This is an example from mpgraphics package documentation:
\documentclass{article}
\usepackage{mpgraphics}
\begin{document}
\begin{mpinline}
draw (20,20)--(0,0)--(0,30)--(30,0)--(0,0)
\end{mpinline}
\end{document}
I am getting something like this:
I'm using:
– mpost version 1.504 (MiKTeX 2.9)
– pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9)
– MiKTeX EPS-to-PDF Converter 2.9.3275 (MiKTeX 2.9)
I compile using wrige using TexMaker and compile by means of:
latexmk -e "$pdflatex=q/pdflatex -synctex=1 -shell-escape -interaction=nonstopmode/" -pdf %.tex
or
pdflatex -interaction=nonstopmode -synctex=1 -shell-escape %.tex
(result is the same)
What am I doing wrong?
You can find the log file here. Example compiled by: pdflatex -interaction=nonstopmode -enable-write18 -synctex=1 -shell-escape %.tex
Resulting pdf: link
EDIT:
I tried to compile it by a command line. This is what I got:
The whole folder with source and logs
Best Answer
As I said in a previous comment, your example compiled without problem in my OSX box, so I was guessing the problem was in your Windows setup.
Looking carefully at your
_COMMAND_LINE_.txt
file, I noticed the following, in line 72:Note the error at the end of the line. Your
epstopdf
program is refusing-o
option, and thus it is not producing the pdf output.mpgraphics
package issues a Warning, which somehow, instead of appearing in the standard output or in the .log file, appears in the final pdf. This is why your documment contains the strange textmpgrahphics********
etc. (this could be considered a bug in mpgraphics implementation.)Nevertheless, the problem is with your
epstopdf
program.mpgraphics
package recommends a "recent" version ofepstopdf
. I don't know if the problem is that yourepstopdf
version is not recent enough or whetherepstopdf
is broken in Windows.You can try to execute
epstopdf --help
in command line and learn which switch it uses instead of-o
(which is for setting the name of the resultingpdf
). Once you know this, you can hack the filempgraphics.sty
(search for the string-o
in that file, in my version is at line 77), and change it appropiately.