几个月前,我能够在 beamer 幻灯片的标题或作者字段中包含一个 fontawesome 图标。在当前(和更新)版本的 MacTeX-2021 中,这似乎不再起作用。在出现错误时暂停时按“r”即可获得强力解决方案。
最小工作示例如下:
\documentclass{beamer}
\title{Slides Title}
\author{Name Surname \faTwitter}
\usepackage{fontawesome5}
\begin{document}
\frame{\titlepage}
\begin{frame}
The inclusion here of \faTwitter works fine... but including in the title or author in the titlepage produces an error (which can be solved by running over, but it is annoying).
\end{frame}
\end{document}
答案1
您必须fontawesome5
先加载才能使用。(通常,在执行序言中的其他操作之前,先加载所有包是一个好主意)
\documentclass{beamer}
\usepackage{fontawesome5}
\title{Slides Title}
\author{Name Surname \faTwitter}
\begin{document}
\frame{\titlepage}
\begin{frame}
The inclusion here of \faTwitter works fine... but including in the title or author in the titlepage produces an error (which can be solved by running over, but it is annoying).
\end{frame}
\end{document}