On 6/29/06, Yakov Lerner wrote:
On 6/28/06, Mojca Miklavec wrote:
> \startpublication
> ....
> \author % highlited differently
> ...
> \stoppublication
>
> \author % highlited just as every other command.
>
> syn match   contextBibField  '\\\(artauthor\|author\|editor\)\>'
> display containedin=contextBib
>
> syn region  contextBib transparent start='\\startpublication\>'
> skip='%.*stoppublication' end='\\stoppublication\>' keepend
> contains=TOP
>
> hi def link contextBibField   Special
>
>
> But now \author outside of \startpublication ... \stoppublication is
> also highlited as Special, while it should remain the old hyghligting.
>
> How can I fix that?

Your problem is that you're missing option 'contained' in
the first 'syn' command. This syn command line shall be:

syn match   contextBibField  '\\\(artauthor\|author\|editor\)\>'
display containedin=contextBib contained

This fixes your problem. You're missing the option 'contained'.

Thank you a lot! That one solved it.

I thought that containedin implied contained automatically (now I see
that it does make sense to have two separate keywords and after
rereading the documentation carefully I also see how stupid I was
because that case was clearly explained). I'm sorry for that and thank
you a lot for taking your time to look into it,

   Mojca Miklavec

Reply via email to