2

Say I want to have a bunch of metadata at the top of a file such as AUTHOR: Foo Bar DATE: Jan 21 2052. Now whenever I use the word AUTHOR somewhere in the file, I would like it to be substituted by Foo Bar and DATE by Jan 21 2052

Does the markdown extension of Pandoc provide this feature?

smilingbuddha
  • 14,334
  • 33
  • 112
  • 189
  • 1
    This might help: https://stackoverflow.com/q/53355628/2425163 – tarleb Dec 12 '18 at 08:29
  • From how you describe your wish, I cannot see why this should be implemented as a *Pandoc* feature. This is simply a question of 'search and replace' which can be accomplished by ***`sed`***: `cat source.markdown | sed 's#AUTHOR #Foo Bar #g;s#DATE #Jan 21 2052 #g;s' | pandoc --to=html --from=markdown -o source.html` – Kurt Pfeifle Dec 17 '18 at 17:59
  • Yes I was also able to achieve this using the m4 (https://ss64.com/bash/m4.html) command-line tool which expands embedded macros automatically. – smilingbuddha Dec 17 '18 at 18:01

0 Answers0