I need to create a writer document (using LO Writer 6.2 or higher) that has, next to other stuff not mentioned here for simplicity, numbered articles (starting at 1), numbered annexes (starting at 1), and clauses under both articles and annexes with consecutive second level numbering (first level should be the number of the article / annex). It should
hence look roughly like this:
Article 1. First article heading
1.1 First clause text
1.2 Second clause text
Article 2. Second article heading
2.1 First clause text
2.2 Second clause text
…
Annex 1. First annex heading
1.1 First clause text
1.2 Second clause text
Annex 2. Second annex heading
2.1 First clause text
2.2 Second clause text
…
Of course I want LO to assign all the numbers automatically, and I want to say only once that the heading name changes from “Article” to “Annex”, re-starting the counter at 1. I also want all these numbers to be cross-referentiable.
My first guess was to define two derivatives of the “Heading 1” style, one for articles, one for annexes, and one derivative of the “Text Body” style for the clauses. However I have not found any way yet to set the prefix of the heading to “Article” or “Annex” as appropriate and at the same time ensure counting of the clauses of both articles and annexes as sketched above.
Hints much welcome, including pointers to descriptions that have escaped my searches so far.