Inspired by:
- coloremoji.sty
- How to use Noto Color Emoji with lualatex?
- How to get certain Unicode characters appearing in LaTeX/PDF output?
$ mkdir -p ~/Library/texmf/tex/latex/local
$ cd ~/Library/texmf/tex/latex/local
$ git clone [email protected]:sdelquin/emojitex.sty.git
$ texhash emojitex.sty
- LuaTeX as the engine to produce PDF output:
lualatex
(included in last TeX distributions). - Noto Emoji font to produce emojis (included in last TeX distributions).
This input.tex
:
\documentclass{article}
\usepackage{emojitex}
\begin{document}
Here I am using great color emojis ๐.
You can have this ๐ or that ๐.
\end{document}
through lualatex input.tex
produces the following output:
This package relies on newunicodechar
"The first argument must consist of a single Unicode character"
A lot of emojis are indeed single Unicode characters (4 bytes), but many others are multi Unicode characters (multiple of 4 bytes). That's why some of them are not produced property.
The following snippet will produce (update) emojitex.sty.
$ git clone [email protected]:sdelquin/emojitex.sty.git
$ cd emojitex.sty
$ # create & activate a virtualenv
$ pip install -r requirements.txt
$ ./build.sh
This package relies on this emoji Python package. From time to time it would be fine to update the file emojitex.sty file (possible new emojis):
$ git clone [email protected]:sdelquin/emojitex.sty.git
$ cd emojitex.sty
$ # create & activate a virtualenv
$ pip install -U emoji # ensure update package
$ ./build.sh
I've only tested this package on MacTeX 2020.