[metapost] Possible bug with boxit

luigi scarso luigi.scarso at gmail.com
Mon Feb 28 11:54:35 CET 2022


On Tue, Feb 22, 2022 at 11:42 PM Laurence Finston <Laurence.Finston at gmx.de>
wrote:

> In the attached MP file, I use macros from boxes.mp.  It doesn't fail to
> call boxit outside of a figure, but it doesn't produce the expected result
> (at least, the one I expected):  If I call it outside of a figure but not
> within the figure, I get this error when I call drawunboxed:
>
> >> sproc_.C
> ! Not a string.
> <to be read again>
>                    (
> <for(C)> scantokens.sproc_(SUFFIX0)(
>                                     (SUFFIX0)); ENDFOR
> fixsize->...$=(TEXT2):scantokens.sproc_$($);endfor
>                                                   .endgroup
> drawunboxed->fixsize((TEXT0))
>
>  ;fixpos((TEXT0));forsuffixes.s=(TEXT0):draw.pic...
> l.290   drawunboxed(C)
>                       ;
> ?
>
> If I call it outside the figure and then inside it, I get this error:
>
> ! Redundant equation.
> <to be read again>
>                    ;
> boxit->...FIX2)sw)=ypart((SUFFIX2)se-(SUFFIX2)sw);
>
> 0=xpart((SUFFIX2)ne-(SUFFI...
> l.273   boxit.C(V67)
>                     ;  %% boxit must be called here in order for
> drawunboxed...
>
> ?
>
> If I call it in figure 0 and don't call it in the following figure (100),
> I get the following error when I call bpath in fig. 100:
>
> >> sproc_.C
> ! Not a string.
> <to be read again>
>                    (
> <for(C)> scantokens.sproc_(SUFFIX0)(
>                                     (SUFFIX0)); ENDFOR
> fixsize->...$=(TEXT2):scantokens.sproc_$($);endfor
>                                                   .endgroup
> bpath->begingroup.fixsize((SUFFIX2))
>
> ;fixpos((SUFFIX2));scantokens.pproc_(SUF...
> <to be read again>
>                    ;
> l.326   undraw bpath(C);
>
> ?
>
> If I call boxit in both figures and not outside them, it works and the
> following two files are output:
>
> ttemp000.eps .. ttemp100.eps
>
> I didn't find any indication in mpboxes.pdf that the variables created by
> boxit would be local to an enclosing figure and I wouldn't have expected
> this behavior.
>
> Is this a bug?
>
> Thanks,
>
> Laurence
> --
> http://tug.org/metapost/


still looking at it.....
-- 
luigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/metapost/attachments/20220228/ad72b0b3/attachment.html>


More information about the metapost mailing list.