We make an example of the proposed process by inserting the 🦄 emoji into a TeX document.
-
Find the unicode of your emoji
Using Google Fu, we find out that the code point for our emoji is
U+1F984
. -
Download an SVG file of the emoji
Be sure to use one consistent data source for all of your tweets. We are referring to twemoji for doing this.
Download the SVG file from twemoji by adjusting this link: https://raw.githubusercontent.com/twitter/twemoji/master/assets/svg/1f984.svg
-
Convert the SVG file into an EPS file
There are certain packages for doing so such as
includesvg
, but I don't want to installinkscape
on my machine, so I use an online converter:Go to https://convertio.co/de/svg-eps/ and insert the URL from step 2. Download the converted file into your LaTeX figures folder.
-
Typeset the emoji in LaTeX
This is how I could typeset emojis the best way in LaTeX:
\usepackage{textcomp} % Required for encoding \textbigcircle \usepackage{scalerel} % Required for emoji \scalerel \def\🦄{\scalerel*{\includegraphics{figures/1f984.eps}}{\textrm{\textbigcircle}}}
To use it, just write something like:
I like \🦄s, and what's about you?
And here is MWE for it: https://de.overleaf.com/project/5f1b1a99a5e56800010e96df
PS: I always like to hear your simpler ideas!
Note: You cannot give unicode names to the commands in regular if you wish to use more than one unicode name.