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

发布于 2024-07-07 05:42:31 字数 54 浏览 9 评论 0原文

我知道这是一个不太可能的事情,但是有没有一些包或方法可以将表情符号插入到 LaTeX 文档中?

I know it's a long shot, but is there some package or means to insert emoticons into a LaTeX document?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

吾家有女初长成 2024-07-14 05:42:31

我至少知道两种部分方法:

第一:

$\ddot\smile$

第二:

\usepackage{wasysym}
\smiley
\frownie

或者你可以使用图像(如其他回复中提到的)。

I know at least two partial ways:

First:

$\ddot\smile$

Second:

\usepackage{wasysym}
\smiley
\frownie

Or you can use images (as mentioned in other replies).

残月升风 2024-07-14 05:42:31

简单的 {\tt :-)} 有什么不好呢?

What's against a simple {\tt :-)}?

泪痕残 2024-07-14 05:42:31

如果您使用 xelatexlualatex,那么

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

If you use xelatex or lualatex, then

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

should produce black-and-white emoji letters in Symbola font,
which is available from http://users.teilar.gr/%7Eg1951d/
or standard package repositories in some Linux distros (e.g. Ubuntu).
The MS Windows emoji font can also be used by \fontspec{Segoe UI Emoji}[RawFeature={ccmp,dist}]
in place of \fontspec{Symbola}.

Unfortunately the color (emoji) fonts are not supported by the standard
lualatex or xelatex. harflatex and luahblatex can typeset color emojis using

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

\begin{document}
\noindent
\fontspec{Noto Color Emoji}[RawFeature={mode=harf}]
☃⛄????????????????????????????????????????????‍????‍????‍????\quad ????‍❤️‍????‍????
\end{document}

harflatex and luahblatex can be installed from TeXLive Contrib at
https://contrib.texlive.info/ as of July 2019.

The above is learnt from https://tex.stackexchange.com/questions/497403/how-to-use-noto-color-emoji-with-lualatex/500180
with a bit of my own investigation.

小瓶盖 2024-07-14 05:42:31

Unicode 的“杂项符号”包括 3 个简单的表情符号:0x2639-0x263B。 您也可以使用0x2686-0x2689

为了获得更多变化,您将需要使用图像并以某种方式包含它们。

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

Unicode's "miscellaneous symbols" include 3 simple emoticons: 0x2639-0x263B. You can possibly use 0x2686-0x2689 as well.

For more variation you are going to need to use images and include them somehow.

I am curious as to the circumstances which lead to this question :)

美煞众生 2024-07-14 05:42:31

现在还有 tikzsymbols 包,它有漂亮的表情符号。

By now there also is the tikzsymbols package which has nice emoticons.

转角预定愛 2024-07-14 05:42:31

一种解决方案是使用 bclogo 包。 它包含两个笑脸(快乐和悲伤),以及许多其他小“标志”,例如旗帜等。

One solution is to use bclogo package. It contains two smileys (happy & sad), plus many other small "logos" like flags and others.

向地狱狂奔 2024-07-14 05:42:31
\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}

另外,从菜单 --> 将编译器设置为 LuaLaTeX 设置
输入图片此处描述

参考

\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}

Also, set the compiler to LuaLaTeX from Menu --> Settings
enter image description here

Reference

海未深 2024-07-14 05:42:31

\binom{.,.}{\frown} 看起来很可爱 - 调整眼睛间距以适应口味 - 尽管它占用了相当多的空间,当然只是一个意见。

\binom{.,.}{\frown} seems cute - adjust eye-spacing to taste - although it takes up a fair amount of space and is of course only an opinion.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文