[OS X TeX] metapost question
Bruce Kellogg
rbmjk at alltel.net
Fri Dec 14 21:20:14 CET 2007
Jean-Claude
Please excuse an ignorant question. I do not understand
what is meant by "picture.mp"; the files that I process
all have the extension .tex .
Bruce Kellogg
rbmjk at alltel.net
-------------
Success teaches you nothing. Failures teach you everything.
Making mistakes is the most important thing you can do.
James Dyson
On Dec 14, 2007, at 11:35 AM, Jean-Claude DE SOZA wrote:
>
> Le 14 déc. 07 à 12:19, Bruce Kellogg a écrit :
>
>> Any suggestions on what to do would be appreciated.
>> I do all my processing using pdftex, and in the
>> TeXShop Preferences Misc pane there is checked mptopdf.
>> I do not really understand these options, should I check mpost?
>>
>> Bruce Kellogg
>
> Bruce,
> I use pdflatex.
> I run Metapost with mpost in TeXShop because it is easier for me to
> manage errors in the MetaPost file with this engine.
> My preamble in the picture.mp is the following :
> verbatimtex
> %&latex
> \documentclass[]{article}
> \usepackage{mathrsfs}
> \begin{document}
> etex;
> beginfig(1)
> .............
> endfig;
> end
> The mp file produces a file whose name is picture.1 that I include
> in my LaTeX file where I don't forget to add this two lines in the
> preamble :
> \usepackage{graphicx}
> \DeclareGraphicsRule{*}{mps}{*}{}
>
> Sometimes I run MetaPost directly in the LaTeX file using the emp
> package. Here is some parts of my LaTeX file :
>
> % ----- in the preamble for inserting MetaPost code ----%
> \usepackage{ifpdf}
> \usepackage[]{emp}
> \ifpdf
> \DeclareGraphicsRule{*}{mps}{*}{}
> \fi
> % ---- end Preamble ----%
>
> %---- Beginning of MetaPost Picture Source----%
> \begin{empfile}
> \begin{empdef}[fig1](8cm,8cm)
> % --- Metapost Code --- %
> beginfig(1)
> ...........
> endfig;
> end;
> % --- End of MetaPost Code ---%
> \end{empdef}
> \end{empfile}
> %---- End of MetaPost Picture ----%
>
> %---- integration of the MetaPost Picture----%
> \immediate \write18{mpost -tex=latex \jobname}
> \begin{figure}[ht]
> \begin{center}
> \empuse{fig1}
> \end{center}
> \end{figure}
> %---- end ----%
>
> Jean-Claude DE SOZA
>
> -------------------------- Helpful Info --------------------------
> TeX FAQ: http://www.tex.ac.uk/faq
> List Reminders and Etiquette: http://www.esm.psu.edu/mac-tex/list/
> List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
> List Archive: http://tug.org/pipermail/macostex-archives/
> Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
>
More information about the macostex-archives
mailing list