Blame docs/faq.xml

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