This should be a reproducible example for the lua error I'm running into (section-refs.lua can be found here):
# (index.Rmd)
---
output:
pdf_document:
pandoc_args:
- --lua-filter=section-refs.lua
section-refs-bibliography: refs.bib
---
# Chapter 1
This is some text [@ainsworth:sheppard].
# Chapter 2
This is some text [@altick:aldine].
# (refs.bib)
@BOOK{ainsworth:sheppard,
title = {Jack Sheppard: A Romance},
author = {William Harrison Ainsworth},
address = {London},
publisher = {George Routledge \& Sons},
year = {1900},
shorttitle = {Jack Sheppard},
}
@Article{altick:aldine,
author = {Richard D. Altick},
title = {From Aldine to Everyman: Cheap Reprint Series of the
English Classics 1830--1906},
journal = {Studies in Bibliography},
year = 1958,
volume = 11,
pages = {3--24}
}
This is the error when trying to render index.Rmd.
Unknown option --citeproc.
Try pandoc --help for more information.
Error running filter section-refs.lua:
PandocFilterError "pandoc" "Filter returned error status 6"
stack traceback:
[C]: in function 'pandoc.utils.run_json_filter'
section-refs.lua:58: in upvalue 'run_citeproc'
section-refs.lua:88: in function <section-refs.lua:66>
Error: pandoc document conversion failed with error 83
Execution halted
Really stuck and hoping someone with knowledge of lua could maybe save the save (@cderv, @rlesur)??
For what its worth, if I knit index.Rmd first with knitr::knit('index.Rmd', 'index.md') and then run pandoc via pandoc index.md --lua-filter section-refs.lua -o index.pdf it works.