Is there a way to tell Pandoc to set \jobanme
to a specific value while converting and compiling single markdown file to PDF (via LaTeX)? -Preferably the name of the source *.md
file.
background:
I have my own LaTeX document class defined which uses \jobname
.
It prints it in the document footer, so that it's easy for me to find source file/repo having a printed PDF.
I set jobname in my compile scripts as pdfLaTeX argument.
I am currently trying to use my document class as LaTeX template for documents processed by Pandoc from Markdown source. It seems, Pandoc sets \jobname
always as 'input'.
I can set any variable in Markdown's yaml header which may be then printed into PDF, but being able to set it based on true md file name will be much less error prone.
\jobname
in my LaTeX template. The only thing I need is to enforce Pandoc (who calls pdfLaTeX) to specify the value of\jobname
I need. Could you provide more details, @mb21 ? – MaciekS\jobname
at the bottom of each page. If I compile the document aspdflatex some_file.tex
I have 'some_file` printed in the footer. If I compile a bigger document which is inside of a git repo, I use command with--jobname=repo_x
. I want to set thedocumentclass
in my markdown yaml header to "mydoc", and get the md file name printed in the footer of my document. – MaciekS--latex-engine-opt
which may be used to set the--job-name
argument to whatever I need. Sadly this do not work. Usingpandoc --latex-engine-opt=--job-name=xxx <...>
I get pandoc: Error producing PDF. I expect pandoc looks forinput.pdf
as the temporary input file is hard codedlet file = tmpDir </> "input.tex"
, and jobname changes the name of the produced PDF file. As a solution I changed my class to usesrcrepo
var. I set it withpandoc -V srcrepo:xx
. – MaciekS