简体   繁体   中英

Pandoc set jobname for LaTeX PDF export

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.

我通过重新定义LaTeX模板并在使用pandoc的情况下使用sourcefile pandoc变量而不是\\jobname来解决了我的问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM