I think for the invoice YAML makes sense. I would rather use an existing YAML library to generate invoice input files for the pandoc template than generating latex source files directly while sanitizing input for latex special characters.