Leo*_*ass 6 latex r r-markdown
例子:
---
output: pdf_document
mainfont: Times New Roman
fontsize: 12pt
spacing: 1.1
geometry: "left=1in,right=1in,top=0.5in,bottom=1in"
vspace: 4pt
---
This line is normal text.
This line uses Garamond font and font size 14.
This line uses arial font and font size 16.
This line is normal text.
Run Code Online (Sandbox Code Playgroud)
我尝试了几种选择,但没有一个有效。请告诉我是否有办法做到这一点。
我们可能会在您的 rmarkdown 脚本中使用 LaTeX 代码。设置字体类型,一些字体代码可以在这里\fontfamily{}找到。(请注意,我在这里使用 Palatino,因为我的系统上可能没有安装 Garamond。)可以使用 来设置字体大小,其中第一个代表大小,第二个代表间距。为了使其只是暂时的,我建议将其嵌入到and中。保留您的 YAML 标头不变。\fontsize{}{}{}\begingroup\endgroup
This line is normal text.
\begingroup
\fontfamily{ppl}\fontsize{14}{16}\selectfont
This line uses Garamond font and font size 14.
\endgroup
\begingroup
\fontfamily{phv}\fontsize{16}{18}\selectfont
This line uses arial font and font size 16.
\endgroup
This line is normal text.
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
10713 次 |
| 最近记录: |