Add support for universal (cross-format) themes #276
Labels
context
Related to the ConTeXt interface and implementation
expl3
Related to the high-level programming language expl3
latex
Related to the LaTeX interface and implementation
optex
Related to the OpTeX interface and implementation
plaintex
Related to the plain TeX interface and implementation
technical debt
Related to code smells and refactoring
themes
Related to Markdown themes
Milestone
Since version 2.10.0 of the Markdown package, we have supported LaTeX themes and snippets. We should move the concepts of themes and snippets from the LaTeX layer to the plain TeX + expl3 layer (see a recent layer diagram of the Markdown package). On-disk, a theme would correspond to different files for different TeX formats. For example, the theme
witiko/markdown/example
would load the following files in different formats:markdownthemewitiko_markdown_example.tex
in plain TeXmarkdownthemewitiko_markdown_example.sty
in LaTeXt-markdownthemewitiko_markdown_example.tex
in ConTeXtmarkdownthemewitiko_markdown_example.opm
in OpTeX (blocked by Support OpTeX #215)This architecture enables the creation of universal (aka fat) Markdown themes that work across different TeX formats. Formats without their format-specific theme would fall back to the plain TeX theme and issue a warning.
Besides the utility of universal themes for third parties, who can use Markdown as a unifying framework on top of different TeX formats, universal themes also present opportunities for simplifying the architecture of the Markdown package itself: We can neatly package all the default definitions of renderer prototypes as a single universal theme
witiko/markdown/defaults
, which could become its own independent TeX package in the future similar to lt3luabridge. We can also simplify the architecture of unit tests by merging filesmarkdownthemewitiko_markdown_test.sty
andplain-setup.tex
into a universal themewitiko/markdown/test
.This issue is currently blocked by #275.
The text was updated successfully, but these errors were encountered: