## Emoji in LaTeX documents

Update: Hilariously, it turns out that either wordpress or my wordpress markdown plugin is choking on the emoji inserted into this post. Thus, to see the actually emoji commands see this plaintext version

We were recently joking around about using emoji in math equations. The idea was to satire of the bad rap exterior calculus symbols like the the Hodge star operator (★) and the “musical isomorphisms” (♭,♯) get in the computer graphics community.

I found a solution for upTeX. This works by first extracting all of the emojis as pdfs and then including the pdfs via (includegraphics) whenever a \coloremoji{...} command is found. This unfortunately did not work with my TexLive pdflatex setup. With some help, I’ve redesigned a coloremoji.sty stylesheet that allows you to directly include emoji in your LaTeX documents.

A Hello, EmojiWorld LaTeX document would look like this:

WordPress dies on emoji, see plaintext version

This produces something that should look like:

You can also use emoji in mathmode:

WordPress dies on emoji, see plaintext version

Download the coloremoji package and simply add \usepackage{coloremoji} to the top of your document.

Actually, Nobuyuki Umetani gave a talk where he used graphic icons in math (I believe successfully!) to explain Sensitive Couture (change in clothing with respect to change in mouse interaction):

Update: I’m now hosting this style package on github.

Tags: , , , , ,

### 8 Responses to “Emoji in LaTeX documents”

1. eli says:

hey! just to let you know, when I try to clone the repo, I get:

Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

2. Paavo says:

I’m having the same problem with the cloning.

3. Matt says:

Hello!

pdflatex was crashing with the following message:
! Undefined control sequence.
\coloremoji … 0*}{}\l_coloremoji_input_tl \text
{\includegraphics [height=…

Adding \usepackage{amstext} to the top of coloremoji.sty resolved the issue.

Afterward, I realized that the version linked on this page is probably not up-to-date with the one on github, so I think the issue has been resolved already.

Thanks for making this package!

4. Wangyan Li says:

Hello, I encounter a problem, when I placed the coloremoji.sty into my file, the error reads:

./coloremoji.sty:7:
LaTeX Error: Option clash for package inputenc.

See the LaTeX manual or LaTeX Companion for explanation.
Type H for immediate help.

l.7 \usepackage

[export]{adjust box}

How to solve this problem, thanks.

5. K says:

How do I use the package{coloremoji} on texstudio?

6. niieani says:

Hi Alec, I followed the instructions, but I’m still getting lots of errors of this sort:

LaTeX Warning: File `emoji_images/hires/1F1FE.pdf’ not found on input line 70.

! Unable to load picture or PDF file ’emoji_images/hires/1F1FE.pdf’.

}
l.70 …nicodeCharacter{127486}{{\coloremoji{🇾}}}

7. Bob F says:

Joking around? Emoji math is no joking matter. See this:

http://blog.eaglehill.school/emoji-algebra-is-more-intuitive-than-standard-algebra

8. Frank B. says:

Hi, maybe this helps:

Save your emoji as images and use the following to create a new command for that emoji.

\newcommand\myemoji{\raisebox{-.4ex}{\protect\includegraphics[height=2.5ex]{myemoji.png}}}