I'm using the R package knitr
to generate a markdown file test.md
. This file is then processed by pandoc
to produce a variety of output formats, such as html and pdf. Because I want to use bibtex
when generating the pdf through latex
, I believe I have to tell pandoc
to stop at the intermediate latex output, and then run bibtex
and pdflatex
myself (twice). Here's where I found a slight annoyance in my workflow: the only way I found for pandoc
to keep the intermediate tex file, and not go all the way to the pdf, was to specify a hard-coded filename through the -o
option with a .tex
extension. This is problematic for me because I'm using a config file to run pandoc('test.md', "latex", "config.pandoc")
via knitr
with options, which I would like to keep generic without hard-coded output filename:
format: latex
o: test.tex
s:
S:
biblio: refs.bib
biblatex:
template: 'template.tex'
default-image-extension: pdf
which in turn becomes the following command for pandoc,
pandoc -s -S --biblio=refs.bib --default-image-extension=pdf --biblatex --template='template.tex' -f markdown -t latex -o test.tex 'test.md'
If I skip the o: test.tex
option, pandoc
produces a pdf and doesn't keep the intermediate latex file. How can I keep the tex file, without specifying this hard-coded filename?