Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] Syntax highlights for LaTeX math expressions in Markdown #198

Open
thunderbird-1990 opened this issue Sep 8, 2023 · 0 comments

Comments

@thunderbird-1990
Copy link

At the moment, PaperColor does not provide syntax highlight for LaTeX math expressions inside (e.g., Pandoc-style) Markdown files.

01

I am aware that some plugins (e.g., vim-pandoc-syntax, vim-markdown) can achieve this, but my experience is that PaperColor looks better (e.g., see this issue or this issue on why the two plugins above don't look as nice as PaperColor).

At the moment, I use vim-SyntaxRange so that Vim treats math expressions inside Markdown files as LaTeX "environments", something like this:

autocmd BufReadPost *.md call SyntaxRange#IncludeEx('start="\\\@<!\$" end="\$" skip="\\\$"', 'tex') | call SyntaxRange#IncludeEx('start="\\\@<!\$\$" end="\$\$" skip="\\\$"', 'tex')

02

I am wondering whether this can be implemented in PaperColor. According to this, Vim-markdown does something similar and treats math expressions as LaTeX environments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant