Would you mind adding a little context, or a link to a description or (better still) a picture of the sort of thing that you'd like? Someone may be able to help but not know what a UML diagram is. Thanks!
– Loop SpaceAug 3 '10 at 9:19

7 Answers
7

MetaUML is a MetaPost library for typesetting UML diagrams with a human-friendly textual notation. Another useful package is emp. It allows to embed Metapost code and therefore MetaUML inside a LaTeX document

pst-uml is a PSTricks package providing support for drawing UML diagrams.

I highly recommend tikz-uml, very flexible, comprehensive and nice looking. Support the author, please. All other packages are very old (last, about 2006) and based on old packages,... pgf-Tikz is too generic.
– user14416Apr 26 '15 at 17:54

For UML class diagrams I'd recommend pgf-umlcd, for sequence diagrams pgf-umlsd (example by the author). Both packages are based on the PGF package collection, which I find very easy to use for drawing vector graphics within TeX & LaTeX.

PlantUML takes pseudo-code-y plain-text class descriptors and generates UML diagrams (as PNG, SVG or EPS, possibly others). It's a Java-based program that used Graphviz on the back-end to determine layouts.

In addition to class/object diagrams, PlantUML can also generate other UML diagrams like sequence, activity, state, use case diagrams.

There's nothing particularly LaTeX-specific about it, and you'll probably need or want to store the class descriptors in an independent file but I've often used PlantUML (or for that matter, ditaa) as part of a LaTeX publishing workflow.

This approach would be especially handy if you have more documentation than just the diagrams to create. Doxygen is intended to document software projects. If you have a set of classes in C++ or java, then you can use doxygen to generate latex from the source code. It can automatically generate several types of diagrams from the source, including UML class diagrams all hyperlinked and integrated with the rest of the documentation and its source code.