Debian Codegraph @

docs/xhtml/manual/sec-covers.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>Book Covers</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-pagesetup.html" title="Global Page Setup" /><link rel="next" href="sec-section-num.html" title="Chapter and Section numbering" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Book Covers</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="sec-pagesetup.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Using dblatex</th><td width="20%" align="right"> <a accesskey="n" href="sec-section-num.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-covers"></a>Book Covers</h2></div></div></div><p>Since version 0.3.10 dblatex provides a basic support for page-size
3 covers, when covers are defined as images to insert at the beginning of the
4 document (front cover), or at the very end of the document (back cover).</p><p>To specify a cover, set in the book information element,
5 <code class="sgmltag-element">info</code> or <code class="sgmltag-element">bookinfo</code>, the images to use in
6 some <code class="sgmltag-element">cover</code> elements (DocBook 5) or in
7 <code class="sgmltag-element">mediaobject</code> with role set to <code class="literal">cover</code>
8 (DocBook 4).</p><p>If two covers are specified, it is assumed that the first one is for the
9 front cover, and the second one for the back cover. You can play with standard
10 <code class="sgmltag-element">imagedata</code> width or depth attributes to ensure that the image
11 is sized to fit the page covers.</p><p>Here are two examples:
12 </p><div class="example"><a id="idp981"></a><p class="title"><strong>Example 3.2. DocBook 5 Front and Back Covers</strong></p><div class="example-contents"><pre class="programlisting">&lt;book&gt;
13 &lt;info&gt;
14 ...
15 &lt;cover&gt;
16 &lt;mediaobject&gt;
17 &lt;imageobject&gt;
18 &lt;imagedata fileref="cover-front-72dpi.png"
19 format="PNG" depth="100%" width="100%" align="left"/&gt;
20 &lt;/imageobject&gt;
21 &lt;/mediaobject&gt;
22 &lt;/cover&gt;
23 &lt;cover&gt;
24 &lt;mediaobject&gt;
25 &lt;imageobject&gt;
26 &lt;imagedata fileref="cover-back-72dpi.png"
27 format="PNG" depth="100%" width="100%" /&gt;
28 &lt;/imageobject&gt;
29 &lt;/mediaobject&gt;
30 &lt;/cover&gt;
31 &lt;/info&gt;
32 ...
33 &lt;/book&gt;</pre></div></div><p><br class="example-break" />
34 </p><div class="example"><a id="idp984"></a><p class="title"><strong>Example 3.3. DocBook 4 Front Cover</strong></p><div class="example-contents"><pre class="programlisting">&lt;book&gt;
35 &lt;bookinfo&gt;
36 ...
37 &lt;mediaobject role="cover"&gt;
38 &lt;imageobject role="front-large"&gt;
39 &lt;imagedata fileref="cover-front-72dpi.png" format="PNG" width="100%" /&gt;
40 &lt;/imageobject&gt;
41 &lt;imageobject role="front"&gt;
42 &lt;imagedata fileref="cover-front-10dpi.png" format="PNG" width="444" /&gt;
43 &lt;/imageobject&gt;
44 &lt;imageobject role="front-small"&gt;
45 &lt;imagedata fileref="cover-front-10dpi.png" format="PNG" width="444" /&gt;
46 &lt;/imageobject&gt;
47 &lt;imageobject role="thumbnail"&gt;
48 &lt;imagedata fileref="cover-front-10dpi.png" format="PNG" width="444" /&gt;
49 &lt;/imageobject&gt;
50 &lt;/mediaobject&gt;
51 ...
52 &lt;/bookinfo&gt;
53 ...
54 &lt;/book&gt;</pre></div></div><p><br class="example-break" />
55 </p><p>Note that in DocBook 4, <span class="command"><strong>dblatex</strong></span> filters on the same
56 roles for <code class="sgmltag-element">mediaobject</code> (<code class="literal">cover</code>) or for
57 <code class="sgmltag-element">imageobject</code> (<code class="literal">front-large</code>) than
58 the DocBook Project does when it implement covers in epub format.</p><p><span class="command"><strong>dblatex</strong></span> defines default templates
59 <code class="literal">front.cover</code> and <code class="literal">back.cover</code> to implement
60 covers through images, but you can overwrite them to create your own
61 method to build covers.</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="sec-pagesetup.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-section-num.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Global Page Setup </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter and Section numbering</td></tr></table></div></body></html>