TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I try to cite a book in such a way

Theorem body.

I've got an error because of multiple use of [ and ]. Is it possible to cite in such a way in theorem argument? Would be great if it could be done without redefine of \cite command.

share|improve this question
up vote 26 down vote accepted

If you need to pass a ] inside an optional argument, just enclose the argument in figure braces:

Theorem body.

Without this, it's the \cite[p.~90 (everything up to the first ]) that gets passed as the argument, while the remaining text is typeset afterwards.

share|improve this answer
Oh, so simple! I have forgot about that. Thanks! – xen Mar 20 '11 at 22:01
It may be worth pointing out why this happens. The [ and ] bracketing of optional arguments in LaTeX isn't as robust as the { ... } bracketing of TeX. In particular, [ is matched by the next ] that is in the same group (with regard to { ... } grouping) as it. It doesn't look to see if the ] should have matched an intervening [. The solution is (as Andrey says) to ensure that any intervening [ and ]s are in a different TeX group by enclosing them in braces. – Loop Space Mar 21 '11 at 8:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.