Search code examples
visual-studio-codeautocompletelatexmarkdownsyntax-highlighting

VS Code Latex Syntax in Markdown


I am currently writing a document with pandoc markdown and therefore use latex syntax.

How can I get Latex support (autocomplete, syntax highlighting, etc.) while writing in a .md file?

The Latex Workshop extension works fine for .tex files but I couldn't find an option to add file types.

Thanks in advance.


Solution

  • After being troubled by this problem for a long time, I have found a solution.

    1. Install Latex Workshop Extension https://github.com/James-Yu/LaTeX-Workshop

    2. Switch the Language Mode (right corner in your vscode) of your markdown files from Markdown to markdown_latex_combined.

    3. Profit :D