I'm sorry if this is a bit of a pandoc question, but I'm hoping you tex users have some familiarity with latex templates within pandoc. I'm very new at this, but am excited to get a good work flow going.
I'm trying to figure out how to use latex templates with pandoc when creating a pdf from a markdown file using
pandoc file.md -o file.pdf --template=default.latex
In the command line. I got the default latex template from
pandoc -D latex > default.latex
The pandoc documentation says a bit about using templates and from what I understood, suggested to modify the default (I may very well have understood completely wrong). pandoc template documentation
My main problem is that I can't figure out how to set variables such as title, author, etc... do I do that in the default.latex file? or in the markdown file?
Thanks in advance for any suggestions or directions to some good guides.
Okay, so looks like pandoc template variables are not controlled in the LaTex template code. For reference, however, I'll mention the following:
- Variables are set automatically by Pandoc and can be used within the template. You cannot set variables in the template. However, you can set them in the original MD source file by means of a YAML metadata block.
- Also, "Variables may be set at the command line using the -V/--variable option".
see http://johnmacfarlane.net/pandoc/README.html#templates for more info
I guess this question can be closed as off topic.