BibTeX, biblatex and biber\cite[option]{citation} does not work

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
danimey
Posts: 2
Joined: Wed Oct 07, 2009 1:02 pm

\cite[option]{citation} does not work

Post by danimey »

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.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX books
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

\cite[option]{citation} does not work

Post by localghost »

Group the citation command with an additional pair of curly braces.

Code: Select all

Code, edit and compile here:
\begin{theorem}[Schmith theorem, see {\cite[Theorem 3.1]{book}}]
% theorem contents
\end{theorem}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
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
danimey
Posts: 2
Joined: Wed Oct 07, 2009 1:02 pm

Re: \cite[option]{citation} does not work

Post by danimey »

Thanks a lot. That does the trick. Well, should have thought about it myself. Again, that was very helpful.
Post Reply