Re: [docbook-apps] Numbered paragraphs

From
Jens Stavnstrup <>
Date
2014-08-01T22:55:47+00:00
ID
Thread
Re: [docbook-apps] Numbered paragraphs
Hi Richard

Have used this solution for many years. 

Note the parameter $use.para.numbering, which have to be defined or removed.

Regards

Jens

<xsl:template match="chapter/para

                     |appendix/para

                     |sect1/para

                     |sect2/para

                     |sect3/para

                     |sect4/para

                     |sect5/para">

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

    <xsl:if test="$use.para.numbering != 0">

      <xsl:number from="book" 

                 count="para[parent::chapter or

                               parent::appendix or

                               parent::sect1 or

                               parent::sect2 or

                               parent::sect3 or

                               parent::sect4 or

                               parent::sect5]" format="111" level="any"/>

      <xsl:text>. </xsl:text>

    </xsl:if>

    <xsl:apply-templates/>

  </fo:block>

</xsl:template>

On 2 August 2014 00:47, Richard Hamilton <> wrote:

Before I dive into a customization, has anyone ever customized the fo stylesheets to generate paragraph numbers? That is, sequentially numbering every paragraph in a book from the beginning to the end.

The ideal would be to put them into the margin, but I'd be happy with any method that assigned a sequential number to each paragraph.

Best regards,

Dick Hamilton

-------

XML Press

XML for Technical Communicators

http://xmlpress.net



---------------------------------------------------------------------

To unsubscribe, e-mail: 

For additional commands, e-mail: