Is there a way to define the position of components in tikz-uml automatically?

Normally it is necessary to set the position of an component as this example shows:

    \umlemptyclass[ x=3,y=−3]{A2}

If you don't define the position, the result would be, that the components are printed at the same position (x=0, y=0). Is there a way to create uml diagrams which components orientate automatically?

  • 1
    Maybe not exactly automatic positioning, but you can give name to a class with \umlemptyclass[name = a]{A1} for example. Then, with your second class, you specify the options node distance = xcm and position it at a given position with respect to a with, for example, the option below right of = a. A full example of your second class would be \umlemptyclass[node distance = 3cm, below right of = a]{A2}. – KersouMan Apr 9 '19 at 8:11
  • Hi @KersouMan, thank you yes I already saw that in the documentation. It is better than the normal way, but still not realy automatic. – NelDav Apr 9 '19 at 15:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.