| 1 |
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| 2 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>dblatex</title><link rel="stylesheet" type="text/css" href="manual.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /><link rel="home" href="index.html" title="DocBook to LaTeX Publishing" /><link rel="up" href="ch03.html#idp409" title="Reference" /><link rel="prev" href="ch03.html#idp409" title="Reference" /><link rel="next" href="sec-style.html" title="Output Formatting Style" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">dblatex</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch03.html#idp409">Prev</a> </td><th width="60%" align="center">Reference</th><td width="20%" align="right"> <a accesskey="n" href="sec-style.html">Next</a></td></tr></table><hr /></div><div class="refentry"><a id="ref-dblatex"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">dblatex</span></h2><p>dblatex — |
| 3 |
convert <span class="application">DocBook</span> to |
| 4 |
<span class="application">LaTeX</span>, <span class="application">DVI</span>, |
| 5 |
<span class="application">PostScript</span>, and <span class="application">PDF</span> |
| 6 |
</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">dblatex</code> [<code class="option">options</code>] {<em class="replaceable"><code>file</code></em> | -} </p></div></div><div class="refsection"><a id="idp468"></a><h2>Description</h2><p> |
| 7 |
<span class="command"><strong>dblatex</strong></span> is a program that transforms your |
| 8 |
<span class="application">SGML</span>/<span class="application">XML</span> |
| 9 |
<span class="application">DocBook</span> documents to |
| 10 |
<span class="application">DVI</span>, <span class="application">PostScript</span> or |
| 11 |
<span class="application">PDF</span> by translating them into pure |
| 12 |
<span class="application">LaTeX</span> as a first process. |
| 13 |
<span class="application">MathML 2.0</span> markups are supported, too. |
| 14 |
|
| 15 |
</p></div><div class="refsection"><a id="idp480"></a><h2>Options</h2><p> |
| 16 |
A summary of options is included below. |
| 17 |
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span></dt><dd>Show a help message and exit.</dd><dt><span class="term"><code class="option">-b <em class="replaceable"><code>backend</code></em></code>, </span><span class="term"> |
| 18 |
<code class="option">--backend=<em class="replaceable"><code>backend</code></em></code> |
| 19 |
</span></dt><dd> |
| 20 |
Backend driver to use: <em class="parameter"><code>pdftex</code></em> (default), |
| 21 |
<em class="parameter"><code>dvips</code></em>, or <em class="parameter"><code>xetex</code></em>. |
| 22 |
<span class="phrase"> |
| 23 |
See also <a class="xref" href="ch01s05.html#sec-process" title="Backend Drivers">the section called “Backend Drivers”</a>.</span> |
| 24 |
</dd><dt><span class="term"><code class="option">-B</code>, </span><span class="term"><code class="option">--no-batch</code></span></dt><dd>All the tex output is printed.</dd><dt><span class="term"><code class="option">-c <em class="replaceable"><code>config</code></em></code>, </span><span class="term"><code class="option">-S <em class="replaceable"><code>config</code></em></code>, </span><span class="term"><code class="option">--config=<em class="replaceable"><code>config</code></em></code></span></dt><dd>Configuration file. A configuration file can be used to group |
| 25 |
all the options and customizations to apply. <span class="phrase">See |
| 26 |
<a class="xref" href="sec-specs.html" title="Dblatex Configuration File">the section called “Dblatex Configuration File”</a>.</span> |
| 27 |
</dd><dt><span class="term"><code class="option">-d</code>, </span><span class="term"><code class="option">--debug</code></span></dt><dd> |
| 28 |
Debug mode: Keep the temporary directory in which dblatex actually |
| 29 |
works. <span class="phrase"><a class="xref" href="sec-custom-latex.html#sec-debug" title="Debugging your Style">the section called “Debugging your Style”</a> explains how |
| 30 |
you can use it.</span> |
| 31 |
</dd><dt><span class="term"><code class="option">-D</code>, </span><span class="term"><code class="option">--dump</code></span></dt><dd> |
| 32 |
Dump the error stack when an error occurs (debug purpose). |
| 33 |
</dd><dt><span class="term"><code class="option">-e <em class="replaceable"><code>indexstyle</code></em></code>, </span><span class="term"><code class="option">--indexstyle <em class="replaceable"><code>indexstyle</code></em></code></span></dt><dd> |
| 34 |
Index style file to pass to <span class="command"><strong>makeindex</strong></span> instead of |
| 35 |
the dblatex default index style. |
| 36 |
</dd><dt><span class="term"><code class="option">-f <em class="replaceable"><code>figure_format</code></em></code>, </span><span class="term"> |
| 37 |
<code class="option">--fig-format=<em class="replaceable"><code>figure_format</code></em></code> |
| 38 |
</span></dt><dd> |
| 39 |
Input figure format: <em class="parameter"><code>fig</code></em>, |
| 40 |
<em class="parameter"><code>eps</code></em>. Used when not deduced from figure file |
| 41 |
extension. <span class="phrase">See also |
| 42 |
<a class="xref" href="sec-figinclude.html#sec-figconv" title="Converting on the fly">the section called “ |
| 43 |
Converting on the fly |
| 44 |
”</a>.</span> |
| 45 |
</dd><dt><span class="term"><code class="option">-F <em class="replaceable"><code>input_format</code></em></code>, </span><span class="term"> |
| 46 |
<code class="option">--input-format=<em class="replaceable"><code>input_format</code></em></code> |
| 47 |
</span></dt><dd> |
| 48 |
Input file format: <em class="parameter"><code>sgml</code></em>, |
| 49 |
<em class="parameter"><code>xml</code></em> (default). |
| 50 |
</dd><dt><span class="term"><code class="option">-i <em class="replaceable"><code>texinputs</code></em></code>, </span><span class="term"> |
| 51 |
<code class="option">--texinputs <em class="replaceable"><code>texinputs</code></em></code> |
| 52 |
</span></dt><dd>Path added to <code class="envar">TEXINPUTS</code></dd><dt><span class="term"><code class="option">-I <em class="replaceable"><code>figure_path</code></em></code>, </span><span class="term"> |
| 53 |
<code class="option">--fig-path=<em class="replaceable"><code>figure_path</code></em></code> |
| 54 |
</span></dt><dd>Additional lookup path of the figures. <span class="phrase">See <a class="xref" href="sec-figinclude.html#sec-lookup" title="Paths Lookup">the section called “ |
| 55 |
Paths Lookup |
| 56 |
”</a>.</span></dd><dt><span class="term"><code class="option">-l <em class="replaceable"><code>bst_path</code></em></code>, </span><span class="term"> |
| 57 |
<code class="option">--bst-path=<em class="replaceable"><code>bst_path</code></em></code> |
| 58 |
</span></dt><dd>Additional lookup path of the BibTeX styles. <span class="phrase">See <a class="xref" href="ch03s14.html#sec-bibtex" title="Using BibTeX Databases">the section called “Using BibTeX Databases”</a>.</span></dd><dt><span class="term"><code class="option">-L <em class="replaceable"><code>bib_path</code></em></code>, </span><span class="term"> |
| 59 |
<code class="option">--bib-path=<em class="replaceable"><code>bib_path</code></em></code> |
| 60 |
</span></dt><dd>Additional lookup path of the BibTeX databases. <span class="phrase">See <a class="xref" href="ch03s14.html#sec-bibtex" title="Using BibTeX Databases">the section called “Using BibTeX Databases”</a>.</span></dd><dt><span class="term"><code class="option">-m <em class="replaceable"><code>xslt</code></em></code>, </span><span class="term"> |
| 61 |
<code class="option">--xslt=<em class="replaceable"><code>xslt</code></em></code> |
| 62 |
</span></dt><dd>XSLT engine to use. The available engines are: |
| 63 |
xsltproc (default), 4xslt, saxon.</dd><dt><span class="term"><code class="option">-o <em class="replaceable"><code>output</code></em></code>, </span><span class="term"><code class="option">--output=<em class="replaceable"><code>output</code></em></code></span></dt><dd> |
| 64 |
Output filename. When not specified, the input filename is used, with |
| 65 |
the suffix of the output format. The option is ignored if several |
| 66 |
books are chunked from a set. In this case the <code class="option">-O</code> |
| 67 |
option is applied instead. |
| 68 |
</dd><dt><span class="term"><code class="option">-O <em class="replaceable"><code>output_dir</code></em></code>, </span><span class="term"><code class="option">--output-dir=<em class="replaceable"><code>output_dir</code></em></code></span></dt><dd> |
| 69 |
Output directory of the books built from a set. When not specified, |
| 70 |
the current working directory is used instead. The option is ignored |
| 71 |
if a single document is outputed, and the <code class="option">-o</code> is |
| 72 |
taken into account. |
| 73 |
</dd><dt><span class="term"><code class="option">-p <em class="replaceable"><code>xsl_user</code></em></code>, </span><span class="term"> |
| 74 |
<code class="option">--xsl-user=<em class="replaceable"><code>xsl_user</code></em></code> |
| 75 |
</span></dt><dd> |
| 76 |
An <span class="application">XSL</span> user stylesheet to use. Several |
| 77 |
user stylesheets can be specified, but the option order is meaningful: a user stylesheet takes precedence over previously defined user stylesheets. |
| 78 |
<span class="phrase">See <a class="xref" href="sec-custom.html#sec-param" title="Using XSL Parameters">the section called “Using XSL Parameters”</a>.</span> |
| 79 |
</dd><dt><span class="term"><code class="option">-P <em class="replaceable"><code>param</code></em>=<em class="replaceable"><code>value</code></em></code> |
| 80 |
, </span><span class="term"> |
| 81 |
<code class="option">--param=<em class="replaceable"><code>param</code></em>=<em class="replaceable"><code>value</code></em></code> |
| 82 |
</span></dt><dd> |
| 83 |
Set an <span class="application">XSL</span> parameter from command line. |
| 84 |
<span class="phrase">See <a class="xref" href="sec-param-value.html" title="Setting Command line Parameters">the section called “Setting Command line Parameters”</a>.</span> |
| 85 |
</dd><dt><span class="term"><code class="option">-q</code>, </span><span class="term"><code class="option">--quiet</code></span></dt><dd> |
| 86 |
Less verbose, showing only TeX output messages and error messages. |
| 87 |
</dd><dt><span class="term"><code class="option">-r [<span class="optional">plugin:</span>]<em class="replaceable"><code>script</code></em></code>, </span><span class="term"> |
| 88 |
<code class="option">--texpost=[<span class="optional">plugin:</span>]<em class="replaceable"><code>script</code></em></code> |
| 89 |
</span></dt><dd> |
| 90 |
Script called at the very end of the tex compilation. Its role is to |
| 91 |
modify the tex file or one of the compilation files before the last |
| 92 |
round. The <em class="replaceable"><code>script</code></em> can be a python plugin. |
| 93 |
In this case add the prefix term '<code class="literal">plugin:</code>'. |
| 94 |
<span class="phrase">See <a class="xref" href="sec-texpost.html" title="Latex post process script">the section called “Latex post process script”</a>.</span> |
| 95 |
</dd><dt><span class="term"><code class="option">-s <em class="replaceable"><code>latex_style</code></em></code>, </span><span class="term"> |
| 96 |
<code class="option">--texstyle=<em class="replaceable"><code>latex_style</code></em></code> |
| 97 |
</span></dt><dd> |
| 98 |
Latex style to apply. It can be a package name, or directly a latex |
| 99 |
package path. A package name must be without a directory |
| 100 |
path and without the '.sty' extension. On the contrary, |
| 101 |
a full latex package path can contain a directory path, but must ends with |
| 102 |
the '.sty' extension. |
| 103 |
<span class="phrase">See <a class="xref" href="sec-custom-latex.html" title="Customized LaTeX style">the section called “Customized LaTeX style”</a>.</span> |
| 104 |
</dd><dt><span class="term"><code class="option">-t <em class="replaceable"><code>format</code></em></code>, </span><span class="term"><code class="option">--type=<em class="replaceable"><code>format</code></em></code></span></dt><dd> |
| 105 |
Output format. Available formats: <em class="parameter"><code>tex</code></em>, |
| 106 |
<em class="parameter"><code>dvi</code></em>, <em class="parameter"><code>ps</code></em>, |
| 107 |
<em class="parameter"><code>pdf</code></em> (default). |
| 108 |
</dd><dt><span class="term"><code class="option">--dvi</code></span></dt><dd>DVI output. Equivalent to <code class="option">-tdvi</code>.</dd><dt><span class="term"><code class="option">--pdf</code></span></dt><dd>PDF output. Equivalent to <code class="option">-tpdf</code>.</dd><dt><span class="term"><code class="option">--ps</code></span></dt><dd> |
| 109 |
PostScript output. Equivalent to <code class="option">-tps</code>. |
| 110 |
</dd><dt><span class="term"><code class="option">-T <em class="replaceable"><code>style</code></em></code>, </span><span class="term"><code class="option">--style=<em class="replaceable"><code>style</code></em></code></span></dt><dd> |
| 111 |
Output style, predefined are: <em class="parameter"><code>db2latex</code></em>, |
| 112 |
<em class="parameter"><code>simple</code></em>, <em class="parameter"><code>native</code></em> |
| 113 |
(default). <span class="phrase">See <a class="xref" href="sec-style.html" title="Output Formatting Style">the section called “Output Formatting Style”</a>. |
| 114 |
</span> |
| 115 |
</dd><dt><span class="term"><code class="option">-v</code>, </span><span class="term"><code class="option">--version</code></span></dt><dd>Display the dblatex version.</dd><dt><span class="term"><code class="option">-V</code>, </span><span class="term"><code class="option">--verbose</code></span></dt><dd>Verbose mode, showing the running commands</dd><dt><span class="term"><code class="option">-x <em class="replaceable"><code>xslt_options</code></em></code>, </span><span class="term"> |
| 116 |
<code class="option">--xslt-opts=<em class="replaceable"><code>xslt_options</code></em></code> |
| 117 |
</span></dt><dd> |
| 118 |
Arguments directly passed to the <span class="application">XSLT |
| 119 |
engine</span> |
| 120 |
</dd><dt><span class="term"><code class="option">-X</code>, </span><span class="term"><code class="option">--no-external</code></span></dt><dd> |
| 121 |
Disable the external text file support. This support is needed for |
| 122 |
callouts on external files referenced by <code class="sgmltag-element">textdata</code> |
| 123 |
or <code class="sgmltag-element">imagedata</code>, but it can be disabled if the document |
| 124 |
does not contain such callouts. Disabling this support can improve the |
| 125 |
processing performance for big documents. |
| 126 |
</dd></dl></div></div><div class="refsection"><a id="idp785"></a><h2>Files and Directories</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="filename">$HOME/.dblatex/</code></span></dt><dd> |
| 127 |
User configuration directory. |
| 128 |
</dd><dt><span class="term"><code class="filename">/etc/dblatex/</code></span></dt><dd> |
| 129 |
System-wide configuration directory. |
| 130 |
</dd></dl></div><p>The predefined output styles are located in the installed package |
| 131 |
directory.</p></div><div class="refsection"><a id="idp799"></a><h2>Environment Variables</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="envar">DBLATEX_CONFIG_FILES</code></span></dt><dd> |
| 132 |
Extra configuration directories that may contain some dblatex |
| 133 |
configuration files. |
| 134 |
</dd></dl></div></div><div class="refsection"><a id="idp807"></a><h2>Examples</h2><p> |
| 135 |
To produce <code class="filename">myfile.pdf</code> from |
| 136 |
<code class="filename">myfile.xml</code>: |
| 137 |
</p><pre class="screen">dblatex myfile.xml</pre><p> |
| 138 |
</p><p> |
| 139 |
To set some XSL parameters from the command line: |
| 140 |
</p><pre class="screen">dblatex -P latex.babel.language=de myfile.xml</pre><p> |
| 141 |
</p><p> |
| 142 |
To use your XSL stylesheet: |
| 143 |
</p><pre class="screen">dblatex -p myconfig.xsl myfile.xml</pre><p> |
| 144 |
</p><p> |
| 145 |
To use the db2latex output style: |
| 146 |
</p><pre class="screen">dblatex -T db2latex myfile.xml</pre><p> |
| 147 |
</p><p> |
| 148 |
To apply your own latex style: |
| 149 |
</p><pre class="screen">dblatex -s mystyle myfile.xml |
| 150 |
dblatex -s /path/to/mystyle.sty myfile.xml</pre><p> |
| 151 |
</p><p> |
| 152 |
To pass extra arguments to the XSLT engine: |
| 153 |
</p><pre class="screen">dblatex -x "--path /path/to/load/entity" myfile.xml</pre><p> |
| 154 |
</p><p> |
| 155 |
To use <span class="command"><strong>dblatex</strong></span> and profiling: |
| 156 |
</p><pre class="screen"> |
| 157 |
xsltproc --param profile.attribute "'output'" \ |
| 158 |
--param profile.value "'pdf'" \ |
| 159 |
/path/to/profiling/profile.xsl \ |
| 160 |
myfile.xml | dblatex -o myfile.pdf - |
| 161 |
</pre><p> |
| 162 |
</p><p> |
| 163 |
To build a set of books: |
| 164 |
</p><pre class="screen">dblatex -O /path/to/chunk/dir -Pset.book.num=all myfile.xml</pre><p> |
| 165 |
</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch03.html#idp409">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch03.html#idp409">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="sec-style.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Reference </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Output Formatting Style</td></tr></table></div></body></html> |