summaryrefslogtreecommitdiffstats
path: root/source-builder/sb/asciidoc/doc/latexmath.txt
blob: 6f043216c3a3f5dffb8ca157f88c92f53f72dae4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
Embedding LaTeX Math in AsciiDoc dblatex documents
==================================================

You can include LaTeX math equations in AsciiDoc documents that are
processed by http://dblatex.sourceforge.net/[dblatex]. The AsciiDoc
'latexmath' macros and passthrough blocks generate DocBook
'inlineequation', 'informalequation' and 'equation' elements
containing the LaTeX markup which is processed by 'dblatex'.


Inline equations
----------------
This markup:

---------------------------------------------------------------------
An inline equation latexmath:[$C = \alpha + \beta Y^{\gamma} + \epsilon$]
using the 'latexmath' inline macro.
---------------------------------------------------------------------

Renders:

An inline equation latexmath:[$C = \alpha + \beta Y^{\gamma} + \epsilon$]
using the 'latexmath' inline macro.


Informal equations
------------------
Informal (untitled) equations are generated with a 'latexmath' style
passthrough delimited block. This markup:

---------------------------------------------------------------------
[latexmath]
++++++++++++++++++++++++++++++++++++++++++++
\[C = \alpha + \beta Y^{\gamma} + \epsilon\]
++++++++++++++++++++++++++++++++++++++++++++
---------------------------------------------------------------------

Renders:

[latexmath]
++++++++++++++++++++++++++++++++++++++++++++
\[C = \alpha + \beta Y^{\gamma} + \epsilon\]
++++++++++++++++++++++++++++++++++++++++++++

Functionally identical block macro syntax:

---------------------------------------------------------------------
latexmath::[\[C = \alpha + \beta Y^{\gamma} + \epsilon\]]
---------------------------------------------------------------------

Renders:

latexmath::[\[C = \alpha + \beta Y^{\gamma} + \epsilon\]]


Formal equations
----------------
Formal equations are titled and are generated with a 'latexmath' style
passthrough delimited block.

This markup:

---------------------------------------------------------------------
.First equation
[latexmath]
++++++++++++++++++++++++++++++++++++++++++++
\[C = \alpha + \beta Y^{\gamma} + \epsilon\]
++++++++++++++++++++++++++++++++++++++++++++
---------------------------------------------------------------------

Renders:

.First equation
[latexmath]
++++++++++++++++++++++++++++++++++++++++++++
\[C = \alpha + \beta Y^{\gamma} + \epsilon\]
++++++++++++++++++++++++++++++++++++++++++++

This markup:

---------------------------------------------------------------------
.Matrix
[latexmath]
++++++++++++++++++++++++++++++++++++++++++++
\[ P^{e \rightarrow c}= \left[
  \begin{array}{*{3}{r@{}l}}
  & \cos \theta & & \sin \theta \sin \varphi & & \sin \theta \cos \varphi\\

  & \sin \theta \sin \psi
  & & \cos \varphi \cos \psi - \cos \theta \sin \varphi \sin \psi
  & - & \sin \varphi \cos \psi - \cos \theta \cos \varphi \sin \psi\\

  - & \sin \theta \cos \psi
  & & \cos \varphi \sin \psi + \cos \theta \sin \varphi \cos \psi
  & - & \sin \varphi \sin \psi + \cos \theta \cos \varphi \cos \psi\\
  \end{array}
\right] \]
++++++++++++++++++++++++++++++++++++++++++++
---------------------------------------------------------------------

Renders:

.Matrix
[latexmath]
++++++++++++++++++++++++++++++++++++++++++++
\[ P^{e \rightarrow c}= \left[
  \begin{array}{*{3}{r@{}l}}
  & \cos \theta & & \sin \theta \sin \varphi & & \sin \theta \cos \varphi\\

  & \sin \theta \sin \psi
  & & \cos \varphi \cos \psi - \cos \theta \sin \varphi \sin \psi
  & - & \sin \varphi \cos \psi - \cos \theta \cos \varphi \sin \psi\\

  - & \sin \theta \cos \psi
  & & \cos \varphi \sin \psi + \cos \theta \sin \varphi \cos \psi
  & - & \sin \varphi \sin \psi + \cos \theta \cos \varphi \cos \psi\\
  \end{array}
\right] \]
++++++++++++++++++++++++++++++++++++++++++++