Blob Blame History Raw
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!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>Customization Precedence</title><link rel="stylesheet" type="text/css" href="manual.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.76.1" /><link rel="home" href="index.html" title="DocBook to LaTeX Publishing" /><link rel="up" href="sec-custom.html" title="Chapter 4. Customization" /><link rel="prev" href="sec-specs.html" title="Dblatex Configuration File" /><link rel="next" href="ch05.html" title="Chapter 5. FAQ" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Customization Precedence</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="sec-specs.html">Prev</a> </td><th width="60%" align="center">Chapter 4. Customization</th><td width="20%" align="right"> <a accesskey="n" href="ch05.html">Next</a></td></tr></table><hr /></div><div class="section" title="Customization Precedence"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="idm828224"></a>Customization Precedence</h2></div></div></div><p>
   All the customization queries are translated to the corresponding command line options. Thus, using several customization methods can be unconsistent because each of them override the same option with another value. 
  </p><p>
   For instance, you can specify the use of a specification file in which it is said to use a latex style (parameter TexStyle) and explicitely use the <code class="option">--texstyle</code> command line option. So, what is the behaviour?
  </p><p>
   The options order is the following:
  </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
   If a specification file is used (<code class="option">-S</code> option), the options are set to the specification file parameters.
   </p></li><li class="listitem"><p>
   If several specification files are used (<code class="option">-S</code> option), the 
   precedence is given to the last specified files.
   </p></li><li class="listitem"><p>
   The options explicitely passed override the specification file setting, whatever is the position of the options (i.e. before or after the <code class="option">-S</code> option).
   </p></li><li class="listitem"><p>
   If an option is passed several times, this is the last occurence that is used.
   </p></li></ul></div><div class="example"><a id="idp2976776"></a><p class="title"><strong>Example 4.6. Customization Precedence</strong></p><div class="example-contents"><p>
   Let's consider the specification file containing the following parameters:
  </p><pre class="programlisting">&lt;?xml version="1.0" ?&gt;
&lt;config xmlns="http://dblatex.sourceforge.net/config"&gt;
  &lt;xslt&gt;&lt;stylesheet fileref="file3.xsl"/&gt;&lt;/xslt&gt;
  &lt;options&gt;-b pdftex&lt;/options&gt;
  &lt;latex&gt;&lt;texstyle use="mystyle1"/&gt;&lt;/latex&gt;
&lt;/config&gt;</pre><p>
   And now the command line:
  </p><pre class="programlisting">
dblatex -b dvips -p file1.xsl -p file2.xsl -S file.specs -s mystyle2 mydoc.xml
  </pre><p>
   The setting used is the following:
  </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
   “-b dvips” overrides “-b pdftex” set by the spec file.
   </p></li><li class="listitem"><p>
   “-p file2.xsl” overrides “-p file1.xsl” since it is defined after, and overrides “file3.xsl” set by the spec file. 
   </p></li><li class="listitem"><p>
   “-s mystyle2” override “mystyle1” set by the spec file.
   </p></li></ul></div></div></div><br class="example-break" /></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="sec-specs.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="sec-custom.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch05.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Dblatex Configuration File </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 5. FAQ</td></tr></table></div></body></html>