This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Please Help: Customizing "titlepage"


Stéphane,
I recently had to do the same thing. With some help from Ken Holman over
on the xsl-fo list <http://groups.yahoo.com/group/XSL-FO/message/740>, I
was able to figure it out. Here's what you need in your fo: 

    <!-- setup for single-sided, 1 column -->
    <fo:page-sequence-master master-name="oneside1">
      <fo:repeatable-page-master-alternatives>
		  <!-- adding this conditional-page-master
		  so that he first pages of chapters can have a
different running header. -->
		  <fo:conditional-page-master-reference
		  master-name="simpleFirstHeader"
		  page-position="first"/>
        <fo:conditional-page-master-reference master-name="simple1"/>
      </fo:repeatable-page-master-alternatives>
    </fo:page-sequence-master>

<!-- This simple-page-master for the first page of a chapter -->
     <fo:simple-page-master 
	  master-name="simpleFirstHeader" 
	  page-width="8.5in" 
	  page-height="11in" 
	  margin-top="1in" 
	  margin-bottom="1in" 
	  margin-left="10pc" 
	  margin-right="1in">
	  <fo:region-body 
		margin-bottom="24pt" 
		margin-top="24pt"/>
	  <!-- Adding a special region-before for the first page
	  of chapters -->
	  <fo:region-before 
		extent="14pt"
		region-name="xsl-region-before-first-chapter-page"/>
	  <fo:region-after 
		extent="14pt"/>
	</fo:simple-page-master>

Now you can add this to: 

	<fo:static-content 
	  flow-name="xsl-region-before-first-chapter-page">
	  <fo:block 
		text-align="center">
		<fo:block 
		  font-size="11pt">
		  Here's a header that only appears on the first page of
a chapter.
		</fo:block>
	  </fo:block>
	</fo:static-content>

The trick is to figure out that flow-name in fo:static-content
corresponds to region-name in fo: region-before. Let me know if you need
more info and I'll dig around let you know exactly how I hacked it into
the stylesheets. Norm gives you some hooks, like <xsl:template
name="user.pagemasters">, to add this stuff in.

Hope that helps,
David

> -----Original Message-----
> From: Stéphane Bline [mailto:sbline@club-internet.fr]
> Sent: Wednesday, September 19, 2001 3:19 PM
> To: docbook-apps@lists.oasis-open.org
> Subject: DOCBOOK-APPS: Please Help: Customizing "titlepage"
> 
> 
> All,
> 
> I am at a loss trying to customize the XSL stylesheets to behave in a
> certain way.
> Here's what I am trying to do. I would like the header on the 
> very first
> page of a chapter or an article to be different from all the 
> other headers
> of the chapter/article. I tried to customize the 
> titlepage.xml file and also
> to define additional fo-simple-page-masters. The problem with 
> this last
> solution is that I do not know how to tell the stylesheets to use this
> fo-simple-page-master for the first page and this other page 
> master for all
> remaining pages.
> This is a very urgent matter and I would appreciate any help 
> or pointer.
> 
> Thanks in advance,
> 
> Stéphane Bline.
> 
> 
> 
> ----------------------------------------------------------------
> To subscribe or unsubscribe from this elist use the subscription
> manager: <http://lists.oasis-open.org/ob/adm.pl>
> 
> 

----------------------------------------------------------------
To subscribe or unsubscribe from this elist use the subscription
manager: <http://lists.oasis-open.org/ob/adm.pl>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]