[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: Indenting a paragraph
Jirka Kosek writes: > Guy Worthington wrote: > > > I like the european way of typesetting paragraphs, where > > the first paragraph after a heading isn't indented, but all > > following paragraphs are. Here's an idea in ASCII art: > > HEADING ONE > > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx > > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx > > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx > > xxxxxxxxxxxxxxxxxxxxx > > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx > > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx > > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx > > xxxxxxxxxxxxxxxxxxxxxx > > Only thing you need is such modification of stylesheets that doesn't > indent first para. It should be sufficient to add something like this > into your customization layer: > > <xsl:template match="para[1]"> > <fo:block text-indent="0em"> > <xsl:apply-imports/> > </fo:block> > </xsl:template> > > <xsl:template match="para"> > <fo:block text-indent="1em"> > <xsl:apply-imports/> > </fo:block> > </xsl:template> Perfect! You've made xsl code look almost readable. Paragraph layout in the customization layer is now controlled by the this code: 8<----------- cut here --------------8< <!-- ~~~~~~~~~~~~~~~~ --> <!-- Paragraph layout --> <!-- ~~~~~~~~~~~~~~~~ --> <xsl:template match="para[1]"> <fo:block xsl:use-attribute-sets="normal.para.spacing"> <xsl:call-template name="anchor"/> <xsl:apply-templates/> </fo:block> </xsl:template> <xsl:template match="para"> <fo:block xsl:use-attribute-sets="normal.para.spacing"> <xsl:attribute name="text-indent">0.15in</xsl:attribute> <xsl:attribute name="space-before.optimum">0pt</xsl:attribute> <xsl:attribute name="space-before.minimum">0pt</xsl:attribute> <xsl:attribute name="space-before.maximum">1pt</xsl:attribute> <xsl:call-template name="anchor"/> <xsl:apply-templates/> </fo:block> </xsl:template> 8<----------- cut here --------------8< The original problem (of having the bullet point for the listitem typeset on the line above the text for the list item) still exists. That is an itemizedlist look like: o xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxx o xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx o xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx For now I've overcome the problem by containing the listitem text in a simpar element. That is: <itemizedlist> <listitem> <simpara>xxxxxxxxxxxxxxxxxxxxx</simpara> </listitem> </itemizedlist> which, although a poor workaround, gives the correct list layout o xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxx o xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx o xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]