You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we have a hack in place for inline latex using:
```latex
...
```
Which is the only standard mechanism in place,
this suffers from at least 1 problem:
It is not possible to tell if we should attempt to syntax highlight the latex code(good luck, parsing TeX is turing complete.), or if we want to render it.
We could recommend something like:
```latex render=true
...
```
but the render=true part Is ignored and not exposed by the markdown parser, so we cannot branch on it. Better inline LaTeX is really required, unfortunately the ecosystem is a mess
My preference is to implement the consistent attribute syntax. While consistent attribute syntax is largely orthogonal to math support it includes attributes on code blocks `...`{.$},
Which should be consistent with code fences
```$
...
```
being equivalent to:
```
...
```{.$}
Once we have the consistent attribute syntax in place, it's fairly easy to introduce the necessary syntaxes for supporting KaTeX or MathJax in pulldown_cmark, and enable them based upon a config::Document::comment_format.
The difficulty here isn't in coming up with the parser syntax changes, but making sure the AST has a uniform data structure to parse it to, Unfortunately that comes along with a bunch of non-math attributes for every Markdown element, and a few questions about how it interacts with the existing markdown extensions.
The text was updated successfully, but these errors were encountered:
Currently we have a hack in place for inline latex using:
Which is the only standard mechanism in place,
this suffers from at least 1 problem:
It is not possible to tell if we should attempt to syntax highlight the latex code(good luck, parsing TeX is turing complete.), or if we want to render it.
We could recommend something like:
but the render=true part Is ignored and not exposed by the markdown parser, so we cannot branch on it. Better inline LaTeX is really required, unfortunately the ecosystem is a mess
My preference is to implement the consistent attribute syntax. While consistent attribute syntax is largely orthogonal to math support it includes attributes on code blocks `...`{.$},
Which should be consistent with code fences
being equivalent to:
Once we have the consistent attribute syntax in place, it's fairly easy to introduce the necessary syntaxes for supporting KaTeX or MathJax in pulldown_cmark, and enable them based upon a config::Document::comment_format.
The difficulty here isn't in coming up with the parser syntax changes, but making sure the AST has a uniform data structure to parse it to, Unfortunately that comes along with a bunch of non-math attributes for every Markdown element, and a few questions about how it interacts with the existing markdown extensions.
The text was updated successfully, but these errors were encountered: