Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

In Kile, some LaTeX commands are rendered bright red (\section, \begin, \end, \cite, …) as opposed to other commands that are displayed in brownish red (\textbf, \newline, \enlargethispage, …).

In Settings the bright red ones are called »structure« and can be found at Settings -> Configure Kile -> Editor -> Fonts and Colours -> Highlight Text Styles.

My Problem: I use multibib and find it very easy to spot my \cites as they are bright red, but very difficult to spot my \citesrcs as they are brownish red.

My question: Is there a way to add custom strings so that kile will see them as »structure« and brighten them up? If so, how?

share|improve this question
    
Please don't add "thanks" as answers. Invest some time in the site and you will gain sufficient privileges to upvote answers you like, which is the LaTeX way of saying thank you. –  Tobi Feb 7 '13 at 10:25
    
And welcome to TeX.sx! A tip: You can use backticks ` to mark your inline code as I did in my edit. –  Tobi Feb 7 '13 at 10:30
    
I don't get it: I closed my question with »thanks a lot«, it was not an answer. I consider it common decency to thank people for their time reading my question, even if they don't have an answer. Of course I upvote answers once their is one. I really don't get how that can be such a problem for you. –  Seul Feb 7 '13 at 10:34
    
Thanks for the backticks though, didn't know that. –  Seul Feb 7 '13 at 10:37
1  
@Seul The way TeX-sx (and the rest of the StackExchange sites) work has a wiki-like element. So the idea is that questions 'stand on their own', which means things like 'thanks' tend to be edited out. Voting is as already mentioned the 'preferred' way to show appreciation. –  Joseph Wright Feb 7 '13 at 10:48

1 Answer 1

up vote 8 down vote accepted

The syntax highlighting of Kile is governed by the general syntax highlighting scheme of katepart. The relevant file for LaTeX is called latex.xml, and can be found on Unix-like systems in

  • /usr/share/apps/katepart/syntax/latex.xml or
  • ~/.kde4/share/apps/katepart/syntax/latex.xml or
  • /opt/share/apps/katepart/syntax/latex.xml or
  • /usr/share/kde4/apps/katepart/syntax/latex.xml

This depends on your distribution, and operating system. Open the file in an editor, and search for cite. You will find a regular expression that triggers structure mode for those citation commands. Add citesrc| to this string, save, restart, done.

share|improve this answer
    
Thanks a bunch, it was in /usr/share/kde4/apps/katepart/syntax/latex.xml, added that to your answer, hope that's in tune with the rules... –  Seul Feb 7 '13 at 12:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.