Blame docs/xhtml/manual/sec-covers.html

Packit 0f19cf
Packit 0f19cf
Packit 0f19cf
<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>

Book Covers

Since version 0.3.10 dblatex provides a basic support for page-size

Packit 0f19cf
covers, when covers are defined as images to insert at the beginning of the
Packit 0f19cf
document (front cover), or at the very end of the document (back cover).

To specify a cover, set in the book information element,

Packit 0f19cf
info or bookinfo, the images to use in
Packit 0f19cf
some cover elements (DocBook 5) or in
Packit 0f19cf
mediaobject with role set to cover
Packit 0f19cf
(DocBook 4).

If two covers are specified, it is assumed that the first one is for the

Packit 0f19cf
front cover, and the second one for the back cover. You can play with standard
Packit 0f19cf
imagedata width or depth attributes to ensure that the image
Packit 0f19cf
is sized to fit the page covers.

Here are two examples:

Packit 0f19cf

Example 3.2. DocBook 5 Front and Back Covers

<book>
Packit 0f19cf
 <info>
Packit 0f19cf
   ...
Packit 0f19cf
   <cover>
Packit 0f19cf
     <mediaobject>
Packit 0f19cf
       <imageobject>
Packit 0f19cf
         <imagedata fileref="cover-front-72dpi.png"
Packit 0f19cf
                    format="PNG" depth="100%" width="100%" align="left"/>
Packit 0f19cf
       </imageobject>
Packit 0f19cf
     </mediaobject>
Packit 0f19cf
   </cover>
Packit 0f19cf
   <cover>
Packit 0f19cf
     <mediaobject>
Packit 0f19cf
       <imageobject>
Packit 0f19cf
         <imagedata fileref="cover-back-72dpi.png"
Packit 0f19cf
                    format="PNG" depth="100%" width="100%" />
Packit 0f19cf
       </imageobject>
Packit 0f19cf
     </mediaobject>
Packit 0f19cf
   </cover>
Packit 0f19cf
 </info>
Packit 0f19cf
 ...
Packit 0f19cf
</book>


Packit 0f19cf

Example 3.3. DocBook 4 Front Cover

<book>
Packit 0f19cf
 <bookinfo>
Packit 0f19cf
   ...
Packit 0f19cf
   <mediaobject role="cover">
Packit 0f19cf
     <imageobject role="front-large">
Packit 0f19cf
       <imagedata fileref="cover-front-72dpi.png" format="PNG" width="100%" />
Packit 0f19cf
     </imageobject>
Packit 0f19cf
     <imageobject role="front">
Packit 0f19cf
       <imagedata fileref="cover-front-10dpi.png" format="PNG" width="444" />
Packit 0f19cf
     </imageobject>
Packit 0f19cf
     <imageobject role="front-small">
Packit 0f19cf
       <imagedata fileref="cover-front-10dpi.png" format="PNG" width="444" />
Packit 0f19cf
     </imageobject>
Packit 0f19cf
     <imageobject role="thumbnail">
Packit 0f19cf
       <imagedata fileref="cover-front-10dpi.png" format="PNG" width="444" />
Packit 0f19cf
     </imageobject>
Packit 0f19cf
   </mediaobject>
Packit 0f19cf
   ...
Packit 0f19cf
 </bookinfo>
Packit 0f19cf
 ...
Packit 0f19cf
</book>


Packit 0f19cf

Note that in DocBook 4, dblatex filters on the same

Packit 0f19cf
roles for mediaobject (cover) or for
Packit 0f19cf
imageobject (front-large) than
Packit 0f19cf
the DocBook Project does when it implement covers in epub format.

dblatex defines default templates

Packit 0f19cf
front.cover and back.cover to implement
Packit 0f19cf
covers through images, but you can overwrite them to create your own
Packit 0f19cf
method to build covers.

</body></html>