Kile ⇒ colored parameters in user command (\newcommand)
colored parameters in user command (\newcommand)
The parameter inside {} get blue in:
\ref{fig:somelabel}
If I create a new command, when I use it, Kile don't highlight the parameter. Example:
%New command
\newcommand{\verfig}[1]{(\mbox{Fig. \ref{#1}})}
%Use
\verfig{fig:somelabel}
But I want...
\verfig{fig:somelabel}
If I could get the same behavior like \ref{} my references would be easiest to find it in the whole text.
I've search and didn't find something like this in the forum.
Thanks for you time.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Re: colored parameters in user command (\newcommand)
http://www.latex-community.org/forum/vi ... f=20&t=206
(The syntax color-highlighting settings for Kile are based on the editor on which Kile is based, Kate... and you need to edit its rules.)
colored parameters in user command (\newcommand)
frabjous wrote:I've never tried this, but there are some instructions here:
http://www.latex-community.org/forum/vi ... f=20&t=206
(The syntax color-highlighting settings for Kile are based on the editor on which Kile is based, Kate... and you need to edit its rules.)
Yes! Thanks!

I don't know why didn't find that post when did my search...
At this moment I'm working in a proyect under Ubuntu, so the configuration file latex.xml is at /usr/share/apps/katepart/syntax/
It was necessary only one change.
Original line:
<RegExpr String="\\(label|pageref|ref|vpageref|vref|cite)(?=[^a-zA-Z])" attribute="Structure" context="Label"/>
Line updated:
<RegExpr String="\\(label|pageref|ref|vpageref|vref|cite|verfig)(?=[^a-zA-Z])" attribute="Structure" context="Label"/>
Thank you again frabjous!!!