OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [docbook-apps] Replacing recto titlepage

Hi, Peter and Bob,
I modified my book.titlepage.recto template according to your suggestions.
And the results is just what i need.
Thanks a lot!

Yours sincerely,

2013/9/11 Bob Stayton <bobs@sagehill.net>
Hi Mona,
Many people manually override the first page by rewriting the template named "book.titlepage.recto", as Peter suggests.  However, the context for that template is already within an fo:page-sequence, using the 'titlepage' page-master.  Since you cannot nest page-sequences, you would not be able to redefine the margins to zero as in your user pagemaster.  Some people instead use an fo:block-container with absolute placement to override the titlepage master's margins when they want a full-page graphic, something like this:

<xsl:template name="book.titlepage.recto">
 <fo:block-container absolute-position="absolute"
                     top="-({$page.margin.top} + {$body.margin.top})"
   <fo:block containing the image element ...

The advantage of this approach is that it retains the pagination.  Turning off the book.titlepage.recto would like cause the verso titlepage to be numbered 1, I think.

The reason your attempt did not work is that page-masters are declared separately in a prolog of the FO file, and then referenced by an fo:page-sequence when needed.  The user.pagemasters template is automatically called in that prolog to add  your new declarations, so you should not call it yourself in book.titlepage.recto.  Once it is declared, referencing it as you did is all that is needed:

<xsl:call-template name="page.sequence">
  <xsl:with-param name="master-reference">front-cover</xsl:with-param>

Bob Stayton
Sagehill Enterprises

From: "Peter Desjardins" <peter.desjardins.us@gmail.com>
Sent: Tuesday, September 10, 2013 7:25 AM
To: "Mona Qi" <qizilan.scutech@gmail.com>
Cc: "DocBook Apps" <docbook-apps@lists.oasis-open.org>
Subject: Re: [docbook-apps] Replacing recto titlepage


Are you using the book element for your content? If so, try overriding
the book.titlepage.recto template. There should be an
article.titlepage.recto template also, I haven't looked for it.

 <xsl:template name="book.titlepage.recto">

I've never worked with the front.cover template before. It does have a
tempting name but it's empty by default and I do not think it will do
what you are hoping.

Good luck!


On Tue, Sep 10, 2013 at 5:52 AM, Mona Qi <qizilan.scutech@gmail.com> wrote:
Hi all,

I'm a beginner, I've added a image as my first page of the fo output, but i
can't delete the recto title page which was auto generated by the

As far as i know, the docbook1.78.1 will generate two consecutive
titlepages, one shows the title in recto and the subtitle and copyright
shows in verso.

Refer to http://www.sagehill.net/docbookxsl/ReplaceTemplate.html
I've been trying to replace the titlepage.templates.xsl by call-template in
my frontcover.xsl, but i failed.

Here is the codes in my frontcover.xsl, and part of it are definitely wrong:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0"> <xsl:import

<xsl:template name="front.cover">
<xsl:call-template name="page.sequence">
<xsl:with-param name="master-reference">front-cover</xsl:with-param>
<xsl:with-param name="content">
<fo:block alignment-adjust="auto">
<fo:external-graphic src="" content-width="{$page.width}"
content-height="{$page.height}" display-align="center"/>

<xsl:template name="user.pagemasters">
<fo:simple-page-master master-name="front-cover"
page-width="{$page.width}" page-height="{$page.height}" margin-top="0pt"
margin-bottom="0pt" margin-left="0pt" margin-right="0pt">
<fo:region-body margin-top="0pt" margin-bottom="0pt" margin-left="-0pt"

       <xsl:template name="book.titlepage.recto">
<xsl:call-template name="user.pagemasters"/>

And all i want is to delete the recto page and keep the verso one - replace
the recto page by the image cover.

Can anyone give me some advice?

Thanks in advance.
Mona Qi

To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]