Re: Bug with in-box test alignment
luigi scarso <[email protected]> Fri, 31 Dec 2021 19:09:18 +0100
| Newsgroups | gmane.comp.tex.metapost |
|---|---|
| Message-ID | <CAG5iGsDDCx7QQ5nF=j_Dawxs3GcJq8X3zgiiqh2VF4uyKMFoFA@mail.gmail.com> |
On Fri, Dec 31, 2021 at 6:51 PM Sebastiano Vigna <[email protected]> wrote: > > > > On 30 Dec 2021, at 01:02, luigi scarso <[email protected]> wrote: > > > > > On 29 Dec 2021, at 07:42, Sebastiano Vigna <[email protected]> > wrote: > > > > > > The following Metapost program > > > > > > outputtemplate := "%j-%c.mps"; > > > > > > input boxes > > > > > > beginfig(1); > > > circleit.n0(btex $0$ etex); > > > drawboxed(n0) > > > endfig; > > > > > > bye > > > > > > > > > generates a circle with a 0 label inside, but the label is not > centered (I'm converting the output of Metapost with mptopdf). > > > You can test with > > mpost -debug test.mp > > that preserves temp. files > > Thanks, that highlighted the problem: > > 1,2c1,2 > < \gdef\mpxshipout{\shipout\hbox\bgroup% > < \setbox0=\hbox\bgroup}% > --- > > \gdef\mpxshipout{\shipout\hbox\bgroup > > \setbox0=\hbox\bgroup} > > For some reason, one installation (Linux) puts a % at the end of these two > lines, the other (MacPorts) doesn't. The result is a space in the output > that moves the label out of place. The difference propagates to the dvi > files. > > This the difference of the dvi files generated by the temporary dvi files > passed through dvitomp: > > < setbounds _p to (0,0.0000)--(4.9813,0.0000)-- > < (4.9813,6.4204)--(0,6.4204)--cycle; > --- > > setbounds _p to (0,0.0000)--(8.3022,0.0000)-- > > (8.3022,6.4204)--(0,6.4204)--cycle; > > This appears to be a difference in behavior of Metapost, but I really do > not know what to do next. Does this ring any bell? Maybe there's a subtle > web2c configuration option that is different in the two installations? > aha... it was a bug introduced with a patch of mine to mpx_copy_mpto for troff. But Metapost 2.01 in TeXLive 2021 should be ok.... perhaps MacPorts has an old version ? -- luigi -- http://tug.org/metapost/