Generalized, customizable solution for documents with complex outlining schemes

I have to make excerpts from several city ordinances with complex outlining and multiple levels. Because each ordinance uses a different outlining scheme I am looking for a generalized solution that I can adapt as needed.

I have been trying to figure this out on my own and by reading and re-reading solutions offered on this site [those by ajlittoz have been most interesting], but I always seem to come to a point where I can go no further.

Could someone please suggest a generalized, customizable solution?

Basically, Writer itself is “a generalized, customizable solution”. But you don’t provide a description of the specific problem. Your question is “I have a problem. Can someone suggest a generalized, customizable solution to all thinkable problems?” type.

It may happen that there is a limitation of Writer (say, you need more than 10 levels). Or there may be a bug that you see at the point “where you can go no further”. Or you might misunderstand something in Writer. Or the specific situation requires different approach, and there is no other way to know that, except describe that situation in detail…