vscode-markdown-pdf icon indicating copy to clipboard operation
vscode-markdown-pdf copied to clipboard

A bug of rendering latex formula

Open Sumsky21 opened this issue 4 years ago • 4 comments

For example, if there are a couple of * in latex formula and in one paragraph, like: ... $x^\*(\boldsymbol{b}) = a^\*$ ... Then export markdown file to PDF with the extension, it will idenify the *...* couple in latex formula as italic (which defined by native markdown grammer), thus destroy the rendering of latex. Here is the html code which converted from md source above: ... $x^<em>(\boldsymbol{b}) = a^</em>$ ... I think this is not a big problem (though it will bring unconvience to users like me), so the author can consider fixing this bug, or someone who have the ability to fix can create a PR.

Sumsky21 avatar Nov 12 '20 17:11 Sumsky21

Have had a similar problem trying to use new lines (i.e. \\) in a formula. The preprocessor thinks that this is a single escaped backslash, so actually you'd need to add two more slashes \\\\, which will afterwards be transformed into \\ when compiling the html and only then interpreted by the math processor. So the problem seems to be that the latex formulas seem like ordinary text to the markdown processor. The solution would be to ignore anything in between dollars when preprocessing the markdown file.

AntonC9018 avatar Mar 06 '21 09:03 AntonC9018

Yes, I've encounterd this problem too.

Sumsky21 avatar Mar 06 '21 12:03 Sumsky21

So do I.

lefpoem avatar Dec 01 '21 11:12 lefpoem

.

ahmadmustafaanis avatar Dec 25 '21 16:12 ahmadmustafaanis