ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* MetaFun: textext.origin, thelabel.origin not positioned on baseline
@ 2022-01-13 21:36 Gavin via ntg-context
  0 siblings, 0 replies; only message in thread
From: Gavin via ntg-context @ 2022-01-13 21:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Gavin

Hello again List,

Now I’m making diagrams using MetaFun. The MetaFun manual describes an “origin” option for positioning textext’s and label’s on the baseline. However, this dose not appear to be happening with the code in the manual (below). In fact, the diagram in the manual dose not show the textext’s and label’s on the baseline. This is on page 144 of metafun-p.pdf.

Maybe I misunderstand what is supposed to be happening here.

Thanks!
Gavin


\startMPcode
  picture p ; p :=                  \MPbetex {1}          ;
  picture q ; q :=  textext.origin( \MPstring{2}        ) ;
  picture r ; r := thelabel.origin("\MPtext  {3}",origin) ;
  for i=p, boundingbox p : draw i withcolor .625red    ; endfor ;
  for i=q, boundingbox q : draw i withcolor .625yellow ; endfor ;
  for i=r, boundingbox r : draw i withcolor .625white  ; endfor ;
  currentpicture := currentpicture scaled 2 ;
  draw origin
    withpen pencircle scaled 5.0mm withcolor white ;
  draw origin
    withpen pencircle scaled 2.5mm withcolor black ;
  draw boundingbox currentpicture
    withpen pencircle scaled .1mm
    dashed evenly ;
\stopMPcode

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-13 21:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-13 21:36 MetaFun: textext.origin, thelabel.origin not positioned on baseline Gavin via ntg-context

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).