Remix.run Logo
jeroenhd 4 days ago

I can see the advantages RST offers in term of HTML generation, but whenever I've needed to work with custom blocks like that, I've always just written HTML.

I'm not sure if <img src="file.jpg" alt="alt text"/> is less readable than

    .. image:: file.jpg
       :alt: Alt text
HTML5 allows for leaving certain tags unclosed (such as <li>, or <head> or even <p>) to such an extent that I find many template languages to not be worth the effort of their complex syntax.

Sure, there are three or four lines here that you can omit using RST or markdown:

    <!doctype html>
    <html lang="en">
    <head>
    <title>My blog page</title>
    <body>
    <h1>Welcome to my blog</h1>
    <p>This is a bunch of text.
    Feel free to stuff newlines here.
    <p>This is also a bunch of text
    <p>Here's a list just for fun:
    <ol>
      <li>This is the first item!
      <li>This is the second one!
      <li>Boom, a third!
    </ol>
    <p>Have an image: <img src="filename.jpg" alt="alt text goes here">
But is having to wrap a list in <ol> and closing the <title> really that bad?

Automatically generating an index and such is nice, but five lines of Javascript can do the same. Plus, you don't need to run a second tool to "process" your input.

I generally use Markdown as a standardised way to format text that will probably be read in plaintext by other people, but when it comes to formatting documents, I don't see the point of most complex template languages.

tpoacher 4 days ago | parent | next [-]

Same. I have a couple of nice html templates (with locally-defined css and mathjax styling), and I now take all my notes directly in html in nano.

Once you've written a couple of documents, the usual tags become muscle memory and are no more of a bother to write than markdown. I've even created a couple of nano macros to automate some of the process.

"But it's not readable like markdown" you might say. Well. This might be true of 'some' html, especially autogenerated stuff, but the stuff I write is totally readable. Once you settle on some meaningful indentation and tag presentation conventions, readability is not a problem. We're talking about plain html documents, after all, not complex websites. The subset of html tags you'll need is generally very small and largely unintrusive.

I could even go a step further and say, my HTML is as readable as this guy's rST, but this guy's generated HTML code is far worse than how my direct HTML would have looked.

aitchnyu 2 days ago | parent | prev [-]

These formats must have made sense with Notepad (no autocomplete balanced tags, indentation, syntax highlight) and custom parsers in C.

Eric Raymond's, in his 2003 book, advocating terse text formats in chapters 5 and 18 https://www.catb.org/esr/writings/taoup/html/graphics/taoup....