Re: [gedit-list] LaTeX syntax highlighting



Hi Holger,

Il giorno lun, 25/05/2009 alle 09.14 -0700, holg3r ha scritto:

> 
> I skimmed over the gtksourceview documentation at
> http://projects.gnome.org/gtksourceview/ which gave rise to a
> follow-up question: I would like to assign each pauir of {} and []
> parentheses/brackets a special style but I don't seem to get this
> working... Here is what I did: (1) In latex.lang, I added the
> following block in the definitions section: 
> <context id="parentheses" style-ref="parentheses">
>             <keyword>\{</keyword>
>             <keyword>\}</keyword>
>             <keyword>\[</keyword>
>             <keyword>\]</keyword>
>         </context>
> (2) In the styles-section of the same file, I added the line 
> <style id="parentheses"        _name="Parentheses"   map-to="def:type"/>
> (3) Of course, in my gedit style definition, I added the line 
> <style name="latex:parentheses"           foreground="#white" bold="true"/>
> But for some reason, the parentheses/brackets do not get displayed in
> bold white. I tried restarting gedit and even my entire machine --
> without effect...
> 


is your context id referenced (or directly defined) inside the main
<context id="latex">? if not it will not be used since contexts are
hierarchical: 

<context id="a">
  <context id="b"/>
</context>

context b is matched only if you are inside a.

Ciao
	Paolo

> This is not crucial, but I'd be very grateful for advice.
> 
> Thanks a lot,
> Holger 
> 
> ______________________________________________________________________
> View this message in context: Re: LaTeX syntax highlighting
> Sent from the Gnome - Gedit mailing list archive at Nabble.com.
> _______________________________________________
> gedit-list mailing list
> gedit-list gnome org
> http://mail.gnome.org/mailman/listinfo/gedit-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]