r - 无法将 PLOS 文章模板与 bookdown 一起使用

标签 r r-markdown bookdown

已关注 this post ,我试图将 @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}

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

关于r - 无法将 PLOS 文章模板与 bookdown 一起使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52478475/

相关文章:

R Shiny : create reactiveValues object with input$ values

r - 有没有办法改变ggplot2中图例项之间的间距?

r - 在 R 中使用 RODBC 连接到 Azure SQL

r - 有没有办法包含来自不同目录的子 Rmd 文件

r - 使用 "cases"在大括号中显示线性方程组(R-markdown)

r-markdown - 具有重复名称的损坏的 bookdown 标题链接

r - 在 ggplot2 之外添加列表,该列表会随着时间的推移而变化 - gganimate

r - 在 R bookdown 中如何设置默认代码输出背景颜色

css - 更改 bookdown gitbook 中的 R block 背景颜色

python - Sublime 编辑器2 : Key-bindings to send command to terminal