【发布时间】:2021-03-01 04:19:45
【问题描述】:
提前感谢任何友好的 cmets。
我使用xelatex引擎生成Beamer的PDF,工作环境是R Markdown,我指定YAML如下:
---
title: Presentation for Research Planning - Literature Review and Academic Writing
subtitle:
author:
institute:
#titlegraphic:
fontsize: 11pt
output:
beamer_presentation:
template: C:\Users\Desktop\R Files\svm-latex-beamer.tex
keep_tex: true
latex_engine: xelatex # pdflatex also works here
dev: cairo_pdf # I typically comment this out if latex_engine: pdflatex
slide_level: 3
make149: true
mainfont: "Titillium Web" # Try out some font options if xelatex
titlefont: "Palatino Linotype" # Try out some font options if xelatex
---
我使用的模板是从http://svmiller.com/blog/2019/08/r-markdown-template-beamer-presentations/下载的
mainfont: "Titillium Web"这是我从谷歌下载并安装的。
titlefont: "Palatino Linotype"这已经在我的系统里了,所以我不需要安装它。而且这种字体有效。
安装完成后,在我在这里发帖之前,我检查了新字体是否在我的本地系统中。我已经更新了我的 Tinytex 包并重新启动了我的计算机。但是还是不行,报错如下:
!包 fontspec 错误:找不到字体“Titillium Web”。
! kpathsea:make_tex: 无效的文件名“Titillium Web”,包含“”
错误:LaTeX 无法编译presentation_sample.tex。有关调试提示,请参阅https://yihui.org/tinytex/r/#debugging。有关详细信息,请参阅presentation_sample.log。
我不知道,但我真的想在我的幻灯片中添加一些很酷的字体!顺便说一句,我的 R 版本是:
sessionInfo()
R 版本 3.6.3 (2020-02-29)
平台:x86_64-w64-mingw32/x64(64位)
运行于:Windows 10 x64(内部版本 18363)
【问题讨论】:
-
嗨,我刚刚添加了它。除了 YAML 和模板,我没有在我的 .Rmd 中编写任何代码。
标签: r latex r-markdown beamer