stydebug.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
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
<section id="sec-debug"><title>Debugging your Style</title>
<para>It is not surprising if your first dblatex compilation fails with a fresh
LaTeX style. So, how to debug it when used with dblatex?</para>
<para>The following steps can help you:</para>
<procedure>
<step><para>Compile your file in the debug mode (option <option>-d</option>).
When the compilation is done, the temporary working directory will not be
removed.
<programlisting><![CDATA[
$ dblatex --texstyle=./mystyle.sty -d file.xml
...
/tmp/tpub-ben-99629 is not removed
]]></programlisting>
</para>
</step>
<step><para>Go under the building temporary directory, and set the environment
with the file <filename>env_tex</filename>.
<programlisting><![CDATA[
$ cd /tmp/tpub-ben-99629
$ . env_tex
]]></programlisting>
</para>
</step>
<step><para>Compile the temporary latex file produced by the XSL stylesheets. Its
name has the suffix "_tmp.tex".
<programlisting><![CDATA[
$ pdflatex file_tmp.tex
$ [ many outputs here ]
]]></programlisting>
</para>
</step>
<step><para>Now latex stops when it encounters an error so that you can debug
your stylesheet.
</para>
</step>
</procedure>
</section>