forked from jgm/lunamark
-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Labels
feature requestplaintexRelated to the plain TeX interface and implementationRelated to the plain TeX interface and implementationquality of lifeRelated to quality-of-life improvements to the interfaceRelated to quality-of-life improvements to the interface
Milestone
Description
Discussed in #121
Originally posted by Witiko March 5, 2022
At the moment, the \markdownSetup LaTeX command allows the redefinition of individual renderers and renderer prototypes. This has several shortcomings:
- It is tedious to redefine several renderer or renderer prototypes at once, such as those for the six levels of headings.
- Keeping some parts of the previous definitions is difficult. Common use cases include prepending and appending code to previous definitions, undoing previous redefinitions, and calling the previous definition from the redefinition.
It makes sense to consider these shortcomings together rather than in isolation. For example, redefining all six levels of headings to behave the same is seldom useful, but prepending or appending the same code to all six levels of headings or all ordered, unordered, and definition lists is a common pattern.
Here are some possible desiderata for a syntax extension to \markdownSetup:
- Backwards compatibility: Whatever is now valid in
\markdownSetupshould stay valid and keep its current meaning. - Bulk redefinitions: Allow several renderers or renderer prototypes to be redefined in bulk.
- Enumeration: Allow the explicit specification of several renderers or renderer prototypes to be redefined in bulk.
- Wildcards: Allow the implicit specification of several renderers or renderer prototypes to be redefined in bulk.
Requires Add reflection to the TeX implementation #119.
- Partial redefinitions: Instead of full redefinitions, allow the partial redefinitions of renderers and renderer prototypes.
- Prepending and appending: Instead of replacement, the code would be prepended or appended to the previous definition.
- Patching: Rather than replacing all of the previous definition, only a part of it could be replaced.
- Matching: Rather than replacing the previous definition, the previous definition could be arbitrarily reordered and interleaved with code.
This thread will list some of the ideas for the syntax extensions and outline which desiderata they satisfy.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
feature requestplaintexRelated to the plain TeX interface and implementationRelated to the plain TeX interface and implementationquality of lifeRelated to quality-of-life improvements to the interfaceRelated to quality-of-life improvements to the interface