jgm / djot

A light markup language
https://djot.net
MIT License
1.67k stars 43 forks source link

Do we need syntax for many styles of ordered lists? #70

Closed matklad closed 1 year ago

matklad commented 1 year ago

I don't have a strong opinion at the moment, but these two observations seem curious:

Which makes me wonder -- perhaps we shouldn't try to cover all variations syntactically, and instead leave it to styling?

Eg,

{style="list-style-type: upper-roman"}
1. one
2. two
3. thee

(and of course it's possible to define a standard class {.upper-roman})

To distill this:

jgm commented 1 year ago

We're still basically motivated by the Markdown philosophy of trying to make the source documents readable as they are -- they should read like documents, not code. So, this is much better from that point of view:

I.  one
II.  two
III.  three
matklad commented 1 year ago

uhu. I think it's useful to tease that apart into two somewhat orthogonal bits:

I would say that 1 vs i score about the same on the source readability, but i is a clear win on the wysiwyg.

Couple of other cases where this oppositions comes up:


I personally care more about raw readability, than wysiwyg (I author complex documents with a fair amount of custom stuff, so I have an inherent wysiwyg gap).

I think the reasonable stance is to make wysiwyg syntax just work via extra formatting (eg, if you reformat a "cell-per-line" table into "row-per-line", you get wysiwyg). Which means, yeah, we should support i, ii, iii syntax, but maybe pandoc's #. / asciidoctor's . as well.

It is unfortunate that we don't support every list style out there, but that is justified by our "no Unicode classes" rule for the parser.

Convinced myself that the answer here is yes, thanks :-)

jgm commented 1 year ago

I'm open to supporting something like #..