Abstract
In the previous edition of Markup UK, I examined various methodologies for converting XML to TeX in the context of automated typesetting. Among the approaches discussed was our xml2tex conversion library, which can be configured to accommodate virtually any XML input and TeX output. Alongside the TeX framework CocoTeX, xml2tex constitutes one of the two core components of our xerif typesetting system.
While xerif continues to rely on XML as its input format, all formatting must be specified in TeX. However, TeX’s complexity poses a significant challenge for many users attempting to create layouts themselves. This difficulty is further compounded by the fact that xerif includes its own TeX framework, CocoTeX, which extends LaTeX with numerous custom macros, a custom metadata and table model, accessibility support, and more. This makes layout creation a resource-intensive and time-consuming process, posing a significant challenge for external beginners trying to use xerif with ease.
In contrast to TeX, PrintCSS is considered easy to learn and user-friendly thanks to its familiar CSS syntax. In the field of automated publishing, PrintCSS has gained widespread popularity. PrintCSS encompasses a set of CSS specifications designed to facilitate page layout, content fragmentation (pages, columns, or regions), and content generation (such as running headers, page numbers, and listings). With PrintCSS, HTML or XML can be formatted for paged media output in much the same way CSS is used for styling conventional web pages. However, it does come with notable limitations: The existing specifications lack certain features and, in some areas, remain underspecified.
We believe that generating TeX from PrintCSS is both a promising and intriguing approach. Many formatting capabilities available in PrintCSS can be effectively rendered using TeX. However, the fundamental differences between these two technologies necessitate workarounds and, in some cases, complex programming solutions. Our goal is to showcase the potential of this approach while also addressing the challenges posed by the differences between these paradigms.
Table of Contents