4

I had the following situation

\begin{itemize}
\item[(A_s)] Item (A_s) such that 
\begin{equation}\label{sob}
\sum_{n}n
\end{equation}
\item[(B_s)] Item (B_s)
\end{itemize}

and the result was blank screen. After that I put $ at the beginning and end of the items

\begin{itemize}
\item[$(A_s)$] Item (A_s) such that 
\begin{equation}\label{sob}
\sum_{n}n
\end{equation}
\item[$(B_s)$] Item (B_s)
\end{itemize}

and everything worked fine. I lost a lot of time until I found this. What was the problem?

3

_ is a special character that denotes the beginning of a subscript, and that is only allowed in math-mode. As such, inserting $ around the math-related content, the problem is avoided.

The equation environment automatically initiates math-mode, so there's no additional need to enter math-mode.

If you actually want an underscore, then you can use any of the methods below. Also see Underscores in words (text).

enter image description here

\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}

\begin{itemize}
  \item[$(A_s)$] Item ($A_s$) such that 
    \begin{equation}\label{sob}
      \sum_{n}n
    \end{equation}
  \item[$(B_s)$] Item ($B_s$)
  \item[(C\string_s)] Item (\detokenize{C_s}) and (C\textunderscore s)
\end{itemize}

\end{document}
  • 2
    Inputting C\_s, i.e., "escaping" the _ character, works too. – Mico Mar 13 '14 at 5:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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