Using MultiMarkdown with Google Docs

Google Docs offers some interesting features when combined with MultiMarkdown. This is a guide to using Google Docs with MultiMarkdown

NOTE

This page is in progress, and the files referenced have not been released yet. It`s coming soon, but I wanted to get things lined up first.

Importing a MMD document into Google Docs

The easiest way to convert load a MultiMarkdown document into Google Docs is to import the HTML file produced by MMD into Google Docs via the “Upload” feature. Be sure to use “.html” instead of “.xhtml” as the file extension.

Converting Footnotes to the Google Docs Format

Google uses its own XHTML syntax for footnotes. I have created an XSLT file, xhtml-google-docs.xslt that converts footnotes and citations into Google footnotes syntax. By using this XSLT file, MMD footnotes and citations will be converted into the Google syntax. This will not convert BibTeX citations, however.

This will allow footnotes to work properly (with the exception that Google footnotes cannot contain <p> tags and the like). Also, Google Docs do not support citations directly. Instead, the XSLT converts citations into footnotes for the time being. This means they won’t be converted to anything useful when exported to Word or OpenDocument.

Additionally, links within the document work properly, and are preserved across export formats.

Note: Footnotes are exported into Word and OpenOffice documents, however it appears that they end up as formatted text, not as true footnotes that can be manipulated, renumbered, etc. For now, however, it seems to be the best option.

Using Google Documents to Convert To Other Formats

Previously, the only way to go from MMD to Word was to use Apple’s textutil command. Google Docs has the ability to export as Word, OpenOffice, PDF, and RTF. Once you get your MMD document loaded into Google Docs as HTML, you can then download it in any of the other formats. This will work on any operating system, and produces better results than Apple’s tools and includes images.

In short, this is far superior to the previous approach!

Sample MultiMarkdown Document

You can view the sample document as a Google Doc online. It does not show the footnotes inline - instead, they are displayed at the bottom of the page.

TO DO

  • continue to improve footnote and citation handling
  • release update to MMD, TextMate Bundle, and Sample Document for this