Compiling markdown creates .MD FILE in some cases, but a FOLDER in other cases

I have absolutely no idea why, but when I compile an .MD file in scrivener, it will create an .MD file in one case, but a folder in another case. I literally change no parameters, just changing the output folder on my desktop. One is named workflow_mmd and another is named workflow_mmd2. When I select for the markdown folder to output into workflow_mmd folder, it creates just an .MD file. When I select for the markdown folder to output into workflow_mmd2 folder, it creates an .MD folder with the .MD file in it. This is frustrating because I need for Scrivomatic to read the pandomatic.yaml file in the folder, but it can’t do that if Scrivener creates another folder by itself. All files in workflow_mmd and workflow_mmd2 folders are exactly the same (I copied and pasted them). All I do is select the output folder differently, and Scrivener does something different based on the file I selected.

As you probably surmised in the other thread, _mmd and -mmd are hard-coded into Scrivener so that it retains the existing folder structure. I’d also prefer a compile setting for this, but it isn’t a major issue for me and I don’t mind the suffix as a solution.

Off-topic, but it is better in the long-term if you move your pandocomatic.yaml and other pandoc files to the Pandoc data folder rather than the compile folder. I use the compile folder in my workflow example just so you can see all the moving parts more easily…

Thanks for letting me know!! Yeah the _mmd is not exactly preferred as I’m sharing with my PIs my manuscripts and grants that I compile directly to a shared google drive folder. One already sorta mentioned why no one is allowed to change our folder name to without the mmd. It’s okay, even though it’s not exactly ‘clean’ looking as I try to keep it as simple as possible since one of them have never heard of Latex before.

As for the side note, where is the Pandoc data folder you refer to? Is it ~/.local/share/pandoc? I have my pandocomatic.yaml there too, but if I don’t have a copy of it in my compile folder, my Scrivomatic.log outputs the error “RETURN non-zero value,” I’m guessing because I don’t know where the default pointer location is to store it in the first place. (Sorry I am a little new to Pandoc and markdown, as I come by way of Rmarkdown for years and needed a better system for purely academic writing as I go deeper into my PhD years).

And one last question about two column .docx output since one thread from 2017 doesn’t really answer how to do this. How can I automatically have Scrivomatic make a two column word document? I made my templates/custom.docx two columns, but it seems to not work on compiling. I just highlighted my template document and adjusted it to have two columns, but not sure how to put two columns into the styles pane, and if that is the issue or something else.

Also, thanks so much for making Scrivomatic. It seems you put a lot of time and effort into making this, and I’m sure you’re very invested in it, so thanks again! I think I found it on some other random forum site (about bookends or something) and I believe you linked to and suggested using it.

Yes, the new location is ~/.local/share/pandoc although the older ~/.pandoc is also still supported. If you are getting an error it is probably because you are specifying it using the -y option in the compile post-processing pane, something like:

"<$inputfile>" -l -v -y "pandocomatic.yaml" 2>&1 >>scrivomatic.log

You can simply remove it, then it will use the version in the pandoc data folder.

"<$inputfile>" -l -v 2>&1 >>scrivomatic.log

I do not know how to support two column templates in Word, Pandoc doesn’t support it directly so it is up to the template to do it. DOCX templates are less flexible, and probably wherever the column setting is stored in a word doc is not compatible with how Pandoc uses reference docx files. But you could add an issue to the Pandoc github tracker, or ask on the pandoc google group; people are generally very helpful, and if anyone knows how to do it, it is they! It may be possible to write a post-processing script to edit the docx, you’d need to find where this info is stored, then edit the zipped XML of the docx file?

Awesome, removing -y “pandocomatic.yaml” worked!

And yeah I suspected it had to do with how two columns is stored in the word template format. Thanks for all your help!