1

My yaml-file has these variables:

values:
- name: MyName
  amount: 123
---

In the pandoc-template for LaTeX I have inserted the variables as following:

$for(values)$
$if(values.name)$Name: $values.name$$endif$
$if(values.amount)$Amnount: $values.amount$$endif$
$endfor$

As long as I do a plain conversion with pandoc it works well.

But when I try to pass a value to the variable values.amount via the command line (from a makefile) it is not recognized however the subshell works fine.

pandoc --variable values.amount="$(shell awk 'NR>1{print $0}' myfile.csv | wc -l)" dummy.md -o final.pdf

How do I pass a value to the variable amount via CLI?

lukascbossert
  • 375
  • 1
  • 11

0 Answers0