TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have problem using the emp package in TeXlive 2010. When I try to use it with empcmds it prints contents to output. If I use emp it parser fails after first character.

Also - how should I import libraries such as MetaUML.

Edit: Code

\documentclass[a4paper,11pt]{article}
\usepackage{enumerate}
\usepackage{amsmath}
\usepackage{emp}
\author{Maciej~M.~Piechotka}
\title{MetaUML}
\begin{document}

\begin{emp}
input metauml;

beginfig(1);
Class.A("Point")
       ("+x: int",
        "+y: int") ();

Class.B("Circle")
       ("radius: int")
       ("+getRadius(): int",
        "+setRadius(r: int):void");

topToBottom(45)(A, B);

drawObjects(A, B);

clink(aggregationUni)(A, B)
endfig;

end;

\end{emp}

\end{document}

and error:

! Use of \emp@ doesn't match its definition.
<recently read> i

l.10 i
      nput metauml;

Final result:

\documentclass[a4paper,11pt]{article}
\usepackage{emp}
\usepackage[pdftex]{graphicx}
\author{Maciej~M.~Piechotka}
\title{MetaUML}
\begin{document}
\DeclareGraphicsRule{*}{mps}{*}{}

\begin{empfile}
\begin{empcmds}
input metauml;
\end{empcmds}

Hi there:
\begin{emp}[uml1](20,20)
Class.A("Point")
       ("+x: int",
        "+y: int") ();

Class.B("Circle")
       ("radius: int")
       ("+getRadius(): int",
        "+setRadius(r: int):void");

topToBottom(45)(A, B);

drawObjects(A, B);

link(aggregationUni)(A, B);
\end{emp}
\end{empfile}
\immediate\write18{mpost -tex=latex \jobname}
\end{document}
share|improve this question
2  
A minimal example with the error message always helps – Aditya Nov 14 '10 at 0:19
up vote 10 down vote accepted

From the emp documentation: "Required arguments are the width and the height of the figure, in units of \unitlength [...] \begin{emp}[⟨name⟩](⟨width⟩,⟨height⟩)"

So you need to write

\begin{emp}(100,100)

or whatever.

share|improve this answer

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.