[texworks] \begin{document} in colour

Stefan Löffler st.loeffler at gmail.com
Mon Jan 18 15:13:07 CET 2010


Hi,

Am 2010-01-18 06:28, schrieb Paul A Norman:
> Is ther eany way I can ask the TexWorks editor to put \begin{document}
> in say bright red or something so that I can quickly see it when the
> document preamble is quite full please?
>   

Yes, there is. The syntax highlighting is configured by the file
configuration/syntax-patterns.txt in your Tw configuration folder. There
is a short introduction in how to use it at the top of the file. For
your case, you could use something like
red            N    \\begin\{document\}
Be sure to put it before the "# LaTeX environments" line, otherwise the
green highlighting will take precedence.

To make it even more noticeable, you could also put
white/red;B            N    \\begin\{document\}
in there. This will result in "\begin{document}" being shown bold white
on a red background.

HTH
Stefan


More information about the texworks mailing list