Class 如何在rmarkdown中输入.cls文件?

Class 如何在rmarkdown中输入.cls文件?,class,latex,r-markdown,Class,Latex,R Markdown,我想在使用rmarkdown生成pdf文件时使用.cls文件,如何包含此文件,在何处包含 --- title: "Proposal" author: "Name Surname" date: "01/30/2015" output: pdf_document: fig_caption: yes keep_tex: yes classoption: a4paper --- 您可以使用csl:命令 --- title: "Sample Document" output: htm

我想在使用rmarkdown生成pdf文件时使用.cls文件,如何包含此文件,在何处包含

---
title: "Proposal"
author: "Name Surname"
date: "01/30/2015"
output:
  pdf_document:
    fig_caption: yes
    keep_tex: yes
classoption: a4paper
---

您可以使用csl:命令

---
title: "Sample Document"
output: html_document
bibliography: bibliography.bib
csl: biomed-central.csl
---

上面,您有一个来自

的示例,您可以在yaml标题中指定
documentclass
classoption
(请参阅)

e、 例如,要使用爱思唯尔的
elsarticle.cls
您可以将documentclass从
article
更改为
elsarticle

---
documentclass: elsarticle
classoption: preprint
---

将文件放在与.Rmd文件相同的目录中。

使用
.csl
进行书目/参考格式设置与使用LaTeX类文件(
.cls
)不同,例如,Elsevier的elserticle.cls()