b) nor can I use a template file, which is in the .local/share/Users/[username]/.local/share/pandoc/templates folder even when I run pandoc in a terminal window.
Ideally I want to be able to get scrivener to compile a word document, in the format specified by my template.
You need a “-t docx” somewhere in there, to specify which format to convert to. The default when no argument is supplied is to use HTML.
And for the template file, try putting it into ~/.pandoc as a file called “reference.docx”. That’s the setup I use, and when I compile from Scrivener the output conforms to that setup with no further configuration.
It sounds like pandocomatic cannot find the pandocomatic.yaml file it needs or cannot read your metadata sent from Scrivener (due to a typo or other problem), and defaults to the Pandoc default to output HTML. Using pandocomatic you don’t specify the output format on the commandline, as that is specified in the pandocomatic.yaml file for the template you are referencing in Scrivener’s metadata…
To really troubleshoot, look at the scrivomatic.log file that is generated upon compile; send it to me or paste it here…
I assume that is a typo, but the current default Pandoc data directory is /Users/[username]/.local/share/pandoc/
Yes, so pandocomatic is running fine, but it cannot parse the metadata to extract the template name so is using the default. Can you show us the top part of your compiled MD file, I suspect there is an issue there. Problems with metadata can occur when, e.g. Scrivener auto capitalises “pandocomatic” to become “Pandocomatic”, or you use a colon in the title without quoting etc. I’m making a list of these potential issues with metadata here:
… running pandocomatic, please wait …
===------ COMMAND OUTPUT: ------===
:: Running: /Users/immanuelkoks/.rbenv/shims/pandocomatic --debug Chapter\ 2\ scrivomatic.md
::: pandoc
::: [WARNING] Note with key ‘fn1’ defined at line 134 column 1 but not used.
::: [WARNING] Note with key ‘fn10’ defined at line 152 column 1 but not used.
::: [WARNING] Note with key ‘fn11’ defined at line 154 column 1 but not used.
::: [WARNING] Note with key ‘fn12’ defined at line 156 column 1 but not used.
::: [WARNING] Note with key ‘fn13’ defined at line 158 column 1 but not used.
::: [WARNING] Note with key ‘fn14’ defined at line 160 column 1 but not used.
::: [WARNING] Note with key ‘fn15’ defined at line 162 column 1 but not used.
::: [WARNING] Note with key ‘fn16’ defined at line 164 column 1 but not used.
::: [WARNING] Note with key ‘fn17’ defined at line 166 column 1 but not used.
::: [WARNING] Note with key ‘fn18’ defined at line 168 column 1 but not used.
::: [WARNING] Note with key ‘fn19’ defined at line 170 column 1 but not used.
::: [WARNING] Note with key ‘fn2’ defined at line 136 column 1 but not used.
::: [WARNING] Note with key ‘fn20’ defined at line 172 column 1 but not used.
::: [WARNING] Note with key ‘fn21’ defined at line 174 column 1 but not used.
::: [WARNING] Note with key ‘fn22’ defined at line 176 column 1 but not used.
::: [WARNING] Note with key ‘fn23’ defined at line 178 column 1 but not used.
::: [WARNING] Note with key ‘fn24’ defined at line 180 column 1 but not used.
::: [WARNING] Note with key ‘fn25’ defined at line 182 column 1 but not used.
::: [WARNING] Note with key ‘fn26’ defined at line 184 column 1 but not used.
::: [WARNING] Note with key ‘fn27’ defined at line 186 column 1 but not used.
::: [WARNING] Note with key ‘fn28’ defined at line 188 column 1 but not used.
::: [WARNING] Note with key ‘fn29’ defined at line 190 column 1 but not used.
::: [WARNING] Note with key ‘fn3’ defined at line 138 column 1 but not used.
::: [WARNING] Note with key ‘fn30’ defined at line 192 column 1 but not used.
::: [WARNING] Note with key ‘fn31’ defined at line 194 column 1 but not used.
::: [WARNING] Note with key ‘fn32’ defined at line 196 column 1 but not used.
::: [WARNING] Note with key ‘fn33’ defined at line 198 column 1 but not used.
::: [WARNING] Note with key ‘fn34’ defined at line 200 column 1 but not used.
::: [WARNING] Note with key ‘fn35’ defined at line 202 column 1 but not used.
::: [WARNING] Note with key ‘fn36’ defined at line 204 column 1 but not used.
::: [WARNING] Note with key ‘fn37’ defined at line 206 column 1 but not used.
::: [WARNING] Note with key ‘fn4’ defined at line 140 column 1 but not used.
::: [WARNING] Note with key ‘fn5’ defined at line 142 column 1 but not used.
::: [WARNING] Note with key ‘fn6’ defined at line 144 column 1 but not used.
::: [WARNING] Note with key ‘fn7’ defined at line 146 column 1 but not used.
::: [WARNING] Note with key ‘fn8’ defined at line 148 column 1 but not used.
::: [WARNING] Note with key ‘fn9’ defined at line 150 column 1 but not used.
::: Pandocomatic needed 0.1 seconds to convert ‘/Users/immanuelkoks/Syncplicity Folders/PhD/Scrivener/drafts for reading/ chapter 2/Chapter 2 scrivomatic.md/Chapter 2 scrivomatic.md’ to ‘Chapter 2 scrivomatic.html’.
:: exit status: pid 86879 exit 0[/code]
Unfortunately I am still only getting an html file, and not docx file. I really need the latter. However, I think I am getting closer with your help