In order to specify an output format for pandoc, I must set the -t flag on the command line. I would like to specify which output format I want from inside of my Markdown text file. Is this possible?
For instance, if I wanted pandoc to convert my Markdown text file to a Microsoft Word document, I imagine it might look like this:
mydocument.md:
---
title: Not Just Good, More Good
author: DanielTA
date: 9 September 2022
geometry: margin=1in
mainfont: Comic Neue
fontsize: 12pt
output: docx
---
Document body text...
Then run pandoc mydocument.md which would output mydocument.docx into the same directory.
I tried this and it does not seem to work. I know that many command line variables can be defined in the YAML metablock header, but I am not sure if format/output options are possible to define there.