Hello, I don't know how to make this that I help me when I use Kile:
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.
Kile ⇒ colored parameters in user command (\newcommand)
colored parameters in user command (\newcommand)
Last edited by jphv on Thu Aug 13, 2009 1:28 pm, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.
Re: colored parameters in user command (\newcommand)
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.)
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!!!
Re: colored parameters in user command (\newcommand)
No problem. And thanks for posting the details of your example. It'll make it that much easier if I ever decide to fiddle with my own settings.