I'm running MiKTeX 2.7 with TeXnicCenter 1.0.
I thought (for some obscure reason) that I should try to include my graphics as metapost code directly in my .tex file.
So I start with a simple example, looking something like this:
Code: Select all
\documentclass{article}
\usepackage{emp}
\begin{document}
\begin{figure}
\centering
\begin{empfile}
\begin{emp}(0, 0)
draw unitsquare scaled 70;
draw (30,40) withpen pencircle scaled 4;
pickup pencircle scaled 8;
draw (40,50);
draw (50,60);
\end{emp}
\end{empfile}
\caption{jebemjimsunce}
\end{figure}
\end{document}
Then I figured out that LaTeX => MP => PDF would also work, if I added \usepackage{graphicx}
\DeclareGraphicsRule{*}{mps}{*}{}
to the preamble.
OK, so now I've hit a wall with all my googling, here are my two problems:
1. How do I include multiple figures using the code I have above? The .mp file that is produced has the same name as my .tex file. I understand that empfile can also name the file, so I could give each figure a different file name, but then I don't understand how to get the postprocessor to pick up the right files... argh, I know I'm beign stupid here...
2. OK, let's stay with one figure, but add the line
dotlabel.bot(btex is this working etex, (30,40));
I get an error saying
The .mp file is created, but not the .1 file, and so no figure...!Undefined control sequence.
1.1 \documentclass [10pt]{article}
?tex: Bad file descriptor
Creating C:\PROGRA~1\MIKTEX~1.mpx...
makempx:"tex -parse-first-line" failed on C:\DOCU..........\mpx314.tex.
mp.exe: The operation failed for some reason.
BUT, if I manually open the .mp file and add %&latex into the third line (just after verbatimex) and then manually run mp, the .1 file is created perfectly and can be included in the .tex file with \includegraphics. But of course then why bother with emp anyway
I apologise for not being articulate in these matters, I hope whoever will be willing to reply will have figured out my level of understanding, and explain at an appropriate level

Thanks!
Maja