【发布时间】:2019-09-26 15:32:01
【问题描述】:
我最近在 R 中安装了“rticles”包,以便在 RMarkdown 中自动设置期刊文章模板。到目前为止,我对它印象深刻,但我希望能够更改字体。这当然是有可能的,但我一直找不到任何在线资源来解释如何做到这一点。
我有兴趣编织成 PDF。
这是我的 RMarkdown 脚本顶部的 YAML:
---
title: This title
author:
- name: This author
email: t.author@thisPlace.com
affiliation: This institute
address:
- code: This institute
address: Street, City, State, etc.
abstract: |
This is the abstract.
It consists of two paragraphs.
keywords: "fun, happiness"
journal: "This Elsevier Journal"
date: "`r Sys.Date()`"
output: rticles::elsevier_article
---
我通过在 R 中运行以下代码行来生成它:
rmarkdown::draft("Test.Rmd", template = "elsevier_article", package = "rticles")
那么在所有这些中我可以在哪里控制字体?在使用“rticles”之前,我曾经通过更改乳胶引擎然后指定字体来更改字体,如下所示:
---
title: This title
author: "This author"
date: "`r Sys.Date()`"
output:
pdf_document:
toc: yes
toc_depth: 4
fig_caption: TRUE
df_print: kable
latex_engine: xelatex
mainfont: Calibri Light
---
是否可以在“文章”中做类似的事情?
【问题讨论】:
标签: r latex yaml r-markdown