TeXstudio and highlighting of units syntax (ex, em, mm, cm, pt, ...) #3587
-
I am moving from TeXnicCenter to the TeXstudio and wondering, if there is a way, how to make a custom syntax color for units like (pt, in, mm, cm, ex, em) in TexStudio. TexnicCenter has option for custom syntax of units but TexStudio not. I am trying to customize tex.qnfa without desirable effect. Can anyone help me how to solve this please? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I don't answer the question but, for the units, I strongly advise the \documentclass{article}
\usepackage{lmodern}
\usepackage{siunitx}
\begin{document}
When I'm sleeping, I'm running \qty{0}{\km} each \unit{\us}.
\end{document} TXS provides completion for it. |
Beta Was this translation helpful? Give feedback.
-
I found the solution which is ok to me. It is adding the custom syntax color for length units (pt, em, mm, cm, pt,...) but also for number in front of the unit. This code needs to be added to the tex.qnfa file:
the color of the syntax is linked to the verbatim environment color. |
Beta Was this translation helpful? Give feedback.
I found the solution which is ok to me. It is adding the custom syntax color for length units (pt, em, mm, cm, pt,...) but also for number in front of the unit. This code needs to be added to the tex.qnfa file:
the color of the syntax is linked to the verbatim environment color.