I took my answer at Big tilde in math mode and made two changes: 1) I changed it from an overstack to an understack; and 2) I increased the vertical stacking gap to \LMpt
, which is 1pt scaled to the local mathstyle.
\documentclass{article}
\usepackage{scalerel}[2014/03/10]
\usepackage{stackengine}
\newcommand\reallywidetilde[1]{\ThisStyle{%
\setbox0=\hbox{$\SavedStyle#1$}%
\stackengine{\LMpt}{$\SavedStyle#1$}{%
\stretchto{\scaleto{\SavedStyle\mkern.2mu\sim}{.5467\wd0}}{.7\ht0}%
% .2mu is the kern imbalance when clipping white space
% .5467++++ is \ht/[kerned \wd] aspect ratio for \sim glyph
}{U}{c}{F}{T}{S}%
}}
\def\test#1{$%
\reallywidetilde{#1}\,
\scriptstyle\reallywidetilde{#1}\,
\scriptscriptstyle\reallywidetilde{#1}
$\par}
\parskip 1ex
\begin{document}
$x = \reallywidetilde{(p_1',p_2') \in C}$
$\scriptstyle x = \reallywidetilde{(p_1',p_2') \in C}$
$\scriptscriptstyle x = \reallywidetilde{(p_1',p_2') \in C}$
\end{document}
If, by some chance, you actually wanted the text over the tilde (rather than the tilde under the text), that is also easy:
\documentclass{article}
\usepackage{scalerel}[2014/03/10]
\usepackage{stackengine}
\newcommand\reallywidetilde[1]{\ThisStyle{%
\setbox0=\hbox{$\SavedStyle#1$}%
\stackengine{\LMpt}{%
\stretchto{\scaleto{\SavedStyle\mkern.2mu\sim}{.5467\wd0}}{.7\ht0}%
}{$\SavedStyle#1$%
% .2mu is the kern imbalance when clipping white space
% .5467++++ is \ht/[kerned \wd] aspect ratio for \sim glyph
}{O}{c}{F}{T}{S}%
}}
\def\test#1{$%
\reallywidetilde{#1}\,
\scriptstyle\reallywidetilde{#1}\,
\scriptscriptstyle\reallywidetilde{#1}
$\par}
\parskip 1ex
\begin{document}
$xyz \reallywidetilde{(p_1',p_2') \in C} abc$
$xyz {\scriptstyle\reallywidetilde{(p_1',p_2') \in C}} abc$
$xyz {\scriptscriptstyle\reallywidetilde{(p_1',p_2') \in C}} abc$
\end{document}
A little space can be added at the start of the superscript:
\documentclass{article}
\begin{document}
\[ \tilde{t}_{k_1}^{\,k_3} \]
\end{document}
Best Answer
Use the command
\utilde
from theundertilde
package.Added by the crowd: This package is not part of TeX Live, so you may have to install it manually. This having been done, using the package is simple:
This produces the following output.