Skip to content

tralston/xelatex-emoji

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xelatex-emoji

Emoji support for XeLaTeX documents

Installation

Clone this repo into your texmf folder or to the project folder. Clone emoji images named after the utf8 code - I recommend EmojiOne.

Note: Tex doesn't natively support SVG, so if you download the vector emojis, you can convert them to PDFs with the following command on Mac and Linux: (assumes you have installed the librsvg2-bin package in Linux

# For Mac OS X:
$ brew install librsvg

# For Linux:
$ sudo apt-get install librsvg2-bin

# Then, run:
$ rsvg-convert -f pdf -o <emoji-UTF-code>.pdf <emoji-UTF-code>.svg

If you don't want to hand convert massive emoji SVGs, run the svgs-to-pdfs command (included this repo) in the folder where the SVGs are:

./svgs-to-pdfs ./*.svg

Usage

Use the xelatexemoji package. Enjoy :)

Example layout

\documentclass{article}

\usepackage{xltxtra}
\usepackage{xelatexemoji}

\setmainfont{Ubuntu}

\begin{document}

  Hello, 🌎. Lorem 😃 😄 😅 😆 ipsum dolor.

\end{document}

yields (using the great EmojiOne images)

example result

Image path

By default, xelatex-emoji expects the images to be in images/utf8code.png. You can change the path and extension by creating your own \xelatexemojipath command.

\newcommand{\xelatexemojipath}[1]{mycustompath/#1.pdf}

Development

To generate the flag codes:

ruby bin/generate_flags.rb > xelatexemoji-flags.sty

About

Emoji support for XeLaTeX documents

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TeX 97.3%
  • Ruby 2.3%
  • Shell 0.4%