r语言 - 设置pdf四开本的CMU无衬线字体



几天来我一直在使用Quarto生成pdf文档。当指定使用的主字体时,我可以很好地选择"Cambria"或"Calibri",但我无法选择"Computer Modern Sans Serif"等字体。

format:
pdf:
toc: true
toc-title: "Text mining"
number-sections: true
colorlinks: true
pdf-engine: lualatex
mainfont: "Computer Modern"
fontsize: 12pt

我应该对代码做什么更改来生成我选择的字体的pdf文件?这里提出的解决办法行不通。

您可以在您的yaml头中使用fontfamilypdflatex引擎并检查The LaTeX Font Catalogue,这表明计算机现代无衬线字体可用。下面是一些可复制的代码:

---
format:
pdf:
toc: true
toc-title: "Text mining et Première Guerre mondiale"
number-sections: true
colorlinks: true
pdf-engine: pdflatex
fontfamily: "Computer Modern Sans Serif"
fontsize: 12pt
---
This is some example text. 

最新更新