Login  Register

Multiple anchors/ids for description list item (glossary pluralization)

Posted by oddhack on May 22, 2020; 2:33pm
URL: https://discuss.asciidoctor.org/Multiple-anchors-ids-for-description-list-item-glossary-pluralization-tp8036.html

I'm trying to reproduce the functionality of LaTeX glossary package \glspl{term}, which produces a link to the glossary for the specified term, but puts it in text as pluralized (e.g. "terms" would link to the glossary "term" entry). My first thought was

[[terms]]term:: A term

But while <<term>> and <<terms>> do both link to this, the former shows up with the rendered "[term]" style in HTML output. I can say <<term,term>> and avoid this ugliness, but that makes markup considerably longer to write. There doesn't seem to be a way to specify multiple anchors on a list item, so I can't say something like

[[term]]term[[terms]]:: A term

AFAICT.

Are there better / different options that allow interchangeable use of the singular and plural terms to link to the same glossary term? Writing a Ruby macro is off the table learning curve-wise.