MarkDown
Published | Actual | |
---|---|---|
Birmingham New Street | 07:10 | 07:10 |
London Euston | 08:30 | 08:33 |
I was speaking to one of my current colleagues the other day about writing documents and about how we approach it. For most cases my instinct has been to write plain text in a text editor, this is simple, clean and means that I can concentrate on the content rather than how it looks. If I wanted to format at the same time then I would mark the text up using HTML but this means that there is a temptation to prettify rather then write. My colleague told me that, like me, he writes plain text and faced similar frustrations until he started using MarkDown.
MarkDown allows a text document to be annotated in a way which, when processed, creates a well formatted and valid HTML document. There are other packages that I have used in the past, like LaTeX and Xilize, that do a similar job to MarkDown but I have found them to be too feature rich. This is a problem as instead of writing my inquisitive mind becomes distracted by trying to use the different features, this is where MarkDown is ideal as it has a small set of mark up. Another benefit of using MarkDown over other systems and HTML is that the actual mark-up syntax is small meaning a MarkDown document is still readable in raw format.
MarkDown Example
MarkDown source…
# Level 1 Heading #
This is some MarkDown with *italic* and **bold** text
## Level 2 heading ##
This section contains some `text that is source code related` and also a [link to the BBC](http://www.bbc.co.uk)
Generated HTML…
<pre><code>
<h1>Level 1 Heading</h1>
<p>
This is some MarkDown with <em>italic</em> and <strong>bold</strong> text
</p>
<h2>Level 2 heading</h2>
<p>
This section contains some <code>text that is source code related</code> and also a <a href=&quot;http://www.bbc.co.uk&quot;>link to the BBC</a>
</p>
</code></pre>
How it actually looks…
Level 1 Heading
This is some MarkDown with italic and bold text
Level 2 heading
This section contains some text that is source code related
and also a link to the BBC
As you can see, the MarkDown script is cleaner and requires less keystrokes to type. To actually turn MarkDown into an output document you will need to install a transformer program; as previously posted, I use jEdit to write my text documents, this has a handy plug-in that allows the MarkDown text to be previewed in a browser or transformed into HTML for saving.
Another tool I use for MarkDown editing on my ipad is NOCS, this is a text editor that displays the document as rendered MarkDown by default but reverts to raw source for editing, it also integrates with Dropbox so that I can easily pick up my MarkDown documents wherever I am.
The final option for MarkDown processing is to install a tool like MultiMarkDown, this can be used from the command line to generate output in a number of different formats; MultiMarkDown is a superset of MarkDown and introduces extra features.