1

This question already has an answer here:

I'm having trouble using underscores in parts of sequence diagrams made using pgf-umlsd. This is particularly perplexing as I have not had this problem in the past, though I've not used the package in maybe almost a year or so.

Here is a minimal example:

\documentclass{article}

\usepackage{pgf-umlsd}

\begin{document}

\begin{sequencediagram}
\newthread{process}{process}
\newinst{hash}{hash\_store}

\begin{sdblock}{Startup}{}
  \mess{hash}{{list\_manifest()}}{process}
\end{sdblock}
\end{sequencediagram}

\end{document}

That underscore in list_manifest generates this error:

! Missing \endcsname inserted.
<to be read again> 
                   \protect 
l.12   \mess{hash}{{list\_manifest()}}{process}

Take out that underscore and the figure generates as expected. Previously I have made such diagrams with underscores in precisely that fashion. I could not determine what's going wrong, or any simple way to wrap and hide that underscore. Note that the underscore in the component instance label hash_store does not cause a problem.

I'm using pgf-umlsd version 0.6 or 0.7 (I think the \ProvidesPackage was not updated):

% History:
% v0.7 2012/03/05
\ProvidesPackage{pgf-umlsd}[2011/07/27 v0.6 Some LaTeX macros for UML

This is with pdfTeX 3.1415926-2.5-1.40.14 (TeX Live 2013/Arch Linux), texlive-core 2013.33063-1.

What's changed and how should I rework that label?

marked as duplicate by egreg, Mike Renfro, Gonzalo Medina tikz-pgf May 28 '14 at 23:15

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Welcome to TeX.SX! The problem seems the same as in How to use Greek letters in pgf-umlsd or generally terms starting with \ – egreg May 28 '14 at 22:32
  • Thanks for that, the answer there seems to address the problem. I had not found that in searching around for existing questions---too much emphasis on the underscore and not the slash as the problem. – tjkopena May 28 '14 at 22:43
  • Don't worry, I remembered I had seen something about pgf-umlsd and then discovered I also gave an answer! I'll vote for closing your question, just to keep information as tight as possible on the site. Don't be afraid of asking again, or even answering! Be again welcome! – egreg May 28 '14 at 22:52

Browse other questions tagged or ask your own question.