I am having trouble fixing the following issue:

illegal parameter number in definition of /reserved@a argument of \caption@ydblarg has an extra }. runaway argument?

This error shows up within a figure enviroment:

        \caption{Liste der zehn Themengebiete \protected\cite{codebook}}

To me, there does not seem to be an extra bracket. I do know that LaTeX addresses internal expressions with @ but i do not know how to solve it. The document can produce a pdf and the figure is shown but the reference is missing and the figure does not appear in the list of figures. When compiled the error log of Overleaf shows this:

{\numberline {4}{\ignorespaces Liste der zehn Themengebiete \protected \ETC.
! Paragraph ended before \contentsline was complete.
<to be read again> 
l.5 ...f ({(}\def ){)}\let \reserved@d =<\def \par
I suspect you've forgotten a `}', causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.

! Extra }, or forgotten \endgroup.
l.5 ...({(}\def ){)}\let \reserved@d =<\def \par }
I've deleted a group-closing symbol because it seems to be
spurious, as in `$x}$'. But perhaps the } is legitimate and
you forgot something else, as in `\hbox{$x}'. In such cases
the way to recover is to insert both the forgotten and the
deleted material, e.g., by typing `I$}'.

I have not modified \cite{} or anything else. There is no custom code used.

  • Please always provide a Minimal Working Example. Not only would it help to see what packages could interact with the problem, it'd also make things easier for people willing to help you.
    – Miyase
    Jul 11, 2022 at 21:12
  • {\numberline {4}{\ignorespaces Liste der zehn Themengebiete \protected \ETC. shows a corrupt aux file, use the overleaf menu to delete the cache of generated files Jul 11, 2022 at 21:51

1 Answer 1


Use \protect (or nothing).

\protected is e-tex primitive command only used, like \long, as a prefix for \def and related commands.

  • Im stupid. I did not even realize that I used \protected instead of \protect. I did not even know that \protected exists. Thank you very much. It solved the issue! Jul 12, 2022 at 10:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .