11

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.

David Carlisle
  • 757,742
Colas
  • 6,772
  • 4
  • 46
  • 96

1 Answers1

14

∞ is U+221E so you want, for (pdf)teX

 \DeclareUnicodeCharacter{221E}{\ensuremath{\infty}}
David Carlisle
  • 757,742
  • Is there a difference if you use \ensuremath{\infty} vs $\infty$ in that declaration? – Alenanno Jan 15 '16 at 16:39
  • 2
    @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