不能将 PLOS 文章模板与 bookdown 一起使用

Can't use PLOS rticles template with bookdown

之后,我试图将@YihuiXie 的答案与文章的 PLOS 模板一起实践,但它不起作用。任何帮助将不胜感激!

下面是一个最小的例子:

---
title: Title of submission to PLOS journal
author:
  - name: Me
    affiliation: Here

# output: rticles::plos_article
output:
  bookdown::pdf_document2:
    base_format: rticles::plos_article
---

# Introduction

Some text \@ref(fig:fig1)

# References {#references .unnumbered}

错误消息显示为

Error in pdf_book(..., base_format = rmarkdown::pdf_document) :    formal argument "base_format" matched by multiple actual arguments 
Calls: <Anonymous> -> create_output_format -> do.call -> <Anonymous> 
Execution halted

您无法更改 bookdown::pdf_document2base_format。您可以为 bookdown::pdf_book 这样做,但是:

---
title: Title of submission to PLOS journal
author:
  - name: Me
    affiliation: Here

#output: rticles::plos_article
output:
  bookdown::pdf_book:
    base_format: rticles::plos_article
---

# Introduction

Some text \@ref(fig:fig1)

# References {#references .unnumbered}

其他读者请注意:确保 .../rticles/rmarkdown/templates/plos_article/skeleton/PLOS-submission.eps 存在于该目录中。