1

When I try to compile a MetaUML program on Windows, I get the following error:

Font ptmr8r not usable: TFM file not found

I Googled this error, and I found that I have to install texlive-fonts-recommended. However, I cannot find any way to install this package on Windows. I am using TeX Live 2010. I am able to compile MetaPost programs without problems.

This isn't a LaTeX document but a MetaPost program that uses the MetaUML library. I wasn't sure about the best place to put this. Here is the code. It is an example from the MetaUML SourceForge site

input metauml.mp
beginfig(1); % had forgotten this

Class.P("Person")()();
Class.C("Company")()();

leftToRight(150)(P, C);

drawObjects(P, C);

clink(association)(P, C);

item(iAssoc)("employee")(obj.sw = P.e);
item(iAssoc)("1..*")(obj.nw = P.e);

item(iAssoc)("employer")(obj.se = C.w);
item(iAssoc)("0..*")(obj.ne = C.w);

item(iAssoc)("works for")(obj.s =.5[P.e,C.w]);

% and these
endfig;
end

To compile I do:

mpost test.mp

Ok, I installed Tex Live 2012, and the problem I had originally went away. I think the issue I had originally was because I did not have the recommended fonts installed (it's an option in the installer and increases the size of the download significantly, and I probably unselected it).

Now when I compile, I see the following:

mpost test.mp
This is MetaPost, version 1.504 (kpathsea version 6.1.0)
(mpost.mp (c:/texlive/2012/texmf-dist/metapost/base/plain.mp
Preloading the plain mem file, version 1.004)) (./test.mp
(c:/texlive/2012/../texmf-local/metapost/local/metauml/metauml.mp
(c:/texlive/2012/../texmf-local/metapost/local/metauml/util_infrastructure.mp
...
(c:/texlive/2012/../texmf-local/metapost/local/metauml/metauml_templates.mp)))
*
(Please type a command or say `end')
*end
Transcript written on test.log.

I don't see any errors. test.log only has the output that was displayed, which consisted of files from the MetaUML library. No other files are generated.

I have other MetaPost code that uses my own included libraries, and I don't see this problem.

The problem was that I didn't have the beginfig(), endfig, and end. This is MetaPost 101, but I had copied and pasted from the website. I've updated the code.

  • Welcome to TeX.SX! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. (Hint: filecontents can be handy for MWEs; you can post multiple files using this environment.) – Sean Allred Jun 17 '13 at 3:38
  • 1
    TeX Live 2010 is rather outdated. In a few days TeX Live 2013 will be released. – egreg Jun 17 '13 at 13:24
  • I thought about updating it, but I wasn't sure whether this was related to the release, and it's a big download. I saw others had the same problem on Linux and they fixed it with installing texlive-fonts-recommended, so I'd figure the same solution would apply to Windows. I'll try installing 2012. Maybe the installer has something related to the fonts. – user2233706 Jun 17 '13 at 15:36
  • That message usually occurs when you forget to write end at the end of your MetaPost file. With the same MP version (1.504) in MiKTeX it compiles correctly. – karlkoeller Jun 19 '13 at 4:24

Browse other questions tagged or ask your own question.