jonschlinkert / sublime-markdown-extended

Top 100 Sublime Text plugin! Markdown syntax highlighter for Sublime Text, with extended support for GFM fenced code blocks, with language-specific syntax highlighting. YAML Front Matter. Works with ST2/ST3. Goes great with Assemble.
https://github.com/jonschlinkert
MIT License
660 stars 96 forks source link

[For the record] LaTeX highlight issues #119

Open randy3k opened 8 years ago

randy3k commented 8 years ago

As the built-in LaTeX syntax contains $top_level_main (or the old $base), it is impossible to embedded it perfectly, see

https://github.com/jonschlinkert/sublime-markdown-extended/issues/49 https://github.com/sekogan/MarkdownLight/issues/2 https://github.com/textmate/textmate/pull/1276

Therefore I hacked the LaTeX syntax by forcibly matching some of the latex elements and prevent them being matched inside the scope of LaTeX. The hack is not beautiful and prefect, but it works in most cases.

For the full solution, rewriting the built-in LaTeX syntax is an option. One could also use other LaTeX syntaxes, for example, LaTeX-Plus syntax by me.

Naereen commented 7 years ago

Any update on this issue?

I am using Markdown-extended a lot, and it would help to have a good highlighting on inlined LaTeX code in Markdown files.

Example: first in Markdown, then in LaTeX :

Example: and so $x = y^3$
Example: and so $x = y^3$