3

I want to define a custom statechart using TikZ-UML (http://www.ensta-paristech.fr/~kielbasi/tikzuml/index.php). My problem is that the state does not seem to render the content in its body.

\documentclass[10pt]{article}

\usepackage[utf8]{inputenc}
\usepackage{amssymb,amsmath}
\usepackage{tikz}
\usepackage{tikz-uml}

\begin{document}
\begin{figure}[h]
\begin{tikzpicture}
\begin{umlstate}[name=State]{A State}
Some

State

Content

$$x = y$$
\end{umlstate}
\end{tikzpicture}
\end{figure}
\end{document}

Does anyone know whether this is a TikZ or TikZ-UML specific issue? And ideally: How would one display abitrary content here?

  • According to TikZ-UML documentation about states it looks like it's not possible to include regular text inside states. All examples show how to include other uml commands, but no one shows text. – Ignasi Feb 7 '14 at 11:41
  • Regarding the usage of $$ for math, pleas take a look at Why is \[ … \] preferable to $$? ;-) – Tobi Jul 12 '16 at 10:07
2

It may be still not documented (if it is the case, this will be fixed soon), but you can use \umlstatetextto do it since release 0.9.8.

\begin{tikzpicture}
\begin{umlstate}[name=State]{A State}
\umlstatetext{Some

State

Content

$$x = y$$
}
\end{umlstate}
\end{tikzpicture}

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.