From: Hans Hagen <pragma@wxs.nl>
Subject: Re: tweaking underlining
Date: Sat, 09 Jul 2005 11:19:07 +0200 [thread overview]
Message-ID: <42CF968B.5030705@wxs.nl> (raw)
In-Reply-To: <1120862975.9027.24.camel@localhost.localdomain>
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
-----------------------------------------------------------------
next prev parent reply other threads:[~2005-07-09 9:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-08 22:49 Stuart Jansen
2005-07-09 9:19 ` Hans Hagen [this message]
2005-07-15 23:04 ` Stuart Jansen
2005-07-11 21:33 ` Mojca Miklavec
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=42CF968B.5030705@wxs.nl \
--to=pragma@wxs.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).