TeXpad

LaTeX error: Double subscript (and Double superscript)

In math mode, each symbol can carry one subscript and one superscript. x_1_2 asks for two subscripts on the same x, which TeX cannot typeset, so it stops. x^2^3 gives the matching "Double superscript" error.

! Double subscript.

Try it: this example has the error

Edit the example using the steps below, then press Compile. What pdfTeX printed for it:

! Double subscript.
l.3 $x_1_
         2$
or paste your own document

Ready. Press Compile (or Ctrl/Cmd + Enter).

Open in the full editor →

Common causes

How to fix it

  1. Group the whole index: x_{1,2} or a_{ij}.
  2. For a subscript on a subscripted symbol, add braces: {x_1}_2.
  3. For powers, group them: x^{2^3} or (x^2)^3.

The fixed example

\documentclass{article}
\begin{document}
$x_{1,2}$ and ${x_1}_2$
\end{document}

Related errors