[英]Changing font family for a paragraph in latex rmarkdown
有誰知道如何在 rmarkdown 文檔中間更改字體系列?
我目前正在使用以下代碼,但它將給定的文本重置為現代計算機,就像它永遠找不到任何其他字體一樣。 請幫忙
---
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
另外有人知道我可以使用哪個 fonts 嗎? 我找不到有效的列表。
您正在使用 xelatex,因此您可以使用您在操作系統上安裝的任何字體
---
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
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.