[Tex/LaTex] Double widetilde

accentssymbols

Is there a standard/good way to obtain a "double widetilde" in LaTeX?

Using $\widetilde{\widetilde{A}}$ the tildes are too separate to my taste. I'd like them to look like a single (double) accent, not like an accent on top of another.

In other words, is there a way to control the distance between widetildes when nested? or otherwise, a natural way to appropriately define such an accent?

Thank you!

Best Answer

The following code reduces by 10% the height of the box formed with a single wide tilde and adds another one on top of it.

\documentclass{article}
\usepackage{kpfonts}
\usepackage{amsmath}

\makeatletter
\newcommand{\doublewidetilde}[1]{{%
  \mathpalette\double@widetilde{#1}%
}}
\newcommand{\double@widetilde}[2]{%
  \sbox\z@{$\m@th#1\widetilde{#2}$}%
  \ht\z@=.9\ht\z@
  \widetilde{\box\z@}%
}
\makeatother

\begin{document}

$\doublewidetilde{abc}_{\doublewidetilde{abc}_{\doublewidetilde{abc}}}$

\end{document}

enter image description here