shd101wyy / vscode-markdown-preview-enhanced

One of the "BEST" markdown preview extensions for Visual Studio Code
https://shd101wyy.github.io/markdown-preview-enhanced
Other
1.48k stars 173 forks source link

Should not interpret +, -, = etc as list indicators in math equations #871

Open Yue-Zhengyuan opened 2 years ago

Yue-Zhengyuan commented 2 years ago

Sometimes I separate a long equation into multiple lines, usually at math operators +, -, * etc. But MPE will interpret these as (unordered) list indicators and does not render the equation.

Screen Shot 2022-03-08 at 16 43 17

But this does not happen if the equation is wrapped in \begin{...} \end{...} (where ... can be equation, align etc), or when using the VS Code built-in markdown preview. I suggest that MPE should never create a list when it detects a math equation environment.


MPE version: 0.6.2 VS Code version: 1.64.2 (Commit: f80445acd5a3dadef24aa209168452a3d97cc326)

pilgrimlyieu commented 2 years ago

I think I've found an indirect solution.

You can add Tab before +, *, - and so on.

Example:

$$
\bar{i}j \bar{k}l
    + \bar{i}j\bar{k}l
    - \bar{i}j\bar{k}l
$$

Snipaste_2022-04-17_11-48-38

pilgrimlyieu commented 2 years ago

Additionally, I think \bar{\imath} and \vec{\imath} may have a better appearance than \bar{i} and \vec{i}.