Can't use PLOS rticles template with bookdown
Asked Answered
I

1

6

Following this post, I'm trying to put @YihuiXie 's answer in practice with the PLOS template of rticles but it doesn't work. Any help would be very appreciated!

Below in a minimal example:

---
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}

The error message reads

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
Internationalist answered 24/9, 2018 at 11:34 Comment(0)
B
5

You cannot change the base_format for bookdown::pdf_document2. You can do so for bookdown::pdf_book, though:

---
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}

Note to other readers: Make sure that .../rticles/rmarkdown/templates/plos_article/skeleton/PLOS-submission.eps is present in that directory.

Blockage answered 24/9, 2018 at 13:46 Comment(1)
Thanks a lot for your help! I just added a comment in the initial thread for future readers.Internationalist

© 2022 - 2024 — McMap. All rights reserved.