On 8/11/19 10:51 AM, Hans Hagen wrote:
> I'll do this (lmtx):
> 
> metapost        > use 'textext(.....)' instead of 'btex ..... etex'
> metapost        > rewrapping btex ... etex at the outer level [[dummy]]
> metapost        > rewrapping btex ... etex at the outer level [["foo"]]
> metapost        > rewrapping btex ... etex at the outer level [[bar]]
> 
> when this is seen
> 
> def drawtest =
>     draw btex dummy etex shifted (0,0);
>     draw btex "foo" etex shifted (1.5cm,0);
>     draw btex bar   etex shifted (3cm,0);
> enddef;
> 
> rewrapping can work kind of ok, but it is still more fragile than textext 
> (which can also be used with variables and concatinated strings and such, 
> which probably is what one wants to do in macros)

Thank you for the quick repsonse.  This looks good to me.  However,
could you tell me a way to get the correct baseline with textext?  When
I use

    \startMPpage
    draw btex dummy etex shifted (0,0);
    draw btex foo   etex shifted (1.5cm,0);
    \stopMPpage

the baseline is the one that I would expect from TeX, i.e. at the depth
of the “y” is removed or otherwise correctly accounted for.  In contrast
when I use

    \startMPpage
    draw textext("dummy") shifted (0,0);
    draw textext("foo")   shifted (1.5cm,0);
    \stopMPpage

the baseline will be below the depth of the “y” which is sometimes
unwanted.

> 
> Hans
> 
> -----------------------------------------------------------------
>                                           Hans Hagen | PRAGMA ADE
>               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -----------------------------------------------------------------

___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to