Binder structure --> MMD: no # headings?

This issue is directly related to the problem described by another user here Create Section/Subsection based on Scrivener Structure.

It seems that Scrivener for Windows 1.6.1 doesn’t compile the binder structure to correct heading structures in MMD. This is a deal-breaker since MMD in Scrivener becomes useless without this functionality :frowning: Let me give you an example.

I create a new empty project “test” in Scrivener. I add two text documents under Drafts; “Header1” with text “Text1.” and “Header2” with text “Text2”:
binder.png
Then I go to File–>Compile, choose Compile For–>MultiMarkDown (.mmd). In the advanced options I go to Formatting and ensure all titles are checked (note that there’s no hashes in the preview which is strange):
formatting.png
I then press Compile and get the following output:

[code]Header1
Text1.

Header2
Text2.[/code]
This is obviously not correct. There’s no Markdown headings in this document, instead all headings have been turned into normal boldfaced text. In Compile For → MultiMarkDown to LaTeX this ends up as

[code]\textbf{Header1}
Text1.

\textbf{Header2}
Text2.[/code]
In the thread above a fix is mentioned:

I tried this with no luck (as did the original thread author it seems). With the fix Scrivener outputs this in MMD:

[code]# Header1 #

Text1.

# Header2 #

Text2.[/code]
and this in LaTeX:

[code]\textbf{# Header1 #}

Text1.

\textbf{# Header2 #}

Text2.[/code]
So basically I am left with no way to output either MMD or LaTeX that reflects the structure in the binder. I hope a fix is in the works for this bug, or maybe there’s another workaround?I’d love to write MMD in Scrivener, but without this functionality it’s pretty useless.

Thanks, this one had been marked as fixed, and I believe it was for a time, but it looks like the behaviour has reverted. I have re-opened the bug ticket for it. Sorry for this! At the moment it appears you have to manually type in your titles, which I agree is far from ideal.

Thanks. I should probably mention that it works on the OS X version of Scrivener. I just installed it in a VM to test, I don’t have a MAC, so it’s unfortunately not a viable solution for me, but still good to know.

Yeah, it works on the Mac, this is a problem specific to the Windows compile code. It has never actually generated titles correctly, but for a while there we could get around that problem by inserting a carriage return in the suffix to trip the logic into an inverse condition from what it should be.

The problem is, there is a condition where hashes shouldn’t be generated that would make it so you could customise what a title is if you needed to, but the logic is backward so that if you do nothing, there are no hashes. Entering the carriage return is part of what should have tripped it to not insert hashes, but instead it does. Whew. It’s all a bit nuts, but all of that is aside from the fact that I have no idea why asterisks are being generated for titles here. That isn’t in the specifications, and so I’ve re-opened this with a high priority marker.

While using the software in a VM isn’t viable, perhaps just using it for running compile may be, for now.