pgf-umlsd icon indicating copy to clipboard operation
pgf-umlsd copied to clipboard

Having a closing round parenthesis in a \mess label throws a fatal error

Open GoogleCodeExporter opened this issue 10 years ago • 4 comments
trafficstars

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

GoogleCodeExporter avatar May 07 '15 08:05 GoogleCodeExporter

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 .

m4dc4p avatar Jul 07 '16 18:07 m4dc4p

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?

ThomasFeher avatar Jul 29 '16 14:07 ThomasFeher

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.

m4dc4p avatar Jul 29 '16 16:07 m4dc4p

Here are some interesting solutions, too. Just for reference.

ThomasFeher avatar Aug 17 '16 08:08 ThomasFeher