According to Adding tikz figure in caption it suffices to add protect to make my program compile. Indeed, it compiles after adding the command, but TeX still throws an error message that the control sequence is undefined.
What portion of the command definition of \circled leads to the problem?
\documentclass[twoside,runningheads, oribibl, draft]{llncs}
\usepackage{graphicx}
\usepackage{tikz}
\newcommand*\circled[1]{%
\protect\tikz[baseline=(char.base)]{%
\node[shape=circle, draw, inner sep=1.5pt, font=\small] (char) {#1};
}}
\begin{document}
\begin{figure}[h]
Hello World
\caption{Derivation of premise \circled{2}}
\end{figure}
\end{document}
\NewDocumentCommand\circled{m}{...}– Ulrike Fischer Jan 27 '22 at 16:40\caption{... \protect\circled{2}}. Putting\protectinside\circledis too late. – Henri Menke Jan 27 '22 at 20:32