# How to be able to use ∞ in latex document?

I would like to use the unicode character ∞ in a LaTeX document. I use the default font. If this character is not defined in this font, I can replace it by $\infty$.

How can I do that?

I tried to play with \DeclareUnicodeCharacter{}{$\infty$} but did not find what to put in the first argument.

• You should consider using xelatex for this. You can find an answer to your question here – Hamed Jan 15 '16 at 15:10
• oh I just see you tagged your question unicode-math are you using that package (and so xetex or luatex) if so DeclareUnicodeCharacter is completely the wrong thing and I will delete my answer. – David Carlisle Jan 15 '16 at 15:14
• No, sorry, I don't use xetex not luatex. – Colas Jan 15 '16 at 15:57
• I retagged then:-) – David Carlisle Jan 15 '16 at 16:55

 \DeclareUnicodeCharacter{221E}{\ensuremath{\infty}}

• Is there a difference if you use \ensuremath{\infty} vs $\infty$ in that declaration? – Alenanno Jan 15 '16 at 16:39
• @Alenanno {$\infty$} would be wrong, possibilities are what I have or (arguably better) just {\infty} try $x < ∞$ to see the difference:-) – David Carlisle Jan 15 '16 at 16:53