The joys of markdown are many.
Markdown is a formatting “language” like HTML that you can use to specify the final appearance of text. When you use a “word processor” like Microsoft Word or Openoffice.org Writer, the text you generate is “marked up” (or “marked down” as it were) with formatting codes that determine how the text looks on a screen or when printed out. If you were to look inside a PDF file you would find commands that do this as well. And, a web page is rendered properly in your browser because of formatting codes in HTML. (If you want to see what the HTML guts of this web page look like and you are using Firefox, just hit ctrl-U and a window with the raw HTML coding will pop up and amaze you.)
Markdown is a version of format coding that has three important characteristics:
- It is entirely text based (as are many other formatting systems) so you can enter the raw coding in a text editor, or read a file that is “marked down” in a text editor. This makes it hard to truly “break” a file, the files tend to be small, the files can be handled with a number of different tools, and since the coding is all jumbled up and stuff it is hard to make a text-based formatting system proprietary or otherwise secret or hard to write software for.
- The coding is minimal. Unlike HTML which requires many characters to format a bit of text, markdown uses formatting characters that are both minimalistic and visually intuitive for a human. More about this in a moment.
Here’s an example. The following text uses italics in one place and includes three links, in HTML:
The best places on the web to learn about the evolution of <em>Homo sapiens</em> are <a href="http://scienceblogs.com/gregladen/">Greg Laden’s blog</a>, <a href="http://johnhawks.net/weblog">John Hawks’ blog</a>, and <a href="http://www.talkorigins.org/">Talk Origns</a>.
Here is the same text written in markdown:
The best places on the web to learn about the evolution of *Homo sapiens* are [Greg Laden's blog], [John Hawks blog] and [Talk Origins].
[Greg Laden's blog]:"http://scienceblogs.com/gregladen/"
The second text is easier to type (fewer formatting characters) and easier to read (for the same reason).
Markdown is a way of formatting text that is easy, fast, clean, and slightly dangerous. In other words, totally cool. But if markdown codes specify formatting, how does the formatting get put on the text and where does the text go? Well, markdown can be used in connection with LaTex to turn marked-down text into some universal format such as PDF. Or, it can be used to specify text that will be converted into HTML. On a Mac you can get software such as Marked which automatically reads a text file to convert it on the fly into raw HTML and allows this to be previewed on your screen, like this:
Writing things like blog posts in markdown can be easier, cleaner, and more fun than using those dumb editing boxes that most blogging platforms use, and it is quicker and easier to proofread than HTML code.
In Linux, and probably on other platforms, one might use either the markdown utility or pandoc to render the markdown code. Pandoc uses a variant of classic markdown, and can convert markdown into HTML, LaTex, PDF and many other formats, using in some cases LaTex software that you should already have installed.