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: reducing font sizes for a chapter in a book

I’ve got a book that I need to output to 2 different page formats, a larger size (7.5x9) for online viewing and a smaller size (4.125x6) for print, so I’ve got a separate stylesheet for each book even though both books contain the same XML content.


For the printed book, I’d like to keep the page count under 300 pages. Consequently, I’ve decided to reduce the fonts of two chapters of the book (which contain specifications, regulatory info, etc.). I did this by adding a custom attribute called “reducefont” to many elements, and then I process those elements whose reducefont attribute is set to “yes”, thus reducing the font size by 60%:


<xsl:template match="d:para">

  <fo:block xsl:use-attribute-sets="normal.para.spacing">

    <xsl:if test="@reducefont and (@reducefont = 'yes')">

      <xsl:attribute name="font-size">

        <xsl:value-of select="$body.font.master * .6"/>




    <xsl:call-template name="anchor"/>





This works, but it seems like a hack. Is there a simpler way to resize the fonts in these two chapters?



Jeff Powanda

Vocera Communications, Inc.

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