Skip to content
This repository has been archived by the owner on Dec 23, 2019. It is now read-only.

Warn if section after appendix not marked up as appendix #102

Closed
ronaldtse opened this issue Jun 26, 2018 · 8 comments
Closed

Warn if section after appendix not marked up as appendix #102

ronaldtse opened this issue Jun 26, 2018 · 8 comments
Assignees
Labels

Comments

@ronaldtse
Copy link
Contributor

In draft-asciirfc-minimal, all sections occurring after a section tagged [appendix] becomes an appendix.

@opoudjis
Copy link
Contributor

They are, but this has no implications for isodoc.

In RFC XML, both clauses and appendixes are marked up as section; the only difference between the two is whether their ancestor is middle or back. The current asciidoctor-rfc code differentiates middle and back positionally: once it sees one section that is a bibliography or appendix, it assumes that everything following also goes to back. It does not require appendixes to be styled as appendixes, because that styling does not change anything: the clause is still called section, and still ends up under back.

In the case of Asciidoctor-ISO, clauses and appendixes are marked up differently, as clause vs annex, and that information is sourced from the style attribute [appendix].

We could be more forgiving, like Asciidoctor-RFC is, and work out that once an appendix is seen, any following section (that is not a bibliography) should also be an appendix, and move them around accordingly. I don't think we should. Forcing tagging discipline on authors is the point of the validating schema to begin with. I could manipulate the asciidoctor input in metanorma to add those [appendix] attributes, but I'm uncomfortable doing much in metanorma that isn't done in asciidoctor itself: it makes the toolchain fragile, for little real benefit.

Asciidoctor-RFC happens to be more relaxed about Asciidoctor markup requirements on appendixes than Asciidoctor-ISO is, because of how RFC XML marks up appendixes. But the expected correct behaviour in Asciidoctor is to mark up Appendixes explicitly. (If you use native Asciidoctor, the crossreferences to unmarked appendixes will come out wrong.) And I do not agree that we should dilute proper Asciidoctor markup practice.

@ronaldtse
Copy link
Contributor Author

I agree with the need of explicit tagging, and the question becomes whether we can make asciidoctor-rfc require this tag on all appendix sections? All Metanorma formats should behave according to the same principles.

@ronaldtse ronaldtse reopened this Jun 28, 2018
@opoudjis opoudjis added bug and removed question labels Jun 28, 2018
@opoudjis
Copy link
Contributor

Yes, we should at least issue a warning when a trailing section is neither an appendix nor a bibliography. asciidoctor-iso already has warnings for that kind of thing in place.

@opoudjis opoudjis changed the title Test out [appendix] feature Warn if section after appendix not marked up as appendix Jun 28, 2018
@ronaldtse
Copy link
Contributor Author

Question: instead of a warning, should we just place that section before the tagged [appendix]es?

@ronaldtse
Copy link
Contributor Author

(in addition to a warning)

@opoudjis
Copy link
Contributor

That violates principle of least surprise. A section after an appendix is much likelier to have been intended as an appendix than as a displaced clause.

@ronaldtse
Copy link
Contributor Author

That's true, but we need to ensure this "least surprise" behavior also applies to all other metanorma flavors such as asciidoctor-iso. Right?

@opoudjis
Copy link
Contributor

opoudjis commented Jul 2, 2018

Right. So, no sections should be moved after an appendix or bibliography section into the main body of text (and none are). And warnings should be issued consistently whenever a section is not tagged. (metanorma/metanorma-iso#185)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants