MyST-Parser
MyST-Parser copied to clipboard
Use pandoc divs for directives
I propose to use pandoc syntax for divs for directives (try):
::: {.block param="1" argument="Title"}
Text in block
::: {.nested param="2"}
Text
:::
:::
This syntax is already essentially available in https://myst-parser.readthedocs.io/en/latest/using/syntax-optional.html#admonition-directives
Arbitrary use is not supported though, because they need to map onto a node type in the AST.
In pandoc, although you have these divs, they only really work for HTML, to literally add a div
tag around content, unless you specifically create a filter to deal with them. They don't extend to other output formats like LaTeX where IIRC they are just dropped.
Do you have a specific use case?