[NTG-context] MetaFun: textext.origin, thelabel.origin not positioned on baseline

Gavin gavinpublic at comcast.net
Thu Jan 13 22:36:38 CET 2022


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



More information about the ntg-context mailing list