0

In the body of my document, I am able to refer to do the following without any problems: \cite[Lemma 2]{ABC} renders as [ABC, Lemma 2] (with the appropriate hyperlink to the bibliography). However, LaTeX gets angry when I attempt \begin{theorem}[\cite[Lemma 2]{ABC}] xyz \end{theorem} and fails to compile; presumably it is using the first ] to close the first [ rather than the second. The desired output would look something like

Theorem 1 ([ABC, Lemma 2]). xyz

(with the hyperlink to the bibliography preserved). Is there a way to make this compile properly? I am using amsthm, in case that is relevant. Thank you.

zjs
  • 271

1 Answers1

2

You have [] inside [] which confuses the parser. Use {} to protect/hide the inner pair:

\begin{theorem}[{\cite[Lemma 2]{ABC}}] 
daleif
  • 54,450