Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/72.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
更改latex rmarkdown中段落的字体系列 是否有人知道如何在一个r降价文档的中间改变字体族?_R_Latex_R Markdown_Pdflatex_Xelatex - Fatal编程技术网

更改latex rmarkdown中段落的字体系列 是否有人知道如何在一个r降价文档的中间改变字体族?

更改latex rmarkdown中段落的字体系列 是否有人知道如何在一个r降价文档的中间改变字体族?,r,latex,r-markdown,pdflatex,xelatex,R,Latex,R Markdown,Pdflatex,Xelatex,我目前正在使用以下代码,但它会将给定的文本重置为computer modern,就像它从未找到任何其他字体一样。请帮忙 --- title: '' output: pdf_document: latex_engine: xelatex keep_tex: yes geometry: left=0.35in,right=0.35in,top=0.3in,bottom=0.3in header-includes: - \usepackage{graphicx} - \usepac

我目前正在使用以下代码,但它会将给定的文本重置为computer modern,就像它从未找到任何其他字体一样。请帮忙

---
title: ''
output:
  pdf_document:
    latex_engine: xelatex
    keep_tex: yes
geometry: left=0.35in,right=0.35in,top=0.3in,bottom=0.3in
header-includes:
- \usepackage{graphicx}
- \usepackage{fancyhdr}
- \usepackage{fontspec}
- \pagestyle{fancy}
- \renewcommand{\headrulewidth}{0.0pt}
fontsize: 9pt
---
\begingroup
\fontfamily{pag}\fontsize{18}{16}\selectfont
\textcolor{black}{tasks}
\endgroup

另外,有人知道我可以使用哪些字体吗?我找不到有效的列表。

您使用的是Xeletex,因此您可以使用您在操作系统上安装的任何字体

---
title: ''
output:
  pdf_document:
    latex_engine: xelatex
    keep_tex: yes
geometry: left=0.35in,right=0.35in,top=0.3in,bottom=0.3in
header-includes:
- \usepackage{graphicx}
- \usepackage{fancyhdr}
- \usepackage{fontspec}
- \pagestyle{fancy}
- \renewcommand{\headrulewidth}{0.0pt}
fontsize: 9pt
---
Global

\begingroup
\setmainfont{Arial}
\fontsize{18}{16}\selectfont
\textcolor{black}{tasks}
\endgroup

Global