Re: Bug with in-box test alignment

Sebastiano Vigna <[email protected]> Fri, 31 Dec 2021 09:51:27 -0800
Newsgroups gmane.comp.tex.metapost
Message-ID <[email protected]>

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

Ciao,

					seba


--
http://tug.org/metapost/