3

I want to type the complex infinity symbol (a “~” above “∞”, which you can see when you compute digamma(0) in WolframAlpha)

I tried many methods, but they are all not satisfactory.

\infty^~

The ~ is not right above the ∞

\overset{~}{\infty}

The ~ aren’t shown at all

\overset{\text{~}}{\infty}

The ~ is too small

\overset{\huge\text{~}}{\infty}

The ~ is too high, far away from the ∞

I searched online and didn’t found anything. How do I type it?

Edit

I didn’t know \tilde. My bad.

4
  • 4
    Did you try \tilde\infty?
    – Skillmon
    Commented Nov 11 at 9:35
  • @Skillmon That works! Thank you!
    – Mr. W
    Commented Nov 11 at 9:39
  • 1
    In your “many methods” NO tilde will appear.
    – egreg
    Commented Nov 11 at 9:40
  • Welcome to TeX.SX!
    – jlab
    Commented Nov 12 at 21:12

2 Answers 2

11

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

no tilde shown

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}

three versions

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 \,.

best symbol

7

You can get the tilde overset to the infinity symbol using \tilde{\infty}. \tilde is the macro to add a tilde diacritic to its argument in LaTeX.

\documentclass{article}

\begin{document}
$\tilde{\infty}$
\end{document}

results in

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .