Why Markdown Is Not My Favourite Language (2012)
wilfred.me.uk
wilfred.me.uk
If you want something more featureful than Markdown, the problem isn't Markdown; it's that you're using the wrong tool for the job.
Here's an example, displayed exactly how you would see it marked up in org-mode syntax in emacs:
|-----+-------|
| Key | Value |
|-----+-------|
| 00 | foo |
| 01 | bar |
|-----+-------|
org-mode can export to HTML, and many other formats.A little known fact, even among most org-users: Github can render org-mode files to HTML directly if checked into a repo, thus you can write your README files as org-files.
Shameless example: https://github.com/josteink/csharp-mode/blob/master/README.o...
This alone was enough to make me drop Markdown as my go-to format for semi-formatted text-files.
A subtle killer feature here is org-babel. You can embed proper code in your text-files and have your editor (at least Emacs) understand them as such. Which makes it excellent for writing technical documentation for projects where code is involved.
I recently stumbled across the tidbit. The Ruby library Github uses to generate it though isn't 100% though. If you want to use org-mode properties for style customization of html output your SOL.
Original project:
https://github.com/bdewey/org-ruby
Currently, you cannot do much to customize the conversion. The
supplied textile conversion is optimized for extracting “content”
from the orgfile as opposed to “metadata.”
It does say that developement has moved to:https://github.com/wallyqs/org-ruby
Which has no such note, but doesn't say anything about supporting it.
They also support ASCIIDoc, ReST, MediaWiki markup, Creole, etc.
+ Name + Occupation
| Alice | Accountant
| Bob | Baker
| Charles | Car salesman
Headers are easier to make and the last column does not require a trailing marker. It's still some work to align columns other than the last, but that's not a requirement and I'd still much rather have a non-aligned ASCII table than nothing at all. |-----+-------|
| Key | Value |
|-----+-------|
| 00 | foo |
| 01 | bar |
|-----+-------|
becomes |-----+-------|
| Key | Value |
|-----+-------|
| 00 | foo |
| 01 | bar |
| 02 | much longer |
|-----+-------|
but as soon as I hit TAB, it turns in to: |-----+-------------|
| Key | Value |
|-----+-------------|
| 00 | foo |
| 01 | bar |
| 02 | much longer |
|-----+-------------|
There's probably a way to make org-mode dynamically resize tables as you type, without requiring the use of TAB, but I'm not sure if that's always desirable.More seriously, ASCII tables are always a major pain to edit, without the proper tools (like emacs—and I'd not be at all surprised if there's something for vim and/or Sublime Text too). That's no reason to avoid them; they are useful.
I don't see how the inclusion of tables violates the ascii-like readability of markdown. Github has implemented a table syntax that is natural to read/write and makes it easy to include tables in your document. Example: https://github.com/Defconbots/2015_target/blob/master/hw/boa...
|Name |Quantity|Part Number |Distributor|
|:--------------:|:------:|:------------------:|:---------:|
|BAT1, BAT2, BAT3|3 |534-082 |Mouser |
is not "natural to write"I find it hard to assume that Markdown is extremely well thought-through considering the fact that we didn't even get a grammar for the language, just an implementation that would be considered super broken in any other language.
Instead, Markdown should be thought of as a convention. A convention that allows for automated translation of ascii text into html. Further, instead of thinking of Markdown as designed think of it as evolved.
In the case of an evolved convention, we wouldn't expect formalism or even long term design. What we would expect and what Markdown is extremely good at is usefulness, high levels of adoption and ease of change. Which we do see. If your needs require formalism, or complex html features then Markdown is not the right tool for you.
Because markdown is for humans first and foremost, not computers. It can't be clearer than that.
If it's intended for humans first and foremost, then why offer the transpiler? After all, it already looks like ASCII e-mail. The overriding directive is human-readability, not unparsability (which do not go hand in hand).
> 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.
http://daringfireball.net/projects/markdown/
I don't think it's far-fetched to say what tptacek did since it's dang close to what Gruber has always said about Markdown. Note that phrasing: it's not a language, it's a "plain text formatting syntax."
Markdown was never intended to have any particular standardized syntax -- it was simply a script that took a common syntax used for a long time when formatting plain text and convert it to formatted HTML. The attempts to standardize it are misguided, as there is absolutely no need for that -- there are numerous existing standards for precisely that, starting with ReST which follows a pretty similar syntax (in fact, any attempt to standardize Markdown will end up with something very similar, as it has to solve all the same issues).
At some point it was intended to be standardized or else we wouldn't have a standardized version of markdown syntax.
When some enterprising people declared they had created "Standard Markdown" the original author got very upset: http://blog.codinghorror.com/standard-markdown-is-now-common...
Markdown does not have standards, it's just a collection of base formatting conventions a lot of people like.
All of the variants exist due to the many undefined edge cases in the original syntax, and not further development by Gruber to 'officially' resolve ambiguities. Some of them became their own standards (e.g. MultiMarkdown) others just became undocumented behaviours of certain Markdown parsers and/or generators when handling edge-cases with no defined 'official' way to handle them.
> When some enterprising people declared they had created "Standard Markdown" the original author got very upset:
This seems to have more to do with the name being 'Standard Markdown' and seeing it as an attempt to usurp 'ownership' of the 'Markdown' name. Said author didn't flip out over variants like MultiMarkdown.
> Markdown does not have standards, it's just a collection of base formatting conventions a lot of people like.
The efforts of people to standardize it are efforts to resolve this idea, and make Markdown more formal.
If we assume there is a standard, it's not called "Markdown", as Gruber heavily opposes that. On the other hand I'll agree that, if we extend the meaning of the term "Markdown" to cover a stantard like CommonMark, in that case yes, Markdown is a means of communicating relatively minor elements of information -- such as emphasis or lists -- as any other markup language.
Gruber did not want them to use the word markdown so they changed to commonmark. And they are trying to standardize with a spec. I would also consider it along with your other alternatives.
I'd say this is partially due to inertial. Reddit and StackExchange for example, have communities that have been writing in their variants of Markdown for years at this point.
I don't understand the motivation for any of these "alternative" markup formats. Normal non-technical people want Word (or at least, some kind of WYSIWYG text entry). I've been on projects where they tried to get non-developers to use ReST and it was an abject disaster. The tech writers revolted and refused to use it. So then a developer had to be sidelined to convert their Word documents to ReST so that we could produce HTML.
Yeah HTML is not perfect, but neither is any of these other markup languages. If you like one, fine, but don't wonder why none of them has really caught on outside of small niches of highly technical people.
I find that Markdown is significantly easier/faster to write than HTML and, more importantly, easier to read in its un-rendered form. To me (and presumably lots of other people, given Markdown's ubiquity) it's well worth learning the relatively small syntax.
Edit: Here's a quick comparison with a README.md from one of my projects:
Rendered: https://github.com/cespare/reflex/blob/master/README.md
Markdown: https://raw.githubusercontent.com/cespare/reflex/master/READ...
HTML: https://gist.githubusercontent.com/cespare/ad6c41aa28583cac8...
Three things I notice from this example:
- The verbosity of an XML syntax with HTML is annoying, particularly the need for closing tags. <code>xyz</code stands out as particularly verbose (compared with `xyz`).
- Having to escape certain characters like & makes this HTML sample harder to read (this is more of a problem with technical/code documents).
- Automatic linkification prevents stuttering: <a href="http://example.com">http://example.com</a>
table
tr
th Col1 Header!
th Col2 Header!
tr
td Col1 Value...
td Col2 Value...
Renders to HTML.Normal non-technical people understand that you click a bold 'B' and you get bold text, you click an italic 'I' and you get italic text, you click a little list icon and you get a list, and so on.
contenteditable has its quirks, sure, but modern browsers mean it's no longer the brainmelt it once was. Real WYSIWYG entry is achievable and almost easy. Markdown has one great usecase (producing documents that are viewable both as plain ASCII and as 'compiled' rich text), but it's not a tool for Joe Normal.
2. In fact, users can't read anything, and if they could, they wouldn't want to.
http://www.joelonsoftware.com/uibook/chapters/fog0000000062....
You're free to argue that these markup languages all suck, but this idea that it's impossible to get "normal people" to learn even a little bit of syntax, is preposterous – what about twitter #hashtags and @replies?
On the other hand, I find Markdown (or ReST) easy to learn, to write and to read.
As to being a niche, there are probably around 20M software developers in the world (probably only 10-20% of them doing web), and several times over of other kinds of technical people. So even a markup language that only targets technical people who are not web developers would be addressing a few tens of millions of people. A niche for sure, but far from a small niche. These markup formats certainly cater to many more people than, say, Ruby or Python.
Compared to LaTeX, markdown markup is less obtrusive: a single asterisk/double asterisk/double backtick interrupts the flow of text less than an \emph{} or \textbf{} or \textit{}. Since there's less noise, it's easier to proofread and edit the source document. [The same is true for HTML vs. markdown]
Indeed, I use pandoc for making LaTeX beamer presentations and it generally provides the goodness of Markdown and LaTeX combined. Slides can be made far more quickly than in LaTeX. E.g.
# Some section slide
## Slide title
* Bullet point one
* Some math: $a^2 + b^2 = c^2$
At the same time, one can e.g. immediately insert fragments of TikZ using the relevant \begin{...} \end{...} block and it just works.In particular, Textile has great table syntax, which I use extensively in pages like http://the.taoofmac.com/space/infoviz (markup at http://the.taoofmac.com/media/infoviz/index.txt). But over the years I became so used to Markdown (largely thanks to the profusion of editor support it spawned) that I mostly gave in.
Still, Creole might be a good addition to my next CMS/Wiki: http://github.com/rcarmo/sushy (already supports Textile, Markdown and ReST).
Maps easily to docbook, and has a heap of extra features.
The asciidoctor project also has browser extensions for rendering which are really nice. For the lazy: http://asciidoctor.org/
I found the lib was rather big :/
Markdown as a spec may not be nailed down 100%, but as a practical thing to use it's very handy. There are implementation differences between StackOverflow and ReText, but those are details.
No really. It is almost 2015 and we are still typing symbols on each side of words in text boxes when we want to emphasize something. Are we cavemen?
(Following was added after initial posting)
Technology has moved on. We should no longer need to remember which combination of magic symbols we need to make a bulleted list or whatever.
There are often helpers to insert those magic symbols. That's great, but then why keep showing us the magic symbols? Do you want me to care that s represent italics? Will including this second cause this fragment to be italicized? How do you show an asterisk without it meaning intalics? Grrr...
Well, essentially, yes.
What do you suggest we use, then?
But to be fair, at least markdown is a lot cleaner than bbcode.
I want forms to either accept plain text and allow angle brackets and stars, or accept HTML and provide an interface that hides the HTML tags. We only need Markdown and their ilk for the last generation of websites (including mine) that are behind the times.
Schocking, I know. But wait, there's more! Some programs don't even use Javascript!
That's called markup. It's what HTML is; it's what any plain-text format is. And it's a good thing: it's interchangeable and archiveable.
Markdown and their ilk are all trying to be sorta-not-quite-HTML, but fail precisely because they are not HTML.
```
```markdown
## HEADER
```
```
to produce a fenced code block which contains a markdown source code for code block.
Also, different markdown editor use different markdown parser. So, same source code will be rendered differently in different editor.
(1) write an 8-page (or more) document with 32 (or more) hyperlinks in it in both txt2tags and any other format.
(2) Print out the plain-ASCII source files.
(3) Wait until you forget the whole text of what you've written.
(4) Re-read it (both versions) somewhere without access to a computer/phone/tablet. (e.g. the bathroom)
You will understand why txt2tags makes more sense:
(1) Less markup [i.e. fewer characters] than Markdown, Textile/Texy, AFT, reST
(2) Text-first, unlike AsciiDoc, MediaWiki, PmWiki, Org-Mode, BBCode. Text-first leads to better/easier readability of source ASCII IM(NSH)O.
(3) Unlike POD, has a syntax for named links.
"There are only two kinds of languages: the ones people complain about and the ones nobody uses."
But looks like Creole as well, which i didn't know :)
It's fine for some 20 line README on github but that's about it.
I still mostly use LaTeX for documentation though.
wikicreole webmaster, please do configure your DNS thoughtfully, and OP please check your links before posting.