Debian Codegraph @

docs/faq.xml

raw
1 <chapter>
2 <title>FAQ</title>
3 <para>The purpose of this mini FAQ is to give some tips about how customizing or
4 tweaking the PDF output.</para>
5
6 <simplesect><title>My images are too big. What can I do?</title>
7
8 <para>When an image is included via <sgmltag>imagedata</sgmltag> with no
9 scaling attributes (e.g, width, height, contentwidth) it is its
10 natural size that is used.</para>
11 <para>One can change individually the size of an <sgmltag>imagedata</sgmltag>
12 by defining its attributes (see <citation>TDG</citation> for more details). One can
13 also use the parameter imagedata.default.scale to apply a
14 systematic scaling rule on every image that has no explicit attribute.
15 </para>
16 <para>The parameter imagedata.default.scale can take:</para>
17 <itemizedlist>
18 <listitem>
19 <para>The default predefined value "pagebound": the image natural size is used,
20 up to the page boundaries. That is, if an image natural width is greater than the
21 page width its size is proportionally reduced
22 so that it is contained in the page. The same control is done for height.</para>
23 </listitem>
24 <listitem>
25 <para>Any combination of valid \includegraphics options. For example
26 </para>
27 <variablelist>
28 <varlistentry><term>imagedata.default.scale=scale=40%</term>
29 <listitem>
30 <para>The scale 40% is applied on the images.</para>
31 </listitem>
32 </varlistentry>
33 <varlistentry><term>imagedata.default.scale=width=40%,height=3in</term>
34 <listitem>
35 <para>This example is weird but shows that several options can be used. In this
36 case the image width is 40% of the page width, and the height is fixed to 3
37 inches. The risk to have an anamorphous result is very high here.</para>
38 </listitem>
39 </varlistentry>
40 </variablelist>
41 </listitem>
42 </itemizedlist>
43 </simplesect>
44
45 <simplesect><title>How can I have the PDF fit to height by default?</title>
46 <para>The behaviour of the PDF file when opened by a reader like Acrobat Reader
47 can be customized with the parameter latex.hyperparam. See <xref
48 linkend="sec-hyperparam"/> for
49 more details about this parameter.
50 </para>
51 <para>To answer precisely to the question, set the parameter with the option
52 "pdfstartview=FitV".</para>
53 </simplesect>
54
55 <simplesect><title>How can I have all the PDF hyperlinks in blue color?</title>
56 <para>Same answer than for the previous question.</para>
57 <para>For this particular case, set the parameter with the options
58 "linktocpage,colorlinks,linkcolor=blue,citecolor=blue,urlcolor=blue".</para>
59 </simplesect>
60
61 <simplesect><title>How can I remove that stupid float rules?</title>
62 <para>If you wonder about this, you propably use the db2latex style. To remove
63 the rules, you need to patch the db2latex.sty. You can:</para>
64
65 <itemizedlist>
66 <listitem>
67 <para>Simply remove the floatstyle definition for the floats for which you don't want
68 the rules.</para>
69 </listitem>
70 <listitem>
71 <para>Explicitely use the plain floatstyle. Note that using this explicit style
72 does not allow to change the float title position anymore. The plain style
73 always put the title at the bottom of the float.</para>
74 </listitem>
75 </itemizedlist>
76 </simplesect>
77
78 <simplesect><title>My long tables don't split in several pages. Why?</title>
79 <para>A formal table (<sgmltag>table</sgmltag> element) is put in a float, so
80 that it can have a numbered caption and placed by tex at the best place. The
81 limitation is that a float cannot split over several pages.</para>
82 <para>For long tables that need to split, use <sgmltag>informaltable</sgmltag>
83 instead.</para>
84 </simplesect>
85
86 <simplesect><title>I cannot put a table in an example.</title>
87 <para>A formal table (<sgmltag>table</sgmltag> element) is put in a float, and
88 cannot be put in another float like an example. You can use an <sgmltag>informaltable</sgmltag> instead.</para>
89 </simplesect>
90
91 <simplesect><title>I cannot compile my cyrillic document. Why?</title>
92 <para>A document using some characters different from the roman alphabet may face some troubles, because latex natively handles only latin1 encoding.</para>
93 <para>Try the different unicode supports provided by dblatex:
94
95 <itemizedlist>
96 <listitem>
97 <para>Use the XeTeX backend, a new tex engine that natively supports Unicode
98 characters: <literal>dblatex -b xetex file.xml</literal>.</para>
99 </listitem>
100 <listitem>
101 <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>
102 </listitem>
103 <listitem>
104 <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>
105 </listitem>
106 </itemizedlist>
107
108 </para>
109 <para>See <xref linkend="sec-doc-encode"/> for more details.</para>
110 </simplesect>
111
112 </chapter>