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.

  • 2
    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

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

  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.