[XeTeX] Asymptote support xetex engine issue.

Bruno Voisin bvoisin at mac.com
Wed Jul 16 14:28:02 CEST 2008


Le 16 juil. 08 à 13:32, liyunhua2004 a écrit :

> I have an eps file name test_0.eps, it is a full circle. the content  
> is:
>
> %!PS-Adobe-3.0 EPSF-3.0
> %%BoundingBox: -43 -43 43 43
> %%HiResBoundingBox: -42.519685 -42.519685 42.519685 42.519685
> %%Creator: Asymptote 1.43
> %%CreationDate: 2008.07.16 18:47:54
> %%Pages: 1
> %%Page: 1 1
> newpath 42.269685 0 moveto
>  42.269685 23.3449024 23.3449024 42.269685 0 42.269685 curveto
>  -23.3449024 42.269685 -42.269685 23.3449024 -42.269685 0 curveto
>  -42.269685 -23.3449024 -23.3449024 -42.269685 0 -42.269685 curveto
>  23.3449024 -42.269685 42.269685 -23.3449024 42.269685 0 curveto
> closepath
> 1 0 0 setrgbcolor
> 0.5 setlinewidth
> 1 setlinecap
> 1 setlinejoin
> stroke
> showpage
> %%EOF
>
> [...]
>
> if change the circle to square, the EPS is:
> %!PS-Adobe-3.0 EPSF-3.0
> %%BoundingBox: -13 -7 79 79
> %%HiResBoundingBox: -12.8551681 -6.41057534 78.6287947 78.6287947
> %%Creator: Asymptote 1.43
> %%CreationDate: 2008.07.16 19:21:11
> %%Pages: 1
> %%Page: 1 1
> newpath 0 0 moveto
>  78.3787947 0 lineto
>  78.3787947 78.3787947 lineto
>  0 78.3787947 lineto
>  0 0 lineto
> closepath
> 0 setgray
> 0.5 setlinewidth
> 1 setlinecap
> 1 setlinejoin
> stroke
> showpage
> %%EOF
>
> it work fine.
>
> why ? who can tell me ??

Both graphics include parts with negative coordinates. With the  
square, the negative coordinates correspond apparently to a white  
border to the left and below the square, so cropping it isn't a  
problem. With the circle, the negative coordinates correspond to the  
second, third and fourth quadrants of the circle, so cropping them  
results in the observed quarter-circle.

Hence it seems XeLaTeX (actually xdvipdfmx) crops the parts of the EPS  
files with negative coordinates. That's odd, given the graphics/x  
package defaults are normally not to crop, except when instructed  
explicitly to do so with \includegraphics* or [clip=true].

I tried (here on the Mac) to change this by using [clip=false] or  
[bb=-43 -43 43 43] or [viewport=0 0 86 86], to no effect.

Bruno Voisin


More information about the XeTeX mailing list