Text Formatting ⇒ citeasnoun highlighting
-
- Posts: 2
- Joined: Mon Nov 29, 2010 7:33 pm
citeasnoun highlighting
I am a very new user sorry, here goes....
I am using latex on vim in linux (actually gvim), and I have a syntax highlighting problem:
when write \citeasnoun{thecitation} only the portion of it 'cite' is highlighted.
whereas I would like it to behave the same way as \cite{thecitation} where the entire term is highlighted.
Has anyone come across this before?
Thanks
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
citeasnoun highlighting
First, make a personal copy of the tex.vim syntax highlighting file. For me, this involved the following commands from the terminal.
Code: Select all
mkdir -p $HOME/.vim/syntax
cp /usr/share/vim/vim73/syntax/tex.vim $HOME/.vim/syntax/tex.vim
Now edit the file you just created ($HOME/.vim/syntax/tex.vim) and look for the line:
Code: Select all
syn match texRefZone '\\cite\%([tp]\*\=\)\=' nextgroup=texRefOption,texCite
Code: Select all
syn match texRefZone '\\cite\%([tp]\*\=\)\=' nextgroup=texRefOption,texCite
syn match texRefZone '\\citeasnoun\%([tp]\*\=\)\=' nextgroup=texRefOption,texCite
Save and you should be all set. (Fingers crossed.)
-
- Posts: 2
- Joined: Mon Nov 29, 2010 7:33 pm
Re: citeasnoun highlighting
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
citeasnoun highlighting
Best regards and welcome to the board
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10