[texworks] \begin{document} in colour

Paul A Norman paul.a.norman at gmail.com
Tue Jan 19 05:03:44 CET 2010


Thank you Steffan for pointing me there.

     red            N    \\begin\{document\}

Works really well, but the following always defaults to the default
green defined in the file.

     white/red;B            N    \\begin\{document\}

Where are the commands like " white/red;B " found please?

For quick reference, the SVG colour names are the same as SVG names
defined in Dr. Uwe Kern's  xcolor package (4.3 Colors via svgnames
option), and we can even use the same upper-case lower-case spelling
that the xcoor packages uses - configuration/syntax-patterns.txt
points to http://www.w3.org/TR/SVG/types.html#ColorKeywords which
defines the color names in all lowercase, but this does not appear to
matter here.

xcolor package       www.w3.org
svgnames option:    Recognized color keyword names:

PaleTurquoise        paleturquoise

Both work.

What does not seem follow the www.w3.org specification is:

"A <color> is either a keyword (see Recognized color keyword names) or
a numerical RGB specification."

I have not yet found a way of entering an RGB triplet, I have so far
tried RGB(128,0,128) and 128,0,128 and rgb(128,0,128)

I am sure that the "Recognized color keyword names" are all that I
would ever need, but was interested to know please, as I ask above in
here, where do I find a list of the " white/red;B " type syntax
possibilities?

Thanks,
paul


2010/1/19 Stefan Löffler <st.loeffler at gmail.com>:
> 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