from Hacker News

Ask HN: How should one format plain-text documents?

by rafael859 on 3/14/18, 7:49 PM with 2 comments

I would like to store short plain-text documents that are readable as text (without being converted to anything else).

I am familiar with LaTeX and Markdown, but I consider the former to be too unreadable for my purposes (since I don't plan to convert the document to any other format), and the latter to be fairly good, but not quite there. I have heard about org-mode, but I would like a format that works as a stand-alone file, regardless of the editor used.

I am looking at the way that RFC documents are formatted, and I have to say that they are fairly readable, though I couldn't find a specification on their format.

My current solution is something that resembles Markdown, without header markings (because even though they make sense in plain-text, they don't really give a sense of hierarchy structurally), with single blank lines under paragraph headers and double blank lines after the end of a paragraph. Text in a paragraph is limited to 80 characters, and words are not broken.

What are some good ways to denote header hierarchy? Should I indent paragraphs? Should I indent lower levels under a header, so that it's clear when a section ends?

I understand that I have mentioned several subjective preferences, so feel free to add your own subjective opinions.

  • by Tomte on 3/14/18, 7:51 PM

    Asciidoc looks „natural“
  • by cimmanom on 3/15/18, 11:16 AM

    I'm a fan of ReStructuredText. It's not unlike Markdown, but among other things its heading markup is better at conveying hierarchy.