vscode-markdown: KaTex Math render problem
What is the problem?
This is a small problem. This code:
$\text{\`{a}}$ <code>\\`{a}</code>
on katex.org should be rendered like this:
However, I got this:
How can I reproduce it?
Write in your md file:
|||||
|:---------------------|:---------------------|:---------------------|:-----
|$\text{\'{a}}$ `\'{a}`|$\text{\~{a}}$ `\~{a}`|$\text{\.{a}}$ `\.{a}`|$\text{\H{a}}$ `\H{a}`
|$\text{\`{a}}$ <code>\\`{a}</code>|$\text{\={a}}$ `\={a}`|$\text{\"{a}}$ `\"{a}`|$\text{\v{a}}$ `\v{a}`
|$\text{\^{a}}$ `\^{a}`|$\text{\u{a}}$ `\u{a}`|$\text{\r{a}}$ `\r{a}`|
Is there any error message in the console?
No.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 17 (13 by maintainers)
I see. Thank you.
My friend, I didn’t come with demands. No need for a wake up call. I know reality just as you.
I suggested a feature, I gave a way to do both (MathJaX support and supporting space after
$
). It is up to you what to do with it.My logic is addressing Students and other people using LaTeX. If you feel this ignite motivation on your side, perfect. If not, I thank you for what you did so far.
As for me, I suggested a contribution of ~Hour of coding. Not because it is an hour work but in order to show I do appreciate your time and would like to show it.
Again, thank you for this nice extension. On my side, given a full LaTeX support it would have been the perfect student replacement for LaTex.
The
html
option is alreadytrue
. (See the source code (for vscode preview), source code (for exported HTML))looks no problem because you are lucky that there is no following
`
character to form an inlne code span. If you tryObserve the above Markdown syntax highlight and the markdown-it demo
both ` and \ need to escape
So theoretically, it should be
<code>\\\`</code>
rather than<code>\\`</code>
It is all about escaping the special characters
\
and`
.For inline code span, Markdown parser does seem to escape them. So you need to use
\\
to denote\
. And for code block, it seems that we can use\
without escaping.