| 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"><book> |
| 13 |
<info> |
| 14 |
... |
| 15 |
<cover> |
| 16 |
<mediaobject> |
| 17 |
<imageobject> |
| 18 |
<imagedata fileref="cover-front-72dpi.png" |
| 19 |
format="PNG" depth="100%" width="100%" align="left"/> |
| 20 |
</imageobject> |
| 21 |
</mediaobject> |
| 22 |
</cover> |
| 23 |
<cover> |
| 24 |
<mediaobject> |
| 25 |
<imageobject> |
| 26 |
<imagedata fileref="cover-back-72dpi.png" |
| 27 |
format="PNG" depth="100%" width="100%" /> |
| 28 |
</imageobject> |
| 29 |
</mediaobject> |
| 30 |
</cover> |
| 31 |
</info> |
| 32 |
... |
| 33 |
</book></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"><book> |
| 35 |
<bookinfo> |
| 36 |
... |
| 37 |
<mediaobject role="cover"> |
| 38 |
<imageobject role="front-large"> |
| 39 |
<imagedata fileref="cover-front-72dpi.png" format="PNG" width="100%" /> |
| 40 |
</imageobject> |
| 41 |
<imageobject role="front"> |
| 42 |
<imagedata fileref="cover-front-10dpi.png" format="PNG" width="444" /> |
| 43 |
</imageobject> |
| 44 |
<imageobject role="front-small"> |
| 45 |
<imagedata fileref="cover-front-10dpi.png" format="PNG" width="444" /> |
| 46 |
</imageobject> |
| 47 |
<imageobject role="thumbnail"> |
| 48 |
<imagedata fileref="cover-front-10dpi.png" format="PNG" width="444" /> |
| 49 |
</imageobject> |
| 50 |
</mediaobject> |
| 51 |
... |
| 52 |
</bookinfo> |
| 53 |
... |
| 54 |
</book></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> |