【问题标题】:Can't use PLOS rticles template with bookdown不能将 PLOS 文章模板与 bookdown 一起使用
【发布时间】:2018-09-24 11:34:44
【问题描述】:

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

【问题讨论】:

    标签: r r-markdown bookdown


    【解决方案1】:

    您不能将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 存在于该目录中。

    【讨论】:

    • 非常感谢您的帮助!我刚刚在最初的帖子中为未来的读者添加了一条评论。
    猜你喜欢
    • 1970-01-01
    • 2018-04-12
    • 1970-01-01
    • 1970-01-01
    • 2020-04-25
    • 2022-06-12
    • 1970-01-01
    • 2019-02-01
    • 2016-06-02
    相关资源
    最近更新 更多