Vscode-markdown: Can not render the $$...$$ block of KaTex if the first $$ is not the beginning of the line

Created on 30 Oct 2020  路  1Comment  路  Source: yzhang-gh/vscode-markdown

Problem

Can not render the $$...$$ block of KaTex if the first $$ is not the beginning of the line.
For example, if there are words before the first $$

abc $$
a = b
$$ def

it cannot render the math formula.

math Question Out of scope Upstream

Most helpful comment

If I recall correctly, it was by design.


Personally, allowing to embed display math area inside normal Markdown paragraphs would be extremely dangerous.

From the perspective of rendering, markdown-it-katex would be much more error-prone.

From the perspective of editing, creating TextMate grammars for such syntax is also a bad idea.

I'd recommend you to have a look at


If you really need display style math in a paragraph, a nice practice is the \displaystyle command. For example:

The optical path length in such medium is ${ \displaystyle [l] = \sum_{i}^{k}{ n_i l_i } }$.

>All comments

If I recall correctly, it was by design.


Personally, allowing to embed display math area inside normal Markdown paragraphs would be extremely dangerous.

From the perspective of rendering, markdown-it-katex would be much more error-prone.

From the perspective of editing, creating TextMate grammars for such syntax is also a bad idea.

I'd recommend you to have a look at


If you really need display style math in a paragraph, a nice practice is the \displaystyle command. For example:

The optical path length in such medium is ${ \displaystyle [l] = \sum_{i}^{k}{ n_i l_i } }$.
Was this page helpful?
0 / 5 - 0 ratings