Use local variable in AutoPandoc function.