Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Ever tried linting and using prettier with markdown? While working with a team some use atom, some vscode editor? Different linters apply different rules. Ended up having to avoid advanced markup features like lists within lists. Which is annoying when you are writing a readme step-by-step document and need a step 2.b) for example.

This article suggests using XML. XML is based on an older markup language called standard generalised markup language ‘SGML’. Why not go the whole hog and use that?

I found this great little markup language descended from SGML, that is specifically designed for documentation and is great for the use case in this article of blog posts. (The markup language has support for links and is designed to work on screens of any size, all of this was baked in to the language from the start, not bolted on to a scientific paper markup language like LaTex.)

It’s called hypertext markup language or ‘HTML’.

Also, your document can be styled using a styling language called cascading style sheets or ‘CSS’. [But this is optional]. And you can change the styling of your document years later without changing the text.

For blogging, there is also a popular graphic user interface to ‘HTML’ and ‘CSS’ called Wordpress.

In 2019 it powers 1/3 of the Internet.



I tried it and it's awful. Finger-twisting angle brackets everywhere. You have to balance not just closing brackets but also match the exact formatting "tag", so rather than "* Foo" it's "<li>Foo</li>" (urgh). It's actually even worse than XML because you have to do these "closing tags" even when they don't make sense, so e.g. rather than an embedded image being "![mouseover text](path)" it's "<img alt="mouseover text" href="path"></img>" (yes, really). To make it even more fun, if you "cross tags" like "<b>blah <i></b>blah</i>", rather than giving an error it will silently work most of the time except when it doesn't.

The available formatting tags are a complete mishmash. There are two different ways to do a bunch of things (e.g. "<em>" and "<i>" do the exact same thing but you're supposed to use "<em>" because it's "more semantic" - apparently screenreaders don't understand "<i>" even though it's older??). There are distinct tags for acronym versus abbreviation but no-one uses either of them because they don't display consistently. But for actually structuring your text all you get is paragraph and headings - there's no way to mark a section as a summary. Strikethrough is a mess (early versions had a sensible "<s>" tag, but now there are two different "semantic" tags that no-one can agree on).

Don't even get me started on CSS. "You can change the styling of your document years later without changing the text" - it seems like no-one working on this nonsense format ever realised what a terrible idea that is. Your text might refer to the figure on the left, but the "styling" that defines whether the figure goes on the left or the right is in a completely different part of the source. Better still, you have to use this ridiculous action-at-a-distance "selector" language to define which "tags" the styles actually apply to, so you cut and paste a paragraph to a different place and magically all its formatting changes.

Version 3 of HTML was just about usable - you could do formatting inline and there was only one tag for how to do a given thing, and it usually had a sensible name (e.g. b for bold, i for italic). The CSS-based versions are just bad design at every level and I've no idea why anyone would choose them as a source format over literally anything else.


> This article suggests using XML. XML is based on an older markup language called standard generalised markup language ‘SGML’. Why not go the whole hog and use that?

That is exactly what I have done at several occasions at customers that made use of either Docbook or DITA, with graphical tooling like Oxygen XML, Framemaker, DITAworks and so on.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: