[NTG-context] Change the default text colour for entire document

Hans Hagen pragma at wxs.nl
Mon Jan 27 12:10:13 CET 2014


On 1/27/2014 12:24 AM, Wolfgang Schuster wrote:
>
> Am 22.01.2014 um 02:15 schrieb Thangalin <thangalin at gmail.com>:
>
>> Hi,
>>
>> In ConTeXt to change the default text colour for the entire document,
>> there are at least two settings that need to be configured:
>>
>>   \setupcolors[textcolor=red]
>>   \setupinmargin[line=13,color=red,style=slanted,]
>>
>> The border colour for tables remains black:
>>
>> \setupcolors[textcolor=red]
>> \setupinmargin[color=red]
>>
>> \starttext
>> {\bTABLE
>> \bTR \bTD One \eTD \bTD Two \eTD \eTR
>> \eTABLE}
>> \stoptext
>>
>> How can you override *all* instances of black? (Ideally there would be
>> a single setting that is inherited by all.) That is, it is difficult
>> to know all the various aspects of a ConTeXt document that use the
>> default black colour -- margins, body text, table borders, and
>> possibly more that I don't know about.
>
> Notes (local notes excluded because they use a different placement system)
> and margin texts ignore the global text color because both mechanism reset
> colors and many other settings to avoid unwanted output from local changes
> in the main text etc.
>
> Even though there is a comment about this problem for margin notes in
> the source it wasn’t fixed yet but I think it makes sense to to so.

\appendtoks
     \inheritmaintextcolor
\to \everybeforenoteinsert

\appendtoks
     \inheritmaintextcolor
\to \everymargindatacontent

could work, but it needs testing as we cannot predict side effects

> The problem with the black frames for natural tables are a result of the explicit
> framecolor setup for it (I guess to avoid problems when you use metapost
> backgrounds which use the framecolor value). A possible way to fix this is to
> add a framecolor setup to \setupcolors which argument is now used as default
> color for the frame of natural tables, this way can use this color also in other
> commands (core functions as well as third party modules) to set a default value.

needs some thinking

\setupTABLE
   [framecolor=\maintextcolor]

some settings date from mkii times but again we need to think of side 
effects

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the ntg-context mailing list