| 1 |
\section{Including \MP{} figures in \LaTeX} |
| 2 |
\label{sec:latexincl} |
| 3 |
|
| 4 |
In order to include a \MP{} figure in \LaTeX{}, the \File{graphicx} |
| 5 |
package is suggested. Below is an example of including a \MP{} figure |
| 6 |
(with name \File{foo-1.mps}) in a \LaTeX{} document. |
| 7 |
|
| 8 |
\begin{lstlisting}[style=LaTeX] |
| 9 |
\documentclass{article} |
| 10 |
\usepackage{graphicx} |
| 11 |
\begin{document} |
| 12 |
|\dots| |
| 13 |
\includegraphics{foo-1.mps} |
| 14 |
|\dots| |
| 15 |
\end{document} |
| 16 |
\end{lstlisting} |
| 17 |
|
| 18 |
Having a \File{.mps} file extension on the graphic allows the same |
| 19 |
graphic to be included in both \LaTeX{} and \PDF\LaTeX{} documents. |
| 20 |
When using \PDF\LaTeX, the EPS graphic (with file extension \File{.mps}) |
| 21 |
is converted to \PDF{} ``on the fly'' using Hans Hagen's \File{mptopdf}. |
| 22 |
This conversion is necessary since \PDF\LaTeX{} performs no \PS{} |
| 23 |
processing. |