3

When I try to write

\begin{equation}
{\hat{a}_{1}^{\dagger}}^{2}
\end{equation}

I am getting this error

! Double superscript.
l.4 {\hat{a}_{1}^{\dagger}}^
                            {2}
? 

So what is the proper way of writing

enter image description here

0

2 Answers 2

1
\documentclass[11pt]{article}
\begin{document}
\begin{equation}
\hat{a}_{1}^{\dagger 2}
\end{equation}
\end{document}

enter image description here

Possibly \hat{a}_{1}^{\dagger\,2} if you want a little bit more space before between the symbols in the superscript.

0

This is quite surprising, given that

${a^b}^c$

works and

${\hat{a}^b}^c$

not. Look for a complete analyisis at Double superscript error involving tilde (which is the same problem).

The problem is that there is a doubt between the position of the hat and the exponents.

Is the two a superscript of what? The \hat{a}? The a (and so it should go with the hat, same level)? The whole a_1^\dagger? Depending on the answer the formula will be different...

(Given your way of writing the equation, I suspect you where looking for the first one).

\documentclass[11pt]{article}
\begin{document}
\begin{equation}
    \left.\hat{a}_{1}^{\dagger}\right.^{2}
\end{equation}
\begin{equation}
    \hat{a}_{1}^{\dagger 2}
\end{equation}
\begin{equation}
    \hat{a}_{1}^{\dagger^2}
\end{equation}
\end{document}

three different case

PD I will call this quite an "hidden feature" (!) of TeX math... first one I found in 20 years. Although it's known and planned this way, see Hendrik Vogt answer to that question.

Not the answer you're looking for? Browse other questions tagged .