Hello,
I have the following code:
\begin{theorem}[Schmith theorem, see \cite[Theorem 3.1]{book}]
...
\end{theorem}
This results in the following error:
>ERROR: Argument of \@citex has an extra }.
>
>--- TeX said ---
><inserted text>
> \par
>l.2641 ...[Schmith theorem, see \cite[Theorem 3.1]
>
>{book}]...
The optional argument for \cite works normally, but not when it occurs as an argument in a theorem style environment. Anybody got an idea? Thanks a lot.
Just to make sure: I'm using TeXlive on Ubuntu 9.4.
BibTeX, biblatex and biber ⇒ \cite[option]{citation} does not work
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
\cite[option]{citation} does not work
Group the citation command with an additional pair of curly braces.
The compiler is irritated by the brackets in the optional argument of the citation command. But only because it is place inside another (outer) optional argument of the theorem environment.
Best regards and welcome to the board
Thorsten
Code: Select all
Code, edit and compile here:
\begin{theorem}[Schmith theorem, see {\cite[Theorem 3.1]{book}}]% theorem contents\end{theorem}
Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: \cite[option]{citation} does not work
Thanks a lot. That does the trick. Well, should have thought about it myself. Again, that was very helpful.