Blame docs/covers.xml

Packit 0f19cf
Packit 0f19cf
Packit 0f19cf
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
Packit 0f19cf
<section id="sec-covers">
Packit 0f19cf
<title>Book Covers</title>
Packit 0f19cf
Packit 0f19cf
<para>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).</para>
Packit 0f19cf
Packit 0f19cf
<para>To specify a cover, set in the book information element, 
Packit 0f19cf
<sgmltag>info</sgmltag> or <sgmltag>bookinfo</sgmltag>, the images to use in
Packit 0f19cf
some <sgmltag>cover</sgmltag> elements (DocBook 5) or in
Packit 0f19cf
<sgmltag>mediaobject</sgmltag> with role set to <literal>cover</literal>
Packit 0f19cf
(DocBook 4).</para>
Packit 0f19cf
Packit 0f19cf
<para>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
<sgmltag>imagedata</sgmltag> width or depth attributes to ensure that the image
Packit 0f19cf
is sized to fit the page covers.</para>
Packit 0f19cf
Packit 0f19cf
<para>Here are two examples:
Packit 0f19cf
<example><title>DocBook 5 Front and Back Covers</title>
Packit 0f19cf
<programlisting language="XML">
Packit 0f19cf
 <info>
Packit 0f19cf
   ...
Packit 0f19cf
   <cover>
Packit 0f19cf
     <mediaobject>
Packit 0f19cf
       <imageobject>
Packit 0f19cf
         
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
         
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>]]></programlisting>
Packit 0f19cf
</example>
Packit 0f19cf
<example><title>DocBook 4 Front Cover</title>
Packit 0f19cf
<programlisting language="XML">
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>]]></programlisting>
Packit 0f19cf
</example>
Packit 0f19cf
</para>
Packit 0f19cf
Packit 0f19cf
<para>Note that in DocBook 4, <command>dblatex</command> filters on the same
Packit 0f19cf
roles for <sgmltag>mediaobject</sgmltag> (<literal>cover</literal>) or for
Packit 0f19cf
<sgmltag>imageobject</sgmltag> (<literal>front-large</literal>) than
Packit 0f19cf
the DocBook Project does when it implement covers in epub format.</para>
Packit 0f19cf
Packit 0f19cf
<para><command>dblatex</command> defines default templates 
Packit 0f19cf
<literal>front.cover</literal> and <literal>back.cover</literal> to implement
Packit 0f19cf
covers through images, but you can overwrite them to create your own
Packit 0f19cf
method to build covers.</para>
Packit 0f19cf
Packit 0f19cf
</section>