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
GitHub recently(?) began rendering content inside ```math code blocks as LaTeX equations, that is,
```mathx = 1``\
get rendered the same way as
$$x = 1$$
Example:
$$x = 1$$
However it appears that Pandoc's gfm doesn't handle this. I'm trying pandoc -f gfm+tex_math_dollars --mathjax -s -t html5 -i issue.md -o issue.html and the code block syntax is rendered in HTML as a plain code block.
I am experimenting with ```math syntax because GitHub won't typeset LaTeX inside double-dollar notation if it spans multiple lines. For example, below is GitHub's rendering of the following:
$$ x = 2$$
vs
```math x = 3``\
$$
x =
2
$$
vs
$$x =
3$$
As you can see, it butchers the double-dollar multi-line equation but ```math is fine.
I know the risks of breaking with established patterns (like double-dollar signs, beautifully supported by LaTeX and Pandoc and many other tools for decades now) for syntax unilaterally introduced by Microsoft, which is why I am only tentatively experimenting with it.
A thousand apologies if this has been discussed before but I couldn't find it.
The text was updated successfully, but these errors were encountered:
fasiha
changed the title
GitHub now supports LaTeX in three-tick code block syntax
GitHub now supports LaTeX in three-tick code block syntax ```math
Feb 18, 2023
It's unfortunate that their implementation of $$ math has this limitation.
We can consider adding this, but in the mean time you can easy handle this with a short Lua filter that matches a CodeBlock with class math and replaces it with Para [Math DisplayMath ((contents))].
GitHub recently(?) began rendering content inside
```math
code blocks as LaTeX equations, that is,get rendered the same way as
Example:
However it appears that Pandoc's
gfm
doesn't handle this. I'm tryingpandoc -f gfm+tex_math_dollars --mathjax -s -t html5 -i issue.md -o issue.html
and the code block syntax is rendered in HTML as a plain code block.I am experimenting with ```math syntax because GitHub won't typeset LaTeX inside double-dollar notation if it spans multiple lines. For example, below is GitHub's rendering of the following:
$$
x =
2
$$
vs
As you can see, it butchers the double-dollar multi-line equation but ```math is fine.
I know the risks of breaking with established patterns (like double-dollar signs, beautifully supported by LaTeX and Pandoc and many other tools for decades now) for syntax unilaterally introduced by Microsoft, which is why I am only tentatively experimenting with it.
A thousand apologies if this has been discussed before but I couldn't find it.
The text was updated successfully, but these errors were encountered: