3

How can I use U+1F54A DOVE OF PEACE in my document, especially with pdfLaTeX and not LuaLaTeX?

Ingmar
  • 6,690
  • 5
  • 26
  • 47
Ommo
  • 835

2 Answers2

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:

twemoji dove of peace

\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 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 typed tex twemojis.ins, in order to to get the file twemojis.sty (I do not know why tex twemojis.dtx did not work). (3) I copied and pasted twemojis.sty inside the folder where there is my .tex document and I compiled with pdfLaTeX – Ommo May 16 '22 at 08:30
  • 1
    You 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
  • 1
    Actually 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
  • 1
    And 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
  • Thanks a lot, very very kind!! :-) – Ommo May 16 '22 at 15:48
  • 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 \setlength command suggested here) do not seem to have any effect on my document. – Vincent Oostelbos Jun 10 '23 at 13:01