Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

How can I install the metafun metapost macros?

I have tried to tlmgr install metafun, but it cannot find it. Also a search for “metafun” on ctan yields only a introductory tutorial on ConTeXt, in Chinese.

I remember I’ve had it installed previously, so I did a search for it on my OSX: find /usr/local/texlive -name metafun\*, which listed the file metafun.mem from an earlier TLBasic2010 directory hierachy under texmf-var/web2c/metapost/metafun.mem. (I am now using TL2012Basic)

I thought I could just copy it to my local texmf tree under ~/Library/texmf/metapost, but

mpost --mem=metafun.mem file.mp

says it cannot find it.

So I would like to ask a) where can I find it on the internet, and b) where do I put the file so that metapost can find it?

share|improve this question
3  
Metapost in TeX Live 2012 doesn't read .mem files any more. Metafun is part of ConTeXt, so you need tlmgr install context; you call metafun with mpost --mem=metafun (no .mem extension required). –  egreg Jan 15 '13 at 14:20
    
Thanks @egreg! Now I don't get any error about mpost not finding the metafun. Do you know if I need to still do something, because when I run the command as you showed, I don't see metapost loading the file (only: Preloading the plain mem file, version 1.004). Also I get an error when trying to call, what I presume, a metafun function drawpoints. –  morbusg Jan 15 '13 at 16:24
    
I've added an answer showing that the necessary file are indeed read in; about drawpoints I really don't know: it is defined in mp-tool.mpii, but the details about it are surely in the documentation that you should be able to find at the Pragma-ADE site: pragma-ade.com/general/manuals/metafun-p.pdf –  egreg Jan 15 '13 at 16:48
add comment

1 Answer

up vote 6 down vote accepted

The metafun macros for Metapost are part of ConTeXt, so you need

tlmgr install context

For calling metafun from the command line, you can say

mpost --mem=metafun <filename>

although mpost doesn't load any more .mem files but instead inputs the corresponding files that would have been used for building the format, in this case metafun.mp. Indeed, if I try on a test file

mpost --mem=metafun test

I get in the log file

This is MetaPost, version 1.504 (kpathsea version 6.1.0)  15 JAN 2013 17:43
**test
(metafun.mp
(/usr/local/texlive/2012/texmf-dist/metapost/context/base/metafun.mpii
(/usr/local/texlive/2012/texmf-dist/metapost/context/base/mp-base.mpii
Preloading the plain mem file, version 0.63)
(/usr/local/texlive/2012/texmf-dist/metapost/context/base/mp-tool.mpii)
(/usr/local/texlive/2012/texmf-dist/metapost/context/base/mp-spec.mpii)
(/usr/local/texlive/2012/texmf-dist/metapost/context/base/mp-core.mpii)
(/usr/local/texlive/2012/texmf-dist/metapost/context/base/mp-page.mpii)
(/usr/local/texlive/2012/texmf-dist/metapost/context/base/mp-text.mpii)
(/usr/local/texlive/2012/texmf-dist/metapost/context/base/mp-txts.mpii)
(/usr/local/texlive/2012/texmf-dist/metapost/context/base/mp-shap.mpii)
(/usr/local/texlive/2012/texmf-dist/metapost/context/base/mp-butt.mpii)
(/usr/local/texlive/2012/texmf-dist/metapost/context/base/mp-char.mpii)
(/usr/local/texlive/2012/texmf-dist/metapost/context/base/mp-step.mpii)
(/usr/local/texlive/2012/texmf-dist/metapost/context/base/mp-grph.mpii)
(/usr/local/texlive/2012/texmf-dist/metapost/context/base/mp-figs.mpii)
(/usr/local/texlive/2012/texmf-dist/metapost/context/base/mp-grid.mpii
(/usr/local/texlive/2012/texmf-dist/metapost/context/base/mp-form.mpii
(/usr/local/texlive/2012/texmf-dist/metapost/base/string.mp)
(/usr/local/texlive/2012/texmf-dist/metapost/base/marith.mp
(/usr/local/texlive/2012/texmf-dist/metapost/base/string.mp))))
(/usr/local/texlive/2012/texmf-dist/metapost/context/base/mp-func.mpii))

and this shows that the right files are loaded.

share|improve this answer
    
Thanks! Now I can see also those files being included when I run mpost. I’m not sure why it didn’t work earlier (maybe because of a same named tex-file along with using mptopdf), but now all is good. :-) –  morbusg Jan 15 '13 at 17:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.