Blame docs/faq.xml

Packit 0f19cf
<chapter>
Packit 0f19cf
<title>FAQ</title>
Packit 0f19cf
<para>The purpose of this mini FAQ is to give some tips about how customizing or
Packit 0f19cf
tweaking the PDF output.</para>
Packit 0f19cf
Packit 0f19cf
<simplesect><title>My images are too big. What can I do?</title>
Packit 0f19cf
Packit 0f19cf
<para>When an image is included via <sgmltag>imagedata</sgmltag> with no
Packit 0f19cf
scaling attributes (e.g, width, height, contentwidth) it is its
Packit 0f19cf
natural size that is used.</para>
Packit 0f19cf
<para>One can change individually the size of an  <sgmltag>imagedata</sgmltag>
Packit 0f19cf
by defining its attributes (see <citation>TDG</citation> for more details). One can
Packit 0f19cf
also use the parameter imagedata.default.scale to apply a
Packit 0f19cf
systematic scaling rule on every image that has no explicit attribute.
Packit 0f19cf
</para>
Packit 0f19cf
<para>The parameter imagedata.default.scale can take:</para>
Packit 0f19cf
<itemizedlist>
Packit 0f19cf
<listitem>
Packit 0f19cf
<para>The default predefined value "pagebound": the image natural size is used,
Packit 0f19cf
up to the page boundaries. That is, if an image natural width is greater than the
Packit 0f19cf
page width its size is proportionally reduced
Packit 0f19cf
so that it is contained in the page. The same control is done for height.</para>
Packit 0f19cf
</listitem>
Packit 0f19cf
<listitem>
Packit 0f19cf
<para>Any combination of valid \includegraphics options. For example
Packit 0f19cf
</para>
Packit 0f19cf
<variablelist>
Packit 0f19cf
<varlistentry><term>imagedata.default.scale=scale=40%</term>
Packit 0f19cf
<listitem>
Packit 0f19cf
<para>The scale 40% is applied on the images.</para>
Packit 0f19cf
</listitem>
Packit 0f19cf
</varlistentry>
Packit 0f19cf
<varlistentry><term>imagedata.default.scale=width=40%,height=3in</term>
Packit 0f19cf
<listitem>
Packit 0f19cf
<para>This example is weird but shows that several options can be used. In this
Packit 0f19cf
case the image width is 40% of the page width, and the height is fixed to 3
Packit 0f19cf
inches. The risk to have an anamorphous result is very high here.</para>
Packit 0f19cf
</listitem>
Packit 0f19cf
</varlistentry>
Packit 0f19cf
</variablelist>
Packit 0f19cf
</listitem>
Packit 0f19cf
</itemizedlist>
Packit 0f19cf
</simplesect>
Packit 0f19cf
Packit 0f19cf
<simplesect><title>How can I have the PDF fit to height by default?</title>
Packit 0f19cf
<para>The behaviour of the PDF file when opened by a reader like Acrobat Reader
Packit 0f19cf
can be customized with the parameter latex.hyperparam. See 
Packit 0f19cf
linkend="sec-hyperparam"/> for
Packit 0f19cf
more details about this parameter.
Packit 0f19cf
</para>
Packit 0f19cf
<para>To answer precisely to the question, set the parameter with the option
Packit 0f19cf
"pdfstartview=FitV".</para>
Packit 0f19cf
</simplesect>
Packit 0f19cf
Packit 0f19cf
<simplesect><title>How can I have all the PDF hyperlinks in blue color?</title>
Packit 0f19cf
<para>Same answer than for the previous question.</para>
Packit 0f19cf
<para>For this particular case, set the parameter with the options
Packit 0f19cf
"linktocpage,colorlinks,linkcolor=blue,citecolor=blue,urlcolor=blue".</para>
Packit 0f19cf
</simplesect>
Packit 0f19cf
Packit 0f19cf
<simplesect><title>How can I remove that stupid float rules?</title>
Packit 0f19cf
<para>If you wonder about this, you propably use the db2latex style. To remove
Packit 0f19cf
the rules, you need to patch the db2latex.sty. You can:</para>
Packit 0f19cf
Packit 0f19cf
<itemizedlist>
Packit 0f19cf
<listitem>
Packit 0f19cf
<para>Simply remove the floatstyle definition for the floats for which you don't want
Packit 0f19cf
the rules.</para>
Packit 0f19cf
</listitem>
Packit 0f19cf
<listitem>
Packit 0f19cf
<para>Explicitely use the plain floatstyle. Note that using this explicit style
Packit 0f19cf
does not allow to change the float title position anymore. The plain style
Packit 0f19cf
always put the title at the bottom of the float.</para>
Packit 0f19cf
</listitem>
Packit 0f19cf
</itemizedlist>
Packit 0f19cf
</simplesect>
Packit 0f19cf
Packit 0f19cf
<simplesect><title>My long tables don't split in several pages. Why?</title>
Packit 0f19cf
<para>A formal table (<sgmltag>table</sgmltag> element) is put in a float, so
Packit 0f19cf
that it can have a numbered caption and placed by tex at the best place. The
Packit 0f19cf
limitation is that a float cannot split over several pages.</para>
Packit 0f19cf
<para>For long tables that need to split, use <sgmltag>informaltable</sgmltag>
Packit 0f19cf
instead.</para>
Packit 0f19cf
</simplesect>
Packit 0f19cf
Packit 0f19cf
<simplesect><title>I cannot put a table in an example.</title>
Packit 0f19cf
<para>A formal table (<sgmltag>table</sgmltag> element) is put in a float, and 
Packit 0f19cf
cannot be put in another float like an example. You can use an <sgmltag>informaltable</sgmltag> instead.</para>
Packit 0f19cf
</simplesect>
Packit 0f19cf
Packit 0f19cf
<simplesect><title>I cannot compile my cyrillic document. Why?</title>
Packit 0f19cf
<para>A document using some characters different from the roman alphabet may face some troubles, because latex natively handles only latin1 encoding.</para>
Packit 0f19cf
<para>Try the different unicode supports provided by dblatex:
Packit 0f19cf
Packit 0f19cf
<itemizedlist>
Packit 0f19cf
<listitem>
Packit 0f19cf
<para>Use the XeTeX backend, a new tex engine that natively supports Unicode
Packit 0f19cf
characters: <literal>dblatex -b xetex file.xml</literal>.</para>
Packit 0f19cf
</listitem>
Packit 0f19cf
<listitem>
Packit 0f19cf
<para>Ask for using the latex unicode support by setting the <parameter>latex.encoding</parameter>=utf8 parameter: <literal>dblatex -P latex.encoding=utf8 file.xml</literal>.</para>
Packit 0f19cf
</listitem>
Packit 0f19cf
<listitem>
Packit 0f19cf
<para>Use the Passivetex extensions by setting the <parameter>latex.unicode.use</parameter>=1 parameter: <literal>dblatex -P latex.unicode.use=1 file.xml</literal>.</para>
Packit 0f19cf
</listitem>
Packit 0f19cf
</itemizedlist>
Packit 0f19cf
Packit 0f19cf
</para>
Packit 0f19cf
<para>See <xref linkend="sec-doc-encode"/> for more details.</para>
Packit 0f19cf
</simplesect>
Packit 0f19cf
Packit 0f19cf
</chapter>