Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for universal (cross-format) themes #276

Closed
Witiko opened this issue Mar 8, 2023 · 0 comments · Fixed by #373
Closed

Add support for universal (cross-format) themes #276

Witiko opened this issue Mar 8, 2023 · 0 comments · Fixed by #373
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

Comments

@Witiko
Copy link
Owner

Witiko commented Mar 8, 2023

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 TeX
  • markdownthemewitiko_markdown_example.sty in LaTeX
  • t-markdownthemewitiko_markdown_example.tex in ConTeXt
  • markdownthemewitiko_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 files markdownthemewitiko_markdown_test.sty and plain-setup.tex into a universal theme witiko/markdown/test.

This issue is currently blocked by #275.

@Witiko Witiko added plaintex Related to the plain TeX interface and implementation latex Related to the LaTeX interface and implementation context Related to the ConTeXt interface and implementation technical debt Related to code smells and refactoring expl3 Related to the high-level programming language expl3 optex Related to the OpTeX interface and implementation labels Mar 8, 2023
@Witiko Witiko added this to the 3.2.0 milestone Mar 8, 2023
@Witiko Witiko changed the title Add support for cross-format (fat) themes Add support for fat (cross-format) themes Mar 8, 2023
@Witiko Witiko changed the title Add support for fat (cross-format) themes Add support for universal (cross-format) themes May 9, 2023
@Witiko Witiko modified the milestones: 3.2.0, 3.3.0 Oct 18, 2023
@Witiko Witiko added the themes Related to Markdown themes label Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant