From fe6de041a5d4c051b7bdc1f08c9a77b8f334e486 Mon Sep 17 00:00:00 2001 From: Greg Shuflin Date: Mon, 10 Jul 2023 02:49:04 -0700 Subject: [PATCH] Ensure ordering of used abbrevs is correct --- abbreviations-used-example.typ | 2 +- linguistic-abbreviations.typ | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/abbreviations-used-example.typ b/abbreviations-used-example.typ index 9e61672..35cb284 100644 --- a/abbreviations-used-example.typ +++ b/abbreviations-used-example.typ @@ -7,7 +7,7 @@ == The meat of the paper -The #p1 pronoun in English is "I". +The #p1#sg pronoun in English is "I". The #p1 pronoun in Spanish is "yo" diff --git a/linguistic-abbreviations.typ b/linguistic-abbreviations.typ index ee269ed..be7886a 100644 --- a/linguistic-abbreviations.typ +++ b/linguistic-abbreviations.typ @@ -92,16 +92,18 @@ #let print_usage_chart = { locate(loc => { let final_used_abbreviations = used_abbreviations.final(loc) + + //TODO this is debugging get rid of soon for (key, value) in final_used_abbreviations { [#key was used: #value] linebreak() } linebreak() - for (key, value) in final_used_abbreviations { - if value { - let desc = standard_abbreviations.at(key) - [#smallcaps(lower(key)) #h(2em) #desc] + //TODO requires standard_abbreviations to be sorted alphabetically, can this be enforced? + for (abbrv, explanation) in standard_abbreviations { + if abbrv in final_used_abbreviations { + [#smallcaps(lower(abbrv)) #h(2em) #explanation] linebreak() } }