Inserting emojis in LaTeX documents on Overleaf
Note: The twemojis
package is not included in TeX Live, and therefore unavailable for use on Overleaf.
Emoji characters and the Overleaf editor
Overleaf cannot store files that contain NUL characters or edit files that contain characters from outside of Unicode's Basic Multilingual Plane (BMP).
Unicode assigned many emoji characters to code points outside the Basic Multilingual Plane: they are encoded in Plane 1, which means their code points are in the range U+10000–U+1FFFF, specifically U+1F000–U+1FFFF. This has an important consequence for anyone wishing to copy and paste emoji characters into the Overleaf editor. At present, Overleaf’s text editor can only handle characters within the Basic Multilingual Plane, although we hope future upgrades will introduce support for non-BMP characters.
If you paste an emoji such as 😀, or any other non-BMP character, into the Overleaf editor it will be converted to the characters ��. However, you can upload text files containing non-BMP UTF-8 sequences: they won't be editable within the Overleaf editor but you can insert those files within your document using appropriate LaTeX file-inclusion commands.
As shown in the examples below, you can insert emoji using suitable fonts and commands provided by LaTeX packages.
Monochrome emojis
You can use the \symbol
or \char
command in tandem with fontspec
, XƎLaTeX or LuaLaTeX and a suitable font. For example, without using the emoji
package, you can still insert monochrome emojis with the Symbola font:
Falling leaves: {\fontspec{Symbola}\symbol{"1F343}}
or
Falling leaves: {\fontspec{Symbola}\char"1F343}
Open this monochrome emoji example in Overleaf
This will give you the output
You can lookup the code points for emojis on this webpage.
Colour emojis
If you want to use colour emojis, have a look at the emoji
package, which uses the LuaLaTeX + HarfBuzz text-shaping engine to access colour emoji fonts correctly. You will need to change your project's compiler to be LuaLaTeX. You can then load the emoji
package, and write \emoji{leaves}
.
\documentclass[12pt]{article}
\usepackage{emoji}
\begin{document}
These are colour emojis using the \texttt{emoji} package and LuaLaTeX:
\emoji{leaves}
\emoji{rose}
You can use emoji-modifiers:
\emoji{woman-health-worker-medium-skin-tone}
\emoji{family-man-woman-girl-boy}
\emoji{flag-malaysia}
\emoji{flag-united-kingdom}
\end{document}
See this live example in Overleaf
You can look up the Unicode CLDR (Common Locale Data Repository) names here, but remember to replace spaces in the names with hyphens. Alternatively, you can look in the emoji
package documentation itself.
Choosing a different emoji font
On Overleaf the default emoji font is Noto Color Emoji. You can select a different emoji font:
\setemojifont{TwemojiMozilla}
\documentclass[12pt]{article}
\usepackage{emoji}
\begin{document}
\setemojifont{TwemojiMozilla}
These are colour emojis using the \texttt{emoji} package and LuaLaTeX:
\emoji{leaves}
\emoji{rose}
You can use emoji-modifiers:
\emoji{woman-health-worker-medium-skin-tone}
\emoji{family-man-woman-girl-boy}
\emoji{flag-malaysia}
\emoji{flag-united-kingdom}
\end{document}
Open this TwemojiMozilla example in Overleaf
Further reading
Overleaf guides
- Creating a document in Overleaf
- Uploading a project
- Copying a project
- Creating a project from a template
- Using the Overleaf project menu
- Including images in Overleaf
- Exporting your work from Overleaf
- Working offline in Overleaf
- Using Track Changes in Overleaf
- Using bibliographies in Overleaf
- Sharing your work with others
- Using the History feature
- Debugging Compilation timeout errors
- How-to guides
- Guide to Overleaf’s premium features
LaTeX Basics
- Creating your first LaTeX document
- Choosing a LaTeX Compiler
- Paragraphs and new lines
- Bold, italics and underlining
- Lists
- Errors
Mathematics
- Mathematical expressions
- Subscripts and superscripts
- Brackets and Parentheses
- Matrices
- Fractions and Binomials
- Aligning equations
- Operators
- Spacing in math mode
- Integrals, sums and limits
- Display style in math mode
- List of Greek letters and math symbols
- Mathematical fonts
- Using the Symbol Palette in Overleaf
Figures and tables
- Inserting Images
- Tables
- Positioning Images and Tables
- Lists of Tables and Figures
- Drawing Diagrams Directly in LaTeX
- TikZ package
References and Citations
- Bibliography management with bibtex
- Bibliography management with natbib
- Bibliography management with biblatex
- Bibtex bibliography styles
- Natbib bibliography styles
- Natbib citation styles
- Biblatex bibliography styles
- Biblatex citation styles
Languages
- Multilingual typesetting on Overleaf using polyglossia and fontspec
- Multilingual typesetting on Overleaf using babel and fontspec
- International language support
- Quotations and quotation marks
- Arabic
- Chinese
- French
- German
- Greek
- Italian
- Japanese
- Korean
- Portuguese
- Russian
- Spanish
Document structure
- Sections and chapters
- Table of contents
- Cross referencing sections, equations and floats
- Indices
- Glossaries
- Nomenclatures
- Management in a large project
- Multi-file LaTeX projects
- Hyperlinks
Formatting
- Lengths in LaTeX
- Headers and footers
- Page numbering
- Paragraph formatting
- Line breaks and blank spaces
- Text alignment
- Page size and margins
- Single sided and double sided documents
- Multiple columns
- Counters
- Code listing
- Code Highlighting with minted
- Using colours in LaTeX
- Footnotes
- Margin notes
Fonts
Presentations
Commands
Field specific
- Theorems and proofs
- Chemistry formulae
- Feynman diagrams
- Molecular orbital diagrams
- Chess notation
- Knitting patterns
- CircuiTikz package
- Pgfplots package
- Typesetting exams in LaTeX
- Knitr
- Attribute Value Matrices
Class files
- Understanding packages and class files
- List of packages and class files
- Writing your own package
- Writing your own class