Summary, Discussion and Future Work

Christine was able to write a pipeline that can create a PDF from HTML and CSS by extending our CSS parser and using libraries that are used in xerif such as xml2tex and CoCoTeX. The presented software tool provides fundamental support for the PrintCSS specifications and could provide a basis for our clients to easily create their own layouts using PrintCSS.

However, due to the inherent differences between CSS and TeX, certain limitations in implementation may arise. In particular, complex layout features or specific typographic refinements may not be fully realized according to the PrintCSS standards. For example, while CSS allows you to specify the maximum number of orphans in a paragraph, in TeX you would specify a penalty. Multicolumn layouts work slightly differently in CSS and TeX and we did not introduce advanced CSS layout models like grid and flexbox.

Furthermore, CoCoTeX offers many layout features that are not possible with standard PrintCSS todays like a class system for figures and tables, improved word- and line-breaking options, custom dictionaries, advanced listings (ToC, LoT, LoF) and a robust PDF/UA-compliant accessibility support. Many of the CoCoTeX features did not make it yet into our PrintCSS renderer, but we plan to implement them as vendor-specific extensions in the future. More advanced CSS features need to be evaluated and might be implemented in TeX.

In any case, our goal isn't to cover the entire CSS specification. As with other PrintCSS formatters, there will always be limitations in the supported CSS vocabulary, which won't be particularly significant for users as long as they can realize their typographic ideas. After all, there is no web browser that support PrintCSS, and we certainly don't need CSS animations for xerif. Looking ahead, we aim to further explore the boundaries of what TeX can represent in the context of PrintCSS.