Newer versions of pandoc handle comments in latex templates a bit differently that cause breakage using this https://github.com/jgm/pandoc/issues/6036 If it’s of interest, Id be happy to issue a PR once I’ve tested the suggested fix