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.

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
add comment

1 Answer

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
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.