4
  • 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?

enter image description here

For your convenience the code I am using below:

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

2 Answers2

2

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*}
  \hat{\tilde{A}} \qquad
  \hat{\widetilde{{}A}} \qquad
  \widehat{\widetilde{{}A}}
\end{equation*}

produces

Sample hats

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*}
  \hat{\tilde{A}}^{a} \qquad
  \widehat{\widetilde{{}A}}{}^{a} \qquad
  \widehat{\widetilde{{}A}}\vphantom{A}^{a}
\end{equation*}

Sample output

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*}
  \hat{\tilde{A}} \qquad
  \hat{\widetilde{{}A}} \qquad
  \widehat{\widetilde{{}A}}
\end{equation*}

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

\end{document}
Andrew Swann
  • 95,762
1

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}

enter image description here

CarLaTeX
  • 62,716