Hello all,
My apologies if this isn't the correct forum for these questions, but I
am on my own as I learn how to best use DocBook, XML, and such.
I have successfully created a DocBook XML file and, using FOP, created a
PDF from it. I have even learned how to create a customization layer so
the PDF output conforms to my company's style conventions. However, I
have hit two snags:
1. When I create the PDF, a default title appears. It is in a large
font, centered. I have been trying to find what template applies to this
title, but to no avail. Does anyone know about this title, and what I
need to do to change its appearance?
When you say the default title, I presume you mean the title of your
document but appearing in the default location where you don't want it?
If so, your customization is probably has a template that processes a
sequence of elements where you want them, but it hasn't turned off the
template that gets applied by default. In general, the stylesheets operate
by doing apply-templates recursively (sometimes in a special mode). So in
many cases you have to redefine a template to perform no action because your
customized template already handled that element.
The title page stuff has many templates that it can use to provide a lot of
opportunities for customization. This reference lists the modes that are
tried for each element on a title page:
http://www.sagehill.net/docbookxsl/HtmlCustomEx.html#d0e10008
You may need to add something like this:
<xsl:template match="title" mode="book.titlepage.recto.mode">
</xsl:template>
2. Similar to #1, I have learned how to change some of the font
properties associated with the header and footer in the PDF output.
However, the header and footer continue to be centered, when I would
like them to be flush left. None of the parameters I have found have
successfully changed the justification for these sections. Could anyone
point me in the right direction?
The headers and footers are formatted as a table with three cells: left,
center and right. Your content is probably in the center cell, and will
always be centered. You want to put your content in the left cell. See
this reference to customize the header content:
http://www.sagehill.net/docbookxsl/PrintHeaders.html
You may also want to change the relative size of the cells, using the
'header.column.widths' parameter. See the doc included with the stylesheets
(the online doc hasn't been updated to 1.65.1 yet).