-
Hello, does anybody know of a filter or a feature of pandoc that lets you replace some placeholder elements in a document with the value of a metadata field? Think of a customized letter ( Dear [recipient]{.replace-with-meta key="recipient"},
... You could get the customized docx version with a command like this: pandoc -f markdown -t docx --metadata recipient="Peter" -L replace-meta.lua -o letter.docx template-letter.md where I know it is possible with templates; what about (template-)documents? Templates are specific to a format, while documents can be converted in many output formats. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
You mean something like this example from the documentation? |
Beta Was this translation helpful? Give feedback.
-
Oops, I read those docs a lot of times... 😳 Thank you! |
Beta Was this translation helpful? Give feedback.
You mean something like this example from the documentation?
https://pandoc.org/lua-filters.html#replacing-placeholders-with-their-metadata-value