From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/21407 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: tweaking underlining Date: Sat, 09 Jul 2005 11:19:07 +0200 Message-ID: <42CF968B.5030705@wxs.nl> References: <1120862975.9027.24.camel@localhost.localdomain> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1121460480 4113 80.91.229.2 (15 Jul 2005 20:48:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 15 Jul 2005 20:48:00 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Fri Jul 15 22:47:54 2005 Return-path: 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 1DtX5T-0004z0-JN for gctc-ntg-context-518@m.gmane.org; Fri, 15 Jul 2005 22:47:11 +0200 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 52E61127EE; Fri, 15 Jul 2005 22:47:11 +0200 (CEST) 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 26604-01; Fri, 15 Jul 2005 22:47:11 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B45D4127E8; Fri, 15 Jul 2005 22:45:20 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 76D6C127E8 for ; Fri, 15 Jul 2005 22:45:19 +0200 (CEST) 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 26401-05-2 for ; Fri, 15 Jul 2005 22:45:18 +0200 (CEST) Original-Received: from mailrelay02.solcon.nl (maillb.solcon.nl [212.45.32.200]) by ronja.ntg.nl (Postfix) with ESMTP id 6F29F127E0 for ; Fri, 15 Jul 2005 22:45:16 +0200 (CEST) Original-Received: from server-1.pragma-net.nl (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by mailrelay02.solcon.nl (8.12.11/SQL-8.12.11-5/8.12.11) with ESMTP id j699IbTV016031 for ; Sat, 9 Jul 2005 11:18:37 +0200 Original-Received: by server-1.pragma-net.nl (Postfix, from userid 65534) id 71841241E6; Sat, 9 Jul 2005 10:42:30 +0200 (CEST) Original-Received: from [10.100.1.53] (unknown [10.100.1.53]) by server-1.pragma-net.nl (Postfix) with ESMTP id 2A4D81A0CE for ; Sat, 9 Jul 2005 08:42:29 +0000 (UTC) User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <1120862975.9027.24.camel@localhost.localdomain> X-Virus-Scanned: ClamAV 0.86.1/974/Fri Jul 8 23:09:18 2005 on mailrelay02 X-Virus-Status: Clean 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-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on smtp.ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:21407 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:21407 Stuart Jansen wrote: > Reading the list archives, it looks like there are certain advantages, > to performing underlining according to my example below: > > ===== > \setupcolors[state=start] > \definetextbackground[underline][location=text,alternative=1,background=,frame=off] > \definestartstop > [underline] > [before={\starttextbackground[underline]}, > after=\stoptextbackground] > \starttext > \startunderline{}http://gurulabs.com/\stopunderline > \stoptext > ===== > > I would like to tweak this a little however. Specifically, I'd like to > change the color of the line and move it down a point or two. > > In one thread, Hans hinted how to do this: > > >>you can redefine the metapost graphic, the main thing there is that >>you draw/fill something related to the multipar paths; it takes a bit >>of experimenting, but after a while you start seeing possibilities. >>See plus-rul.tex for an example of such a graphic. > > > I think I've tracked this reference down to the definition of > mpos:par:columnset, but at this point am lost as to how to proceed. > Metapost is still beyond me. Any hints would be much appreciated. ok, a quick hack (no time today): the one ou need to tweak is: \startuseMPgraphic{mpos:par:columnset} \iftracepositions show_multi_pars \else draw_multi_pars \fi ; \stopuseMPgraphic so one option is to provide your own draw macro (the draw macro is in mp-core.mp); however, here you can check a bit: \startuseMPgraphic{mpos:par:columnset} \iftracepositions show_multi_pars \else draw_multi_pars \fi ; path p ; p := boundingbox currentpicture ; currentpicture := currentpicture shifted (0,-3pt) ; setbounds currentpicture to p ; \stopuseMPgraphic or better: \startuseMPgraphic{mpos:par:columnset} \iftracepositions show_multi_pars \else draw_multi_pars \fi ; path p ; p := boundingbox currentpicture ; currentpicture := currentpicture shifted (0,-StrutDepth/2) ; setbounds currentpicture to p ; \stopuseMPgraphic (remind me some time later to add an option to shift the thing down by keyword control) [this is wikiable] Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------