Skip to main content

Section 30.20 Direct PDF via XSL-FO

The conversions described so far in this chapter reach a PDF by way of , as an intermediate format (Section 30.18). An experimental alternative produces a PDF directly from an XSL-FO rendering of your source, formatted by Apache FOP, with no stage at all. This route is under active development and does not yet match the maturity or typographic polish of the route, so it is not yet a substitute for it.
One motivation for this route is accessibility: it produces a tagged, PDF/UA PDF, and every font it uses is fully embedded. Because there is no in the pipeline, the available fonts are a small, curated set rather than the whole ecosystem, and they are bundled with PreTeXt, so a build depends on no fonts installed on your machine. There are two choices for the text font, selected by the @font attribute of the <pdf> element of the publication file (Subsection 45.4.1).
The default, latin-modern, is the Latin Modern family of the route, so the two PDF routes share a body typeface. The alternative, alegreya, sets the text in Alegreya, a typeface designed for sustained reading. It is meant for text-heavy documents, such as proposals, reports, and writing in the humanities, where a distinctive book face is wanted; mathematics is supported, but is not the aim. Code and verbatim text use the same monospace font with either choice, and a small number of symbols absent from the text fonts are supplied from a fallback font. These two are the only fonts bundled for this conversion.