1 | Embedding LaTeX Math in AsciiDoc dblatex documents |
---|
2 | ================================================== |
---|
3 | |
---|
4 | You can include LaTeX math equations in AsciiDoc documents that are |
---|
5 | processed by http://dblatex.sourceforge.net/[dblatex]. The AsciiDoc |
---|
6 | 'latexmath' macros and passthrough blocks generate DocBook |
---|
7 | 'inlineequation', 'informalequation' and 'equation' elements |
---|
8 | containing the LaTeX markup which is processed by 'dblatex'. |
---|
9 | |
---|
10 | |
---|
11 | Inline equations |
---|
12 | ---------------- |
---|
13 | This markup: |
---|
14 | |
---|
15 | --------------------------------------------------------------------- |
---|
16 | An inline equation latexmath:[$C = \alpha + \beta Y^{\gamma} + \epsilon$] |
---|
17 | using the 'latexmath' inline macro. |
---|
18 | --------------------------------------------------------------------- |
---|
19 | |
---|
20 | Renders: |
---|
21 | |
---|
22 | An inline equation latexmath:[$C = \alpha + \beta Y^{\gamma} + \epsilon$] |
---|
23 | using the 'latexmath' inline macro. |
---|
24 | |
---|
25 | |
---|
26 | Informal equations |
---|
27 | ------------------ |
---|
28 | Informal (untitled) equations are generated with a 'latexmath' style |
---|
29 | passthrough delimited block. This markup: |
---|
30 | |
---|
31 | --------------------------------------------------------------------- |
---|
32 | [latexmath] |
---|
33 | ++++++++++++++++++++++++++++++++++++++++++++ |
---|
34 | \[C = \alpha + \beta Y^{\gamma} + \epsilon\] |
---|
35 | ++++++++++++++++++++++++++++++++++++++++++++ |
---|
36 | --------------------------------------------------------------------- |
---|
37 | |
---|
38 | Renders: |
---|
39 | |
---|
40 | [latexmath] |
---|
41 | ++++++++++++++++++++++++++++++++++++++++++++ |
---|
42 | \[C = \alpha + \beta Y^{\gamma} + \epsilon\] |
---|
43 | ++++++++++++++++++++++++++++++++++++++++++++ |
---|
44 | |
---|
45 | Functionally identical block macro syntax: |
---|
46 | |
---|
47 | --------------------------------------------------------------------- |
---|
48 | latexmath::[\[C = \alpha + \beta Y^{\gamma} + \epsilon\]] |
---|
49 | --------------------------------------------------------------------- |
---|
50 | |
---|
51 | Renders: |
---|
52 | |
---|
53 | latexmath::[\[C = \alpha + \beta Y^{\gamma} + \epsilon\]] |
---|
54 | |
---|
55 | |
---|
56 | Formal equations |
---|
57 | ---------------- |
---|
58 | Formal equations are titled and are generated with a 'latexmath' style |
---|
59 | passthrough delimited block. |
---|
60 | |
---|
61 | This markup: |
---|
62 | |
---|
63 | --------------------------------------------------------------------- |
---|
64 | .First equation |
---|
65 | [latexmath] |
---|
66 | ++++++++++++++++++++++++++++++++++++++++++++ |
---|
67 | \[C = \alpha + \beta Y^{\gamma} + \epsilon\] |
---|
68 | ++++++++++++++++++++++++++++++++++++++++++++ |
---|
69 | --------------------------------------------------------------------- |
---|
70 | |
---|
71 | Renders: |
---|
72 | |
---|
73 | .First equation |
---|
74 | [latexmath] |
---|
75 | ++++++++++++++++++++++++++++++++++++++++++++ |
---|
76 | \[C = \alpha + \beta Y^{\gamma} + \epsilon\] |
---|
77 | ++++++++++++++++++++++++++++++++++++++++++++ |
---|
78 | |
---|
79 | This markup: |
---|
80 | |
---|
81 | --------------------------------------------------------------------- |
---|
82 | .Matrix |
---|
83 | [latexmath] |
---|
84 | ++++++++++++++++++++++++++++++++++++++++++++ |
---|
85 | \[ P^{e \rightarrow c}= \left[ |
---|
86 | \begin{array}{*{3}{r@{}l}} |
---|
87 | & \cos \theta & & \sin \theta \sin \varphi & & \sin \theta \cos \varphi\\ |
---|
88 | |
---|
89 | & \sin \theta \sin \psi |
---|
90 | & & \cos \varphi \cos \psi - \cos \theta \sin \varphi \sin \psi |
---|
91 | & - & \sin \varphi \cos \psi - \cos \theta \cos \varphi \sin \psi\\ |
---|
92 | |
---|
93 | - & \sin \theta \cos \psi |
---|
94 | & & \cos \varphi \sin \psi + \cos \theta \sin \varphi \cos \psi |
---|
95 | & - & \sin \varphi \sin \psi + \cos \theta \cos \varphi \cos \psi\\ |
---|
96 | \end{array} |
---|
97 | \right] \] |
---|
98 | ++++++++++++++++++++++++++++++++++++++++++++ |
---|
99 | --------------------------------------------------------------------- |
---|
100 | |
---|
101 | Renders: |
---|
102 | |
---|
103 | .Matrix |
---|
104 | [latexmath] |
---|
105 | ++++++++++++++++++++++++++++++++++++++++++++ |
---|
106 | \[ P^{e \rightarrow c}= \left[ |
---|
107 | \begin{array}{*{3}{r@{}l}} |
---|
108 | & \cos \theta & & \sin \theta \sin \varphi & & \sin \theta \cos \varphi\\ |
---|
109 | |
---|
110 | & \sin \theta \sin \psi |
---|
111 | & & \cos \varphi \cos \psi - \cos \theta \sin \varphi \sin \psi |
---|
112 | & - & \sin \varphi \cos \psi - \cos \theta \cos \varphi \sin \psi\\ |
---|
113 | |
---|
114 | - & \sin \theta \cos \psi |
---|
115 | & & \cos \varphi \sin \psi + \cos \theta \sin \varphi \cos \psi |
---|
116 | & - & \sin \varphi \sin \psi + \cos \theta \cos \varphi \cos \psi\\ |
---|
117 | \end{array} |
---|
118 | \right] \] |
---|
119 | ++++++++++++++++++++++++++++++++++++++++++++ |
---|
120 | |
---|
121 | |
---|