这是我的Rmarkdown代码:
---
title: "My Title"
header-includes:
- \usepackage{calligra}
- \usepackage[T1]{fontenc}
output:
pdf_document:
latex_engine: xelatex
---
# Section 1
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.
When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:我正在研究在Rmarkdown中更改字体的最好方法。在texlive中,会出现已安装的calligra包,同时还会显示calligra type1。
当我使用calligra包运行脚本时,它会生成pdf,但字体与calligra字体不匹配。
当我运行calligra type1的脚本时,甚至没有生成pdf。
有什么帮助吗,伙计们?
发布于 2019-10-07 00:35:40
calligra.sty不会将Calligra设置为默认字体,但您可以通过添加
\renewcommand{\rmdefault}{calligra}敬header-includes。
顺便说一句,不需要调用fontenc.sty,因为calligra.sty已经这样做了。此外,这里不需要使用xelatex。
https://stackoverflow.com/questions/58244210
复制相似问题