Debian Codegraph @

docs/introduction.xml

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
4 <chapter>
5 <title>Introduction</title>
6
7 <section>
8 <title>What about DB2LaTeX?</title>
9
10 <para><command>Dblatex</command> started as a <ulink
11 url="http://db2latex.sourceforge.net">DB2LaTeX</ulink> clone, but since then
12 many things have changed and new features have been added or (hopefully)
13 improved. Now, the portion of shared code is small if any, and the dblatex
14 purpose is different from DB2LaTeX on these points:</para>
15
16 <itemizedlist>
17 <listitem>
18 <para>The project is end-user oriented, that is, it tries to hide as much as
19 possible the latex compiling stuff by providing a single clean script to
20 produce directly DVI, PostScript and PDF output.</para>
21 </listitem>
22
23 <listitem>
24 <para>The actual output rendering is done not only by the XSL stylesheets
25 transformation, but also by a dedicated LaTeX package. The goal is to allow a
26 deep LaTeX customisation without changing the XSL stylesheets.</para>
27 </listitem>
28
29 <listitem>
30 <para>Post-processing is done by Python, to make publication faster, convert
31 the images if needed, and do the whole compilation.</para>
32 </listitem>
33 </itemizedlist>
34 </section>
35
36 <section>
37 <title>Features</title>
38
39 <para>With <command>dblatex</command> you can:</para>
40
41 <itemizedlist>
42 <listitem>
43 <para>transform a DocBook XML/SGML book or article to pure LaTeX,</para>
44 </listitem>
45
46 <listitem>
47 <para>compile the temporary LaTeX file with <command>latex</command>,
48 <command>pdflatex</command>, or <command>xelatex</command> to produce DVI,
49 PostScript and PDF files,</para>
50 </listitem>
51
52 <listitem>
53 <para>publish a set of books,</para>
54 </listitem>
55
56 <listitem>
57 <para>convert on the fly the figures included in the document,</para>
58 </listitem>
59
60 <listitem>
61 <para>have cross references with hot links,</para>
62 </listitem>
63
64 <listitem>
65 <para>olink to other documents built with <command>dblatex</command>,</para>
66 </listitem>
67
68 <listitem>
69 <para>write complex tables,</para>
70 </listitem>
71
72 <listitem>
73 <para>write several bibliographies,</para>
74 </listitem>
75
76 <listitem>
77 <para>reuse BibTeX bibliographies,</para>
78 </listitem>
79
80 <listitem>
81 <para>use callouts on program listings or on images,</para>
82 </listitem>
83
84 <listitem>
85 <para>create an index with <command>makeindex</command> or <command>xindy</command>,</para>
86 </listitem>
87
88 <listitem>
89 <para>write mathematical equations in LaTeX,</para>
90 </listitem>
91
92 <listitem>
93 <para>write mathematical equations in MathML,</para>
94 </listitem>
95
96 <listitem>
97 <para>have revision bars,</para>
98 </listitem>
99
100 <listitem>
101 <para>customise the output rendering with an XSL configuration file,</para>
102 </listitem>
103
104 <listitem>
105 <para>use your own LaTeX style package.</para>
106 </listitem>
107 </itemizedlist>
108 </section>
109
110 <section>
111 <title>Version</title>
112
113 <para>This manual is for dblatex version <xi:include href="version.xml"
114 xmlns:xi="http://www.w3.org/2001/XInclude"/>.</para>
115 </section>
116
117 <section id="sec-changelog">
118 <title>Change History</title>
119
120 <para>See the <olink output="pdf" targetdoc="releasenotes"
121 targetptr="intro">Release Notes</olink><ulink output="html"
122 url="../release-notes/index.html">Release Notes</ulink> to have the dblatex
123 change history.</para>
124 </section>
125
126 <section>
127 <title>Publishing Principles</title>
128
129 <para>Dblatex transforms a DocBook XML/SGML document to LaTeX. Once
130 transformed into LaTeX, standard LaTeX tools are used to produce DVI,
131 Postcript or PDF files.</para>
132
133 <para><xref linkend="fig-processus" /> explains the process applied. It shows
134 the tools used and the steps. The emphasized tools are provided by the
135 package.</para>
136
137 <figure float="0" id="fig-processus">
138 <title>Transforming Process</title>
139
140 <mediaobject>
141 <imageobject>
142 <imagedata output="pdf" align="center" fileref="processus" width="60%" />
143 <imagedata output="html" align="center" fileref="processus.svg" width="60%" />
144 </imageobject>
145 </mediaobject>
146 </figure>
147
148 <section id="sec-process">
149 <title>Backend Drivers</title>
150
151 <para>The main script supports the following LaTeX backend drivers:</para>
152
153 <variablelist>
154 <varlistentry>
155 <term>dvips</term>
156
157 <listitem>
158 <para>The driver calls <command>latex</command>, and produces DVI, Postscript
159 and at the end PDF files. Latex natively accepts only EPS graphics. The
160 drawback is that converting to PDF can take a while.</para>
161 </listitem>
162 </varlistentry>
163
164 <varlistentry>
165 <term>pdftex</term>
166
167 <listitem>
168 <para>The driver calls <command>pdflatex</command>, to directly produce PDF
169 files. The conversion is fast, the file size is smaller. Pdflatex natively
170 accepts PDF, PNG, JPEG, and TIFF graphics.</para>
171 </listitem>
172 </varlistentry>
173
174 <varlistentry>
175 <term>xetex</term>
176
177 <listitem>
178 <para>The driver calls <command>xelatex</command>, to directly produce PDF
179 files through the <ulink url="http://scripts.sil.org/xetex">XeTeX</ulink>
180 engine. This engine natively supports UTF-8 which improves multilingual
181 support.</para>
182 </listitem>
183 </varlistentry>
184 </variablelist>
185 </section>
186
187 <section id="sec-stylesheets">
188 <title>XSL Stylesheets</title>
189
190 <para>The XSL stylesheets located under <filename>xsl/</filename> are used to
191 transform from XML to “raw” LaTeX. The main file is
192 <filename>latex_book_fast.xsl</filename>, that includes the other stylesheets
193 of the directory.</para>
194 </section>
195
196 <section id="sec-perl-process">
197 <title>Python Post Processing</title>
198
199 <para>Actually the XSL stylesheets does not produce valid LaTeX. The reason is
200 that some DocBook processing is too complex or too time-consuming for XSL
201 transforming. Besides, some extra actions need sometimes to be done such like
202 figure conversion. Here are the main actions done by Python Post
203 processing:</para>
204
205 <itemizedlist>
206 <listitem>
207 <para>Transform the entities to valid LaTeX characters (e.g. &amp;nbsp; is
208 transformed to '~'). Python is suited and performant for this task.</para>
209 </listitem>
210
211 <listitem>
212 <para>Convert the figures to be compatible with the backend driver. See <xref
213 linkend="sec-figinclude" /> for more detail.</para>
214 </listitem>
215
216 <listitem>
217 <para>Force some hyphenation in tables or for typed words.</para>
218 </listitem>
219
220 <listitem>
221 <para>Do the whole LaTeX compilation sequence thanks to the <ulink
222 url="http://www.pps.jussieu.fr/~beffara/soft/rubber">rubber</ulink>
223 compilation engine.</para>
224 </listitem>
225 </itemizedlist>
226 </section>
227
228 <section>
229 <title>LaTeX Style Package</title>
230
231 <para>Once valid LaTeX is available, the LaTeX style package (docbook.sty)
232 under <filename>latex/style/</filename> is used to customize the output
233 rendering. It includes the other files of the directory. You can also provide
234 your own LaTeX style (cf. <xref linkend="sec-custom" />).</para>
235 </section>
236 </section>
237 </chapter>