From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/55763 Path: news.gmane.org!not-for-mail From: Hans van der Meer Newsgroups: gmane.comp.tex.context Subject: Re: coloring rules Date: Sat, 23 Jan 2010 14:32:27 +0100 Message-ID: References: <9C10C160-CF71-4E53-B034-11CC1291AC31@uva.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset="us-ascii"; Format="flowed"; DelSp="yes" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1264253606 17540 80.91.229.12 (23 Jan 2010 13:33:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 23 Jan 2010 13:33:26 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Jan 23 14:33:19 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.50) id 1NYg74-00038U-8P for gctc-ntg-context-518@m.gmane.org; Sat, 23 Jan 2010 14:33:18 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id DBA3FC9C8C; Sat, 23 Jan 2010 14:33:14 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id W5XinEccMNcr; Sat, 23 Jan 2010 14:32:54 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B6DE4C9C01; Sat, 23 Jan 2010 14:32:54 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 029F7C9C01 for ; Sat, 23 Jan 2010 14:32:48 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id IDCrAHrZ7eSE for ; Sat, 23 Jan 2010 14:32:34 +0100 (CET) Original-Received: from pony.ic.uva.nl (pony.ic.uva.nl [145.18.40.181]) by balder.ntg.nl (Postfix) with ESMTP id 3D258C9BDF for ; Sat, 23 Jan 2010 14:32:33 +0100 (CET) Original-Received: from Mindolluin.fritz.box (a82-95-102-36.adsl.xs4all.nl [82.95.102.36]) (authenticated bits=0) by pony.ic.uva.nl (8.13.1/8.13.1) with ESMTP id o0NDWSZl001120 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Sat, 23 Jan 2010 14:32:29 +0100 In-Reply-To: X-Mailer: Apple Mail (2.936) X-CanIt-Geo: ip=82.95.102.36; country=NL; region=07; city=Amsterdam; latitude=52.3500; longitude=4.9167; http://maps.google.com/maps?q=52.3500,4.9167&z=6 X-CanItPRO-Stream: auth (inherits from default) X-Canit-Stats-ID: Bayes signature not available X-Scanned-By: CanIt (www . roaringpenguin . com) on 145.18.40.181 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:55763 Archived-At: 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 ___________________________________________________________________________________