Quarto PDF文档无法显示作者邮箱问题求助
解决Quarto PDF文档作者邮箱不显示的问题
Quarto默认的PDF模板不会自动渲染email字段,要让邮箱正常显示,可通过以下两种简单方法实现:
方法一:利用affiliation字段配合LaTeX包
在YAML配置中添加header-includes引入authblk包,将邮箱作为作者的附属信息:
--- format: pdf title: "Your Title" author: - name: Bill Gates affiliation: \texttt{bill@gates.com} header-includes: - \usepackage{authblk} --- ```{r} mtcars
## 方法二:直接插入LaTeX代码自定义显示 通过`header-includes`插入LaTeX代码,在作者名称下方手动添加邮箱: ```yaml --- format: pdf title: "Your Title" author: "Bill Gates" header-includes: - \usepackage{titling} - \posttitle{\par\end{center} \begin{center}\textit{bill@gates.com}\end{center}} --- ```{r} mtcars
两种方法都能让邮箱在PDF的标题区域正常显示,可根据个人排版需求选择。 内容的提问来源于stack exchange,提问作者Tomas R
相关产品推荐
相关产品推荐

