XML technologies / XSL-FO / Reference / Antenna House Formatter XSL Extensions / Properties / leader-expansion

(Excerpt from "XSL-FO ― Die Referenz" by Manuel Montero Pineda & Steffen Herkert, 2016, dpunkt.verlag)

A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z

Category Spacing and Alignment >> Text Alignment

axf:leader-expansion specifies whether to expand a leader forcibly. [no-LT]

Value:

auto | force

Initial value:

auto

Applies to:

fo:block

Inherited:

yes

Percentages:

N/A

Values have the following meanings.

auto

Operates as usual by specifying text-align.

force

Considers a line with leaders as text-align="justify". Consequently, leaders will expand.

Suppose you create a table of contents using leaders. Then you might want to format as follows with the length of a label, or the length of the number of pages.

  1. Short Label ................................. 10, 20, 30
    
  2. Short Label ... 10, 20, 30, 40, 50, 60, 70, 80, 90, 100,
               110, 120, 130, 140, 150
    
  3. Very Loooooooooooooooooooooooooooooooooooooong Label ...
    ............................................. 10, 20, 30
    
  4. Very Loooooooooooooooooooooooooooooooooooooong Label ...
    ..... 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120,
                   130, 140, 150
    
  5. Very Very Very Loooooooooooooooooooooooooooooooooooooong
    Long Long Label ............................. 10, 20, 30
    
  6. Very Very Very Loooooooooooooooooooooooooooooooooooooong
    Long Long Label .... 10, 20, 30, 40, 50, 60, 70, 80, 90,
              100, 110, 120, 130, 140, 150
    

When the following XSL Standard is specified,

<fo:block text-align="justify" text-align-last="justify"> Label <fo:leader leader-pattern="dots"/> Pages </fo:block>

only the simple 1. and 5. can get the expected results. And 3. can be performed by the following specification.

<fo:block text-align="justify" text-align-last="justify"> Label <fo:leader leader-length.minimum="0pt" leader-pattern="dots"/><fo:leader leader-pattern="dots"/> Pages </fo:block>

Next, by using axf:text-align-first as follows,

<fo:block text-align="justify" text-align-last="right" axf:text-align-first="justify"> Label <fo:leader leader-length.minimum="0pt" leader-pattern="dots"/><fo:leader leader-pattern="dots"/> Pages </fo:block>

all cases excluding 3. and 5. gets the result as expected. Furthermore, by using axf:leader-expansion as follows,

<fo:block text-align="justify" text-align-last="right" axf:text-align-first="justify" axf:leader-expansion="force"> Label <fo:leader leader-length.minimum="0pt" leader-pattern="dots"/><fo:leader leader-pattern="dots"/> Pages </fo:block>

all cases of 1. to 6. gets the result as expected.

This property is not available with AH Formatter V6.3 Lite.

back to top