ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Change the default text colour for entire document
@ 2014-01-22  1:15 Thangalin
  2014-01-26 23:24 ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Thangalin @ 2014-01-22  1:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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.

Thank you!
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Change the default text colour for entire document
  2014-01-22  1:15 Change the default text colour for entire document Thangalin
@ 2014-01-26 23:24 ` Wolfgang Schuster
  2014-01-27 11:10   ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2014-01-26 23:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen


Am 22.01.2014 um 02:15 schrieb Thangalin <thangalin@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.


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.

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Change the default text colour for entire document
  2014-01-26 23:24 ` Wolfgang Schuster
@ 2014-01-27 11:10   ` Hans Hagen
  2014-01-27 11:30     ` Keith J. Schultz
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2014-01-27 11:10 UTC (permalink / raw)
  To: Wolfgang Schuster, mailing list for ConTeXt users

On 1/27/2014 12:24 AM, Wolfgang Schuster wrote:
>
> Am 22.01.2014 um 02:15 schrieb Thangalin <thangalin@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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Change the default text colour for entire document
  2014-01-27 11:10   ` Hans Hagen
@ 2014-01-27 11:30     ` Keith J. Schultz
  2014-01-27 11:45       ` Thangalin
  0 siblings, 1 reply; 5+ messages in thread
From: Keith J. Schultz @ 2014-01-27 11:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 3524 bytes --]

Hi Everybody,

If I remember right colors can be defined in ConTeXt, right?

So why not just redefine black!

If this is stupid, the defaults get initialize before a redefined occurs!

forget it!

Just a stupid simplistic idea!

regards
	Keith.
 
Am 27.01.2014 um 12:10 schrieb Hans Hagen <pragma@wxs.nl>:

> On 1/27/2014 12:24 AM, Wolfgang Schuster wrote:
>> 
>> Am 22.01.2014 um 02:15 schrieb Thangalin <thangalin@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
> -----------------------------------------------------------------
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________


[-- Attachment #1.2: Type: text/html, Size: 5494 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Change the default text colour for entire document
  2014-01-27 11:30     ` Keith J. Schultz
@ 2014-01-27 11:45       ` Thangalin
  0 siblings, 0 replies; 5+ messages in thread
From: Thangalin @ 2014-01-27 11:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Keith: that was a brilliantly clever idea.

I will write up a wiki page on this if someone can tell me where
*every independent occurrence of black* could possibly appear (e.g.,
margins, footnotes, page numbers, table borders, etc.) and how to set
each to a different colour.

Not having a single inherited colour means knowledge of where all
black references are used should be captured. I much prefer Hans'
suggestion of defining \inheritmaintextcolor and using that
everywhere: it is quite clean.

Thank you!
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-01-27 11:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-22  1:15 Change the default text colour for entire document Thangalin
2014-01-26 23:24 ` Wolfgang Schuster
2014-01-27 11:10   ` Hans Hagen
2014-01-27 11:30     ` Keith J. Schultz
2014-01-27 11:45       ` Thangalin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).