ismayc / thesisdown

An updated R Markdown thesis template using the bookdown package

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow to add `pandoc_args`

shirdekel opened this issue · comments

Describe the bug
When adding pandoc arguments using pandoc_args I get the following error:

Error in bookdown::pdf_book(template = "template.tex", toc = toc, toc_depth = toc_depth,  : 
  formal argument "pandoc_args" matched by multiple actual arguments

To Reproduce
https://www.loom.com/share/f240c87535f14ecfb3f8fe0ad2b98659

Steps to reproduce the behavior:

  1. Open the thesisdown template Rmd
  2. Add a pandoc argument using pandoc_args
  3. Knit using bookdown::render_book(output_format = "thesisdown::thesis_pdf")
  4. See error

Expected behavior
To be able to add extra pandoc arguments.

Desktop (please complete the following information):

  • OS: macOS 10.14.6
  • Browser: Firefox
  • Version: 86.0.1 (64-bit)

Additional context
I want to add some filters from rmdfiltr, specifically the word count and ampersand filters. I think the issue is that thesisdown already specifies pandoc_args here. Can thesisdown supply the default argument while allowing for extra ones?

I believe I fixed this in my fork, so I'm happy to submit a PR.

Thanks for digging in! Please do submit a PR

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org whenever possible) and link to this issue. If a reprex is not applicable, recording a short Loom video showing what you are seeing can go a long way in helping to diagnose problems.