This question is a bit broad but I am trying to install metauml (I am using Mac and texlive). I downloaded the package and ran the install script which put a metauml directory under the metapost directory (which I Was expecting). However, I cannot get it to run. I have this code:
\documentclass[a4paper,12pt]{article}
\usepackage{amssymb} % needed for math
\usepackage{amsmath} % needed for math
\usepackage[utf8]{inputenc} % this is needed for german umlauts
\usepackage[ngerman]{babel} % this is needed for german umlauts
\usepackage[T1]{fontenc} % this is needed for correct output of umlauts in pdf
\usepackage[margin=1.5cm]{geometry} %layout
% this is needed for forms and links within the text
\usepackage{hyperref}
% The following is needed in order to make the code compatible
% with both latex/dvips and pdflatex.
\ifx\pdftexversion\undefined
\usepackage[dvips]{graphicx}
\else
\usepackage[pdftex]{graphicx}
\DeclareGraphicsRule{*}{mps}{*}{}
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% THE DOCUMENT BEGINS %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\section{Class diagram}
\includegraphics{metadiagram.mp}
\end{document}
The metadiagram.mp is in the same folder and is defined as follows:
input metauml;
beginfig(1);
Class.World("World")
("-age: int",
"#ressources: List")
("+sayHello(): void");
Class.NoHuman("Human")
("-birthday: Date",
"-nickname: String",
"-secret: String")
("+code(language: Language): Program");
leftToRight(50)(World, NoHuman);
drawObjects(World, NoHuman);
link(aggregation)(NoHuman.w -- World.e);
item(iAssoc)("1")(obj.n = .2[World.e,NoHuman.w]);
item(iAssoc)("has >")(obj.n = .5[World.e,NoHuman.w]);
item(iAssoc)("0..*")(obj.n = .8[World.e,NoHuman.w]);
endfig;
end
I am getting the error: Cannot determine size of graphic in metadiagram.mp (no BoundingBox)
Can anyone help ?