From 0438d73ab50b91f11366b7597dd4ef04316d8ee7 Mon Sep 17 00:00:00 2001 From: servostar Date: Mon, 26 Aug 2024 15:26:28 +0200 Subject: [PATCH] only show used acronyms (#51) --- src/glossarium.typ | 8 +++++++- src/lib.typ | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/glossarium.typ b/src/glossarium.typ index cc01e0f..5b1a8de 100644 --- a/src/glossarium.typ +++ b/src/glossarium.typ @@ -170,7 +170,13 @@ SOFTWARE.*/ numbering: none, caption: { context { - let term_references = __query_labels_with_key(here(), entry.key) + let key = if entry.key.ends-with("__glossary_entry") { + entry.key.replace("__glossary_entry", "") + } else { + entry.key + } + + let term_references = __query_labels_with_key(here(), key) if term_references.len() != 0 or show-all [ #let desc = entry.at("desc", default: "") #let long = entry.at("long", default: "") diff --git a/src/lib.typ b/src/lib.typ index 0cde410..348265e 100644 --- a/src/lib.typ +++ b/src/lib.typ @@ -93,7 +93,7 @@ #if "glossary" in config.thesis and config.thesis.glossary != none { print-glossary( - show-all: true, + show-all: false, disable-back-references: true, enable-group-pagebreak: true, glossary(config.thesis.glossary, config),