I could use some more help from the scripting wizards on this forum
I have a postprocessing script that does a few replacements and then calls pandoc in the form:
[code]/bin/sh
perl -pe
s/([[^[]]?@\w+.?])\s+./$1./g; # delete extra space
s/\S\K(?=[[^[]]?@\w+.?])/ /g; # add missing space before citation
… some other things here
’ $1 | pandoc -t latex -o $2
[/code]
This works fine. However, when, instead of latex, I specify
-t docx
, I get an error that “option `-o’ requires an argument FILE”.
I have then tried to specify per the Scrivener manual
-o <$outputname>.docx
in the Arguments field instead of in the script. This runs but it doesn’t produce the Word file. What am I doing wrong?