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'm wondering how could I draw node that looks like ** UML comment **. Any suggestions?

enter image description here

share|improve this question
The PGF manual contains an example for creating exactly this node shape in the section "Declaring New Shapes". – Jake Dec 27 '12 at 20:16
If you want to create UML diagrams with tikz, you should look at TikZ-UML. – Nicolás Dec 27 '12 at 22:14

As it is stated in the tikz manual, there is no UML support in TikZ at the moment [p. 791]. So you might find MetaUML interesting, and especially their notes.

If you have installed MetaUML, simply save the following code as name.mp and type in the console mptopdf name.mp:

input metauml;
input TEX;

  Note.A("This class implements the formula:", 
          TEX("$\sum_1^n f(x)\cdot dx$"));


You'll get this result as name.pdf.

Example of a Note in MetaUML

So you have to define your UML structure externally and then just include the pdf in your document.

Have Fun!

share|improve this answer
that's not what i want, it it is not how to do it in tikz – Meter Dec 27 '12 at 20:13
@Daniel Thanks for the advise, I hope my answer is now more helpful. – polyfunc Dec 28 '12 at 13:47
+1: I have deleted my now obsolete comment :-) – Daniel Dec 28 '12 at 21:11
        \inheritanchor[from=rectangle]{north east}
        \inheritanchor[from=rectangle]{north west}
        \inheritanchor[from=rectangle]{south east}
        \inheritanchor[from=rectangle]{south west}
            \southwest \pgf@xa=\pgf@x \pgf@ya=\pgf@y
            \northeast \pgf@xb=\pgf@x \pgf@yb=\pgf@y
            \pgf@xc=\pgf@xb \advance\pgf@xc by-5pt
            \pgf@yc=\pgf@yb \advance\pgf@yc by-5pt

copied from documentation

share|improve this answer
Does it work? If so could you post a working example, because solely \usepackage{tikz} and the shapes library are not enough to make this work. – polyfunc Dec 27 '12 at 22:51
You should consider improving your answer. First of all because it doesn't provide a minimal working example. Second because it doesn't provide any insight into how it solves your problem. Anybody else who hasn't read the pgf manual would not be able to make sense out of this. – Marc van Dongen Dec 28 '12 at 6:55
please don't downvote own answers. – percusse Dec 29 '12 at 3:08

Your Answer


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.