[OS X TeX] metapost question

Jean-Claude DE SOZA jeanclaudedesoza at wanadoo.fr
Fri Dec 14 15:37:45 EST 2007


MP is the extension for MetaPost File.
JCDS
Le 14 déc. 07 à 21:20, Bruce Kellogg a écrit :

> 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
> -------------
>
> 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





More information about the MacOSX-TeX mailing list