Latex 带R标记的Calligra字体

Latex 带R标记的Calligra字体,latex,r-markdown,Latex,R Markdown,这是我的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 formatt

这是我的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:
---
标题:“我的标题”
标题包括:
-\usepackage{calligra}
-\usepackage[T1]{fontenc}
输出:
pdf\U文件:
乳胶引擎:Xeletex
---
#第一节
这是一份R降价文件。Markdown是一种用于编写HTML、PDF和MS Word文档的简单格式语法。有关使用R标记的更多详细信息,请参阅。
当您单击**Knit**按钮时,将生成一个文档,其中包括文档中任何嵌入的R代码块的内容和输出。您可以像这样嵌入R代码块:
我正在研究在Rmarkdown中更改字体的最佳方法。在texlive中,将显示已安装的calligra软件包,并显示calligra-type1

当我使用calligra包运行脚本时,它会生成pdf,但字体与calligra字体不匹配

当我运行calligra-type1的脚本时,pdf甚至没有生成


有什么帮助吗,伙计们?

calligra.sty没有将calligra设置为默认字体,但您可以通过添加

\renewcommand{\rmdefault}{calligra}
标题包括

顺便说一句,没有必要调用
fontenc.sty
,因为
calligra.sty
已经这样做了。此外,此处不需要使用
Xeletex