Style features to format the front cover
You might require a front cover for PDF and EPUB ebooks, so cop-e-boox lets you specify a
graphic or illustration and format that for output.
The stylesheet p3-cover-titlepage.xsl
has all features and instructions for you to
format the front cover. The details that can be set in the stylesheet are:
- display front cover
- name of the front cover image
- positioning of the front cover image
- size of the front cover image.
XML markup to edit
The XML tagging for a book's front cover is marked up nested inside the
Nested inside this <cover>
element is markup that contains the graphics
for the front cover:
For more details about XML markup for graphics, see the section on Graphics
For each graphic, change the following markup nested inside <mediaobject
|<textobject><phrase> Description of
||Contains the alternate text for an image in EPUB or web pages
||Use different values of the role attribute to select different
graphics for each ebook format. Options for the role attribute are: pdf | epub |
||The directory and file name of the graphic, and the format of the graphic.
Formats are: GIF | PNG | JPG | SVG.
Note: Graphics must be located in a directory called images to appear in output
ebooks. Create this directory in your working directory, which contains all XML files of the
book you are currently working on.
Stylesheet settings to edit
The relevant Stylesheet Guide page
for the front cover is PDF-frontcover.svg.
Setting the size of the front cover graphic. The stylesheet
p3-cover-titlepage.xsl has features to set the height (p3-35) and width
(p3-40) of the cover page graphic. These values should match the page size.
Note: If the values at features p3-35 and p3-40 are larger than the page height
and width, the front cover graphic might not appear in a PDF (there will be a blank page
Adjusting the position of a graphic on the front cover. Type in a value at the
appropriate feature (p3-15 to p3-30). This value can be in any measurement unit, and can be
To adjust the position of the front cover graphic, you need to correctly specify the
values. Read the section on Common problems