XML-Technologien / XSL-FO / Referenz / Antenna House Formatter XSL Extensions / Elements / space-after-punctuation
(Auszug aus "XSL-FO ― Die Referenz" von 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 Extension for European Rule
Specifies the amount of space after the punctuation.
XSL-FO sample:
<fo:root font-size="12pt" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:cpfo="http://www.compart.net/xmlns/cpfo" xmlns:svg="http://www.w3.org/2000/svg" xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions">
<axf:document-info name="author" value="Alex Critchfield, Antenna House"/>
<axf:document-info name="keywords" value="extensions, punctuation, spacing, sample, example"/>
<axf:document-info name="subject" value="punctuation spacing extensions"/>
<axf:document-info name="title" value="punctuation spacing extensions example"/>
<fo:layout-master-set>
<fo:simple-page-master page-width="8.5in" page-height="11in" master-name="main">
<fo:region-body region-name="body" margin-top="1in" margin-bottom="1in" margin-left=".75in" margin-right=".75in"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:declarations>
<axf:space-after-punctuation code="." space="2in" language="en"/>
</fo:declarations>
<fo:page-sequence master-reference="main">
<fo:flow flow-name="body">
<fo:block space-after="10mm">
Formatter has extensions to customize the spacing around punctuation. These are used mostly for documents in European languages.
</fo:block>
<fo:block space-after="10mm" font-family="monospace" white-space-treatment="preserve" linefeed-treatment="preserve">
The following code has been added as a child of the fo:declarations element:
<axf:space-after-punctuation code="." space="2in" language="en"/>
</fo:block>
<fo:block space-after="10mm" space-before="10mm" language="en">
This block has the property language="en". This will cause the spacing extension to be applied and there will be 2 inches of space after the periods. The first block does not have language property so the extension isn't applied.
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>Output: