# Underscores in pgm-umlsd diagrams [duplicate]

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}
\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.
\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 StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); May 28 '14 at 23:15

• 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
• 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