From c60d81bd2d5f9ca2d6592a5b3655b143fc854a96 Mon Sep 17 00:00:00 2001 From: servostar Date: Thu, 22 Aug 2024 10:43:13 +0200 Subject: [PATCH] add acronym to glossary if specified (#45) --- src/glossarium.typ | 6 ++++-- src/glossary.typ | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/glossarium.typ b/src/glossarium.typ index 3784d18..c643fdb 100644 --- a/src/glossarium.typ +++ b/src/glossarium.typ @@ -180,10 +180,12 @@ SOFTWARE.*/ #block( par(hanging-indent: 1em)[ #text(weight: "bold", entry.short) - #if hasLong { + #if hasLong and hasDesc [ + (#text(entry.long)) + ] else if hasLong { text(entry.long) } - #if hasLong and hasDesc [:] + #if hasDesc [ #sym.dash.en ] #if hasDesc [ #desc ] #if disable-back-references != true { term_references diff --git a/src/glossary.typ b/src/glossary.typ index 436b664..9a34923 100644 --- a/src/glossary.typ +++ b/src/glossary.typ @@ -76,7 +76,7 @@ // acronym and glossary if "long" in v and "desc" in v { processed_glossary.insert(k, (short: v.short, long: v.long, group: acronym_group)) - processed_glossary.insert(k + "__glossary_entry", (short: v.short, desc: v.desc, group: glossary_group)) + processed_glossary.insert(k + "__glossary_entry", (short: v.short, desc: v.desc, long: v.long, group: glossary_group)) } else { processed_glossary.insert(k, v) processed_glossary.at(k).group = group