ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Cc: "NTG-ConTeXt mailing list" <ntg-context@ntg.nl>
Subject: Re: one answered
Date: Fri, 07 Sep 2001 09:11:00 +0200	[thread overview]
Message-ID: <5.1.0.14.1.20010907085603.030c7900@server-1> (raw)
In-Reply-To: <000701c13714$75a97d00$15a7fea9@lap>

At 10:35 PM 9/6/2001 +0200, Frans Goddijn wrote:

>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>\startreusableMPgraphic{omcirkeld}
>   draw fullcircle xyscaled (OverlayWidth)
>      withpen pencircle scaled OverlayLineWidth
>      withcolor OverlayLineColor ;
>  path b ; b := boundingbox currentpicture ;
>  currentpicture := currentpicture shifted (-1pt,+3pt) ;
>  setbounds currentpicture to b ;
>\stopreusableMPgraphic
>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>\defineoverlay[omcirkeld][\reuseMPgraphic{omcirkeld}]
>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\startreusableMPgraphic{omcirkeld}
   draw fullcircle xyscaled (OverlayWidth)
      withpen pencircle scaled OverlayLineWidth
      withcolor OverlayLineColor ;
  path b ; b := boundingbox currentpicture ;
  currentpicture := currentpicture shifted (-.05*EmWidth,0*ExHeight) ;
  setbounds currentpicture to b enlarged 3pt ;
\stopreusableMPgraphic

You can prevent the clipping by enlarging the boundingbox a bit; for 
illustrative purposes, you can add an extra line:

draw boundingbox currentpicture withcolor red ;

to see what this box is

since backgrounds are centered a larger boundingbox does not hurt

>Now I wonder, should I make the c!voorgrond something like c!achtergrond
>(which didn't work when I tried of course ;=}}}

hm, what do you want to achieve here? the foreground can be accessed, for 
special purposes, like in

background={graphic-1,graphic-2,foreground,graphic-3}

there is also foregroundcolor, which cna be used for a 'non interefering' 
coloring of content

with regards to the macro: you should set the font outsite the framed, so 
that it will adapt itself to the font characteristics. Also, \font is not 
needed:

you probably want to use the serif, so

\def\FransP
   {\midaligned{\definedfont[Whow][PFont sa 1]\omcirkeld....}

Instead of PFont you can use a name but indirectness makes this macro 
useable in other docs with other fonts:

    \definefontsynonym[PFont][Serif]  % or [PFont] 
[oneoffransoldstylefonts] or whatever

etc etc etc

hans

-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


  reply	other threads:[~2001-09-07  7:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <003201c13710$891f5160$cf29a33e@arnhem.chello.nl>
2001-09-06 20:35 ` Frans Goddijn
2001-09-07  7:11   ` Hans Hagen [this message]
2001-09-07 11:11     ` Frans Goddijn
2001-09-07 15:23       ` Hans Hagen
2001-09-04  9:34 Frans Goddijn
2001-09-04 10:29 ` Hans Hagen
2001-09-04 11:17   ` Frans Goddijn
2001-09-04 12:38     ` Hans Hagen
2001-09-04 20:47       ` Frans Goddijn
2001-09-05  5:12         ` Johannes Huesing
2001-09-05  7:13         ` Hans Hagen
2001-09-05  8:58           ` Frans Goddijn
2001-09-05 10:36             ` Hans Hagen
2001-09-05 19:02               ` Frans Goddijn
2001-09-06  6:48                 ` 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=5.1.0.14.1.20010907085603.030c7900@server-1 \
    --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).