I have defined several macros in my LaTeX report. For instance, following is a macro I defined for writing bold letter H. I have several macros like this I use throughout my work.
\newcommand{\channel}{\ensuremath{\mathbf{H}}}
Whenever I use \channel
, TeXstudio highlights it as red saying unknown-command. But it is indeed supported by the auto-completion feature. I want to stop TeXstudio from highlighting it as red (as it is annoying and affects readability). Is there any way to do this?
Update---
After seeing the comments, I realize I forgot to include a important thing. I always write these macros and package calls all inside a single file. Then I input this file in the LaTeX file I am writing. But now I guess I am asking a bit too much. I mean I require the software to recognize the macros which I have input from another file. Nevertheless I was wondering if there was any solution.
`
to mark your inline code.\documentclass{article}\newcommand{\channel}{\ensuremath{\mathbf{H}}}\begin{document}\channel\end{document}
works as expected inTeXStudio 2.5.1
withTL2012
. No red highlighting.