From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/24956 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: How to do this in ConTeXt Date: Wed, 04 Jan 2006 22:48:40 +0100 Message-ID: <43BC42B8.5020408@wxs.nl> References: <43BC16BF.9030502@uqam.ca> <43BC3564.1090202@uqam.ca> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1136411365 19946 80.91.229.2 (4 Jan 2006 21:49:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 4 Jan 2006 21:49:25 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Wed Jan 04 22:49:21 2006 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1EuGV0-0003EP-UN for gctc-ntg-context-518@m.gmane.org; Wed, 04 Jan 2006 22:48:54 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 6511D12894; Wed, 4 Jan 2006 22:48:50 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 11919-10; Wed, 4 Jan 2006 22:48:48 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 356E11288F; Wed, 4 Jan 2006 22:48:48 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id BE6A71288F for ; Wed, 4 Jan 2006 22:48:46 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 12234-01 for ; Wed, 4 Jan 2006 22:48:45 +0100 (CET) Original-Received: from mail.pragma-ade.net (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by ronja.ntg.nl (Postfix) with SMTP id AB4791287E for ; Wed, 4 Jan 2006 22:48:45 +0100 (CET) Original-Received: from [10.100.1.102] (unverified [10.100.1.102]) by controller-1 (SurgeMail 3.5b3) with ESMTP id 10310 for ; Wed, 04 Jan 2006 22:57:46 +0300 User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <43BC3564.1090202@uqam.ca> X-Server: High Performance Mail Server - http://surgemail.com r=-274017400 X-Authenticated-User: hagen@controller-1 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 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 X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:24956 Archived-At: FabriceL. wrote: > Hi, > > Hans, it's so instructive to read yout post... I have learned from > this last post 2 new commands ! > However, I think the original poster wish a line who run to the right > margin, so I added to your code > in the "defineenumeration" a "inbetween=\vskip-4pt{\hrule height > 1.5pt}\blank". This is not very elegant, > but this works. By the way, I'm interested to know if there is a > better solution. > > > Hans wrote: > > one of you has to wikify this answer ... > > I'm not sure how to do this, but I can try how this works. > The complete code follows. > FL. > > \setupcolors[state=start] > \setupbackgrounds[text][text][background=color,backgroundcolor=darkred,backgroundoffset=3pt] > > > \defineenumeration > [example] > [way=bychapter, > separator=\compoundhyphen, > chapternumber=yes, > color=white, > command=\exampleframed, > inbetween=\vskip-4pt{\hrule height 1.5pt}\blank] if you say \showstruts you will notice why you need to skip back; your 4pt is a gamble, best do something: \defineenumeration [example] [way=bychapter, separator=\compoundhyphen, chapternumber=yes, color=white, command=\exampleframed, inbetween=\setups{example:inbetween}] \startsetups example:inbetween \removedepth % nils strut depth \nointerlineskip \blackrule[height=1.5pt,width=\hsize,depth=0pt] \blank \nobreak \stopsetups btw, this makes a nice example for a regression test > \defineframed > [exampleframed] > [background=color, > backgroundcolor=black, > foregroundcolor=white, > style=bold, > frame=off] > > \starttext > > \chapter{One} > > \input tufte > > \startexample > \input tufte > \stopexample > > \input tufte > > \stoptext > > _______________________________________________ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context