Educate me on MMD and import into Scrivener

I am an academic and while I greatly enjoy writing in Scrivener, the reality is that I need to exchange manuscripts with collaborators using other software. The minimal requirements for me are:
I want to be able to export a structured document and have this structure survive treatment in other word processors. The actual input from my co-authors comes in very basic form at my request: They add their own contribution to my text in another colour and indicate deletions by using strikethrough text markers or whatever they please. All in all, this is a minimallistic and primitive markup system that over the years I have found to be far better than the dreaded sidenote, comment and track changes feature in Word (yuck, if there were prizes to things that sound like improvement and yet are disastrous to my workflow, the first prize I would award to these features in Word, the traveling library in Endnote being a close second). More importantly, these contributions will survive re-import into Scrivener as well.

While I can export a manuscript, the structure I have given it in Scrivener is all lost. Chapters, subsections etc. all appear in a single stream of rich text. The visual appearance of headings is retained but when I re-import into Scrivener I need to start over and assign text passages chapter status or whatever I wnat them to be.

Would it in principle be possible to reverse the logic of MMD Export and use some primitive markup for the Import into Scrivener? An example:
A scientific paper I am writing now consists of the ususal sections: Title, abstract, introduction, Mat&Met, Results, discusssion, acknowledgements, figures, tables, references
plus subsections thereof.

Ideally, I’d precede each of these sections and subsections with simple MMD code in plain ASCII (so that nothing happens to them during export and in other word processors) and Scrivener would automatically divide the document into hierarchical portions upon re-import using the text until the following line break as section title.
This code could be as simple as [] for the sections and [.] for all the sub-sections. (I don’t claim to be an MMD expert so feel free to correct me here)

Is that too radical a departure from a RTF concept for you, Keith? While it sounds a lot like style-based workflow, the problem is that all other widely used processors hide this information in their proprietary formats and so this information is only viable as long all collaborators use the same software. Only MS Word gets away with it because it is the de facto standard.

This would make collaborating and exchanging manuscripts so much easier.


Not too much time for a reply right now (off to T-Day festivities), but it sounds like the import and export features of MMD are what you need to experiment. Sounds like you need to read more about MMD and try it out, as it should do most of what you need (if not all) out of the box.

As long as your document structure is “logical,” in the sense that it can be expressed in a hierarchy tree like the Binder, you should have no problems importing an MMD file into Scrivener. Even in cases where you do have illogical structuring, it will try and make the best guess as to what you want.

To export properly from Scrivener, you’ll have to make a decision on how you wish to use its three document types. In the application itself, there is no difference between them. They all act identical to one another, save but for the icon and their context. The two primary types are Folders and Documents. The third type is created when you place articles beneath a Document, as if it were a Folder – then it becomes a Document Stack. Currently the exporter does not distinguish between Documents and Document Stacks, but in future betas it will. The exporter is pretty much the only place where things are handled differently. The only exception that I can think of off the top of my head is if you have the Navigation preferences set to treat Folders and Document Stacks differently when clicking on them in the Binder.

So the first decision is if you want to have structural elements separate from textual elements, or if you want them to be combined. If you want Folders to strictly represent structure, and not have Documents be represented as sections or sub-sections; as opposed to the Binder exporting literally. The inverse can also be assigned, where Documents define all of the structure and Folders do not. It is really entirely up to you. The key is to toggle “Titles” on in the Exporter, as you’ve already experimented with in the RTF format. When using the MMD exporters, titles get exported using MMD structural syntax to define the depth of the exported item in the hierarchy.

+ Draft + Chapter 1 - Section 1.1 - Section 2.2



Chapter 1

Section 1.1

Section 1.2 ##[/code]

Though of course, you would not want to actually number them. Section depth is simply a matter of how many hashes precede the title itself. So even sub-sub-sub-sectioning is possible. :slight_smile:

Your colleagues then edit the plain text files; make their revisions and comments, and so on. Upon receipt of the file, simply use File/Import/MultiMarkdown, and the MMD will be converted into Binder hierarchy just as you exported it. The structure is now fluid again and you can edit it in the Binder. The next time you export, those changes will be represented. This is the advantage over actually embedding a syntax itself into your Scrivener project text. Let the exporter take care of that, unless you have some special situation that a logical tree cannot express (or, as in the case with the FAQ, the titles are too long or complex to fit into Scrivener’s title field). In the current beta, you can even over-ride Scrivener’s structuring during export, on a single document basis by toggling the “Preserve Formatting” flag in the document’s meta-data. This is useful if you do want full structuring during export, but wish to keep all of your footnotes or glossary entries together in one document, separate from the outlined structure.

That aside, you might find colour and strikethrough in particular to be a bit troublesome with MMD. Neither is directly supported (unless you do not have an aversion to HTML tags in your document), and in any case they will not magically turn into RTF format when you import into Scrivener. Scrivener does support a minimal amount of bold and italic import, but no style to syntax export is supported.

