tree-sitter-markdown icon indicating copy to clipboard operation
tree-sitter-markdown copied to clipboard

Injection for LaTeX blocks

Open brdoney opened this issue 2 years ago • 2 comments

Although it does not appear to have been added to the GFM spec, GitHub recently added support for LaTeX rendering on their website using $ and $$ blocks. It is more formally outlined here.

Accordingly, It would be amazing if the parser could be extended to detect LaTeX blocks as marked by $ and $$ and provide injections for them.

brdoney avatar Aug 24 '22 22:08 brdoney

Second this, it would be great because I often write latex in markdown with mathjax

danjenson avatar Sep 12 '22 06:09 danjenson

Good suggestion. This shouldn't be too much of a problem to implement.

MDeiml avatar Sep 15 '22 16:09 MDeiml

Looking forward to this as well!

SichangHe avatar Jan 27 '23 13:01 SichangHe

Looking forward to the implementation!

Entoryvekum avatar Jan 30 '23 05:01 Entoryvekum

FYI, there is a working PR for this, which should be able to be merged soon #71

MDeiml avatar Feb 02 '23 16:02 MDeiml

As #71 is closed now, all that is needed is for injection of latex is editor-specific configuration. For people using neovim that means some very small changes in nvim-treesitter. I'm happy to help if there are problems.

MDeiml avatar Feb 04 '23 09:02 MDeiml