[gedit-list] LaTeX syntax highlighting



Hi all,

I would like to contribute a spruced-up .lang file for tex/latex markup.
Relative to the current one, the attached .lang file does the following:

* it matches words enclosed in braces, so that they can be colored
differently. Thus, e.g., \begin{theorem} can result in "begin" being
colored in blue and "{theorem}" in green.

* it has greater granularity in matching commands: in particular, it
explicitly recognizes \section & friends, \ref & friends, \begin-\end
pairs.

* it also recognizes a variety of math commands (e.g. greek letters) so
they can be colored differently.

* it catches \emph{xxxx}, \textit{xxxx} and \textbf{xxxx} so that they
can be colored differently, emphasized and/or boldfaced as needed.

Suggestions are welcome. Now, questions:

1. Is there any way I can suggest a coloring for the above directly in
the .lang file (or in another file), using gtksourceview-1.0? Right now
I use the standard styles (e.g. Keyword, or Others) and then customize
colors manually: see below for my current prefs settings.

2. (really broad) any idea as to when gtksourceview-2.0 will be
incorporated in gedit?

Thanks a lot!

My current settings for the various elements (foreground only: I did not
touch the backgrounds). "default" means I did not change settings for a
particular element (e.g. Command) --- this applies to elements that are
also defined in the latex.lang file that comes with gedit by default.

BeginEndCommand: Bold #231BA6
BoldCommands: Bold #641B1B
Command: default
Comment: default
Comment Environment: default
EmphItCommands: Italic #4D0909
InBraces: #288A3B
Include: default
Keyword: default
Math: default
MathSymbols: Bold #61167D
RefCommands: Bold #299F12
SectionCommands: Bold #962183
TODO: Bold #FB1008











Attachment: latex.lang
Description: application/xml



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