mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-03 21:36:36 +00:00
Block problem when Math rendering (MathJax) #695
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @KaiDeMori on GitHub (Sep 4, 2024).
Good day! And thank you for this great libary. I have been using it for years now 🤗
At the moment, I am struggling to get math rendering to work.
The lines I seek to render are using the
\[mathgoeshere\]notation like this:If I simply put it in a HTML file with MathJax (see attached example) it works fine.
But when I try to use it in a markdig generated HTML page, it doesnt work. The
\in front of the[]s are missing and thev^2gets rendered as<sup>, which I guess must confuse MathJax.I can't use the $$ notation and all the
.mdfiles I have already use the square brackets blocks.I am normally using many extensions, but I removed all of them for now (for testing the math).
Without any extensions loaded, it works perfectly if I add an additional backslash in front of the block brackets
\\[texgoeshere\\]Although there seems to be ways to "fix" this, my question is how it is supposed to work. Like: What is the intended way of doing math?
I couldn't find real examples or a tutorial and would be happy to write some explanation for the docs, when I get it to work.
Of course it would be an honor to answer any questions, as I might not have been able to present the problem in best manner. Please forgive me.
I have read these other related topics:
#259
#307
and have read the pull request
#311
I thought the latter one should support my intended use-case 🤔
These are the extensions I usually load:
I don't mind switching to a different math-rendering library, if that's the cause. I am looking for the cleanest solution.
Please have a wonderful time everyone and thanks again for the amazing code!
math_trials.zip