13

I am attempting to use R Markdown with papaja. I downloaded everything according to this website. I open an APA template, and click "knit". I get this error:

Error running filter pandoc-citeproc: Could not find executable pandoc-citeproc

I know that pandoc is working outside of R (I can run it in the terminal window). It appears it is on my computer, why can't R Markdown see it and use it? How might I change this to pandoc-citeproc? I have tried running

install pandoc-citeproc 

in my terminal window.

It then shows me this:

install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
           [-o owner] file1 file2
   install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
           [-o owner] file1 ... fileN directory
   install -d [-v] [-g group] [-m mode] [-o owner] directory ...

I then go back to R, restart my session, and get the same error. Any ideas?

I am running R Studio on a Mac.

Katie
  • 323
  • 3
  • 10
  • Which pandoc version did you install? There has been a recent change in pandoc which folds the functionality of pandoc-citeproc into pandoc proper. If you downloaded pandoc 2.11, try upgrading your R Markdown installation or downgrade pandoc to version 2.10.1. – tarleb Oct 16 '20 at 20:20
  • Thank you for your help! I did this, now I am getting this error when I attempt to knit..! LaTeX Error: Option clash for package geometry. Error: LaTeX failed to compile APA_Template.tex. Execution halted – Katie Oct 22 '20 at 15:35

1 Answers1

18

I was experiencing the same problem right after upgrading from Ubuntu 18.04 LTS to 20.04 LTS. Running knitr from RStudio to turn an RMarkdown file into HTML format. I found out the pandoc-citeproc program was not installed with the upgrade, so I had to install it.

I got the instructions from the package page: https://ubuntu.pkgs.org/20.10/ubuntu-universe-arm64/pandoc-citeproc_0.17.0.1-1build1_arm64.deb.html. Here I reproduce verbatim for quick reference:

  1. Update the package index:

    sudo apt-get update

  2. Install pandoc-citeproc deb package:

    sudo apt-get install pandoc-citeproc

Hope it works for anyone out there if you suddenly find your installation does not have all the pandoc-related packages that your workflow needs.

Pablo Adames
  • 578
  • 6
  • 12