Re: What is the best export module to latex



Tim, I don't know what it is about your e-mail, but your messages are coming
through to me as attached *.txt files.  Please fix it if you can.

In fact, I replied to your prior e-mail without even reading your message.
I just saw the subject line and tried to be helpful.  Glad it worked out.

I use the encapsulated metapost package (emp) to include my MetaPost figures
in my latex documents.  You'll need it first.

Then, my coduments need a few tweaks to make everything work.  Assuming
you're using pdflatex, you'll need (in addition to the rest of your junk):


\documentclass{article}

\usepackage{emp}
\DeclareGraphicsRule{*}{mps}{*}{}

\usepackage[pdftex]{graphicx}
\DeclareGraphicsExtensions{.pdf,.png,.mps,.mp} %% whatever else trips your
trigger.

\empfile

\begin{document}

\begin{emp}[1,1]
input foo.mp;
\end{emp}

\end{document}

The [1,1] tells emp the size of the figure.  Fortunately, the rest of the
mechanisms override this value with a properly generated bounding box.
However, it is a required parameter, so you can't leave it out.  [1,1] is
just a dummy variable.

Because of the \empfile, you're telling emp to bring all your mp files into
a master file for processing.  Because of this, you need to remove the

beginfig(1);

from near the top of the file, and the

endfig;
end;

from the bottom of the file.

You'll want to use 0.95-pre2 if you can, Hans has made some fixes that are
important for MetaPost files.

Good luck,

              Rob




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]