PrintCSS Meets TeX
Christine Windeln and Martin Kraetke
Overview
- Building a PrintCSS Renderer
- Demo
- Outlook and Q/A
Building a PrintCSS Renderer
MarkupUK 2023
- introduced xml2tex
- schema-agnostic configuration
- used for docx2tex and xerif
Creating Layouts for xerif
- TeX: steep learning curve and abstract concepts (tokens, expansion control, and macro definitions)
- TeX programmers are a rare species
- need to learn CoCoTeX as well
Would PrintCSS serve as an alternative?
- moderatly easy to learn
- limited features, partly ambiguous specifications
- dependent on Prince and AH for professional use
Render PrintCSS with TeX?
- CSS: easy layout setup
- TeX: powerful rendering engine
Render PrintCSS with TeX?
- declarative vs procedural
- TeX has no HTML or CSS parser
- different concepts
I. Parsing PrintCSS
- EBNF schema parser XSLT
- Output: CSS XML and XHTML/CSSa
II. XSLT Transformations
- insert placeholder elements in XHTML
- generate xml2tex config from CSS XML and XHTML
- apply xml2tex on XHTML
Outlook
- integrate in xerif
- add xerif features as vendor-specific extensions
- explore CSS modules such as grid, flexbox