Clean up abbreviations
This commit is contained in:
parent
55545eeccc
commit
e008aa16f4
@ -1,4 +1,4 @@
|
||||
#import "linguistic-abbreviations.typ": *
|
||||
#import "abbreviations.typ": *
|
||||
|
||||
#let custom-abbreviations = (
|
||||
"FMNT": "Present/Future stem formant",
|
||||
@ -7,7 +7,7 @@
|
||||
#let fmnt = emit-abbreviation("FMNT")
|
||||
|
||||
// An example function that uses `with-used-abbreviations`
|
||||
#let print_usage_chart = with-used-abbreviations.with(debug: false)(final-used-abbreviations => {
|
||||
#let print_usage_chart = with-used-abbreviations(final-used-abbreviations => {
|
||||
|
||||
show terms: t => {
|
||||
for t in t.children [
|
||||
|
@ -93,22 +93,11 @@
|
||||
|
||||
// Accepts a callback that accepts the state of the `used-abbreviations`
|
||||
// dictionary at the end of the document. Also an additional debug parameter
|
||||
#let with-used-abbreviations(callback, debug: false) = {
|
||||
#let with-used-abbreviations(callback) = {
|
||||
locate(loc => {
|
||||
let final_used-abbreviations = used-abbreviations.final(loc)
|
||||
|
||||
if debug {
|
||||
for (key, value) in final_used-abbreviations {
|
||||
[#key was used: #value]
|
||||
linebreak()
|
||||
}
|
||||
linebreak()
|
||||
}
|
||||
|
||||
callback(final_used-abbreviations)
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
#let render-abbreviation(symbol) = smallcaps(lower(symbol))
|
||||
|
Loading…
Reference in New Issue
Block a user