rstudio/rticles

JOSS template error with bookdown

Closed this issue · 2 comments

As explained here, using the joss_article() template with bookdown is to be done by putting the following in the yaml header:

output:
  bookdown::pdf_book:
    base_format: rticles::joss_article

However, this produces an error message which can be reproduced as follows:

bookdown::pdf_book(base_format = rticles::joss_article)
Error in rmarkdown::pdf_document(..., template = template) : 
  formal argument "pandoc_args" matched by multiple actual arguments

It seems that adding a pandoc_args argument to rticles::joss_article() and prepending its value to the function's internal definition of pandoc_args solves the issue. (I've checked that this works, and this is also what rticles::jss_article() does).

Would you like me to submit a PR?

xfun::session_info("rticles")
R version 4.3.1 (2023-06-16)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Sonoma 14.3.1

Locale: en_CA.UTF-8 / en_CA.UTF-8 / en_CA.UTF-8 / C / en_CA.UTF-8 / en_CA.UTF-8

Package version:
  base64enc_0.1.3   bslib_0.6.1       cachem_1.0.8      cli_3.6.2        
  digest_0.6.34     ellipsis_0.3.2    evaluate_0.23     fastmap_1.1.1    
  fontawesome_0.5.2 fs_1.6.3          glue_1.7.0        graphics_4.3.1   
  grDevices_4.3.1   highr_0.10        htmltools_0.5.7   jquerylib_0.1.4  
  jsonlite_1.8.8    knitr_1.45        lifecycle_1.0.4   memoise_2.0.1    
  methods_4.3.1     mime_0.12         R6_2.5.1          rappdirs_0.3.3   
  rlang_1.1.3       rmarkdown_2.26    rticles_0.26.3    sass_0.4.8       
  stats_4.3.1       tinytex_0.49      tools_4.3.1       utils_4.3.1      
  xfun_0.42         yaml_2.3.8       

By filing an issue to this repo, I promise that

  • I have fully read the issue guide at https://yihui.name/issue/.
  • I have provided the necessary information about my issue.
    • If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
    • If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included xfun::session_info('rticles'). I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: remotes::install_github('rstudio/rticles').
    • If I have posted the same issue elsewhere, I have also mentioned it in this issue.
  • I have learned the Github Markdown syntax, and formatted my issue correctly.

I understand that my issue may be closed if I don't fulfill my promises.

Thanks you for the report !

You were absolutely right - it was quick enough to fix so I did the change. Thanks.

I'll do CRAN release shortly

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.