如何在LaTeX中插入表情符号?
我知道这是一个不太可能的事情,但是有没有一些包或方法可以将表情符号插入到 LaTeX 文档中?
I know it's a long shot, but is there some package or means to insert emoticons into a LaTeX document?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
我至少知道两种部分方法:
第一:
第二:
或者你可以使用图像(如其他回复中提到的)。
I know at least two partial ways:
First:
Second:
Or you can use images (as mentioned in other replies).
简单的 {\tt :-)} 有什么不好呢?
What's against a simple {\tt :-)}?
如果您使用
xelatex
或lualatex
,那么If you use
xelatex
orlualatex
, thenshould 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
andluahblatex
can typeset color emojis usingharflatex
andluahblatex
can be installed from TeXLive Contrib athttps://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.
Unicode 的“杂项符号”包括 3 个简单的表情符号:
0x2639
-0x263B
。 您也可以使用0x2686
-0x2689
。为了获得更多变化,您将需要使用图像并以某种方式包含它们。
我很好奇导致这个问题的情况:)
Unicode's "miscellaneous symbols" include 3 simple emoticons:
0x2639
-0x263B
. You can possibly use0x2686
-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 :)
现在还有
tikzsymbols
包,它有漂亮的表情符号。By now there also is the
tikzsymbols
package which has nice emoticons.一种解决方案是使用 bclogo 包。 它包含两个笑脸(快乐和悲伤),以及许多其他小“标志”,例如旗帜等。
One solution is to use bclogo package. It contains two smileys (happy & sad), plus many other small "logos" like flags and others.
另外,从菜单 --> 将编译器设置为 LuaLaTeX 设置
参考
Also, set the compiler to LuaLaTeX from Menu --> Settings
Reference
\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.