Re: glossary conundrum
Posted by
abelsromero on
Feb 13, 2020; 8:59am
URL: https://discuss.asciidoctor.org/glossary-conundrum-tp7578p7638.html
I know this does not match what you want to do Marc, but in your case I'd would go for a different organization that offers the same final result.
For the sake of simplicity and ease of manteninance I would avoid having untagged and tagget sections in the included content.
I'd have a file with all the grouped terms defined by tag like the one below. But I would avoid using "all" unless you have lots of group, just add all related tags like in the third element.
// tag::group1[]
* This only applies to group 1.
// end::group1[]
// tag::group2[]
* This only applies to group 2.
// end::group2[]
// tag::group2[]
// tag::group1[]
* This only applies to group 1 or 2.
// end::group1[]
// end::group2[]
// tag::all[]
* This is some geenral term for everyone.
// end::all[]
Then from the files that are actualy renders just import what you need.
= Title
== General terms
include::glossary.adoc[tag=all]
== Terms for Group 1
include::glossary.adoc[tag=group1]
== Terms for Group 2
include::glossary.adoc[tag=group2]
== Terms for both (Group1 OR Group2)
include::glossary.adoc[tags=group1;group2]
That way you keep the access to contents in a separate file with single consistent way of tagging. And then you control what and how you want to show the info in another.
PS: I don't knwo if it's possible to tell to include tags matching all groups (and AND)