I get the error
! Argument of \@item has an extra }. <inserted text> \par l.135 \emph{class} \bfcode{C}} when translating a LaTeX file generated by Sphinx documentation system.
I've managed to reduce it to the following self-contained example:
\documentclass{article} \usepackage{hyperref} \newcommand{\pysigline}[1]{\item[#1]\nopagebreak} \newenvironment{fulllineitems}{ \begin{list}{}{\labelwidth \leftmargin \labelsep 0pt \rightmargin 0pt \topsep -\parskip \partopsep \parskip \itemsep -\parsep} }{\end{list}} \begin{document} \begin{fulllineitems} \pysigline{\phantomsection\label{index:project0class_c}\item[] template \textless{}typename T\textgreater{} \emph{class} \bfcode{C}} Test class. \end{fulllineitems} \end{document} As you can see the '{' and '}' are balanced.
What does this error mean and how can I fix it?
\itemis indeed inside some sort of list environment (where it would cause an error outside of one).\pysiglineputs its argument in an optional argument so use\pysigline{{...}}to hide the[]