Markdown to odt Crashes

I wrote a document using basic Markdown. I’d like to compile to both .docx and .tex.
Compiled to .docx, except that crosshatches are still crosshatches and not converted into sections; highlighted words are enclosed by asterisks and are not italicized.
Tried Multimarkdown to .odt as .odt to .docx is trivial. Unfortunately the program hung and I had to force quit the program. Twice.
Tried pandoc to Microsoft Word and got the error message below. Yes, Pandoc is installed; panda -v yields
Any ideas?[attachment=0]Screen Shot 2021-03-29 at 9.46.34 PM.png[/attachment][attachment=1]Screen Shot 2021-03-29 at 9.51.14 PM.png[/attachment]

Update: I compiled to rtf, then opened the document in Libreoffice and saved it as a txt file.
I can now convert the text file using pandoc on the command line, outside of Scrivener.
That doesn’t solve my .tex problem, but it gets me closer.
And I wonder why I can’t go directly from a document written in Markdown inside Scrivener to the two formats.
Query whether I can convert the Scrivener document into its word processing engine format from Markdown, so that instead of highlight I’d get highlight.

I would try upgrading Pandoc first, as 1.19 is pretty old at this point in time. I’m currently using 2.13 on the Mac, and it is compiling cleanly. If you can’t upgrade it for some reason, maybe switch to using the Processing pane to supply your own command-line options.

I can’t reproduce the MMD→ODT hang either, could be something content specific. Does a one-word blank project also hang?

I created a one page project:




The compile settings were: Basic MultiMarkdown, Multimarkdown to ODT.
Scrivener compiled a one page document of three words:


So a) it didn’t crash, but b) there are no headings. The document that crashed was 135,000 words long, text only with no footnotes or Markdown formatting other than sections (##) and italics (* *).

The document is not particularly large for Scrivener. I let it compile for 20 minutes before force-closing, that should have been enough time.

Any other ideas and thank you.

Sorry, I have no idea how that would be the natural result of a vanilla test like that. I would presume that if you compile to straight .md, to see what Scrivener itself is doing, all would be fine though. It would perhaps be informative to examine what would happen if that file is then converted to .fodt on the command line. We would expect to see (showing only the office:text element in excerpt):

<text:h text:outline-level=“1”><text:bookmark text:name=“one”/>One</text:h>

<text:h text:outline-level=“2”><text:bookmark text:name=“two”/>Two</text:h>

<text:h text:outline-level=“3”><text:bookmark text:name=“three”/>Three</text:h>

I.e. properly outlined, styled and bookmarked headings.

Overall it sounds to me like there is some kind of configuration issue with the MMD installation you have. Maybe try setting it aside and using Scrivener’s embedded version, to see if that is the source of the problem.

I didn’t install any plug-ins for Scrivener and am writing Markdown in the editor as if it were plain text.

Fair enough, I’m not aware of any plug-ins for Scrivener at that. But how did the test go when compiling to plain MultiMarkdown and then using MMD on the command-line to generate the .odt file, was the result the same?

I didn’t install any plug-ins. I didn’t even know there was a Multimarkdown plugin that could be installed.

There aren’t any plug-ins, that I’m aware of, nor any capability for there to be any. I’m asking about the actual software itself, MultiMarkdown. If you don’t have a copy of that installed, that is fine, you can use the copy that is embedded in Scrivener. On Terminal, use:

/Applications/ -t odt -o ~/Desktop/test.odt ~/Desktop/

So obviously you will need to change the path so that it points to the .md file you compiled, and you can adjust the “-o” (output) path and filename as well if you want. The rest should be as typed.

But again, first, open the .md file and examine it by eye in a text editor to see if Scrivener is producing correct Markdown.

Scrivener is compiling to Markdown, insofar as I get a plain text file with an *.md extension and the Markdown tags are present,

## For a Section Heading

When text should be in italics.

But I couldn’t get these to be converted to Word/Open Office sections or italics when compiling to .docx and .odt hung.

I was able to use the compiled .md file and separately, using Pandoc, convert successfully to .docx and .odt with the Markdown tags properly converted.

But I don’t know why Scrivener doesn’t do this. The file isn’t that big and only contains text and basic (i.e. no code blocks) Markdown.

Does this refer to the main project, rather than the test? You can compile your work to .md, and use MultiMarkdown on the command line to create a proper ODT file? If so, that’s at least a way to get things rolling while the nature of the problem is discovered.

I’d try installing your own copy of MultiMarkdown. There is a .pkg installer, so it’s a piece of cake. If you’re using the direct-sale version of Scrivener, it will pick up on that and use it instead, so you don’t even have to change anything, just restart the software probably.

First try the simple test, and see if the formatting comes out correct. Then try the larger project.

As you say, it’s probably not the size of it, or even what you type into the editor. I regularly compile the ~250k user manual project and I’m quite sure it pushes all edges of the compiler to the limits in ways few projects do.

There may very well be ways to set things up that would cause a crash though. Playing with your compile settings, disabling options you’ve changed, and starting from the “Basic MultiMarkdown” or OpenOffice-specific format, are all things worth testing.