I have a LaTeX document using the algorithm2e
package. It used to work before I upgraded to texlive (it's the Debian version 2012.20120516-1 — some snapshot from 2012, if I understand correctly).
The problem is that now it seems that I can't use underscores in captions of algorithms, functions, and so on…
\documentclass{article}
\usepackage{algorithm2e}
\begin{document}
\begin{procedure}
This is ``A''
\caption{method\_A}
\end{procedure}
\end{document}
When I try to process the above document with pdflatex, I see this error:
Runaway argument?
method\_A@\endcsname ##1{\FuncSty {\algocf@captname method\_A@(}\ArgSty \ETC.
! Paragraph ended before \algocf@captname was complete.
<to be read again>
\par
l.11
?
What does this error mean, and is there anything I can do to fix it?
Best Answer
The
procedure
environment supplied byalgorithm2e
has a strict requirement in terms of its caption. From thealgorithm2e
documentation:As such, you're required to use something like: