test.py
def f(x):
return x
test.md
~~~{
#lst:test
.py
include="test.py"
caption=`test.py`
}
~~~
header.tex
\usepackage{minted}
\definecolor{bg}{rgb}{0.85, 0.85. 0.85}
\setminted{breaklines=true, bgcolor=bg, breakanywhere}
I’m compiling with:
pandoc -s -F pandoc-crossref -L include-code-files.lua -L minted.lua -H header.tex --from markdown --to latex test.md -o test.tex
latexmk --shell-escape -pdflatex test.tex
I get an error upon compilation, because pandoc-crossref
defines its own header include which gets overwritten by my -H header.tex
. This link provides more information.
I tried the solution proposed by @lierdakil in the link provided but get an error:
! LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H for immediate help.l.97 $
for(header-includes)$
?
So I’m at a bit of a loss regarding what to do here, Any pointers welcome. Thanks