The character ~
has a special meaning in LaTeX: it produces a space that cannot be use for breaking a line.
Thus any among
\infty^~
\overset{~}{\infty}
\overset{\text{~}}{\infty}
\overset{\huge\text{~}}{\infty}
will not show a tilde. If you try with
\documentclass{article}
\usepackage{amsmath}
\begin{document}
$\infty^~$
$\overset{~}{\infty}$
$\overset{\text{~}}{\infty}$
$\overset{\huge\text{~}}{\infty}$
\end{document}
you get
and some runtime errors:
! Missing { inserted.
<to be read again>
\unhbox
l.6 $\infty^~
$
?
! Missing } inserted.
<inserted text>
}
l.6 $\infty^~$
?
LaTeX Font Warning: Command \huge invalid in math mode on input line 9.
Never ignore errors.
What you want is either \tilde{\infty}
or \widetilde{\infty}
, but the latter is really unsightly, so I propose also an “intermediate” version:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
$\tilde{\infty}$
$\widetilde{\infty}$
$\,\widetilde{\!\infty\!}\,$
\end{document}
Do yourself a favor and define a personal command for the job:
\documentclass{article}
\usepackage{amsmath}
\newcommand{\rsinfty}{{\,\widetilde{\!\infty\!}\,}}
%\newcommand{\rsinfty}{\tilde{\infty}}
\begin{document}
$\rsinfty$
\end{document}
You can decide what method to use at the last minute with no need to chase in the document for occurrences of the symbol: just change the definition in the preamble. I chose the name from “Riemann sphere infinity”.
What's the trick with \,
and \!
? Since \widetilde{\infty}
chooses too wide a tilde, I place \widetilde
over \!\infty\!
which is less wide than \infty
, but add \,
on either side to compensate. The space inserted by \!
is the negative of the thin space inserted by \,
.
\tilde\infty
?