Researching LMLs
As noted in the article How This Site is Made, I write the content for this website using the lightweight markup language (LML) txt2tags or Markdown (see April 2011 update below). Before I settled on these, I looked at information on the web about LMLs. I began this page to describe my research and discuss the features of some of the LMLs available. I started with the summary of LMLs on Wikipedia, did a Google search, and discovered that there were a wealth of web pages already dedicated to discussing and comparing LMLs. So instead of writing about all the LMLs out there, I began to read...
Using LMLs
The idea behind a LML is simple: markup plain text in a manner that is readable to you and others and permits the document to be converted to different presentation formats. So any LML has at least two components--the markup syntax for the text file and a processor to convert that syntax to a different format such as HTML or DocBook. The whole purpose is to use a simple enough syntax that it does not get in the way of composing your document. That is, separate the writing from the publishing. If you looked at the Wikipedia page linked above, you saw that there are many, many LMLs in use today. They are all similar, but there is no standardization of markup. Reviewing Wikipedia's comparison table of the markup, you can see the similarities and differences among the different LMLs. While each is simple enough to learn quickly, you probably want to decide on one to use predominantly so you're not always getting tripped up in just how you insert a link in your document text. (BTW, I used the link markup as the example here because that markup seems to vary more among LMLs than other markup.)
The primary questions to ask when deciding which LML to use are:
- Does the processor support the output format you want?
- Is the processor written in a language you have on your computer (or want to put there)?
- Does the LML syntax suit your purposes?
- Does the processor handle all the drudge work that you want it to?
- Is the process from writing your document to getting it to the output format you want suitable for your work habits?
Making My Decision
I started looking at LMLs after reading this article by Merlin Mann years ago. His comment about Markdown particularly fascinated me since it clearly indicated there was a way to produce HTML that was faster than typing all those opening and closing brackets. So Markdown was the first LML I looked at.
I really like Markdown. The text documents are the most readable, at least to my eye, of any of the ones using other LMLs. The syntax is comprehensive enough and includes the markup I need for all the document elements I typically use. I am a fan of single purpose tools. Markdown was originally written to produce HTML snippets (see Dive into Markdown) and that only. (It has since been extended to produce almost any format you want.) However, Markdown did not do one thing I was looking for--I wanted a LML processor that allowed me to set up and generate complete webpages without my having to copy and cut & paste the HTML code for headers and footers and other parts of the document.
The search for an alternative to Markdown led me to txt2tags. There are probably other LMLs with processors that do what txt2tags do, but this was the first one I found that had built-in provisions to include external files, pre- and post-process the text document, automatically generate a table of contents from the document headings, and more. You can see the list of features here. As of December 2010, I am using txt2tags to produce the pages for this site. I'll continue my research to see if there is an even easier way to produce the pages, but that process will be low priority since I also believe in: if something works, quit spinning wheels trying to perfect it and just use it.
Update: April 2011
As noted above, I decided on txt2tags based on its ability to produce complete web pages. But I also noted that I really like Markdown. I have since found WriteMonkey, a text editor that accepts Markdown and directly exports it into a complete web page. See the update at the top of the page How This Site is Made for more detail on the change to WrtieMonkey.
Your Research
If you want to learn about LMLs, I suggest you start with both the Wikipedia page linked above and this webpage, which contains what I believe is a rather complete, although admittedly partial, list of LMLs, with links to details of each in a logical presentation. Unfortunately, this link appears to be obsolete as it links to worldlingo's main page and you cannot find the page linked to. So I guess my recommendation is to start with the Wikipedia page.