pgf-umlsd
pgf-umlsd copied to clipboard
Having a closing round parenthesis in a \mess label throws a fatal error
Steps to reproduce:
\documentclass{article}
\usepackage{pgf-umlsd}
\begin{document}
\begin{sequencediagram}
\newinst[5]{A}{Alice}
\newinst[5]{B}{Bob}
\mess[1]{A}{)}{B}
% Coming from:
% \mess[1]{A}{Enc(M)}{B}
\end{sequencediagram}
\end{document}
What I see:
! Package tikz Error: A node must have a (possibly empty) label text.
See the tikz package documentation for explanation.
Type H <return> for immediate help.
...
l.31 \mess[1]{A}{)}{B}
! ==> Fatal error occurred, no output PDF file produced!
Transcript written on p2ppki_validation_test.log.
I'm using pgf-umlsd version 0.7 on Arch Linux from texlive-core 2014.34872.
Original issue reported on code.google.com by [email protected] on 9 Feb 2015 at 7:17
This happens because the \mess macro creates a node based on the text of the message. TikZ does not allow node names with parentheses, commas, etc.
Fixed by #28 .
I had a similar problem trying to use something like \mess{A}{x\_y)}{B}. This seems to be not fixed by #28.
So are these nodes really necessary? Simply removing them seems to solve all those problems.
Could they be created conditionally, if someone really needs them?
Or could we use a separate command (\namedMess for example) that accepts an additional parameter with the node name?
I found the same - my PR didn't fix all occurrences. I agree the feature should be removed. No one seems to be using the feature, and I suspect you can always calculate the location of the nodes anyways.
I closed my PR in any case.
Here are some interesting solutions, too. Just for reference.