3 ms·
Having written a heck of a lot of raw HTML, Markdown, LaTeX, [gnt]roff, Docbook, and probably a few other markup formats: - Markdown is quite close to plain-AS
by dredmorbius 5y ago
Having written a heck of a lot of raw HTML, Markdown, LaTeX, [gnt]roff, Docbook, and probably a few other markup formats:
- Markdown is quite close to plain-ASCII writing. (AsciiDoc or reStructured Text might be even better).
- Markdown + pandoc gives a tool for producing numerous output formats or endpoints, including PDF, ePub, and others.
- Markdown avoids fiddly bits like balancing open/close tag pairs.
- Markdown supports features such as footnotes and tables of contents which HTML does not have simple and easy equivalents for.
Yes, there are things which are possible in HTML which Markdown itself doesn't readily provide. Off the top of my head: underlined text, coloured text, and nested superscripts. That said, these are either infrequent needs or are better accomplished through other means (e.g., styles, code-highlighting within code blocks, etc.).
Markdown does allow for about 99.9% of my HTML-tagging needs, with a lot less overhead and cleaner syntax. Which is a win.
If I were to move in any direction, it would probably be LaTeX for more complex source documents.
- klodolph 5y agoIt's kind of annoying to see links to other comments in the thread. https://news.ycombinator.com/item?id=30142334 https://news.ycombinator.com/item?id=30142334 Markdown syntax IMO is pretty fiddly. I find myself messing with spacing, or with line breaks between list, or things like that. On the whole I find Markdown more annoying than HTML... Markdown is just less typing. "Markdown" doesn't support TOCs or footnotes any more than HTML does... both TOCs and footnotes are non-standard extensions to Markdown that your particular Markdown engine may support, in ways which are frequently incompatible with other Markdown engines. I found it no trouble to put footnotes in my HTML-based static site generator anyway. I don't expect TOCs would be any different, but I don't use TOCs on my site. Superscripts of any kind are a Markdown extension in the first place, and I'm always so unsure where the superscript ends that I have to try different things and reload the preview until it looks right (this is one of those fiddly bits that drove me away from Markdown). I guess if you want to target PDF + ePub and others, yes, use something like Markdown. I'm putting video content or interactive content in my blog often enough that it's just not something that would work anyway. Don't get me wrong... I love using Markdown for stuff like READMEs on GitHub. It's just that for something like my blog, where I put a bit more care into things, Markdown really gets in the way.
- dredmorbius 5y agoIn the case of superscripts, the issue is that Markdown doesn't have a concept of nested elements. In HTML superscript and subscript tags may simply be nested: 10<sup>10<sup>10</sup></sup> Markdown implementations ... vary, but typically either a ^<text><whitespace> or ^<text>^ block indicates superscript. That .. doesn't permit nesting: 10^10^10 or: 10^10^10^^ ... either way is ... ambiguous or undefined. HTML's start/end tag syntax wins. More generally, where simply writing text, the notion of having bounded blocks and pairs can become confusing, especially where <div>, <section>, or <article> tags are used. I'll frequently find myself unbalanced in those. To the extent that Markdown allows me to Just F*cking Write and not worry about markup ... that's a win. Ironically, for all its reputation for fiddlyness, LaTeX's use of a double carriage return as a paragraph delimiter affords a similar simplicity to much straight prose. Markdown extension of course vary, but my point remains that using Pandoc (my usual approach), I have as first-class ready-at-hand elements tables of contents and footnotes, both of which I use extensively. I don't have a good formula-entry capability, for which I'd turn instead to LaTeX. I'd also argue that basic table entry in Markdown beats HTML, and is moreover very easy to script given structured input, e.g., with a sed or awk one-liner. The fact that you seem to be focusing on short content rather than longer pieces may explain some of our differences of views. My typical focus is essay-to-book-length text-heavy documents. If I'm kicking out a short HTML fragment, sure, just code it up directly. Where I'm writing a work which is not specifically intended for the Web, but which could include HTML among other formats, Markdown and LaTeX start making far more sense. I find complaining about hypertext references to streamline discussion and avoid duplicate content a ... curious gripe in the context of hypertext-authoring tools, but power to you.
- klodolph 5y agoWhen I'm writing HTML, there isn't a ton of nesting. It's mostly <h2> <h3> <p> <figure> at top-level. No parent tags. This is standard HTML, the <html> and <body> are implicit. Sections are implicitly delimited by header tags. Open and close tags are generally no more than a few lines apart. I'm strongly in favor of "semantic" tags in general (and so, for example, I do not use <cite> <em> or <i> interchangeably, even though they are all styled the same) but AFAIK the <section> tag does not really serve a useful purpose, semantically, because sections are already delimited by header tags (and screen readers and the like understand this). Anything like an <article> or <main> or whatever is going to get handled by the template. I only write the contents of each article, and let tooling handle the boilerplate. Just like how you don't write navigation bars or TOCs in markdown, you let the tooling do that for you. Re: tables, to each their own... I find tables in Markdown to be a bit fragile and easy to screw up when I'm changing them. I don't like having the columns shoved into one line of text. And any time I'm sticking tables in a document I'm likely to want to adjust the styling a little. Tables are easily the thing I hate the most about markdown. > Markdown extension of course vary, but my point remains that using Pandoc (my usual approach... Using some particular markdown tooling you get TOC and footnotes... and using some particular HTML tooling I can get the same thing. For particular pages I often add small snippets of CSS or JavaScript, which I can just stick in <style> tags at the top, or <script> tags at the bottom, because it's just standard HTML.