News for hackers. Stuff that matters.
Re:Markdown Tutorial by dt3ft on Monday May 18, 2020 @02:19AM (#23218989)
Agreed, but what else is there for simple formatting like headings, bold, underline, img? I had to go with markdown because I could not find anything else out there.
Re:Markdown Tutorial by krmbzds on Monday May 18, 2020 @02:22AM (#23219006)
I would recommend AsciiDoctor: https://asciidoctor.org/
Re:Markdown Tutorial by otachack on Monday May 18, 2020 @02:28AM (#23219038)
Sweet, had no idea that existed. Will check it out soon!
Re:Markdown Tutorial by app4soft on Monday May 18, 2020 @07:57AM (#23221213)
Sadly, there no any Qt-based editor for AsciiDoctor, such as Ghostwriter or ReText for Markdown.
Re:Markdown Tutorial by geraldbauer on Monday May 18, 2020 @03:44AM (#23219482)
Another great alternative is Wikitext used by the Wikipedia (among many others) see https://www.wikipedia.org or https://en.wikipedia.org/wiki/Help:Wikitext

PS: Why not have the best of both worlds, that is, Markdown and Wikitext? Yes, you can; see Texti (Text with Formatting Instructions) - https://texti.github.io

Re:Markdown Tutorial by scrollaway on Monday May 18, 2020 @05:21AM (#23220187)
Texti is yours? It looks like an interesting experiment. Lots of good ideas in it, though it gets way too unfocused/wip in the second half of the document, especially in some areas like the "blocks". (Also your emojis are broken)

Having hash line comments is probably a non-starter in a text format (the latex % syntax is probably a better idea indeed if you want line comments). Also the -- strikethrough -- syntax will probably conflict too much. You want comments to use a syntax which is otherwise nearly unused.

Re:Markdown Tutorial by geraldbauer on Monday May 18, 2020 @08:49AM (#23221646)
Thanks for your kind words (yes, sorry for the missing disclaimer). Texti is slowly evolving :-) The point is NOT to invent new syntax [1], thus, using the established unix-style/shell-style/python-style/ruby-style for comments. For a litte real world examples that generated HTML, LaTeX and Markdown from Texti see https://github.com/texti/texti.github.io/tree/master/samples

PS: The main missing feature (among others) in Markdown and that rocks Wikitext (and Texti too) is built-in (recursive) templates (with optional parameters) using the {{}} syntax.

[1]: I know % is not new because it's used in LaTeX but LaTeX is esoteric compared to Python, Ruby, Shell Scripts, Unix Configs, etc.

Re:Markdown Tutorial by scrollaway on Monday May 18, 2020 @09:51AM (#23222287)
Yeah I figured, and I personally really like # for comments in code, but here's a list of reasons why I don't think hash as comment in text is workable, in practice:

#1: That's the only reason.

Re:Markdown Tutorial by geraldbauer on Monday May 18, 2020 @11:14AM (#23223342)
FYI: # is already "reserved" in markdown for headings. So in theory markdown is also not workable, in practice :-).

It's kind of like:

1. FC Köln - that's a football club name (and not a list marker). Try it in markdown - same gotcha :-)

Re:Markdown Tutorial by scrollaway on Monday May 18, 2020 @11:28AM (#23223564)
Well, that's true, you have a point there ;) It's probably my bias talking. Good luck with the project; I love Markdown, but it's great that other people are exploring alternatives.
Re:Markdown Tutorial by moonchild on Monday May 18, 2020 @03:49AM (#23219515)
Why not plain html? For simple formatting like you mention, it really is simple, and it has all the power you could want if you want if you to go further.
Re:Markdown Tutorial by KitDuncan on Monday May 18, 2020 @04:03AM (#23219636)
Plain HTML is super verbose for basic text formatting. Having to wrap every paragraph is super annoying UX.
Re:Markdown Tutorial by enriquto on Monday May 18, 2020 @04:27AM (#23219811)
HTML5 is not all that verbose. You can omit closing tags for many elements (for example, </p>, </li> and </td>). Many other tags are also implicitly opened, like <body> and the like. I actually prefer it to markdown for most cases.
Re:Markdown Tutorial by antman on Monday May 18, 2020 @04:52AM (#23220014)
Is that a spec or it just happens?
Re:Markdown Tutorial by enriquto on Monday May 18, 2020 @05:56AM (#23220419)
Part of the spec, and recommender by many people.

For some examples of modern html, see google's style guide for html, section 3.1.7 shows an example of a complete and correct document that may blow your mind. Also, the examples of tables and lists without closing elements:

https://google.github.io/styleguide/htmlcssguide.html

Re:Markdown Tutorial by duckmysick on Monday May 18, 2020 @10:36AM (#23222822)
It sounds good in theory, but in practice it adds a huge mental overhead.

> A p element's end tag may be omitted if the p element is immediately followed by an address, article, aside, blockquote, details, div, dl, fieldset, figcaption, figure, footer, form, h1, h2, h3, h4, h5, h6, header, hgroup, hr, main, menu, nav, ol, p, pre, section, table, or ul element, or if there is no more content in the parent element and the parent element is an HTML element that is not an a, audio, del, ins, map, noscript, or video element, or an autonomous custom element.

https://html.spec.whatwg.org/multipage/syntax.html#syntax-ta...

This is so complicated. In the end it's easier for me to close the tag instead of second guessing if I may skip it or may not.

Re:Markdown Tutorial by enriquto on Tuesday May 19, 2020 @08:09AM (#23233934)
In practice you can always skip the closing p tag. The difference is inconsequential (it only matters for the whitespace).
Re:Markdown Tutorial by Stratoscope on Monday May 18, 2020 @05:01AM (#23220074)
Re:Markdown Tutorial by bachmeier on Monday May 18, 2020 @06:57AM (#23220822)
If I want to convert my work to PDF or MS Word format, that's easy to do if I've used markdown, due to the existence of converters. If the document is written in html, the conversion is more difficult. Any html extensions that need to be converted by hand stand out in a markdown document.
Re:Markdown Tutorial by rovr138 on Monday May 18, 2020 @07:59AM (#23221229)