LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices


Reply
  Search this Thread
Old 07-03-2014, 11:19 AM   #1
Soderlund
Member
 
Registered: Aug 2012
Posts: 185

Rep: Reputation: 81
Lightweight markup languages


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.
 
Old 07-03-2014, 11:34 AM   #2
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,219

Rep: Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309
Markdown.

Last edited by dugan; 07-03-2014 at 11:38 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Lightweight Markup Languages LXer Syndicated Linux News 0 09-22-2013 03:31 AM
[SOLVED] No rule to make target 'Markup.cpp', needed by `Markup.o'. Stop. shamjs Programming 11 12-10-2011 10:51 AM
Lightweight distro with GUI, support of East Asian languages. sc_ijin Linux - Distributions 5 07-27-2010 03:29 AM
simple documentation markup abolishtheun General 1 10-02-2008 10:05 PM
languages of linux: which languages can be choosen in suse and red-hat distributions? Klaus Schnorr Linux - Software 3 09-10-2005 02:19 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 08:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration