Debian Codegraph @

docs/xhtml/manual/sec-figinclude.html

raw
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!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>Figure Inclusion</title><link rel="stylesheet" type="text/css" href="manual.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /><link rel="home" href="index.html" title="DocBook to LaTeX Publishing" /><link rel="up" href="ch03.html" title="Chapter 3. Using dblatex" /><link rel="prev" href="sec-section-num.html" title="Chapter and Section numbering" /><link rel="next" href="sec-table.html" title="Creating Tables" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">
3 Figure Inclusion
4 </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="sec-section-num.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Using dblatex</th><td width="20%" align="right"> <a accesskey="n" href="sec-table.html">Next</a></td></tr></table><hr /></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="sec-figinclude"></a>
5 Figure Inclusion
6 </h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="sec-figinclude.html#idp1044">
7 Presentation
8 </a></span></dt><dt><span class="section"><a href="sec-figinclude.html#sec-figconv">
9 Converting on the fly
10 </a></span></dt><dt><span class="section"><a href="sec-figinclude.html#sec-lookup">
11 Paths Lookup
12 </a></span></dt></dl></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="idp1044"></a>
13 Presentation
14 </h3></div></div></div><p>
15 The expected format of the included figures depends on the backend driver used:
16 </p><div class="variablelist"><dl class="variablelist"><dt><span class="term">
17 dvips:
18 </span></dt><dd><p>EPS format is required.
19 </p></dd><dt><span class="term">
20 pdftex:
21 </span></dt><dd><p>PDF or PNG format is required.
22 </p></dd></dl></div><p>
23 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.
24 </p><p>
25 The figures must either already exists in the expected format, or must be able to be converted on the fly.
26 </p><div class="example"><a id="idp1058"></a><p class="title"><strong>Example 3.4. Figure inclusion</strong></p><div class="example-contents"><pre class="programlisting">
27 &lt;figure id="fig-exemple1"&gt;
28 &lt;title&gt;Components&lt;/title&gt;
29 &lt;mediaobject&gt;
30 &lt;imageobject&gt;
31 &lt;imagedata fileref="path/figure1" align="center" scale="70"&gt;
32 &lt;/imageobject&gt;
33 &lt;/mediaobject&gt;
34 &lt;/figure&gt;
35 </pre></div></div><br class="example-break" /></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="sec-figconv"></a>
36 Converting on the fly
37 </h3></div></div></div><p>When it is needed dblatex tries to automatically convert the figures to
38 the expected format (i.e. EPS or PDF). The principle is to detect the original
39 figure format from the suffix of the fileref attribute. If no suffix is given,
40 the tool checks if a file whose basename is conformant with the
41 fileref attribute and with one of the predefined suffixes exists (that is, ".eps",
42 ".fig", ".pdf", or ".png"). If such a file exists, conversion is done from the
43 original format found.
44 </p><p>
45 The option <code class="option">-f <em class="replaceable"><code>fig_format</code></em></code> allows to specify the default included figures format (<em class="replaceable"><code>fig_format</code></em>), 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.
46 </p><p>
47 If the specified format is unknown, no conversion is done. The supported formats are:
48 </p><div class="variablelist"><dl class="variablelist"><dt><span class="term">
49 fig:
50 </span></dt><dd><p>native format of the figures produced by XFig.
51 </p></dd><dt><span class="term">
52 eps:
53 </span></dt><dd><p>Encapsulated PostScript format. This format shall be specified only when using the pdftex backend.
54 </p></dd></dl></div><div class="example"><a id="idp1078"></a><p class="title"><strong>Example 3.5. Figure conversion</strong></p><div class="example-contents"><p>
55 The following command compiles a document that contains figures produced with XFig.
56 </p><pre class="programlisting">
57 % dblatex -f fig mydoc.sgml
58 </pre></div></div><br class="example-break" /></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="sec-lookup"></a>
59 Paths Lookup
60 </h3></div></div></div><p>
61 You can use and cumulate the option <code class="option">-I <em class="replaceable"><code>path</code></em></code> to specify where the figures are. The given paths can be absolute or relative.
62 The paths are added to the document root path.
63 </p><div class="example"><a id="idp1087"></a><p class="title"><strong>Example 3.6. Figures lookup</strong></p><div class="example-contents"><p>
64 This example shows how figure lookup is done. Let's consider this document source:
65 </p><pre class="programlisting">
66 &lt;figure id="fig-example1"&gt;
67 &lt;title&gt;Composants&lt;/title&gt;
68 &lt;mediaobject&gt;
69 &lt;imageobject&gt;
70 &lt;imagedata fileref="rep1/rep2/figure1" align="center" scale="70"&gt;
71 &lt;/imageobject&gt;
72 &lt;/mediaobject&gt;
73 &lt;/figure&gt;
74 </pre><p>
75 And the document is compiled like this:
76 </p><pre class="programlisting">
77 % dblatex -I /another/path -I /last/case /initial/path/document.sgml
78 </pre><p>
79 The figure1 lookup is done in the following directories, in respect of the order:
80 </p><div class="itemizedlist"><ul class="itemizedlist compact" style="list-style-type: disc; "><li class="listitem"><p>
81 <code class="filename">/initial/path/rep1/rep2</code> ;
82 </p></li><li class="listitem"><p>
83 <code class="filename">/another/path/rep1/rep2</code> ;
84 </p></li><li class="listitem"><p>
85 <code class="filename">/last/case/rep1/rep2</code>.
86 </p></li></ul></div></div></div><br class="example-break" /></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="sec-section-num.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch03.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="sec-table.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter and Section numbering </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Creating Tables</td></tr></table></div></body></html>