15

I'm inputting a file into LaTeX (in verbatim mode) that contains a unicode smiley character, code 128512.

I thought declaring

\DeclareUnicodeCharacter{128512}{\smiley}

would do the trick, but:

Package inputenc Error: 128512 too large for Unicode.
1
  • marvosym.sty tikzsymbols.sty and arev.sty also having good smilies
    – MadyYuvi
    Oct 16, 2019 at 9:08

1 Answer 1

21

\DeclareUnicodeCharacter takes the codepoint in hexadecimal notation:

\documentclass{article}
\usepackage{wasysym}
\DeclareUnicodeCharacter{1F600}{\smiley}
\begin{document}
Hello 😀
\end{document}

enter image description here

You must log in to answer this question.

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