| 1 |
<?xml version="1.0" encoding="iso-8859-1"?> |
| 2 |
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" |
| 3 |
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> |
| 4 |
<section id="sec-debug"><title>Debugging your Style</title> |
| 5 |
<para>It is not surprising if your first dblatex compilation fails with a fresh |
| 6 |
LaTeX style. So, how to debug it when used with dblatex?</para> |
| 7 |
<para>The following steps can help you:</para> |
| 8 |
<procedure> |
| 9 |
<step><para>Compile your file in the debug mode (option <option>-d</option>). |
| 10 |
When the compilation is done, the temporary working directory will not be |
| 11 |
removed. |
| 12 |
<programlisting><![CDATA[ |
| 13 |
$ dblatex --texstyle=./mystyle.sty -d file.xml |
| 14 |
... |
| 15 |
/tmp/tpub-ben-99629 is not removed |
| 16 |
]]></programlisting> |
| 17 |
</para> |
| 18 |
</step> |
| 19 |
<step><para>Go under the building temporary directory, and set the environment |
| 20 |
with the file <filename>env_tex</filename>. |
| 21 |
<programlisting><![CDATA[ |
| 22 |
$ cd /tmp/tpub-ben-99629 |
| 23 |
$ . env_tex |
| 24 |
]]></programlisting> |
| 25 |
</para> |
| 26 |
</step> |
| 27 |
<step><para>Compile the temporary latex file produced by the XSL stylesheets. Its |
| 28 |
name has the suffix "_tmp.tex". |
| 29 |
<programlisting><![CDATA[ |
| 30 |
$ pdflatex file_tmp.tex |
| 31 |
$ [ many outputs here ] |
| 32 |
]]></programlisting> |
| 33 |
</para> |
| 34 |
</step> |
| 35 |
<step><para>Now latex stops when it encounters an error so that you can debug |
| 36 |
your stylesheet. |
| 37 |
</para> |
| 38 |
</step> |
| 39 |
</procedure> |
| 40 |
</section> |