How can I use U+1F54A DOVE OF PEACE in my document, especially with pdfLaTeX and not LuaLaTeX?
Asked
Active
Viewed 364 times
3
-
2Special case of Entering Unicode characters in LaTeX - TeX - LaTeX Stack Exchange – user202729 May 15 '22 at 14:48
-
1This would be much easier if you could actually use fonts that contain the required glyph. – Ingmar May 15 '22 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 – Fran May 16 '22 at 08:39
2 Answers
6
Maybe it's not the exact same symbol, but fontawesome5 has a dove icon.
\documentclass{article}
\usepackage{fontawesome5}
\begin{document}
\faDove
\end{document}
Vincent
- 20,157
4
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".)
frabjous
- 41,473
-
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... :-) – Ommo May 16 '22 at 08:23 -
Just for information to the readers of this thread, I had to install the package
twemojismanually, 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.dtxdid not work). (3) I copied and pastedtwemojis.styinside the folder where there is my.texdocument and I compiled withpdfLaTeX– Ommo May 16 '22 at 08: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. – frabjous May 16 '22 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}. – frabjous May 16 '22 at 14:28 -
1And to set the default height for all emojis:
\setlength{\twemojiDefaultHeight}{14pt}or whatever. See the package documentation for more. – frabjous May 16 '22 at 14:32 -
-
I am using both the emoji and twemoji packages, and the twemoji are noticeably smaller and slightly raised above the emoji. I was able to address the first option by passing a
[scale=0.5]parameter to the twemoji (ironically that makes them a bit bigger), but I don't know what to do for their positioning. Also, I would rather use commands in the preamble to avoid having to do this every time, but the commands I found (such as the\setlengthcommand suggested here) do not seem to have any effect on my document. – Vincent Oostelbos Jun 10 '23 at 13:01

