<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!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.76.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" title="Book Covers"><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
covers, when covers are defined as images to insert at the beginning of the
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,
<code class="sgmltag-element">info</code> or <code class="sgmltag-element">bookinfo</code>, the images to use in
some <code class="sgmltag-element">cover</code> elements (DocBook 5) or in
<code class="sgmltag-element">mediaobject</code> with role set to <code class="literal">cover</code>
(DocBook 4).</p><p>If two covers are specified, it is assumed that the first one is for the
front cover, and the second one for the back cover. You can play with standard
<code class="sgmltag-element">imagedata</code> width or depth attributes to ensure that the image
is sized to fit the page covers.</p><p>Here are two examples:
</p><div class="example"><a id="idp9380664"></a><p class="title"><strong>Example 3.2. DocBook 5 Front and Back Covers</strong></p><div class="example-contents"><pre class="programlisting"><book>
<info>
...
<cover>
<mediaobject>
<imageobject>
<imagedata fileref="cover-front-72dpi.png"
format="PNG" depth="100%" width="100%" align="left"/>
</imageobject>
</mediaobject>
</cover>
<cover>
<mediaobject>
<imageobject>
<imagedata fileref="cover-back-72dpi.png"
format="PNG" depth="100%" width="100%" />
</imageobject>
</mediaobject>
</cover>
</info>
...
</book></pre></div></div><p><br class="example-break" />
</p><div class="example"><a id="idm1190584"></a><p class="title"><strong>Example 3.3. DocBook 4 Front Cover</strong></p><div class="example-contents"><pre class="programlisting"><book>
<bookinfo>
...
<mediaobject role="cover">
<imageobject role="front-large">
<imagedata fileref="cover-front-72dpi.png" format="PNG" width="100%" />
</imageobject>
<imageobject role="front">
<imagedata fileref="cover-front-10dpi.png" format="PNG" width="444" />
</imageobject>
<imageobject role="front-small">
<imagedata fileref="cover-front-10dpi.png" format="PNG" width="444" />
</imageobject>
<imageobject role="thumbnail">
<imagedata fileref="cover-front-10dpi.png" format="PNG" width="444" />
</imageobject>
</mediaobject>
...
</bookinfo>
...
</book></pre></div></div><p><br class="example-break" />
</p><p>Note that in DocBook 4, <span class="command"><strong>dblatex</strong></span> filters on the same
roles for <code class="sgmltag-element">mediaobject</code> (<code class="literal">cover</code>) or for
<code class="sgmltag-element">imageobject</code> (<code class="literal">front-large</code>) than
the DocBook Project does when it implement covers in epub format.</p><p><span class="command"><strong>dblatex</strong></span> defines default templates
<code class="literal">front.cover</code> and <code class="literal">back.cover</code> to implement
covers through images, but you can overwrite them to create your own
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>