You might wish to have a look at what you can do with MMD, to see if there is something that appeals to you. The realm of collaborative or even solitary editing and commentation seems to be one area that is a bit difficult in MMD by itself. I think this is due to its purpose of providing an easy to read and type method of creating otherwise complex LaTeX or XHTML documents. Scrivener has more capacity for this with basic rich text, named highlights, and annotations. Unfortunately, you cannot do a “hybrid” import where an RTF file is scanned for MMD style structural markers – structure is reconstructed, and formatting is retained.

Fletcher and Amber,

I don’t know why but I had completely missed the import of MMD files and how Scrivener’s binder hierarchies interact with the import, thank you very much for pointing this out to me.:blush:

I’m off to catch up on the capabilities of MMD and Scrivener now, thanks to you two I have some reading to do.

Amber, it almot looks like you can read my mind, I was indeed thinking I could get the best of the two worlds by MMD’ing RTF files. But before I’ll ask more specific questions on how I could circumvent the problems arising from collaborating with others let me fill the biggest gaps in my knowledge first.

Thanks for taking the time to reply, it looks promising indeed.

I admit that reading Amber’s reply I could not help but feel like the 7-year old who had sneaked in the kitchen to grab the tin can full of sweets and hoped to get away with it, only to run into someone looking at him for a little while already.

Of course I had hoped to mix RTF and MMD which would be ideal for what I am trying to accomplish. MMD to give me the structure in an exportable (and importable!) form and RTF to facilitate collaborative writing. How did you know I was driving at it? Spooky :smiley:

This would give me the best of the two worlds, I could exchange manuscripts with people using Word (of all things, but I am trying to cover the worst case scenario) without having to re-define my structure upon re-import.

From what I have been able to gather, MMD would give me just about everything I’d need to write my papers except I would have to ask my collaborators to refrain from using any RTF related formatting.

Alternatively, I’d stick with Scrivener and RTF and simply live with the fact that I’d need to split the document everytime I’d receive somebody else’s comment. Perhaps less elegant but workable. Certainly more enjoyable than having to use Word.

I haven’t decided yet but I have the feeling that I would be asking too much from my rather Word-centric environment. It is not that everybody in Science is so incredibly fond of Word, but most major journals expect you to submit your manuscripts in Word format, many expressedly exclude pdf, Latex and the like. RTF may just be a little closer to being acceptable.

Many thanks for responding!

Some ideas:

  1. If you and your collaborators could come up with a system that involves the use of bold or italics, then you might still have a clean way of doing what you want. Scrivener has a menu function that will convert RTF bold and italics into MMD syntax. It does not do this automatically, because in some complex scenarios, it can cause problems. Naturally, if your document uses either of these as actual formatting, then it would become more difficult to do that.

  2. Abandon the use of MMD for this idea and use Scrivener’s Export Files feature. This function will create a nearly mirror image of your Binder as a file and folder structure. It would be a perfect image except in that it creates “side-car” RTF files for folders (since Scrivener can hold text in its containers, unlike Finder.) They would have to make their changes as a series of files instead of one big file, but since everything is titled the way it appears in the outline, it almost works more like a table of contents. To bring their changes back in, simple drag the top level folder back into the Binder and the structure will be retained. You will have to manually re-insert any folder text used. In this workflow, I would recommend not using folders as text containers, for simplicity.

One nice thing about this method is that you actually still can use MMD if you want. The no MMD+RTF limitation is only relevant to imports. From inside of Scrivener, you can mix the two freely. In fact, I do just that. I use the RTF features of Scrivener to make non-publication markings to my text. It is like having the ability to put proofreading marks in your document without fear of them being exported since the MMD exporter completely ignores format.

However, given your statement about your publisher requiring Word documents, that might not be the best road to take, as MMD’s RTF export is far less powerful than Scrivener’s RTF exporter.

And on to that… as long as you have a copy of word, you needn’t fear the RTF exporter in Scrivener. It does a lot more than the average RTF generator on the Mac. Importing these RTFs into word and then exporting as a Word document would be quite fine for most purposes.

It is a shame that your collegues cannot also use Scrivener, because it itself has quite a few tools which would be excellent for collaboration. Snapshots, annotations, a dedicated note taking area attached to each document, labelling, and so forth. These are all features you’ll have to do without for the most part, since import and export is not optimised to retain these various data structures in their original form. Labels can be expressed in the export, but taking them back in does not turn them back into labels. Anyway, hopefully you were able to get some ideas out of this.

I apologise for reading your mind, earlier. That was entirely unethical. :wink:

I’m not sure, but wouldn’t it be possible to export as RTF files, then merge them into one file using AppleScript and TextEdit? This way, others wouldn’t have to open and edit multiple files. In order to get the changes back into Scrivener, you would have to split the single file into multiple RTF files again, preserving the original folder/file structure. Maybe you can do this by automatically including separator lines such as “----- [filename] - do not change this line! ----” with AppleScript after each appended RTF and afterwards splitting and naming them according to the seperator lines. Thus, as long as nobody touches these lines, everything will be preserved. That’s the idea, anyway. I’m not firm with AppleScript (nor with the Scrivener’s export feature), so I don’t know if this is possible. But maybe somebody else can figure out how to do this with some scripting?