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 #373

Merged
merged 32 commits into from
Dec 29, 2023
Merged

Conversation

Witiko
Copy link
Owner

@Witiko Witiko commented Nov 22, 2023

Closes #276.

Tasks

  • Move options import/theme from LaTeX (Section 2.3.2.3 of the technical documentation) to plain TeX (Section 2.2.2.5).
    • The documentation for options import/theme was moved in commit 3261f9f from this PR.
    • The options import/theme were moved to the plain TeX interface in commit 8253bb4 from this PR.
  • Define function \@@_load_theme:nn not only in LaTeX (Section 3.3.2.1 of the technical documentation), but also in plain TeX (new Section 3.2.2).
    • Prevent repeated loading of plain TeX themes.
  • Move theme witiko/tilde from LaTeX (Section 2.3.2.3 of the technical documentation) to plain TeX (new Section 2.2.2.5).
  • Move options snippet/import from LaTeX (Section 2.3.2.4 of the technical documentation) to plain TeX (new Section 2.2.2.6).
  • Move option code from LaTeX (Section 3.3.3 of the technical documentation) to plain TeX (Section 2.2.6).
  • House-keeping of the technical documentation:
    • Move sections 2.2.2.5 and 2.2.2.6 into higher-level sections 2.2.3 and 2.2.4.
    • Move Section 2.3.2.3 of the technical documentation into a new higher-level Section 2.3.3.
    • Move Section 3.3.2.1 of the technical documentation into a new higher-level Section 3.3.4.
  • Add macro \markdownSuper, which loads the plain TeX theme from the LaTeX theme.
    The macro \markdownSuper was documented in commit 3261f9f from this PR.
  • Rename \markdownSuper, which is a super confusing name, to \markdownLoadPlainTeXTheme.
  • Log whether a plain TeX or a LaTeX theme is being loaded.
  • Add support for ConTeXt themes by analogy with LaTeX themes at this point of the implementation.
  • Move default LaTeX, ConTeXt renderer (prototype) definitions to a new theme witiko/markdown/defaults.
  • Merge files plain-setup.tex and the LaTeX theme witiko/markdown/test into plain TeX theme with the same name.
    Create stub ConTeXt and LaTeX themes that use \markdownLoadPlainTeXTheme to load the plain TeX theme.

Here are some further remarks:

  • After the beginning of a document, loading a theme in LaTeX should emit an error if an *.sty file exists and load a *.tex file if it exists or emit an error otherwise.

@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 themes Related to Markdown themes labels Nov 22, 2023
@Witiko Witiko added this to the 3.3.0 milestone Nov 22, 2023
@Witiko Witiko self-assigned this Nov 22, 2023
@Witiko Witiko force-pushed the feat/universal-themes branch 7 times, most recently from e194dc5 to 8253bb4 Compare November 22, 2023 15:11
@Witiko Witiko force-pushed the feat/universal-themes branch 2 times, most recently from 3838560 to 245b83d Compare December 15, 2023 20:14
@Witiko Witiko marked this pull request as ready for review December 29, 2023 22:27
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 this pull request may close these issues.

Add support for universal (cross-format) themes
1 participant