[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: DOCBOOK-APPS: Overiding Chapter Title formatting
On Tue, Feb 25, 2003 at 01:02:19PM -0500, Brian Burridge wrote: > I see how to do this: > <xsl:param name="local.l10n.xml" select="document('')"/> > <l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"> > <l:l10n language="en"> > <l:context name="title"> > <l:template name="chapter" text="Chapter %n %t"/> > </l:context> > </l:l10n> > </l:i18n> > > But I want to put a line break after the "Chapter X" and before the > Chapter Title. How do I put a page break in there? Line breaks in FO are not as easy as with HTML's <br> tag. Each line should appear in its own <fo:block>: <fo:block>Chapter 3</fo:block> <fo:block>My Chapter Title</fo:block> You can't do that by editing the gentext templates. Here is how you can do it with a customization layer. Currently the chapter titles are designated in fo/titlepage.templates.xml to use the 'component.title' template to format the chapter title. You would have to clone the component.title template (from fo/component.xsl) to a customization layer (say, to a template named 'chapter.title'). Then designate that new template in titlepage.templates.xml to be used for chapter. Then generate from that a new titlepage.templates.xsl for your customization so the chapter.title template is used for chapters. Your customized 'chapter.title' template would have to use mode="label.markup" to get the "Chapter X" part, and put that in one fo:block. Then it would have to use mode="title.markup" (instead of "object.title.markup which does the label and title), and put that in a second fo:block. -- Bob Stayton 400 Encinal Street Publications Architect Santa Cruz, CA 95060 Technical Publications voice: (831) 427-7796 The SCO Group fax: (831) 429-1887 email: bobs@sco.com
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC