Thanks for your comment, John. For now I chose to use a bash script which runs a `sed` command before rendering with pandoc, and it works fine.
On Wednesday, January 9, 2019 at 7:33:09 PM UTC+1, Vang Le Quy wrote:
pandoc -v
pandoc 2.3.1
Compiled with pandoc-types 1.17.5.1, texmath 0.11.1.1, skylighting 0.7.3
Default user data directory: /Users/vle/.pandoc
Copyright (C) 2006-2018 John MacFarlane
Web: http://pandoc.org
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose.
pandoc -h says that there is `-V` and `--varaible KEY[:VALUE]` flag. I want to include some value at rendering time (document version). So I did this:
pandoc --variable gitcommit:xxxxxyyy -o markdowndoc.pdf markdowdoc.md
---
title: Test Variables
output: pdf_document
header-includes:
- \usepackage{hyperref}
- \usepackage{datetime}
- \usepackage{fancyhdr}
- \pagestyle{fancy}
- \fancyhead[LE,LO]{}
- \fancyfoot[CO,CE]{Template Version \pdfdate| Git Commit:$gitcommit$}
- \fancyfoot[LE,RO]{\thepage}
---
Variable value, gitcommit: $gitcommit$
This however did not result in expected value in the finale PDF document. So is it possible at all to do this kind of thing at the moment?