metanorma / coradoc

Coradoc is the Core AsciiDoc Parser used by Metanorma
MIT License
1 stars 4 forks source link

Add missing support for section #36

Open abunashir opened 7 months ago

abunashir commented 7 months ago

Todos

Reference: https://www.metanorma.org/author/topics/sections/

abunashir commented 7 months ago

@ronaldtse: This are the things that is still missing for the section parsing, let me know if you can think of anything else.

opoudjis commented 7 months ago

... There's a lot of functionality here that Metanorma, not Asciidoctor, handles, with downstream processing of Asciidoctor processing.

I continue to think that reimplementing Asciidoctor as coradoc is a wasteful idea, but reimplementing Asciidoctor PLUS Metanorma, which is what this ticket is implying, plus doing so without referring to the code, but only the user-facing documentation, is even more wasteful.

You need to focus on built-in Asciidoctor functionality, and defer Metanorma-specific functionality, if this is ever going to be done. That means that you must prioritise:

Attributes with key, value pair, eg: [heading=foreword] Attributes with with multi value, eg: [bibliography,heading=normative] Support for blank subclause heading: === {blank} Support for level attribute in heading: [level=6]

Add to that support for all the predefined section types as role attributes, if you haven't already: [abstract], [bibliography], [annex], [preface],[index],[acknowledgements]`. See https://docs.asciidoctor.org/asciidoc/latest/sections/styles/ , although those are the types we use.

It is way premature for you to be looking at the Metanorma ad hoc solution of keep-title, when coradoc doesn't even support parsing attributes on sections. Please focus on Asciidoctor functionality first. Metanorma ignores some of it (sectnums, sectnumlevels, sectids), but presupposes much of it. The place you should be looking is https://docs.asciidoctor.org/asciidoc/latest/sections/titles-and-levels/ and following:

abunashir commented 6 months ago

Hey @opoudjis, thanks a lot for your comment, and you added quite some valuable information there 🙇🏼

I totally agree it's probably gonna be quite some work here and going through the metanorma docs might not make it any easier.

I do have little visibility on what are the things that are being used the most by the doc author. If you would be kind enough to add those missing things for sections in priority orders (besides the one you mentioned above) would be super helpful for me. Thanks a lot in advance Nick ❤️