7

In the enumerate environment, an item begins with "[Co]image is..." LaTex interprets the square bracket as a customized bullet symbol. How can I write [ without this glitch?

ashpool
  • 1,361

3 Answers3

10

\relax FTW:

\item\relax[Co]image
yo'
  • 51,322
8

This also works:

\documentclass{article}

\begin{document}

\begin{enumerate}
    \item{}[Co]image
\end{enumerate}


\end{document}

Enumeration

cfr
  • 198,882
  • @tohecz You're right - it's gone... Thanks! – cfr Apr 21 '14 at 22:03
  • @tohecz FWIW, I'd already voted for your solution. However, I bet I would still use {} here because I'd never think to use \relax in a document - only in code. (Mostly, I want something done but nothing typeset as opposed to nothing done at all and \myhellomacro{} bird! \myhellomacro\relax plane! does right by bird but not by plane.) – cfr Apr 21 '14 at 22:30
  • And I would use \myhellomacro\ bird or \myhellomacro\@ bird ;) – yo' Apr 22 '14 at 15:20
  • @tohecz I used to use \myhellomacro\ bird and then I read about some reason \myhellomacro{} bird is preferable. Although I cannot remember what the reason was. I've never come across \@ - what does that do? – cfr Apr 22 '14 at 15:29
  • See http://tex.stackexchange.com/a/22564/11002 – yo' Apr 22 '14 at 15:45
  • @tohecz Thanks. I even use that and didn't realise when you wrote it. (I type etc\@. to end a sentence and etc.\ to not end one although presumably at least one of these is unnecessary.) – cfr Apr 22 '14 at 17:21
4

You could also simply put a {} around the text. .

enter image description here

Notes:

  • Adding an additional brace group is also a handy technique and useful for cases where you need to pass a parameter containing a [].

Code:

\documentclass{article}

\begin{document}

\begin{enumerate} \item {[Co]image} \end{enumerate}

Peter Grill
  • 223,288