[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [docbook] Clean way to insert a "pause" between blocks of paragraphs?
--- "James J. Ramsey" <jjramsey_6x9eq42@yahoo.com> wrote: > I created a stylesheet with the following content: > > <?xml version='1.0'?> > <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 > href="file:///usr/share/sgml/docbook/xsl-stylesheets/fo/docbook.xsl"/> > > <xsl:template > match="processing-instruction('jjfo')[contains(.,'pause')]"> > <fo:block font-size="12pt" > text-align="center" > space-before="12pt" > keep-with-previous="always"> > </fo:block> > </xsl:template> > -- snip --- > > The result looks kind of ugly because the Docbook > XSL > stylesheet distiguishes paragraphs with blank lines > instead of indenting by default, but it's a start. The following stylesheet looks *much* better, IMHO: <?xml version='1.0'?> <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 href="file:///usr/share/sgml/docbook/xsl-stylesheets/fo/docbook.xsl"/> <xsl:template match="processing-instruction('jjfo')[contains(.,'pause')]"> <fo:block font-size="12pt" text-align="center" space-before="6pt" keep-with-previous="always"> . . . </fo:block> </xsl:template> </xsl:stylesheet> With paragraphs demarked by blank lines instead of indentation, the three centered periods work better than just blank space. The tricky part is making sure the spacing above is about the same as the spacing below, since the periods obviously have about 12 points of space on top of them. Setting the "space-before" attribute to 6 points seems to keep the periods centered between paragraphs, although I'm not sure of the details of why it works out that way. __________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]