From e7b417f0d38c1a64d21ac5906185da6276694705 Mon Sep 17 00:00:00 2001 From: Greg Shuflin Date: Wed, 4 Oct 2023 01:50:21 -0700 Subject: [PATCH] Document with-used-abbreviations And fix some minor formatting concerns --- documentation.typ | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/documentation.typ b/documentation.typ index 5abce5a..bcf50a0 100644 --- a/documentation.typ +++ b/documentation.typ @@ -1,4 +1,4 @@ -#set document(title: "leipzig-glossing documentation") +#set document(title: "typst leipzig-glossing documentation") #import "leipzig-gloss.typ": abbreviations, gloss, numbered-gloss, gloss-count #show link: x => underline[*#x*] @@ -23,7 +23,7 @@ #let fmnt = abbreviations.emit-abbreviation("FMNT") -#align(center)[#text(17pt)[`typst-leipzig-glossing` Documentation]] +#align(center)[#text(17pt)[Typst `leipzig-glossing` Documentation]] = Introduction @@ -242,10 +242,28 @@ for (abbreviation, description) in abbreviations.standard-abbreviations { } } +== Custom abbreviations + +Custom abbreviations may be defined using the `abbreviations.emit-abbreviation` function: + +#codeblock( +"#import abbreviations: obl, sg, prf, fut, emit-abbreviation + +#let ts = emit-abbreviation(\"TS\") + +#gloss( + header: [(from _Georgian: A Structural Reference Grammar_, by George Hewitt)], + source: ([g-nax-av-en],), + morphemes: ([you#sub[2]-see(#fut)#sub[4]-#ts#sub[7]-they#sub[11]],), + translation: \"they will see you\", +)", addl-bindings: (abbreviations: abbreviations), unevaled-first-line: "#import \"leipzig-gloss.typ\": abbreviations") + == Building used-abbreviations pages A user of `leipzig-glossing` might wish to generate an introductory page -displaying which abbreviations were actually used in the document. +displaying which abbreviations were actually used in the document. The +`abbreviations.with-used-abbreviations` function may be used for this purpose; +see the `abbreviations-used-example.typ` file in `leipzig-glossing` source for an example. = Further Example Glosses