[XeTeX] Asymptote support xetex engine issue.

liyunhua2004 liyunhua2004 at 163.com
Wed Jul 16 13:32:46 CEST 2008


 Hi, I am Chinese. I amimg add xetex support for Asymptote, Asymptote is a powerful descriptive vector graphics language like Metapost. see http://asymptote.sourceforge.net. But it not support xetex engine right now, so it can't use Chinese font whitout CJK. 
% asy --help
-tex engine     TeX engine ("latex|pdflatex|tex|pdftex|none") ["latex"]

I am add xetex support for Asymptote, I have accomplished the major jobs. 
the  asymptote can work fine with xelatex. but found an issue.

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

And a tex file is test.tex:
\documentclass[12pt]{article}
\usepackage{color}
\usepackage[dvipdfm]{graphics}
\begin{document}
\includegraphics{test_0.eps}
\end{document}

After run xelatex test.tex, I get a part circle, not full circle. I have check check out xetex from http://scripts.sil.org/svn-public/xetex/TRUNK.
also got part circle.

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

The EPS file is produced by asympote from the following code.
size(0,3cm);
draw(unitcircle,red);
// draw(unitsquare);
label("C",(0,0)); 

run asy -k test.asy, can will get test_0.eps. 

sorry for my english. i hope someone can help me. thank you very much.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/xetex/attachments/20080716/a03fc259/attachment-0001.html 


More information about the XeTeX mailing list