How can I use U+1F54A DOVE OF PEACE
in my document, especially with pdfLaTeX
and not LuaLaTeX
?
-
2Special case of Entering Unicode characters in LaTeX - TeX - LaTeX Stack Exchange– user202729Commented May 15, 2022 at 14:48
-
1This would be much easier if you could actually use fonts that contain the required glyph.– IngmarCommented May 15, 2022 at 17:24
-
1Noto Sans Symbols2 have the glyph, but it is a true type font (not for pdflatex). However, using xelatex and the standalone class you can save it as PDF and then use some like \newcommand\dove{\includegraphics[width=1.5em]{dove.pdf}} in pdflatex– FranCommented May 16, 2022 at 8:39
2 Answers
Maybe it's not the exact same symbol, but fontawesome5
has a dove icon.
\documentclass{article}
\usepackage{fontawesome5}
\begin{document}
\faDove
\end{document}
You can use the twemojis package with \twemoji{1f54a}
or \twemoji{dove}
. It works with PDFLaTeX.
Unfortunately the dove is hard to see against a white background, so here I made the background gray:
\documentclass[12pt]{article}
\usepackage{twemojis}
\begin{document}
\pagecolor{gray}
\twemoji{1f54a}
\end{document}
Other possibilities include embedding an image, or creating a tiny PDF cropped to just the emoji using lualatex with the emoji package (or any other software that supports emojis, cropped via pdfcrop or similar tool); that PDF could them be included in a pdflatex document via \includegraphics
. (Not sure if that counts as "exclusively".)
-
thanks a lot! But is it possible to scale
\twemoji{1f54a}
, i.e. to. make it slightly bigger or smaller ? In my document, for example, it is quite small, if compared to the text... :-)– OmmoCommented May 16, 2022 at 8:23 -
Just for information to the readers of this thread, I had to install the package
twemojis
manually, because not included in my distribution... (1) I downloaded the package from CTAN. (2) Through the Terminal of my laptop, I went inside the folder where the package was downloaded and I typedtex twemojis.ins
, in order to to get the filetwemojis.sty
(I do not know whytex twemojis.dtx
did not work). (3) I copied and pastedtwemojis.sty
inside the folder where there is my.tex
document and I compiled withpdfLaTeX
– OmmoCommented May 16, 2022 at 8:30 -
1You can use a scalebox, e.g.,
\scalebox{4.5}{\twemoji{1f54a}}
to make it 4.5× its normal size. There's also\texttwemoji{1f54a}
which will scale according to font size.– frabjousCommented May 16, 2022 at 14:22 -
1Actually I just found you can specify a height or width or scale directly as an optional parameter.
\twemoji[height=1in]{1f54a}
.– frabjousCommented May 16, 2022 at 14:28 -
1And to set the default height for all emojis:
\setlength{\twemojiDefaultHeight}{14pt}
or whatever. See the package documentation for more.– frabjousCommented May 16, 2022 at 14:32