带有RMarkdown的Calligra字体

问题描述 投票:2回答:1

这是我的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。

任何帮助,伙计?

latex r-markdown
1个回答
0
投票

[calligra.sty不会将Calligra设置为默认字体,但您可以通过添加]来设置

\renewcommand{\rmdefault}{calligra}

header-includes

顺便说一句,无需调用fontenc.sty,因为calligra.sty已经如此。另外,这里不需要使用xelatex

© www.soinside.com 2019 - 2024. All rights reserved.