1
<sect1 id="sec-figinclude">
10
The expected format of the included figures depends on the backend driver used:
16
</term><listitem><para>EPS format is required.
23
</term><listitem><para>PDF or PNG format is required.
29
In order to be able to use both backends, it is wise to not write the suffix of the file that references the figure. The suffix will be deduced from the backend used.
32
The figures must either already exists in the expected format, or must be able to be converted on the fly.
34
<example><title>Figure inclusion</title>
36
<![CDATA[<figure id="fig-exemple1">
37
]]><![CDATA[ <title>Components</title>
38
]]><![CDATA[ <mediaobject>
39
]]><![CDATA[ <imageobject>
40
]]><![CDATA[ <imagedata fileref="path/figure1" align="center" scale="70">
41
]]><![CDATA[ </imageobject>
42
]]><![CDATA[ </mediaobject>
47
<sect2 id="sec-figconv">
51
<para>When it is needed dblatex tries to automatically convert the figures to
52
the expected format (i.e. EPS or PDF). The principle is to detect the original
53
figure format from the suffix of the fileref attribute. If no suffix is given,
54
the tool checks if a file whose basename is conformant with the
55
fileref attribute and with one of the predefined suffixes exists (that is, ".eps",
56
".fig", ".pdf", or ".png"). If such a file exists, conversion is done from the
57
original format found.
60
The option <option>-f <replaceable>fig_format</replaceable></option> allows to specify the default included figures format (<replaceable>fig_format</replaceable>), that will be used when automatic format scanning gives no result. Then, the tool converts the figures from the specified format to the expected one.
63
If the specified format is unknown, no conversion is done. The supported formats are:
69
</term><listitem><para>native format of the figures produced by XFig.
76
</term><listitem><para>Encapsulated PostScript format. This format shall be specified only when using the pdftex backend.
81
<example><title>Figure conversion</title>
83
The following command compiles a document that contains figures produced with XFig.
86
<![CDATA[% dblatex -f fig mydoc.sgml
90
<sect2 id="sec-lookup">
95
You can use the option <option>-I "<replaceable>path1</replaceable> <replaceable>path2</replaceable> ..."</option> to specify where the figures are. The given paths must be absolute. The paths are added to the doculent root path.
97
<example><title>Figures lookup</title>
99
This example shows how figure lookup is done. Let's consider this document source:
102
<![CDATA[<figure id="fig-example1">
103
]]><![CDATA[ <title>Composants</title>
104
]]><![CDATA[ <mediaobject>
105
]]><![CDATA[ <imageobject>
106
]]><![CDATA[ <imagedata fileref="rep1/rep2/figure1" align="center" scale="70">
107
]]><![CDATA[ </imageobject>
108
]]><![CDATA[ </mediaobject>
109
]]><![CDATA[</figure>
110
]]> </programlisting>
112
And the document is compiled like this:
115
<![CDATA[% dblatex -I "/another/path /last/case" /initial/path/document.sgml
116
]]> </programlisting>
118
The figure1 lookup is done in the following directories, in respect of the order:
123
<filename>/initial/path/rep1/rep2</filename> ;
128
<filename>/another/path/rep1/rep2</filename> ;
133
<filename>/last/case/rep1/rep2</filename>.