Login  Register

Re: glossary conundrum

Posted by 1marc1 on Feb 13, 2020; 4:59am
URL: https://discuss.asciidoctor.org/glossary-conundrum-tp7578p7636.html

Hi Team,

Based on Abel's post I started to explore the partial includes for the purpose of including (parts of) other asciidoc files, but came up with a question.

Assume I have the following document called myfile.adoc:

== Title

General information that applies to everyone.

// tag::group1[]
This only applies to group 1.
// end::group1[]

// tag::group2[]
This only applies to group 2.
// end::group2[]

More general information that applies to everyone.

The question is: how do I include all text and the text that belongs to a specific tag? For example, the output I am looking for when (somehow) specifying the group1 tag would look like this:

Title

General information that applies to everyone.

This only applies to group 1.

More general information that applies to everyone.

I have tried various combinations of the wildcards and tag names, but seem to be unable to include everything that is untagged and selected parts that are tagged.

Further to this, I would like to be able to select multiple tags for inclusion. Let's say my example document had a total of 5 tags (group1...group5), then would it be possible to do something like

include::myfile.adoc[tags=**;group1;group4;group5]

...to end up with a document that includes all non-tagged text and the text for group1, 4 and 5?

I am running asciidoctor 2.0.10.

Thank you.

Marc.