Guide To MultiMarkdown and Scrivener

First, everything related to MMD on the site fletcher.freeshell.org has been moved to the new(as of 1 1/2 years ago) site:

fletcherpenney.net/multimarkdown/

The site used to be a wiki, which would allow for user submitted contributions, but very few people actually did this. The new site is run by Movable Type, which does allow for user-comments.

There is a FAQ section, and I will add any user contribution to the page here - you can submit as a comment, or as an email to me.

fletcherpenney.net/multimarkdown/faq/

F-

With the announcement of ePub support in Scrivener 2.0, it occurs to me that it would be attractive to be able to use MultiMarkdown in Scrivener, and be able to export directly to ePub as well. However, I’m wondering whether this two-stage workflow would be possible, or whether it’s either Export->ePub or Compile->MultiMarkdown->HTML but not both.

This is actually something we want to have available post 2.0. The details haven’t been hashed out yet, but once the mayhem of 2.0 and Windows beta dies down a bit, some form of MMD->ePub would be a nice addition to the available methods. As for right now, you could look into some kind of system that will take an XHTML file with headers and turn it into an ePub book, that is the nice thing about MMD’s HTML files, they are pretty low-profile and “good spec” with clear header usage and such, so tools that take XHTML files to convert them into ePub ought to be able to interface with them. Perhaps Calibre has a function for this?

A better way of doing this straight out of Scrivener may or may not be feasible. It’s just a pipe dream at the moment.

Calibre is great! I use the command-line tools all the time to create the mobi format that Amazon in its infinite wisdom chose for the Kindle. :wink:

Just make sure that you add the correct XPath expressions to generate the table of contents:

ebook-convert input.html output.epub --level1-toc //h:h1 --level2-toc //h:h2 --level3-toc //h:h3

This can also be done in Calibre’s confusing GUI, but I much more prefer the command-line version. If you wish, you can also add a cover page from an image in the same folder :

ebook-convert input.html output.epub --level1-toc //h:h1 --level2-toc //h:h2 --level3-toc //h:h3 --cover cover.jpg

A note of warning, the id-tags that MMD automatically adds to the HTML headings will likely confuse Calibre. The best practice is to remove them altogeher from MMDs output with a custom XSLT file:

[code]<?xml version='1.0' encoding='utf-8'?>

<xsl:stylesheet
xmlns:xsl=“XSLT Namespace
xmlns:xhtml=“XHTML namespace
xmlns=“XHTML namespace
exclude-result-prefixes=“xhtml xsl”
version=“1.0”>

<xsl:output method='xml' version="1.0" encoding='utf-8' doctype-public="-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" doctype-system="http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd" indent="no"/>

<xsl:template match="@*|node()">
	<xsl:copy>
		<xsl:apply-templates select="@*|node()"/>
	</xsl:copy>
</xsl:template>

<xsl:template match="xhtml:h1|xhtml:h2|xhtml:h3|xhtml:h4|xhtml:h5|xhtml:h6">
	<xsl:copy>
		<xsl:apply-templates select="*|node()"/>
	</xsl:copy>
</xsl:template>

</xsl:stylesheet>[/code]

I know this is an old post, but I was wanting to read the guide (unless it’s something available elsewhere and I just haven’t found it).

I keep getting…

I’m using Safari on Mac OS X, so what’s a “real” browser? Something like Lynx? :smiley:

That’s just his “404” page I think. It’s not detecting browsers, just stating that IE sucks in all cases, no matter what the condition. :slight_smile:

Here is the link you want:

fletcherpenney.net/2010/01/sampl … n_document

Does MultiMarkDown 3 work ok in the current release of Scrivener for WINDOWS??
Do I need to install the MMD 3 files from your site or already included in the current Scrivener for Windows release?

Thank you ! I love the image features!

Soram

Yes, in fact the current release of Scrivener as MMD 4 embedded in it. There is no need to install anything. Everything is provided for you in the software. The only external things you’ll need are a LaTeX distribution if you intend to use that typesetting engine.

Thank you very much for the quick reply!

S