ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Thomas A. Schmitz" <thomas.schmitz@uni-bonn.de>
To: mailing ConTeXt users list for <ntg-context@ntg.nl>
Subject: question about MPpositiongraphic
Date: Sat, 3 Jan 2009 15:02:16 +0100	[thread overview]
Message-ID: <D0702F0F-822D-4CE1-8218-B844F0FF9EED@uni-bonn.de> (raw)

Hi all,

first, best wishes for the New Year to all of you - may 2009 bring  
peace and fortune and world domination for ConTeXt!

And my little question - trivial for the resident experts, I guess,  
but I can't find a solution: I want to write a little macro that will  
allow me to place a thin curved line under letters (metrical symbol  
for synizesis). Now that metafun is so fast in mkiv, I thought I'd use  
a MPpositiongraphic for that purpose, but my problem is that I can't  
make the graphic really local - when it is used more than once in a  
document, Metafin uses the last values for all occurrences. I tried  
grouping and the "save" command, but to no avail. Here's an example  
that shows the problem:

\startMPpositiongraphic{placesynizesis}
      StartPage ;
      begingroup ; save a ;
      initialize_box(\MPpos{\MPvar{self}}) ;
      numeric a ; a = ExHeight/6 ;
      z1 = llxy ;
      z2 = lrxy ;
      z3 = 1/2[z1,z2] ;
      z4 = ((x1 + 2a),(y1 - 2a)) ;
      z5 = (x3, (y3 - 4a)) ;
      z6 = ((x2 - 2a),(y2 - 2a)) ;
      path syn ; syn := z4 .. z5 .. z6 ;
      pickup pencircle scaled a ;
      draw syn ;
      anchor_box(\MPanchor{\MPvar{self}}) ;
      endgroup ;
      StopPage ;
\stopMPpositiongraphic%
\setMPpositiongraphic{POS}{placesynizesis}

\define[1]\synizesis
   {\hpos{POS}{#1}}

\starttext

\switchtobodyfont[25pt]

test: \synizesis{au} and \synizesis{aeiou}

\stoptext

Any solution to this conundrum?

All best

Thomas
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


             reply	other threads:[~2009-01-03 14:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-03 14:02 Thomas A. Schmitz [this message]
2009-01-03 14:26 ` Wolfgang Schuster
2009-01-04 12:59   ` Thomas A. Schmitz

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=D0702F0F-822D-4CE1-8218-B844F0FF9EED@uni-bonn.de \
    --to=thomas.schmitz@uni-bonn.de \
    --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).