Apache FOP 2.1 | DocBook XSL 1.78.1
Some notes and useful links for working on FOP/XSL customization of the PDF template.
Table of Contents
- Apache™ FOP v2.1:
- DocBook XSL: The Complete Guide:
- Adding a font — tutorial (FOP v0.93)
- Fonts and FOP — tutorial by Jean-François Perrot.
The Adobe PostScript and PDF Specification specify a set of 14 fonts that must be available to every PostScript interpreter and PDF reader: Helvetica (normal, bold, italic, bold italic), Times (normal, bold, italic, bold italic), Courier (normal, bold, italic, bold italic), Symbol and ZapfDingbats.
The following font family names are hard-coded into FOP for the Base-14 font set:
Base-14 font | font families |
---|---|
Helvetica | Helvetica, sans-serif, SansSerif |
Times | Times, Times Roman, Times-Roman, serif, any |
Courier | Courier, monospace, Monospaced |
Symbol | Symbol |
ZapfDingbats | ZapfDingbats |
Please note that recent versions of Adobe Acrobat Reader replace "Helvetica" with "Arial" and "Times" with "Times New Roman" internally. GhostScript replaces "Helvetica" with "Nimbus Sans L" and "Times" with "Nimbus Roman No9 L". Other document viewers may do similar font substitutions. If you need to make sure that there are no such substitutions, you need to specify an explicit font and embed it in the target document.
In earlier FOP versions, it was always necessary to create an XML font metrics file if you wanted to add a custom font. This inconvenient step has been removed and in addition to that, FOP supports auto-registration of fonts, i.e. FOP can find fonts installed in your operating system or can scan user-specified directories for fonts. Font registration via XML font metrics has been deprecated and is not recommended although it is still supported by the current code.
FOP 2.1 doesn't support font ligatures in PDF:
OpenType fonts support advanced layout features such as ligatures, small caps, swashes, alternates, old style figures and more. [...] These features are currently missing within FOP due to the implementation opting to favor a greater number of formats. [...] the current method extracts the Compact Font Format (CFF) data containing among other things the character definitions, optionally subsets and embeds the result as a Type1C font.
- DocBook XSL: The Complete Guide:
- programlisting and other verbatim elements — by New Mexico Tech Computer Center.
References:
- https://www.oxygenxml.com/samples/xslt-documentation/docbook/docbook2.html#P_callout.defaultcolumnS_param.xsl
- https://www.systutorials.com/docs/linux/packages/docbook-style-xsl-1.78.1/doc/html/callouts.html
- http://www.sagehill.net/docbookxsl/CustomAdmonitions.html
- http://www.sagehill.net/docbookxsl/PrintIcons.html#PrintAdmonGraphics
- http://www.sagehill.net/docbookxsl/PrintHeaders.html
- http://infohost.nmt.edu/~shipman/doc/doc5style/web/fo-head-foot.html
Asciidoctor-fopub uses the following components versions:
Software Project | Version |
---|---|
Apache FOP | 2.1 |
DocBook XSL | 1.78.1 |
Apache Commons XML Resolver | 1.2 |
Xalan | 2.6.0 |
JEuclid | 3.1.9 |
XSLTHL | 2.1.0 |
Gradle | 2.0 |
- Apache™ FOP v2.1:
- XSL FO reference — by Miloslav Nic.
- Practical Formatting Using XSL-FO — free eBook by Crane Softwrights Ltd.
- DocBook XSL: The Complete Guide:
- Adding a font — tutorial (FOP v0.93)
- Syntax highlighting
- DocBook XSL Stylesheets: Reference Documentation:
- XSLTHL Wiki:
- Syntax Highlighters (syntax definitions specs)
- Schema Central » XSL-FO 1.1
- Adobe: Font technical notes
- Wikipedia » XSLT (Extensible Stylesheet Language Transformations)
- asciidoctor-fopub — at GiHub.
Dependencies:
- Apache™ FOP (Formatting Objects Processor)
- XSLTHL (XSLT syntax highlighting) — at Sourceforge.
- DocBook XSL
- Apache Commons XML Resolver
- Xalan
- JEuclid
- Gradle
- DocBook 5: The Definitive Guide — (DocBook 5.0) by Norman Walsh, online book.
- DocBook Wiki — (rebooted) on GitHub.
- Wikipedia » DocBook
- DocBook XSL: The Complete Guide — (4th Edition) by Bob Stayton, online book.
- DocBook XSL Stylesheets: Reference Documentation — by Norman Walsh, online book.
- Wikipedia » DocBook XSL
- https://github.com/docbook/xslt20-stylesheets
- https://github.com/docbook/xslt10-stylesheets
- XSLTHL (XSLT syntax highlighting) — at Sourceforge.
- XSLTHL Wiki — at Sourceforge.