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
julou
  • 602
  • 4
  • 12

1 Answers1

4

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.

Ralf Stubner
  • 26,263
  • 3
  • 40
  • 75
  • Thanks a lot for your help! I just added a comment in the initial thread for future readers. – julou Sep 25 '18 at 05:28