Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to use some text as the optional parameter to some command. The text includes square braces ([ and ]), but since the optional parameter goes within square brackets, unexpected things happen.

More info: I want an itemized list whose bullets are citations like [GMR85]. I used this command:

  \item[[GMR85]] ...

but it takes the first ] as the end of optional parameter.

Any way to escape ] ?

Edit: I specially want this to work in beamer. My current result is like:

Note how ] is not included the label.


This bug has been solved in the latest versions of beamer.

share|improve this question
Use {description} rather than {itemize} with lexicon-like lists. –  Charles Stewart Dec 7 '10 at 13:23
Also, why don't you use the bibliography environment? –  Caramdir Dec 7 '10 at 17:51
@Caramdir: I always use the bibliography environment, but let's just say that there are technical reasons I don't want to do that now. (It's a long story!). As a short answer, you can just assume that I want an enumerate listing whose labels include brackets. (while they aren't citations.) –  Sadeq Dousti Dec 7 '10 at 18:26
@Charles: Sorry, but even {description} environment does not work in the beamer. (Screenshot: s1.bild.me/bilder/311010/1151044untitled.PNG) –  Sadeq Dousti Dec 7 '10 at 18:37
I found a way to solve your beamer problem, please see my solution below... –  Matten Dec 7 '10 at 18:59

2 Answers 2

up vote 24 down vote accepted

group the citation...


  \item[{[GMR85]}] ...

The Beamer package makes things a little bit more difficult.



\begin{frame}{frame title}
  \item[\braces{GMR95}] ...


This works fine for me.

share|improve this answer
Thanks Matten, but it does not work either (I tried) –  Sadeq Dousti Dec 7 '10 at 13:01
It does not work? I'll put a complete example in my answer, I have compiled it and it works fine for me... –  Matten Dec 7 '10 at 13:04
itemize will cause the bullet cross beyond the left margin. See my answer (not really answer actually, just a comparison) :-) –  xport Dec 7 '10 at 17:43
@Matten: Sorry, I should have described more. I'm using it in a beamer slide, and it does not work in that case (but works fine when you use the article documentclass). Can you test it in the beamer too? (screenshot of my result: s1.bild.me/bilder/311010/1151044untitled.PNG). –  Sadeq Dousti Dec 7 '10 at 18:35
hey Sadeq.. I supplied another approach for your beamer problem. Please see my second code example! –  Matten Dec 7 '10 at 18:55

Based on Charles Stewart's comment and Matten's answers, I make the following comparion. I suggest to follow the Stewart's suggestion. If we insist on using itemize environment instead of description, the bullet item will expands to the left crossing the left margin.

alt text

  {\typeout{***Successfully patched \protect\SX@codeInput***}}
  {\typeout{***ERROR! Failed to patch \protect\SX@codeInput***}}

  \item{[GMR85]} I am happy.
  \item{[GMR86]} Are you happy?

  \item[{[GMR85]}] I am happy.
  \item[{[GMR86]}] Are you happy?

share|improve this answer
paralist also fixes the margin behavior. –  Caramdir Dec 7 '10 at 17:53

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.