File: latex_docbook.xml

package info (click to toggle)
libjlatexmath-java 1.0.7-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,268 kB
  • sloc: xml: 23,113; java: 13,399; makefile: 37; cpp: 30; sh: 10
file content (116 lines) | stat: -rw-r--r-- 4,006 bytes parent folder | download | duplicates (4)
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
<?xml version="1.0" encoding="UTF-8"?>
 <book xml:id="simple_book" xmlns="http://docbook.org/ns/docbook" version="5.0">
   <title>Very simple book with mathematical formulas</title>
   <chapter xml:id="chapter_1">
     <title><latex xmlns="http://forge.scilab.org/p/jlatexmath">\JLaTeXMath</latex></title>
     <para>
       The Java package <latex xmlns="http://forge.scilab.org/p/jlatexmath">\JLaTeXMath</latex> combining with FOP gives the possibility to write <latex xmlns="http://forge.scilab.org/p/jlatexmath">\LaTeX</latex> commands in Docbook. 
     </para>
     <para>
       This example has been written in using the CM Unicode fonts available at http://sourceforge.net/projects/cm-unicode/ .
     </para>
     <para>
       For example :
     </para> 
     <equation>
       <latex align="center" xmlns="http://forge.scilab.org/p/jlatexmath">
	 <![CDATA[
\phi_n(\kappa) = \frac{1}{4\pi^2\kappa^2} \int_0^\infty \frac{\sin(\kappa R)}{\kappa R}  \frac{\partial}{\partial R}\left[ R^2\frac{\partial D_n(R)}{\partial R}\right]\,dR
]]>
       </latex>
     </equation>
     <para>
       We can use an example block :
       <example>
	 <latex xmlns="http://forge.scilab.org/p/jlatexmath">
	   <![CDATA[
\det\begin{bmatrix}
a_{11}&a_{12}&\cdots&a_{1n}\\
a_{21}&\ddots&&\vdots\\
\vdots&&\ddots&\vdots\\
a_{n1}&\cdots&\cdots&a_{nn}
\end{bmatrix}\overset{\mathrm{def}}{=}\sum_{\sigma\in\mathfrak{S}_n}\varepsilon(\sigma)\prod_{k=1}^n a_{k\sigma(k)}
]]>
	 </latex>
       </example>
     </para>
     <para>
       The formulas can be in displaystyle <latex xmlns="http://forge.scilab.org/p/jlatexmath">\sum_{n=1}^{+\infty}\frac1{n^2}=\frac{\pi^2}{6}</latex> or in textstyle <latex style="text" xmlns="http://forge.scilab.org/p/jlatexmath">\sum_{n=1}^{+\infty}\frac1{n^2}=\frac{\pi^2}{6}</latex>.
     </para>

     <para>
       Several centered formulas with gather environment :
     </para>
     <equation>
       <latex align="center" xmlns="http://forge.scilab.org/p/jlatexmath">
	 <![CDATA[     
\begin{gather}
a x + b = 0 \\
a x^2 + b x + c = 0 \\
a x^3 + b x^2 + c x + d = 0
\end{gather}
]]>
       </latex>
     </equation>
     <para>
       Several formulas with flalign environment :
     </para>
     <equation>
       <latex align="center" xmlns="http://forge.scilab.org/p/jlatexmath">
	 <![CDATA[
\begin{flalign}
10xy^2+15x^2y-5xy & =  5\left(2xy^2+3x^2y-xy\right) = \\
   & = 5x\left(2y^2+3xy-y\right) = \\
   & = 5xy\left(2y+3x-1\right)
\end{flalign}
]]>
       </latex>
     </equation>
     <para>
       Several formulas with split environment :
     </para>
     <equation>
       <latex align="center" xmlns="http://forge.scilab.org/p/jlatexmath">
	 <![CDATA[
\begin{split}
10xy^2+15x^2y-5xy & =  5\left(2xy^2+3x^2y-xy\right) = \\
   & = 5x\left(2y^2+3xy-y\right) = \\
   & = 5xy\left(2y+3x-1\right)
\end{split}
]]>
       </latex>
     </equation>
     <para>
       Splitting a long formula on several lines with multline environment :
     </para>
     <equation>
       <latex align="center" xmlns="http://forge.scilab.org/p/jlatexmath">
	 <![CDATA[
\begin{multline}
\left(1+x\right)^n  = 1 + nx + \frac{n\left(n-1\right)}{2!}x^2 +\\
+ \frac{n\left(n-1\right)\left(n-2\right)}{3!}x^3 +\\
+ \frac{n\left(n-1\right)\left(n-2\right)\left(n-3\right)}{4!}x^4 + \dots
\end{multline}
]]>
       </latex>
     </equation>
     <para>
       An array with vertical and horizontal lines and different sizes of font :
     </para>
     <equation>
       <latex align="center" xmlns="http://forge.scilab.org/p/jlatexmath">
	 <![CDATA[
\begin{array}{|c|l|||r|c|}
\hline
\text{Matrix}&\multicolumn{2}{|c|}{\text{Multicolumns}}&\text{Font sizes commands}\cr
\hline
\begin{pmatrix}\alpha_{11}&\cdots&\alpha_{1n}\cr\hdotsfor{3}\cr\alpha_{n1}&\cdots&\alpha_{nn}\end{pmatrix}&\Large \text{Large Right}&\small \text{small Left}&\tiny \text{tiny Tiny}\cr
\hline
\multicolumn{4}{|c|}{\Huge \text{Huge Multicolumns}}\cr
\hline
\end{array}
]]>
       </latex>
     </equation>
   </chapter>
 </book>