introduction.xml

  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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
<chapter>
<title>Introduction</title>

<section>
<title>What about DB2LaTeX?</title>

<para><command>Dblatex</command> started as a <ulink
url="http://db2latex.sourceforge.net">DB2LaTeX</ulink> clone, but since then
many things have changed and new features have been added or (hopefully)
improved. Now, the portion of shared code is small if any, and the dblatex
purpose is different from DB2LaTeX on these points:</para>

<itemizedlist>
<listitem>
<para>The project is end-user oriented, that is, it tries to hide as much as
possible the latex compiling stuff by providing a single clean script to
produce directly DVI, PostScript and PDF output.</para>
</listitem>

<listitem>
<para>The actual output rendering is done not only by the XSL stylesheets
transformation, but also by a dedicated LaTeX package. The goal is to allow a
deep LaTeX customisation without changing the XSL stylesheets.</para>
</listitem>

<listitem>
<para>Post-processing is done by Python, to make publication faster, convert
the images if needed, and do the whole compilation.</para>
</listitem>
</itemizedlist>
</section>

<section>
<title>Features</title>

<para>With <command>dblatex</command> you can:</para>

<itemizedlist>
<listitem>
<para>transform a DocBook XML/SGML book or article to pure LaTeX,</para>
</listitem>

<listitem>
<para>compile the temporary LaTeX file with <command>latex</command>,
<command>pdflatex</command>, or <command>xelatex</command> to produce DVI,
PostScript and PDF files,</para>
</listitem>

<listitem>
<para>publish a set of books,</para>
</listitem>

<listitem>
<para>convert on the fly the figures included in the document,</para>
</listitem>

<listitem>
<para>have cross references with hot links,</para>
</listitem>

<listitem>
<para>olink to other documents built with <command>dblatex</command>,</para>
</listitem>

<listitem>
<para>write complex tables,</para>
</listitem>

<listitem>
<para>write several bibliographies,</para>
</listitem>

<listitem>
<para>reuse BibTeX bibliographies,</para>
</listitem>

<listitem>
<para>use callouts on program listings or on images,</para>
</listitem>

<listitem>
<para>create an index with <command>makeindex</command> or <command>xindy</command>,</para>
</listitem>

<listitem>
<para>write mathematical equations in LaTeX,</para>
</listitem>

<listitem>
<para>write mathematical equations in MathML,</para>
</listitem>

<listitem>
<para>have revision bars,</para>
</listitem>

<listitem>
<para>customise the output rendering with an XSL configuration file,</para>
</listitem>

<listitem>
<para>use your own LaTeX style package.</para>
</listitem>
</itemizedlist>
</section>

<section>
<title>Version</title>

<para>This manual is for dblatex version <xi:include href="version.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"/>.</para>
</section>

<section id="sec-changelog">
<title>Change History</title>

<para>See the <olink output="pdf" targetdoc="releasenotes"
targetptr="intro">Release Notes</olink><ulink output="html"
url="../release-notes/index.html">Release Notes</ulink> to have the dblatex
change history.</para>
</section>

<section>
<title>Publishing Principles</title>

<para>Dblatex transforms a DocBook XML/SGML document to LaTeX. Once
transformed into LaTeX, standard LaTeX tools are used to produce DVI,
Postcript or PDF files.</para>

<para><xref linkend="fig-processus" /> explains the process applied. It shows
the tools used and the steps. The emphasized tools are provided by the
package.</para>

<figure float="0" id="fig-processus">
<title>Transforming Process</title>

<mediaobject>
<imageobject>
<imagedata align="center" fileref="processus" width="60%" />
</imageobject>
</mediaobject>
</figure>

<section id="sec-process">
<title>Backend Drivers</title>

<para>The main script supports the following LaTeX backend drivers:</para>

<variablelist>
<varlistentry>
<term>dvips</term>

<listitem>
<para>The driver calls <command>latex</command>, and produces DVI, Postscript
and at the end PDF files. Latex natively accepts only EPS graphics. The
drawback is that converting to PDF can take a while.</para>
</listitem>
</varlistentry>

<varlistentry>
<term>pdftex</term>

<listitem>
<para>The driver calls <command>pdflatex</command>, to directly produce PDF
files. The conversion is fast, the file size is smaller. Pdflatex natively
accepts PDF, PNG, JPEG, and TIFF graphics.</para>
</listitem>
</varlistentry>

<varlistentry>
<term>xetex</term>

<listitem>
<para>The driver calls <command>xelatex</command>, to directly produce PDF
files through the <ulink url="http://scripts.sil.org/xetex">XeTeX</ulink>
engine. This engine natively supports UTF-8 which improves multilingual
support.</para>
</listitem>
</varlistentry>
</variablelist>
</section>

<section id="sec-stylesheets">
<title>XSL Stylesheets</title>

<para>The XSL stylesheets located under <filename>xsl/</filename> are used to
transform from XML to “raw” LaTeX. The main file is
<filename>latex_book_fast.xsl</filename>, that includes the other stylesheets
of the directory.</para>
</section>

<section id="sec-perl-process">
<title>Python Post Processing</title>

<para>Actually the XSL stylesheets does not produce valid LaTeX. The reason is
that some DocBook processing is too complex or too time-consuming for XSL
transforming. Besides, some extra actions need sometimes to be done such like
figure conversion. Here are the main actions done by Python Post
processing:</para>

<itemizedlist>
<listitem>
<para>Transform the entities to valid LaTeX characters (e.g. &amp;nbsp; is
transformed to '~'). Python is suited and performant for this task.</para>
</listitem>

<listitem>
<para>Convert the figures to be compatible with the backend driver. See <xref
linkend="sec-figinclude" /> for more detail.</para>
</listitem>

<listitem>
<para>Force some hyphenation in tables or for typed words.</para>
</listitem>

<listitem>
<para>Do the whole LaTeX compilation sequence thanks to the <ulink
url="http://www.pps.jussieu.fr/~beffara/soft/rubber">rubber</ulink>
compilation engine.</para>
</listitem>
</itemizedlist>
</section>

<section>
<title>LaTeX Style Package</title>

<para>Once valid LaTeX is available, the LaTeX style package (docbook.sty)
under <filename>latex/style/</filename> is used to customize the output
rendering. It includes the other files of the directory. You can also provide
your own LaTeX style (cf. <xref linkend="sec-custom" />).</para>
</section>
</section>
</chapter>