FO Tips and Tricks |
||||
Examples in this set share a common simple XML markup. The backbone XSLT stylesheet generic.xsl contains basic templates that produce valid XSL FO (XSLFO) documents given one of these examples. Most individual XML files have a complementary stylesheet that demonstrates specific XSL FO techniques employed for a particular use case or trick. All these stylesheets import generic.xsl backbone. Images referenced in this set can be downloaded here: images.zip. |
||||
Character-by-character font selection strategy |
||||
Explains use of font-selection-strategy attribute with character-by-character value for texts in mixed languages or different charsets. Source XML: charbychar.xml |
||||
Creating drop capitals using side floats |
||||
Create dropped capitals from either plain text or image. Source XML: dropcap.xml |
||||
Basic use of side floats |
||||
Shows how to use <fo:float> elements with different values of clear property to create incuts (illustrations) and floating headers. Source XML: float.xml |
||||
Fonts embedding |
||||
Embeds fonts of different types (Type1, TrueType, CJK) and shows appopropiate configuration settings. Source XML: fontembed.xml |
||||
Scaling images using scale-to-fit |
||||
Scales down images using scale-to-fit value of content-width and content-height traits. Source XML: image-scale.xml |
||||
Creating document indexes using RenderX extensions |
||||
Creates document indexes using RenderX extensions. Single-page and range references, different styling for index entries. Source XML: index.xml |
||||
Creating marginalia using side floats |
||||
Creates marginalia (notes on margins synchronized with the main text) using <fo:float> elements together with margin property. Source XML: marginalia.xml |
||||
Instream SVG in XSL FO (XSLFO): Tree graphs |
||||
Creates XSL FO (XSLFO) document with embedded SVG graphic generated from arbitrary XML data. Shows one possible usecase of SVG usage - generation of tree graphs from phrase constituent structures. Source XML: svg1.xml |
||||
Instream SVG in XSL FO (XSLFO): Diagrams |
||||
Creates XSL FO (XSLFO) document with embedded SVG graphic generated from arbitrary XML data. Shows one possible usecase of SVG usage - generation of a diagram based on numeric data stored in XML. Source XML: svg2.xml |
||||
Use of rx:table-omit-initial-header parameter |
||||
Shows use of rx:table-omit-initial-header RenderX extension attribute to create continuation headers in tables. Source XML: table-header.xml |
||||
Decimal point alignment using fo:list-block or fo:leader |
||||
Emulates the effect of text-alignment="." using fo:list-block or fo:leader elements. Source XML: decalign.xml |