我在这里偶然发现了一个名为 Emojione 的精彩软件包 -表情符号有人能告诉我如何在 beamer 中安装和使用这个包吗?[将 .sty 文件和整个包一起放在本地 texmf 中并更新 FDNB 似乎还不够]
以下是 MWE
\documentclass{beamer}
\author{Karthik}
\title{My title}
\usetheme{default}
\usepackage{emojione}
\begin{document}
\maketitle
\begin{frame}[t]\frametitle{First frame}
I am trying to insert an emoji here \emojialien
\end{frame}
\end{document}
没有 pdf 输出。我收到的错误消息是
C:\localtexmf\tex\latex\beamer\emojione\emojione.sty:57: Forbidden control sequence found while scanning use of \bool_if:nTF. [\bool_if:nTF { \xetex_if_engine_p:]
C:\localtexmf\tex\latex\beamer\emojione\emojione.sty:57: Undefined control sequence. [\bool_if:nTF { \xetex_if_engine_p:]
C:\localtexmf\tex\latex\beamer\emojione\emojione.sty:57: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! [\bool_if:nTF { \xetex_if_engine_p:]
C:\localtexmf\tex\latex\beamer\emojione\emojione.sty:57: LaTeX Error: Missing \begin{document}. [\bool_if:nTF { \xetex_if_engine_p: |]
C:\localtexmf\tex\latex\beamer\emojione\emojione.sty:57: Undefined control sequence. [...xetex_if_engine_p: || \luatex_if_engine_p:]
C:\localtexmf\tex\latex\beamer\emojione\emojione.sty:57: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! [...xetex_if_engine_p: || \luatex_if_engine_p:]
C:\localtexmf\tex\latex\beamer\emojione\emojione.sty:57: Too many }'s. [...etex_if_engine_p: || \luatex_if_engine_p:}]
C:\localtexmf\tex\latex\beamer\emojione\emojione.sty:67: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! [ \cs_new:Npn \emojione_define:nnnn]
C:\localtexmf\tex\latex\beamer\emojione\emojione.sty:73: Undefined control sequence. [...ine:nnnn{
答案1
该emojione
软件包已有大约 2 年历史。与此同时,LaTeX3 内容至少有一次更新。而该emojione
软件包并未相应更改。
您需要将emojione.sty
第 57 行从
\bool_if:nTF { \xetex_if_engine_p: || \luatex_if_engine_p:}
到
\bool_if:nTF { \sys_if_engine_xetex_p: || \sys_if_engine_pdftex_p:}
那么报告的错误emojione.sty
就应该消失。
该包调用\includegraphics[...]{.pfd/...}
来插入图片。这意味着,该文件夹pdf
应与您的.tex
文件位于同一文件夹中。
有两种方法可以解决这个问题。你可以将pdf
文件夹复制到你的文件的文件夹中.tex
,或者将第 54 行emojione.sty
从
{\c_emojione_folder / #1.\c_emojione_extension}%
到
{#1.\c_emojione_extension}%
pdf
这样,如果文件夹与文件位于同一文件夹中,就可以找到图片emojione.sty
。