Can you use different fonts in VSCode depedending on the code block?

Viewed 174

I usually use VScode to write Latex using the Latex Workshop extension.

When writing the tex file, for the normal text part of the document, I find it much easier to read non-code like fonts, such as Verdana. However, when writing equations and in math environments, I find code like fonts such as Consolas easier.

I normally just stick with Verdana, but I was curious to know if VSCode could use different fonts depending on the code block? Something like this,

\begin{document}

\section{Introduction}

So in the text part of the Latex document, I'd like VSCode to use a font such as Verdana.

\section{Some maths}

\begin{equation}
    But in a math environment, such as equation, I'd like a code-like font, something like Consolas
\end{equation}

And then back to Verdana.

\end{document}

I have no idea if this is possible, but Latex Workshop already highlights the text differently depending on if you are in a math environment or normal text. So is there a way to change the font as well?

Thanks in advance!

0 Answers
Related