iamcco / markdown-preview.nvim

markdown preview plugin for (neo)vim
MIT License
6.67k stars 277 forks source link

Cannot use ```math code block #528

Open jjeffrey opened 1 year ago

jjeffrey commented 1 year ago

Describe the bug There is no option to use the math fenced code block in the style of GitHub to render LaTeX expressions. (But I might have missed the option.)

To Reproduce

Write

This is the Pythagorean equation
$$
a^2 + b^2 = c^2
$$
This is the Pythagorean equation
``` math
a^2 + b^2 = c^2
```

The top one renders via a LaTeX renderer, the bottom one does not.

Expected behavior I would like a code block rendered with ```math ``` to be displayed with a LaTeX renderer as if it has been written surrounded by $$ $$.

Screenshots image

Desktop (please complete the following information):

LinuxIsCool commented 10 months ago

This would be very helpful to synchronize MarkdownPreview with GitHub markdown rendering.

LinuxIsCool commented 10 months ago

Anyone know where in the code to begin attempting to add this feature?