Next in thread → Next in month →

Re: [docbook-apps] Custom master page question

From
Bob Stayton <>
Date
2004-11-10T04:28:22+00:00
ID
0d3201c4c6dd$9f252420$6501a8c0@toshiro
Thread
Re: [docbook-apps] Custom master page question
Hi Jacques,
I would recommend an easier approach to putting the graphic on the
titlepage, without having to create a custom pagemaster.  In general, you
need a custom pagemaster only when you want to change the margins or switch
to multiple columns.

You could create a customized template named 'book.recto.titlepage'. That
named template is automatically called by the stylesheet to put content on
the front title page.  You could fill the content with a table to lay out
your content.  See this section of my book for an example:

http://www.sagehill.net/docbookxsl/TitlePagePrint.html#TitlepageTableLayout

You could create a single cell table whose row's row-height is the height of
the page minus the margins. Then use the align properties on the cell
element to center an fo:external-graphic element in the table cell.  I'm not
sure how well that will work in FOP, if you using FOP.

Bob Stayton
Sagehill Enterprises
DocBook Consulting



----- Original Message ----- 
From: "Jacques" <>
To: "docbook-apps" <>
Sent: Sunday, November 07, 2004 3:22 AM
Subject: [docbook-apps] Custom master page question


Hello all,

I read, and re-read, all the contributions, the Bob's website, the bob's
book, but I still have a problem to macke a custom master page.

I just want to add a graphic in the center of the first page of my book.

I've put in my custom.xsl file this little chooser  (found in Bob's
book):

<xsl:template name="select.user.pagemaster">
    <xsl:param name="element"/>
    <xsl:param name="pageclass"/>
    <xsl:param name="default-pagemaster"/>
    <xsl:choose>
        <xsl:when test="$default-pagemaster = 'titlepage'">
            <xsl:value-of select="'my-new-titlepage'"/>
        </xsl:when>
        <xsl:otherwise>
            <xsl:value-of select="$default-pagemaster"/>
        </xsl:otherwise>
    </xsl:choose>
</xsl:template>

I have a file named my-new-titlepage.xsl which containt some
customization (found again in Bob's book) :

<xsl:attribute-set name="book.titlepage.recto.style">
    <xsl:attribute name="font-family">Garamond</xsl:attribute>
    <xsl:attribute name="text-align">right</xsl:attribute>
    <xsl:attribute name="color">#E0E0E0</xsl:attribute>
</xsl:attribute-set>

When (with eclipse and oxygenxml plugin) I try to transform my book to
fo then PDF, I have an error :
The process ended with code : 2 The error was : [ERROR]
file:/Users/jacques/8sens/book.xml_xslt:1:12710 master-reference
'my-new-titlepage' for fo:page-sequence matches no simple-page-master or
page-sequence-master

So I think I must use a file named user.pagemaster.xsl (which is a copy
of fo/pagesetup.xsl). But I don't interstand what to keep, what to
delete and what to change in this file.

I found in <fo:simple-page-master master-name="titlepage-first"
                           page-width="{$page.width}"
                           page-height="{$page.height}"....

and the page-sequence-master part...

But it still confusing I my head.

Who can help me to clarify this point ?

Thanks in advance,
Jacques
-- 
 C'est tout pour aujourd'hui !
Next in thread → Next in month →