29 May 2006
When I first came across Markdown, I loved the way that I could write simple, readable markup, which I could then easily convert to HTML with a script. It struck me at the time that since what Markdown does is to mark structure in a document, and then convert that structure from one form of text to another, it ought to be possible to convert Markdown-formatted text files to other kinds of structured text---like LaTeX.
I was thinking about modifying the Markdown script to do just that, but luckily for me, someone else got there first and made a much more thorough and elegant job of it than I would ever have managed. Fletcher Penney's MultiMarkdown is a wonderful script that can convert Markdown formatted text into HTML, LaTeX and even RTF. In fact, since it converts to valid XHTML first and then applies XSLT parsing to convert into other formats, the world is your bivalved mollusc. LaTeX and RTF are included, but you could use those examples to create an XSLT parser to convert to any other structured format. MultiMarkdown extends Markdown quite a bit by allowing you to add metadata (like a title, author etc.), and also adds support for footnotes, tables and citations, which work pretty well.
TextMate now has support for MultiMarkdown built in to the Markdown bundle, which makes life even easier. It has, of course, always been possible to write a document in plain text and then manually add the LaTeX markup afterwards, but it's a bit of a pain. And if you're not sure what format you'll need to produce the end document in when you start, you can end up doing a lot of fiddling. Now I can just write text in Markdown without worrying about it, and then hit a hotkey to convert the file to HTML, LaTeX or RTF when I'm finished.
2
This looks really neat, but does it do math? For me, LaTeX support without LaTeX's math capability is like paper without a pen.
by Hans @ 30/05/2006 2:06 am • Permalink •
3
<ul> <li>reaches for the paracetamol and passes JB a couple *</li> </ul>
4
Jonathan Briggs and Mr. D.: I know, but it's all part of me: one minute I'm wittering on about blackbirds and the next I'm talking techie. I wouldn't be me if I didn't express it all. Perhaps I should flag this with a little symbol so that you can pass swiftly on without getting a migraine.
Hans: No, it doesn't. I don't mind because I steer clear of maths wherever possible
. However, I did some experimentation, and inline maths enclosed in dollar signs is translated verbatim, just with the dollar signs escaped with a backslash. So it would be possible to add a little script (or perhaps modify the Multimarkdown script itself) to unescape the maths again. Not ideal, but it might be a good trade off.
5
The current version of MultiMarkdown supports math. See . There are also a couple of other implementations of this feature. Some of them are mentioned on the thread as well. Best, Mark
by Mark Eli Kalderon @ 24/06/2006 4:06 pm • Permalink •
1
Oh lordie, back to the techie stuff I don't understand......
by Jonathan Briggs @ 29/05/2006 5:06 pm • Permalink •