Which
lightweight markup language do you prefer and why?
The greatness of Markdown
I found Markdown a few years ago and have been using it since for reports (-> PDF), man pages (-> roff), plain text documentation (CHANGES, README et c.), websites (-> HTML), CVs (-> PDF), note taking and just about everything I write. I'm sure most of you are familiar with it, but here's a quote from the
website for those who are not:
Quote:
The overriding design goal for Markdown's formatting syntax is to make it as readable as possible. The idea is that a Markdown-formatted document should be publishable as-is, as plain text, without looking like it's been marked up with tags or formatting instructions. While Markdown's syntax has been influenced by several existing text-to-HTML filters, the single biggest source of inspiration for Markdown's syntax is the format of plain text email.
|
Particularly note the bold text. Being able to export to a bunch of formats is only a part of the point, in my opinion. I don't think it qualifies it it looks like it has been marked up. Then we may as well use TeX, roff, DocBook or whatever.
Plain old Markdown can only export to HTML (I think), but with MultiMarkdown and Pandoc you can get nearly any document format. Adding things like
\usepackage[...]{...} et c. can easily be automated with a simple ad hoc makefile, so you can get well-formed output in HTML, roff, LaTeX or publish it as-is in plain text. As plain text it looks familiar and could have been written like that even if Markdown didn't exist.
An added benefit is that it saves a lot of error-prone formatting. Some statistics from randomly selected files of mine:
Code:
Markdown to HTML (using John Gruber's Markdown):
Source files: 26858 bytes
Output files: 49116 bytes
(54.7%)
Markdown to roff (using Pandoc and some post-processing):
Source files: 56695 bytes
Target files: 64684 bytes
(87.6%)
DocBook is a bit like Markdown but
with ugly and error-prone formatting.
Other formats
The reason I ask is because I'm interested in other formats. Usually there is some equivalent Unix variant that has been around for 20 years until someone decided that the wheel must be reinvented because it's too old. Then a new project comes along and gets a lot of credit that it doesn't deserve. But it looks like Markdown is quite unique (or was, around the time when it was released). Still I'm suspecting that I may have missed something because you often have to compile the various Markdown variants from source on Linux, indicating that everyone uses something else and Markdown is just a fad.
txt2tags fails because there is usually a lot of metadata in the files. This
example reminds of TeX with comments everywhere. You can't publish that in plain text format or E-mail it to someone. I suppose you could ignore those features, but then you basically have Markdown.
Here's an example of Markdown source for comparison. There is some inline HTML, but of course you would use AWK or similar to make an index when the file is converted if you intend to use other formats than HTML.
Textile and POD remind of roff:
Code:
.SH ROFF HEADING
h1. Textile heading
=head1 POD heading
AsciiDoc is nice but why the metadata? "Author" can not be used in non-English publications, so this has to be inserted into the document upon converting it to other formats anyway.
MultiMarkdown (which is very good if you ignore this feature) and
reStructuredText have the same problem ("Title:", ":Author:", et c.).
Creole and the
MediaWiki markup language are not bad but not a reason to switch from Markdown.
Well, those are my opinions at least. Please post yours.