When I use the EPS images made by Metapost in XeLaTeX. The image is not in the right place.
Here is my code:
\documentclass[a4paper,12pt]{article}
\usepackage{graphicx}
\usepackage{epsfig}
\begin{document}
\begin{tabular}{|c|}\hline
\psfig{figure=pix-1.eps} \\ \hline
\end{tabular}
\end{document}
And the output is:
If I use other EPS images not made by Metapost, I have no problem. How can I fix the issue?
The xelatex and metapost compiler is MikTex 2.9.6210 64-bit.
EDIT: the source code of image:
prologues:=3;
filenametemplate "%j-%c.eps";
verbatimtex
%&latex
\documentclass{article}
\usepackage{amsmath,amssymb}
\begin{document}
etex
input TEX
TEXPRE("%&latex" & char(10) & "\documentclass{article}\begin{document}");
TEXPOST("\end{document}");
beginfig(1)
u := 1cm;
lx := 1u;
sx := -1.2;
ex := 1.2;
rx := (ex - sx)/40;
drawarrow (-1.5u,0) -- (1.2u,0);
drawarrow (0,-3u) -- (0,3u);
drawoptions(withpen pensquare scaled 1.2);
for i = .5 step 0.5 until 2:
draw (sx,i*sx*sx)*lx for j = 1 upto 40:
.. (sx + j*rx,i*((sx + j*rx)**2))*lx
endfor;
label.rt("a=" & decimal(i),(ex,i*ex*ex)*lx);
endfor;
drawoptions();
endfig;
epsfig
and\epsfig
not the standard graphics inclusion. (I doubt it makes any difference as\epsfig
just expands to\includegraphics
but it looks a bit odd to be using that emulation unless the document was written in the 1980's) – David Carlisle Feb 27 '17 at 13:49\includegraphics
has the same result. – Prester Feb 27 '17 at 14:07