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

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.