White Papers/Ruler

From Docs

Jump to: navigation, search

Get PDF

Line numbering functionality

Some documents require all of its lines to be numbered. I've implemented an extension -- rx:ruler -- that automatically numbers text lines. Beeing nested in any reference area, it puts line numbers at fixed intervals.

Note: there is no relationship between actual text line areas and digits in the ruler, so empty lines will also be numbered.

Format of these numbers is governed by the format property. Also the following XSL FO properties are applicable to the rx:ruler element: font properties, text-align, writing-mode.

XEP4 contains the same extension (although it was never advertised), so users of XEP4 may be familar with it. Here is an example:

<fo:block-container>
  <rx:ruler format="1"
            width="16pt"
            text-align="start"/>
  <fo:block start-indent="16pt">
    Text lines to be numbered here...
  </fo:block>
</fo:block-container>

Alexei Gagarinov

Personal tools