Multimarkdown to PDF

As I begin to write longer pieces again, after too long a hiatus, I find myself again not wanting to trust my work entirely to Word. I am not a knee-jerk Microsoft hater, or even one to complain about the bloat in Word. Word is great for any number of things, but it’s not so great at keeping things simple and it’s not so great at being able to have multiple outputs from a single file.

Working with a text editor like [Textmate][tm] has shown me how working with plain text formatted using something like Fletcher Penney’s [Multimarkdown][mmd] means I can not only output to HTML, RTF, DOC, and even PDF, but that I can do so using my own style sheets. (And, yes, I fiddled a bit over the last day or two with going through LaTeX, which produces beautiful output but is far too complicated for me.) The ability to produce PDF output is especially welcome, and the fact that I finally got not only an install of [PrinceXML][pxml] working but I also got a working adaptation of a Textmate command to automate the process is a *huge* step forward for me.

Again with thanks to Fletcher Penney, I adapted the syntax for the convert to Word DOC:

# Process the MultiMarkdowndocument and convert to PDF using PrinceXML

# first figure out a name for the result

#cd “${TM_MULTIMARKDOWN_PATH:-~/Library/Application Support/MultiMarkdown}”
cd “${TM_MULTIMARKDOWN_PATH:-$HOME/Library/Application Support/MultiMarkdown}”
cd bin

./ > “$DST.html”

# Get all this to Prince
require_cmd prince
prince “$DST.html”

open “$DST.pdf”

[tm]: “Home of Textmate”
[mmd]: “Multimarkdown’s Home Page”

Leave a Reply