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.
\documentclass{article}
\usepackage[shellescape]{gmp}
\begin{document}

\begin{mpost}[use,mpsettings={input metauml;}]
Class.A("A")()();
Class.B("B")()();
Class.C("C")()();
Class.D("D")()();

B.n = A.s + (0,-80);
C.w = D.w + (-80,0);
A.s = C.w + (50,40);
drawObjects(A, B, C, D);
clink(association)(A,B);
clink(association)(C,D);
\end{mpost}
\end{document}

The ouput I get:
what I get

As you can see lines A--B and C--D intersect.

I really need something like this:

what I need

How can I do that?

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted
+50

Take a look at section 8 and especially subsection 8.5 of the metauml manual.

Code

\documentclass{article}
\usepackage[shellescape]{gmp}
\begin{document}

\begin{mpost}[use,mpsettings={input metauml;}]
Class.A("A")()();
Class.B("B")()();
Class.C("C")()();
Class.D("D")()();

B.n = A.s + (0,-80);
C.w = D.w + (-80,0);
A.s = C.w + (50,40);
drawObjects(A, B, C, D);
clink(association)(A,B);
%clink(association)(C,D);
path cool;
cool := C.e -- C.c+(38,0) .. C.c+(40,2) .. D.c+(-38,0) -- D.w;
link(association)(cool);
\end{mpost}
\end{document}

Output

Output of posted code

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.