this post之后,我尝试将@YihuiXie的答案与rticles的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

最佳答案

您不能将base_format更改为bookdown::pdf_document2。不过,您可以针对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

10-04 14:16