# Multiple math accents in exponents

• How can I prevent an offset in stacked accents (hat is not in the middle of the tilde)
• and how can I typeset the exponent 'a' in the example below not to be so high and near the tilde?

For your convenience the code I am using below:

\documentclass[a4paper,11pt]{article}
\usepackage{amsthm,amsfonts}
\begin{document}
$$\hat{\widetilde{A}}^a$$
\end{document}

• @campa thanks for checking, what is a MWE? Oct 23, 2018 at 9:17
• I solved the first problem and edited the question together with a MWE. Oct 23, 2018 at 9:34
• Maybe this could help to solve the first point tex.stackexchange.com/questions/121937/… Oct 23, 2018 at 9:42
• Don't use \widetilde for this; \tilde is the right option. Oct 23, 2018 at 12:06
• @HenriMenke: I get exactly the same output from latex and from pdflatex. How did you produce your screen shots?
– GuM
Nov 1, 2018 at 23:58

For the first problem, either use \tilde instead of \widetilde as egreg suggests or put an empty group before the letter:

\hat{\widetilde{{}A}}


though I would strongly suggest that you use \widehat with \widetilde. To illustrate

\begin{equation*}
\widehat{\widetilde{{}A}}
\end{equation*}


produces

For the second problem, egreg's approach will give you the superscript at the height you desire. For the cases with \widetilde you can again either add an empty group before the superscript, or more generally a \vphantom:

\begin{equation*}
\widehat{\widetilde{{}A}}\vphantom{A}^{a}
\end{equation*}


All images produced from the following document. Note I have also loaded amsmath.

\documentclass[a4paper,11pt]{article}

\usepackage{amsthm,amsfonts,amsmath}

\begin{document}

\begin{equation*}
\widehat{\widetilde{{}A}}
\end{equation*}

\begin{equation*}
\widehat{\widetilde{{}A}}\vphantom{A}^{a}
\end{equation*}

\end{document}


Some dirty hacks, just to stimulate better response.

\documentclass[a4paper,11pt]{article}
\usepackage{amsthm,amsfonts}
\begin{document}
$\hat{\widetilde{A}\,\,}^{\!\raisebox{-.5ex}{\scriptstyle a}}$
or
$\hat{\tilde{A}\;}^{\hspace{-.15em}\raisebox{-.3ex}{\scriptstyle a}}$
\end{document}