asciidoctor-latex 1.5.0.dev → 1.5.0.1.dev
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.adoc +118 -122
- data/data/extras.css +6 -0
- data/{try-out → examples}/README.adoc +8 -4
- data/examples/box.adoc +16 -0
- data/examples/chem.adoc +17 -0
- data/{try-out → examples}/click.adoc +0 -0
- data/{try-out → examples}/code.adoc +0 -0
- data/{try-out → examples}/env.adoc +0 -0
- data/examples/eq-alignment.adoc +5 -0
- data/examples/eq-block.adoc +60 -0
- data/{try-out → examples}/eq-latex.adoc +0 -0
- data/{try-out → examples}/eq-stem.adoc +0 -0
- data/{try-out → examples}/eqno-latex.adoc +0 -0
- data/{try-out → examples}/math_article.adoc +0 -0
- data/{try-out → examples}/pyth-stem.adoc +0 -0
- data/{try-out → examples}/theorem-latex.adoc +0 -0
- data/{try-out → examples}/xref-equations.adoc +2 -1
- data/lib/asciidoctor/latex/click_block.rb +0 -2
- data/lib/asciidoctor/latex/converter.rb +90 -77
- data/lib/asciidoctor/latex/environment_block.rb +44 -26
- data/lib/asciidoctor/latex/prepend_processor.rb +1 -1
- data/lib/asciidoctor/latex/preprocess.rb +0 -8
- data/lib/asciidoctor/latex/tex_preprocessor.rb +2 -2
- data/lib/asciidoctor/latex/version.rb +1 -1
- data/manual.adoc +2 -2
- data/test/examples/adoc/env.adoc +1 -9
- data/test/examples/adoc/eq.adoc +1 -1
- data/test/examples/adoc/zero.adoc +2 -0
- data/test/examples/asciidoc-html/env.adoc +103 -0
- data/test/examples/asciidoc-html/equations.adoc +15 -0
- data/test/examples/tex/env.tex +1 -127
- data/test/examples/tex/eq.tex +2 -125
- data/test/examples/tex/zero.tex +2 -120
- metadata +39 -21
- data/rake/cacert.pem +0 -3894
- data/rake/jdk_helper.rb +0 -105
- data/rake/tar-licence +0 -19
- data/rake/tar.rb +0 -38
- data/test/examples/asciidoc-html/block_open.adoc +0 -17
@@ -0,0 +1,103 @@
|
|
1
|
+
// .env_theorem
|
2
|
+
[env.theorem]
|
3
|
+
--
|
4
|
+
There exist infinitely many prime numbers.
|
5
|
+
--
|
6
|
+
|
7
|
+
// .env_theorem_no_numbers
|
8
|
+
[env.theorem%no_number]
|
9
|
+
--
|
10
|
+
There exist infinitely many prime numbers.
|
11
|
+
--
|
12
|
+
|
13
|
+
// .env_theorem_titled
|
14
|
+
.Euclid
|
15
|
+
[env.theorem]
|
16
|
+
--
|
17
|
+
There exist infinitely many prime numbers.
|
18
|
+
--
|
19
|
+
|
20
|
+
|
21
|
+
// .env_theorem_titled_no_number
|
22
|
+
.Euclid
|
23
|
+
[env.theorem%no_number]
|
24
|
+
--
|
25
|
+
There exist infinitely many prime numbers.
|
26
|
+
--
|
27
|
+
|
28
|
+
|
29
|
+
// .env_equation
|
30
|
+
[env.equation]
|
31
|
+
--
|
32
|
+
a^{p-1} \equiv 1\ \text{mod}\ p
|
33
|
+
--
|
34
|
+
|
35
|
+
// .env_equation_no_number
|
36
|
+
[env.equation%no_number]
|
37
|
+
--
|
38
|
+
a^{p-1} \equiv 1\ \text{mod}\ p
|
39
|
+
--
|
40
|
+
|
41
|
+
// .env_equationalign
|
42
|
+
[env.equationalign]
|
43
|
+
--
|
44
|
+
a &= b + c \\
|
45
|
+
c &= d + e \\
|
46
|
+
a &= b + d + e
|
47
|
+
--
|
48
|
+
|
49
|
+
//.chem
|
50
|
+
This -- chem::[2H2 + O2 -> 2H2O] -- happens a lot.
|
51
|
+
|
52
|
+
//.chem_env
|
53
|
+
Let's smelt some iron!
|
54
|
+
[env.chem#reaction-smelt]
|
55
|
+
--
|
56
|
+
2Fe2O3 + 3C -> 4Fe + 3CO2
|
57
|
+
--
|
58
|
+
|
59
|
+
// .click_comment
|
60
|
+
[click.comment]
|
61
|
+
--
|
62
|
+
It is sometimes useful to "hide" a comment ...
|
63
|
+
--
|
64
|
+
|
65
|
+
//.%external_reference
|
66
|
+
He read an article in http://washingtonpost.com[The Washington Post]
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
//.box
|
71
|
+
[env.box]
|
72
|
+
--
|
73
|
+
Buurem lok medes, nor. Paat for deng zu locnoop.
|
74
|
+
--
|
75
|
+
|
76
|
+
|
77
|
+
//.box_numbered
|
78
|
+
[env.box%numbered]
|
79
|
+
--
|
80
|
+
Buurem lok medes, nor. Paat for deng zu locnoop.
|
81
|
+
--
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
//.box_with_title
|
86
|
+
.Blaar, dem za doop
|
87
|
+
[env.box]
|
88
|
+
--
|
89
|
+
Buurem lok medes, nor. Paat for deng zu locnoop.
|
90
|
+
--
|
91
|
+
|
92
|
+
//.box_numbered_with_title
|
93
|
+
.Blaar, dem za doop
|
94
|
+
[env.box%numbered]
|
95
|
+
--
|
96
|
+
Buurem lok medes, nor. Paat for deng zu locnoop.
|
97
|
+
|
98
|
+
//.jsxgraph
|
99
|
+
[env.jsxgraph, width=200, height=200]
|
100
|
+
--
|
101
|
+
var board = JXG.JSXGraph.initBoard('box',
|
102
|
+
{boundingbox: [-10, 10, 10, -10], axis:true});
|
103
|
+
--
|
data/test/examples/tex/env.tex
CHANGED
@@ -1,132 +1,6 @@
|
|
1
|
-
|
2
|
-
%% A minimal LaTeX preamble
|
3
|
-
|
4
|
-
\documentclass[11pt]{amsart}
|
5
|
-
\usepackage{geometry} % See geometry.pdf to learn the layout options. There are lots.
|
6
|
-
\geometry{letterpaper} % ... or a4paper or a5paper or ...
|
7
|
-
%\geometry{landscape} % Activate for for rotated page geometry
|
8
|
-
%\usepackage[parfill]{parskip} % Activate to begin paragraphs with an empty line rather than an indent
|
9
|
-
\usepackage{graphicx}
|
10
|
-
\usepackage{amssymb}
|
11
|
-
\usepackage{epstopdf}
|
12
|
-
\usepackage{hyperref}
|
13
|
-
\usepackage{color}
|
14
|
-
|
15
|
-
% \usepackage{fontspec}
|
16
|
-
\usepackage{polyglossia}
|
17
|
-
\setmainlanguage{en}
|
18
|
-
|
19
|
-
|
20
|
-
\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
%% Asciidoc TeX Macros %%
|
30
|
-
|
31
|
-
% Needed for Asciidoc
|
32
|
-
|
33
|
-
\newcommand{\admonition}[2]{\textbf{#1}: {#2}}
|
34
|
-
\newcommand{\rolered}[1]{ \textcolor{red}{#1} }
|
35
|
-
|
36
|
-
\newtheorem{theorem}{Theorem}
|
37
|
-
\newtheorem{remark}{Remark}
|
38
|
-
\newtheorem{corollary}{Corollary}
|
39
|
-
\newtheorem{problem}{Problem}
|
40
|
-
\newtheorem{definition}{Definition}
|
41
|
-
\newtheorem{example}{Example}
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
%% User Macros %%
|
47
|
-
%% Macro definitions
|
48
|
-
%% J. Carlson
|
49
|
-
%% 9/26/2014
|
50
|
-
|
51
|
-
|
52
|
-
%% Blackboard Bold
|
53
|
-
\def\AA{\mathbb{A}}
|
54
|
-
\def\BB{\mathbb{B}}
|
55
|
-
\def\CC{\mathbb{C}}
|
56
|
-
\def\DD{\mathbb{D}}
|
57
|
-
\def\EE{\mathbb{E}}
|
58
|
-
\def\FF{\mathbb{F}}
|
59
|
-
\def\NN{\mathbb{N}}
|
60
|
-
\def\OO\mathbb{{O}}
|
61
|
-
\def\PP{\mathbb{P}}
|
62
|
-
\def\QQ{\mathbb{Q}}
|
63
|
-
\def\RR{\mathbb{R}}
|
64
|
-
\def\ZZ{\mathbb{Z}}
|
65
|
-
\def\ffp{\mathfrak{p}}
|
66
|
-
\def\bold#1{\bf #1}
|
67
|
-
|
68
|
-
%% Mathcal
|
69
|
-
\def\EEE{\mathcal{E}}
|
70
|
-
\def\PPP{\mathcal{P}}
|
71
|
-
\def\UUU{\mathcal{U}}
|
72
|
-
\def\CCC{\mathcal{C}}
|
73
|
-
|
74
|
-
%% Arrows, sets, etc.
|
75
|
-
\newcommand{\commadots}{, \ldots, }
|
76
|
-
\newcommand{\set}[1]{ \{\,#1\, \} }
|
77
|
-
\newcommand{\sett}[2]{ \{\,#1\, \mid\, #2\, \} }
|
78
|
-
\newcommand{\Set}[1]{ \Big\{\,#1\, \Big\} }
|
79
|
-
\newcommand{\Sett}[2]{ \Big\{\,#1\, \Big\vert\; #2\, \Big\} }
|
80
|
-
\newcommand{\mapright}[1]{\ \smash{
|
81
|
-
\mathop{\longrightarrow}\limits^{#1}}\ }
|
82
|
-
\newcommand{\vars}[2]{{#1}_1\commadots{#1}_{#2}}
|
83
|
-
\newcommand{\map}{\longrightarrow}
|
84
|
-
|
85
|
-
%% Math operators
|
86
|
-
\def\rank{\mathop{rank}}
|
87
|
-
\def\dim{\mathop{dim}}
|
88
|
-
\def\height{\mathop{height}}
|
89
|
-
|
90
|
-
\def\ord{\mathop{ord}\nolimits}
|
91
|
-
\def\CP{\CC\PP}
|
92
|
-
|
93
|
-
%% Document appearance
|
94
|
-
\parskip8pt
|
95
|
-
\parindent0pt
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
\input newEnvironments.tex
|
101
|
-
%% Front Matter %%
|
102
|
-
|
103
|
-
\title{Env test}
|
104
|
-
\author{}
|
105
|
-
\date{}
|
106
|
-
|
107
|
-
|
108
|
-
%% Begin Document %%
|
109
|
-
|
110
|
-
\begin{document}
|
111
|
-
\maketitle
|
112
|
-
%% Begin Document Text %%
|
113
|
-
\section{Env test}
|
114
|
-
|
1
|
+
%== .env ==%
|
115
2
|
\begin{theorem}
|
116
3
|
The equation \(a^2 + b^2 = c^2\)
|
117
4
|
has infinitely many non-proportional
|
118
5
|
integer solutions.
|
119
6
|
\end{theorem}
|
120
|
-
|
121
|
-
\begin{theorem}
|
122
|
-
The equation \(a^n + b^n = c^n\),
|
123
|
-
for $\(n > 2\), has only trivial
|
124
|
-
integer solutions, where one of
|
125
|
-
the variables is zero.
|
126
|
-
\end{theorem}
|
127
|
-
|
128
|
-
Dummy
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
\end{document}
|
data/test/examples/tex/eq.tex
CHANGED
@@ -1,132 +1,9 @@
|
|
1
|
-
|
2
|
-
%% A minimal LaTeX preamble
|
3
|
-
|
4
|
-
\documentclass[11pt]{amsart}
|
5
|
-
\usepackage{geometry} % See geometry.pdf to learn the layout options. There are lots.
|
6
|
-
\geometry{letterpaper} % ... or a4paper or a5paper or ...
|
7
|
-
%\geometry{landscape} % Activate for for rotated page geometry
|
8
|
-
%\usepackage[parfill]{parskip} % Activate to begin paragraphs with an empty line rather than an indent
|
9
|
-
\usepackage{graphicx}
|
10
|
-
\usepackage{amssymb}
|
11
|
-
\usepackage{epstopdf}
|
12
|
-
\usepackage{hyperref}
|
13
|
-
\usepackage{color}
|
14
|
-
|
15
|
-
% \usepackage{fontspec}
|
16
|
-
\usepackage{polyglossia}
|
17
|
-
\setmainlanguage{en}
|
18
|
-
|
19
|
-
|
20
|
-
\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
%% Asciidoc TeX Macros %%
|
30
|
-
|
31
|
-
% Needed for Asciidoc
|
32
|
-
|
33
|
-
\newcommand{\admonition}[2]{\textbf{#1}: {#2}}
|
34
|
-
\newcommand{\rolered}[1]{ \textcolor{red}{#1} }
|
35
|
-
|
36
|
-
\newtheorem{theorem}{Theorem}
|
37
|
-
\newtheorem{remark}{Remark}
|
38
|
-
\newtheorem{corollary}{Corollary}
|
39
|
-
\newtheorem{problem}{Problem}
|
40
|
-
\newtheorem{definition}{Definition}
|
41
|
-
\newtheorem{example}{Example}
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
%% User Macros %%
|
47
|
-
%% Macro definitions
|
48
|
-
%% J. Carlson
|
49
|
-
%% 9/26/2014
|
50
|
-
|
51
|
-
|
52
|
-
%% Blackboard Bold
|
53
|
-
\def\AA{\mathbb{A}}
|
54
|
-
\def\BB{\mathbb{B}}
|
55
|
-
\def\CC{\mathbb{C}}
|
56
|
-
\def\DD{\mathbb{D}}
|
57
|
-
\def\EE{\mathbb{E}}
|
58
|
-
\def\FF{\mathbb{F}}
|
59
|
-
\def\NN{\mathbb{N}}
|
60
|
-
\def\OO\mathbb{{O}}
|
61
|
-
\def\PP{\mathbb{P}}
|
62
|
-
\def\QQ{\mathbb{Q}}
|
63
|
-
\def\RR{\mathbb{R}}
|
64
|
-
\def\ZZ{\mathbb{Z}}
|
65
|
-
\def\ffp{\mathfrak{p}}
|
66
|
-
\def\bold#1{\bf #1}
|
67
|
-
|
68
|
-
%% Mathcal
|
69
|
-
\def\EEE{\mathcal{E}}
|
70
|
-
\def\PPP{\mathcal{P}}
|
71
|
-
\def\UUU{\mathcal{U}}
|
72
|
-
\def\CCC{\mathcal{C}}
|
73
|
-
|
74
|
-
%% Arrows, sets, etc.
|
75
|
-
\newcommand{\commadots}{, \ldots, }
|
76
|
-
\newcommand{\set}[1]{ \{\,#1\, \} }
|
77
|
-
\newcommand{\sett}[2]{ \{\,#1\, \mid\, #2\, \} }
|
78
|
-
\newcommand{\Set}[1]{ \Big\{\,#1\, \Big\} }
|
79
|
-
\newcommand{\Sett}[2]{ \Big\{\,#1\, \Big\vert\; #2\, \Big\} }
|
80
|
-
\newcommand{\mapright}[1]{\ \smash{
|
81
|
-
\mathop{\longrightarrow}\limits^{#1}}\ }
|
82
|
-
\newcommand{\vars}[2]{{#1}_1\commadots{#1}_{#2}}
|
83
|
-
\newcommand{\map}{\longrightarrow}
|
84
|
-
|
85
|
-
%% Math operators
|
86
|
-
\def\rank{\mathop{rank}}
|
87
|
-
\def\dim{\mathop{dim}}
|
88
|
-
\def\height{\mathop{height}}
|
89
|
-
|
90
|
-
\def\ord{\mathop{ord}\nolimits}
|
91
|
-
\def\CP{\CC\PP}
|
92
|
-
|
93
|
-
%% Document appearance
|
94
|
-
\parskip8pt
|
95
|
-
\parindent0pt
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
\input newEnvironments.tex
|
101
|
-
%% Front Matter %%
|
102
|
-
|
103
|
-
\title{Equation test}
|
104
|
-
\author{}
|
105
|
-
\date{}
|
106
|
-
|
107
|
-
|
108
|
-
%% Begin Document %%
|
109
|
-
|
110
|
-
\begin{document}
|
111
|
-
\maketitle
|
112
|
-
%% Begin Document Text %%
|
113
|
-
\section{Equation test}
|
114
|
-
|
1
|
+
%== .eq ==%
|
115
2
|
The Pythagorean theorem, \(a^2 + b^2 = c^2\),
|
116
3
|
relates the hypotenuse to the altitude
|
117
4
|
and base of a right triangle.
|
118
|
-
|
119
|
-
|
120
5
|
Euler’s formula states that
|
121
6
|
\[
|
122
|
-
|
7
|
+
e^{2\pi \sqrt{-1}} = 1
|
123
8
|
\]
|
124
|
-
|
125
|
-
|
126
9
|
Ain’t that great!
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
\end{document}
|
data/test/examples/tex/zero.tex
CHANGED
@@ -1,121 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
\documentclass[11pt]{amsart}
|
5
|
-
\usepackage{geometry} % See geometry.pdf to learn the layout options. There are lots.
|
6
|
-
\geometry{letterpaper} % ... or a4paper or a5paper or ...
|
7
|
-
%\geometry{landscape} % Activate for for rotated page geometry
|
8
|
-
%\usepackage[parfill]{parskip} % Activate to begin paragraphs with an empty line rather than an indent
|
9
|
-
\usepackage{graphicx}
|
10
|
-
\usepackage{amssymb}
|
11
|
-
\usepackage{epstopdf}
|
12
|
-
\usepackage{hyperref}
|
13
|
-
\usepackage{color}
|
14
|
-
|
15
|
-
% \usepackage{fontspec}
|
16
|
-
\usepackage{polyglossia}
|
17
|
-
\setmainlanguage{en}
|
18
|
-
|
19
|
-
|
20
|
-
\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
%% Asciidoc TeX Macros %%
|
30
|
-
|
31
|
-
% Needed for Asciidoc
|
32
|
-
|
33
|
-
\newcommand{\admonition}[2]{\textbf{#1}: {#2}}
|
34
|
-
\newcommand{\rolered}[1]{ \textcolor{red}{#1} }
|
35
|
-
|
36
|
-
\newtheorem{theorem}{Theorem}
|
37
|
-
\newtheorem{remark}{Remark}
|
38
|
-
\newtheorem{corollary}{Corollary}
|
39
|
-
\newtheorem{problem}{Problem}
|
40
|
-
\newtheorem{definition}{Definition}
|
41
|
-
\newtheorem{example}{Example}
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
%% User Macros %%
|
47
|
-
%% Macro definitions
|
48
|
-
%% J. Carlson
|
49
|
-
%% 9/26/2014
|
50
|
-
|
51
|
-
|
52
|
-
%% Blackboard Bold
|
53
|
-
\def\AA{\mathbb{A}}
|
54
|
-
\def\BB{\mathbb{B}}
|
55
|
-
\def\CC{\mathbb{C}}
|
56
|
-
\def\DD{\mathbb{D}}
|
57
|
-
\def\EE{\mathbb{E}}
|
58
|
-
\def\FF{\mathbb{F}}
|
59
|
-
\def\NN{\mathbb{N}}
|
60
|
-
\def\OO\mathbb{{O}}
|
61
|
-
\def\PP{\mathbb{P}}
|
62
|
-
\def\QQ{\mathbb{Q}}
|
63
|
-
\def\RR{\mathbb{R}}
|
64
|
-
\def\ZZ{\mathbb{Z}}
|
65
|
-
\def\ffp{\mathfrak{p}}
|
66
|
-
\def\bold#1{\bf #1}
|
67
|
-
|
68
|
-
%% Mathcal
|
69
|
-
\def\EEE{\mathcal{E}}
|
70
|
-
\def\PPP{\mathcal{P}}
|
71
|
-
\def\UUU{\mathcal{U}}
|
72
|
-
\def\CCC{\mathcal{C}}
|
73
|
-
|
74
|
-
%% Arrows, sets, etc.
|
75
|
-
\newcommand{\commadots}{, \ldots, }
|
76
|
-
\newcommand{\set}[1]{ \{\,#1\, \} }
|
77
|
-
\newcommand{\sett}[2]{ \{\,#1\, \mid\, #2\, \} }
|
78
|
-
\newcommand{\Set}[1]{ \Big\{\,#1\, \Big\} }
|
79
|
-
\newcommand{\Sett}[2]{ \Big\{\,#1\, \Big\vert\; #2\, \Big\} }
|
80
|
-
\newcommand{\mapright}[1]{\ \smash{
|
81
|
-
\mathop{\longrightarrow}\limits^{#1}}\ }
|
82
|
-
\newcommand{\vars}[2]{{#1}_1\commadots{#1}_{#2}}
|
83
|
-
\newcommand{\map}{\longrightarrow}
|
84
|
-
|
85
|
-
%% Math operators
|
86
|
-
\def\rank{\mathop{rank}}
|
87
|
-
\def\dim{\mathop{dim}}
|
88
|
-
\def\height{\mathop{height}}
|
89
|
-
|
90
|
-
\def\ord{\mathop{ord}\nolimits}
|
91
|
-
\def\CP{\CC\PP}
|
92
|
-
|
93
|
-
%% Document appearance
|
94
|
-
\parskip8pt
|
95
|
-
\parindent0pt
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
\input newEnvironments.tex
|
101
|
-
%% Front Matter %%
|
102
|
-
|
103
|
-
\title{Zero}
|
104
|
-
\author{}
|
105
|
-
\date{}
|
106
|
-
|
107
|
-
|
108
|
-
%% Begin Document %%
|
109
|
-
|
110
|
-
\begin{document}
|
111
|
-
\maketitle
|
112
|
-
%% Begin Document Text %%
|
113
|
-
\section{Zero}
|
114
|
-
|
1
|
+
%== .zero ==%
|
2
|
+
\section*{Zero}
|
115
3
|
This is a test.
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
\end{document}
|