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

Support incremental definitions of token renderers and renderer prototypes in the \markdownSetup command #435

Merged
merged 20 commits into from
Apr 23, 2024

Conversation

Witiko
Copy link
Owner

@Witiko Witiko commented Apr 17, 2024

This PR adds support to incremental definitions of token renderers and renderer prototypes in the \markdownSetup plain TeX command using the following syntax:

\markdownSetup {
  renderers = {  % or rendererPrototypes
    headingOne += { code },  % Appends `code` to the top-level heading.
    % ...
  }
}

(Originally drafted in #232 (comment).)

This PR continues #232.

Tasks

  • Implement prepending/appending.
  • Unimplement prepending and change the syntax of appending from $= to +=.
    It's unclear that prepending (^=) has useful uses.
    Furthermore, characters ^ and $ in keys are difficult to parse due to their catcodes.
  • Change \g_@@_appending_bool to \g_@@_appending_renderer_bool and renderer_prototype_bool.
  • Reimplement appending without etoolbox, so that TeX formats other than LaTeX can easily be supported.
  • Redefine default headerAttributeContextBegin renderer prototype for LaTeX using appending, as discussed in #232.
  • Document appending in renderers and renderer prototypes.
  • Ensure no TODOs remain in the Files changed tab.
  • Review the text of the technical documentation.
  • Update CHANGES.md.

@Witiko Witiko added feature request plaintex Related to the plain TeX interface and implementation quality of life Related to quality-of-life improvements to the interface labels Apr 17, 2024
@Witiko Witiko added this to the 3.5.0 milestone Apr 17, 2024
@Witiko Witiko self-assigned this Apr 17, 2024
@Witiko Witiko force-pushed the feat/support-prepending-and-appending branch from 47a39e5 to abd174d Compare April 19, 2024 12:06
@Witiko Witiko force-pushed the feat/support-prepending-and-appending branch from abd174d to 7779bb4 Compare April 19, 2024 12:29
@Witiko Witiko changed the title Support prepending and appending in the \markdownSetup plain TeX command Support incremental definitions of token renderers and renderer prototypes in the \markdownSetup plain TeX command Apr 19, 2024
@Witiko Witiko force-pushed the feat/support-prepending-and-appending branch from 4b638bb to 30182f1 Compare April 19, 2024 21:32
@Witiko Witiko force-pushed the feat/support-prepending-and-appending branch from 8f7e174 to b1d71b7 Compare April 22, 2024 14:32
@Witiko Witiko force-pushed the feat/support-prepending-and-appending branch from 48994ec to 8b24efa Compare April 22, 2024 16:00
@Witiko Witiko marked this pull request as ready for review April 22, 2024 16:01
@Witiko Witiko changed the title Support incremental definitions of token renderers and renderer prototypes in the \markdownSetup plain TeX command Support incremental definitions of token renderers and renderer prototypes in the \markdownSetup command Apr 22, 2024
@Witiko Witiko force-pushed the feat/support-prepending-and-appending branch from cb15454 to 147e854 Compare April 22, 2024 22:21
@Witiko Witiko marked this pull request as draft April 23, 2024 08:04
@Witiko Witiko marked this pull request as ready for review April 23, 2024 09:12
@Witiko Witiko added the automerge This pull request will be automatically merged after continuous integration has succeeded label Apr 23, 2024
@Witiko Witiko force-pushed the feat/support-prepending-and-appending branch from 57f2d0c to 5fed4f7 Compare April 23, 2024 10:26
@github-actions github-actions bot merged commit 391c1ec into main Apr 23, 2024
15 checks passed
@Witiko Witiko deleted the feat/support-prepending-and-appending branch April 23, 2024 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge This pull request will be automatically merged after continuous integration has succeeded feature request plaintex Related to the plain TeX interface and implementation quality of life Related to quality-of-life improvements to the interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant