[texworks] \begin{document} in colour

Stefan Löffler st.loeffler at gmail.com
Tue Jan 19 07:27:22 CET 2010


Hi,

On 2010-01-19 05:03, Paul A Norman wrote:
> 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?
>   

This was probably my bad. They were added in r476 (background color) and
r488 (font flags), which are not available as a general download yet
(Jonathan promised to update the downloads soon, though, so there is
hope ;)). Note that even then, you will need to (temporarily)
remove/rename the configuration/ directory in your Tw config folder as
the files are not updated automatically in order to prevent accidentally
overwriting changes made by the user. Alternatively, you can look at the
current version of the file at
http://code.google.com/p/texworks/source/browse/trunk/res/resfiles/configuration/syntax-patterns.txt
(and could also download it if you want).

> 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)
>   

Yeah, its the svg names that are supported, not the whole svg color
definition. However, arbitrary numeric colors can be specified as
#RRGGBB (where RR, GG, BB are two digit hexadecimal values) IIRC. E.g.
#ff0000 for red, #ffffff for white, etc.

HTH
Stefan


More information about the texworks mailing list