如何在LaTeX中插入表情符号?

Ash*_*ppa 35 latex emoticons

我知道这是一个很长的镜头,但有一些包或方法将表情符号插入LaTeX文档?

ADE*_*Ept 38

我至少知道两种方式:

第一:

$\ddot\smile$
Run Code Online (Sandbox Code Playgroud)

第二:

\usepackage{wasysym}
\smiley
\frownie
Run Code Online (Sandbox Code Playgroud)

或者您可以使用图像(如其他回复中所述).


DaG*_*DaG 17

什么是简单的{\ tt :-)}?

  • 我们使用LaTeX,因此我们可以获得漂亮的图形表单而不是纯文本再现.☺ (6认同)
  • 确实,但真正的表情符号 - 与表情符号或其他图形图标相对 - 本质上由"纯文本"字符组成. (3认同)

小智 9

如果您使用xelatexlualatex,则

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Symbola}
\begin{document}

 
\end{document}
Run Code Online (Sandbox Code Playgroud)

应该以 Symbola 字体生成黑白表情符号,可从http://users.teilar.gr/%7Eg1951d/ 或某些 Linux 发行版(例如 Ubuntu)的标准包存储库中获得。MS Windows 表情符号字体也可以用于\fontspec{Segoe UI Emoji}[RawFeature={ccmp,dist}] 代替\fontspec{Symbola}.

不幸的是,标准 lualatex 或 xelatex 不支持颜色(表情符号)字体。harflatex并且luahblatex可以使用排版颜色表情符号

\documentclass{minimal}
\usepackage{harfload}
\usepackage{fontspec}

\begin{document}
\noindent
\fontspec{Noto Color Emoji}[RawFeature={mode=harf}]
?????\quad ?????
\end{document}
Run Code Online (Sandbox Code Playgroud)

harflatex并且luahblatex可以从 TeXLive Contrib 在https://contrib.texlive.info/安装,截至 2019 年 7 月。

以上是从https://tex.stackexchange.com/questions/497403/how-to-use-noto-color-emoji-with-lualatex/500180 和我自己的调查中了解到的。


fre*_*ace 5

Unicode的"杂项符号"包括3个简单的表情符号:0x2639- 0x263B.您可以使用可能0x2686- 0x2689为好.

对于更多变化,您将需要使用图像并以某种方式包含它们.

我很好奇导致这个问题的情况:)

  • 好主意,但要应用此功能,您需要知道如何输入Unicode字符.请参阅http://stackoverflow.com/questions/219853/entering-unicode-characters-in-latex (4认同)
  • 我为LaTeX中的学生准备了作业讲义(导出为PDF)。我想在那儿给学生们一个笑脸:-) (3认同)
  • 嗯,我想这是有道理的-我想在作业中看到笑脸。但是,如果您仅将它们放在棘手的问题中,然后加上“这应该很容易”,则不是这样:P (2认同)