ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans van der Meer <H.vanderMeer@uva.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: coloring rules
Date: Sat, 23 Jan 2010 14:32:27 +0100	[thread overview]
Message-ID: <E7A892E0-7B31-4C2D-AF95-6ECE07BC6CFC@uva.nl> (raw)
In-Reply-To: <alpine.LNX.2.01.1001211621550.8427@ybpnyubfg.ybpnyqbznva>

Further experimentation has shown that it is not impossible to color  
\vrule's, thus \blackrule is not specifically needed. Let me first  
mention that I put the colored rules away with \setbox\B=\hbox{} and  
then later call \B up. It is a pity until now I am not able to concoct  
a minimal example showing consistently the behaviour.

However I have made the following observations:
define: \definecolor[mycolor][r=myR,g=myG,b=myB]

(1) \color[mycolor]{rule} typesets a black rule
(2) \color[red]{something}\color[mycolor]{rule} typesets a mycolor rule
(3) \definecolor[green][r=myR,g=myG,b=myB]\color[mycolor]{rule}  
typesets a mycolor rule
(4) changing the values of myR,myG,myB between runs keeps typesetting  
the old mycolor
(5) it seems there is a memory effect on defined colors, something  
with a cache that keeps me from changing things.

It is mainly the seemingly erratic behaviour of the color changes that  
puzzles me. I seem not being able to pinpoint a culprit.

Hans van der Meer


On 21 jan 2010, at 22:24, Aditya Mahajan wrote:

> On Thu, 21 Jan 2010, Hans van der Meer wrote:
>
>> ConTeXt  ver: 2010.01.19 23:29 MKIV  fmt: 2010.1.20  int: english/ 
>> english
>>
>> Coloring hrule's and vrule's with \color[aColor]{\vrule  
>> heightdepthwidth} works only if aColor is one of the standardcolors  
>> like red, blue, gray, etc.
>> But defining other colors don't color the rule \definecolor[mygray] 
>> [r=.6,g=.7,b=.7]\color[mygray]{\vrule heightdepthwidth} typesets  
>> the rule in black, not in mygray.
>> The strange is that the lines around \framed[framecolor=mygray] do  
>> get colored correctly.
>>
>> How can I accomplish the general coloring of vrule's and hrule's?
>
> \blackrules.
>
> %D \macros
> %D   {blackrules}
> %D
> %D One can call for a sequence of black rules, if needed
> %D equally spaced over the given width.
> %D
> %D \showsetup{blackrules}
> %D
> %D The two alternative calls are therefore:
> %D
> %D \startbuffer
> %D Tell me, is this according to the \blackrules[n=6]?
> %D These \blackrules[alternativevariant=b,n=10,distance=. 
> 2em,width=4cm] are quite clear.
> %D \stopbuffer
>
>
> Despite its name, \blackrules can be of any color. The default  
> options are
>
> \setupblackrules
>  [\c!n=3,
>   \c!width=1em,
>   \c!height=1ex,
>   \c!depth=\!!zeropoint,
>   \c!alternative=\c!a,
>   \c!distance=.25ex,
>   \c!color=]
>
> Aditya

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


  reply	other threads:[~2010-01-23 13:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-21 16:28 Hans van der Meer
2010-01-21 21:24 ` Aditya Mahajan
2010-01-23 13:32   ` Hans van der Meer [this message]
2010-01-23 13:49     ` Wolfgang Schuster
2010-01-23 15:06       ` Hans van der Meer
2010-01-23 18:19         ` Wolfgang Schuster
2010-01-24 13:02     ` Hans Hagen
2010-01-24 13:04     ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E7A892E0-7B31-4C2D-AF95-6ECE07BC6CFC@uva.nl \
    --to=h.vandermeer@uva.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).