Help needed with basic steps to compile through Pandoc into .docx and .odt

I understand this now. I obtained Pandoc’s ODT template with this pandoc -D odt > template.xml. I edited it to add Affiliation and Abstract:

$endfor$
$if(affiliation)$
<text:p text:style-name="Affiliation">$affiliation$</text:p>
$endif$
$if(date)$
<text:p text:style-name="Date">$date$</text:p>
$endif$
$if(abstract)$
<text:p text:style-name="Abstract">$abstract$</text:p>
$endif$

Now I call both the reference document and the template, alongside all the other stuff:

--verbose -s -f markdown+smart --reference-doc="C:\Users\xxx\AppData\Roaming\pandoc\handout-en.odt" --template=handout-odt-en.xml  --lua-filter=zotero.lua --output <$outputname>.odt

And both the Affiliation and the Abstract content appear with their respective styles. It is working, thanks!

I have a question. --template=xxx.xml works without providing an absolute path. How about --reference-doc? Is there a place I should store it to avoid having to use an absolute path?

I will definitely try this later; abstracts are indeed an essential piece of text in their own right.


So after a lot of trial and error, and with a strong feeling that the learning curve is too steep, I have managed to understand how it works and make it work (so far). Would it not be meaningful to have a pinned wiki thread in the forum that explains, step by step, the basic usage and concepts of Pandoc (such as reference and template) for Scrivener users?