How can I convert my book to MultiMarkdown (MMD)?

User avatar
kaybaird
Posts: 19
Joined: Mon May 31, 2010 11:47 am
Contact:

Fri May 20, 2016 5:51 pm Post

The book I’m writing in Scrivener has until now been composed in rich text — with italics, curly quotation marks, and block quotes.

Now I need to convert it to MultiMarkdown. There appears to be no simple way to accomplish this. For example, I must replace each instance of italics with *text*.

The first part I need to do has 20+ documents (22,000 words).

Does anyone have an automated technique for converting rich text to MultiMarkdown?

Br
Briar Kit
Posts: 1788
Joined: Thu Apr 04, 2013 9:04 am
Platform: Mac

Fri May 20, 2016 7:03 pm Post

Hi

This is (AFAIK) as much as you can do automatically…

1. Quotes to Straight Quotes

2. Bold and Italics to MMD

mmd.png


Best

Briar Kit
Account closed January 2017

User avatar
AmberV
Posts: 20613
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Santiago de Compostela, Galiza
Contact:

Fri May 20, 2016 11:38 pm Post

You can disregard typographic punctuation if you please, as the compiler has a few options for making text more ASCII-friendly, in the Transformations pane. If you prefer looking at typographically correct text while writing, those options should do. And even beyond that, you can get away with Unicode these days for most things except LaTeX, unless you're planning on adopting XeTeX (which is not a bad idea if you want to use system fonts).

There is one other thing that you'll likely need to do: search and replace single carriage returns between paragraphs with two. It's just how you write with systems like these, since plain-text files without a clear empty line between paragraphs are super ugly to read. But even on this score we have a tool that can handle this part of the job for you---presuming you use enough paragraph spacing between paragraphs to mathematically be considered over half of an empty line. I.e. if you have 14pt lines, then eight or more points of empty space after the paragraph can be converted to a literal empty line in plain-text with again the use of the Transformations compile pane, this time with the whitespace conversion tool. For MMD I do not recommend converting indents to spaces unless you wish to use Scrivener's ruler for code blocks and obviously not as a paragraph marker.

You could use a blank project to use these tools to convert your work to MMD, compiling with these options, then import the cleaned content into the main project, or you could go on using the features to allow for a more "rich text-ish" writing experience.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

User avatar
kaybaird
Posts: 19
Joined: Mon May 31, 2010 11:47 am
Contact:

Sat May 21, 2016 3:45 pm Post

Thank you Briar Kit! I thought I had examined the rich repertoire of controls Scrivener offers, but I did miss those two (or three). It's a start.

Br
Briar Kit
Posts: 1788
Joined: Thu Apr 04, 2013 9:04 am
Platform: Mac

Sat May 21, 2016 7:14 pm Post

Welcome.

Happy writing

Best

Briar Kit
Account closed January 2017

User avatar
kaybaird
Posts: 19
Joined: Mon May 31, 2010 11:47 am
Contact:

Tue Jun 07, 2016 10:32 am Post

Thank you, Ioa, for your detailed suggestions. I appreciate your help.

mi
mitchellm
Posts: 105
Joined: Tue Jan 20, 2009 2:10 pm

Mon Jul 18, 2016 11:33 am Post

This is a late reply, and you may not be interested, but TextSoap can be a fantastic companion for doing bulk changes to text. It's very stable, and useful for many things. I have to do text cleanup on a fairly regular basis (some similar to your description, other times for very different needs) and TextSoap is my "go to" fixer. More here: https://www.unmarked.com/textsoap/