[OS X TeX] Looking for inline mpost example

Eric van der Oord eric.van-der-oord at wanadoo.fr
Sun Dec 26 10:08:16 CET 2004


That was a very good question, and there were very good answers ---  
I've learned a lot !

IMHO, the emp package deserves beeing included in Gerben's distribution.

E.

Le 25 déc. 04, à 08:15, Jean-Claude DE SOZA a écrit :

> Gerben,
>
> You need the emp package which isn't in your TeX distribution; you'll  
> find it at :
> http://www.ctan.org/tex-archive/help/Catalogue/entries/emp.html? 
> action=/tools/cataloguesearch&catstring=emp
>
> In the preamble, add :
> \usepackage{ifpdf}
> \usepackage[]{emp}
> \ifpdf
>   \DeclareGraphicsRule{*}{mps}{*}{}
> \fi
>
> Where you want to include your MetaPost picture, insert :
>
> %----  Begining of the MetaPost Picture ----%
> \begin{empfile}
> \begin{empdef}[fig1](8cm,8cm)
>> % --- Metapost  Code--- %
>> endfig;
> end;
> \end{empdef}
> \end{empfile}
> %----  End of the MetaPost Picture----%
> %----  Inclusion of the MetaPost Picture ----%
> \immediate \write18{mpost -tex=latex \jobname}
> \begin{figure}[ht]
> \begin{center}
>   \empuse{fig1}
> \end{center}
> \end{figure}
> %----  End ----%
>
> If you read French, here is a short tutorial about MetaPost
> http://www.gutenberg.eu.org/pub/GUTenberg/publicationsPDF/41- 
> popineau.pdf
>
> Jean-Claude DE SOZA
> Le 24 déc. 2004, à 20:01, Gerben Wierda a écrit :
>
>> I received some example mpost files (thanks) off list but what I was  
>> looking for is the smootest way to have these in my text. I guess I  
>> need to use something like the mfpic package, but what I woul dbe  
>> looking for ideally would be a way to do
>>
>> \begin{foo}
>> % metaposty stuff
>> \end{foo}
>>
>> and have the result as a picture in my document.
>>
>> (The sinus example is the curve and a step-function following the  
>> curve e.q. the way a ADC would interpret a sinus and produce a  
>> discrete result).
>>
>> G
>>
>> On Dec 23, 2004, at 18:29, Gerben Wierda wrote:
>>
>>> I am looking foran inline mpost example. I'd like to illustrate a  
>>> piece of text with a picture that shows a graph, say a sin(x)  
>>> function combined with a block-function approach to that sin(x)  
>>> (rough, it is for illustration). I would like to use the example for  
>>> a template for some of my illustrations.
>>>
>>> Is there someone  who has such an exampe for me or otherwise is  
>>> there a mpost guru who can provide me one. It is for inclusion in a  
>>> memoir class document in case that matters.
>>>
>>> Thanks,
>>>
>>> G
>>>
>>> --------------------- Info ---------------------
>>> Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
>>>           & FAQ: http://latex.yauh.de/faq/
>>> TeX FAQ: http://www.tex.ac.uk/faq
>>> List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
>>>
>>>
>>>
>>
>> --------------------- Info ---------------------
>> Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
>>           & FAQ: http://latex.yauh.de/faq/
>> TeX FAQ: http://www.tex.ac.uk/faq
>> List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
>>
>>
>>
>
>
> --------------------- Info ---------------------
> Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
>           & FAQ: http://latex.yauh.de/faq/
> TeX FAQ: http://www.tex.ac.uk/faq
> List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
>
>
>


--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the macostex-archives mailing list