>> is it possible to pass data from MetaPost back to TeX? This would be similar 
>> in spirit to, say, the MetaPost variable BodyFontSize that contains data 
>> from the TeX surrounding. Just the other way round.
> 
> maybe future mlib versions will provide something like that (writing 
> something from mp to a lua table); currently you have to use a file or 
> interpret the log (use show to print out values).

OK. What I have in mind is to vertically align a diagram with the math axis... 
something like:

---
\startuseMPgraphic{diagram}
   u := StrutHeight;
   draw origin--(2u,0)--(u,sqrt(3)*u)--cycle;
   % MathAxis at y-coordinate sqrt(3)*u/3
\stopuseMPgraphic


\starttext

\startformula
   A\useMPgraphic{diagram}
   =B
\stopformula

\stoptext
---

It would be great if the comment could be turned into a processing instruction 
for ConTeXt such that the triangle's center of mass ends up on the math axis of 
the formula.

What's the best way to achieve this?

Many thanks,
Oliver
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to