typst-lepizig-glossing/linguistic-abbreviations.typ

215 lines
6.2 KiB
Plaintext
Raw Normal View History

// See https://www.eva.mpg.de/lingua/resources/glossing-rules.php
#let standard_abbreviations = (
"1": "first person",
"2": "second person",
"3": "third person",
"A": "agent-like argument of canonical transitive verb",
"ABL": "ablative",
"ABS": "absolutive",
2023-07-10 02:19:57 -07:00
"ACC": "accusative",
"ADJ": "adjective",
"ADV": "adverb(ial)",
"AGR": "agreement",
"ALL": "allative",
"ANTIP": "antipassive",
"APPL": "applicative",
"ART": "article",
"AUX": "auxiliary",
"BEN": "benefactive",
"CAUS": "causative",
"CLF": "classifier",
"COM": "comitative",
"COMP": "complementizer",
"COMPL": "completive",
"COND": "conditional",
"COP": "copula",
"CVB": "converb",
"DAT": "dative",
"DECL": "declarative",
"DEF": "definite",
"DEM": "demonstrative",
"DET": "determiner",
"DIST": "distal",
"DISTR": "distributive",
"DU": "dual",
"DUR": "durative",
"ERG": "ergative",
"EXCL": "exclusive",
"F": "feminine",
"FOC": "focus",
"FUT": "future",
"GEN": "genitive",
"IMP": "imperative",
"INCL": "inclusive",
"IND": "indicative",
"INDF": "indefinite",
"INF": "infinitive",
"INS": "instrumental",
"INTR": "intransitive",
"IPFV": "imperfective",
"IRR": "irrealis",
"LOC": "locative",
"M": "masculine",
"N": "neuter",
2023-07-10 03:00:53 -07:00
"N-": [non- (e.g. #smallcaps[nsg] nonsingular, #smallcaps[npst] nonpast)],
"NEG": "negation, negative",
"NMLZ": "nominalizer/nominalization",
"NOM": "nominative",
"OBJ": "object",
"OBL": "oblique",
"P": "patient-like argument of canonical transitive verb",
"PASS": "passive",
"PFV": "perfective",
"PL": "plural",
"POSS": "possessive",
"PRED": "predicative",
"PRF": "perfect",
"PRS": "present",
"PROG": "progressive",
"PROH": "prohibitive",
"PROX": "proximal/proximate",
"PST": "past",
"PTCP": "participle",
"PURP": "purposive",
"Q": "question particle/marker",
"QUOT": "quotative",
"RECP": "reciprocal",
"REFL": "reflexive",
"REL": "relative",
"RES": "resultative",
"S": "single argument of canonical intransitive verb",
"SBJ": "subject",
"SBJV": "subjunctive",
"SG": "singular",
"TOP": "topic",
"TR": "transitive",
"VOC": "vocative",
)
2023-07-11 01:17:41 -07:00
// A dictionary used as a set to mark which abbreviations have been used by a call to
// `emit_abbreviation`. Each key in the dictionary is the string symbol of that abbreviation,
// and the value is always `true`.
#let used_abbreviations = state("leipzig-gloss-used-abbreviations", (:))
2023-07-11 01:17:41 -07:00
// 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) = {
locate(loc => {
let final_used_abbreviations = used_abbreviations.final(loc)
2023-07-11 01:17:41 -07:00
if debug {
for (key, value) in final_used_abbreviations {
[#key was used: #value]
linebreak()
}
2023-07-11 01:17:41 -07:00
linebreak()
}
2023-07-11 01:17:41 -07:00
callback(final_used_abbreviations)
2023-07-11 01:17:41 -07:00
})
}
2023-03-23 21:34:17 -07:00
2023-07-11 01:17:41 -07:00
// Public function. Given a symbol that is a string, emits
// the lowercase version of that string in smallcaps format, and adds
// its use to the `used_abbreviations` table
2023-07-10 02:51:34 -07:00
#let emit_abbreviation(symbol) = {
2023-07-11 00:42:45 -07:00
let mark_used(symbol) = {
used_abbreviations.update(cur => {
cur.insert(symbol, true)
cur
})
}
2023-07-10 02:51:34 -07:00
mark_used(symbol)
smallcaps(lower(symbol))
}
#let p1 = emit_abbreviation("1")
#let p2 = emit_abbreviation("2")
#let p3 = emit_abbreviation("3")
#let A = emit_abbreviation("A")
#let abl = emit_abbreviation("ABL")
#let abs = emit_abbreviation("ABS")
#let acc = emit_abbreviation("ACC")
#let adj = emit_abbreviation("ADJ")
#let adv = emit_abbreviation("ADV")
#let agr = emit_abbreviation("AGR")
#let all = emit_abbreviation("ALL")
#let antip = emit_abbreviation("ANTIP")
#let appl = emit_abbreviation("APPL")
#let art = emit_abbreviation("ART")
#let aux = emit_abbreviation("AUX")
#let ben = emit_abbreviation("BEN")
#let caus = emit_abbreviation("CAUS")
#let clf = emit_abbreviation("CLF")
#let com = emit_abbreviation("COM")
#let comp = emit_abbreviation("COMP")
#let compl = emit_abbreviation("COMPL")
#let cond = emit_abbreviation("COND")
#let cop = emit_abbreviation("COP")
#let cvb = emit_abbreviation("CVB")
#let dat = emit_abbreviation("DAT")
#let decl = emit_abbreviation("DECL")
#let def = emit_abbreviation("DEF")
#let dem = emit_abbreviation("DEM")
#let det = emit_abbreviation("DET")
#let dist = emit_abbreviation("DIST")
#let distr = emit_abbreviation("DISTR")
#let du = emit_abbreviation("DU")
#let dur = emit_abbreviation("DUR")
#let erg = emit_abbreviation("ERG")
#let excl = emit_abbreviation("EXCL")
2023-07-11 01:17:41 -07:00
#let F = emit_abbreviation("F")
2023-07-10 02:51:34 -07:00
#let foc = emit_abbreviation("FOC")
#let fut = emit_abbreviation("FUT")
#let gen = emit_abbreviation("GEN")
#let imp = emit_abbreviation("IMP")
#let incl = emit_abbreviation("INCL")
#let ind = emit_abbreviation("IND")
#let indf = emit_abbreviation("INDF")
#let inf = emit_abbreviation("INF")
#let ins = emit_abbreviation("INS")
#let intr = emit_abbreviation("INTR")
#let ipfv = emit_abbreviation("IPFV")
#let irr = emit_abbreviation("IRR")
#let loc = emit_abbreviation("LOC")
2023-07-11 01:17:41 -07:00
#let M = emit_abbreviation("M")
#let N = emit_abbreviation("N")
2023-07-10 03:00:53 -07:00
#let non = emit_abbreviation("N-")
2023-07-10 02:51:34 -07:00
#let neg = emit_abbreviation("NEG")
#let nmlz = emit_abbreviation("NMLZ")
#let nom = emit_abbreviation("NOM")
#let obj = emit_abbreviation("OBJ")
#let obl = emit_abbreviation("OBL")
#let P = emit_abbreviation("P")
#let pass = emit_abbreviation("PASS")
#let pfv = emit_abbreviation("PFV")
#let pl = emit_abbreviation("PL")
#let poss = emit_abbreviation("POSS")
#let pred = emit_abbreviation("PRED")
#let prf = emit_abbreviation("PRF")
#let prs = emit_abbreviation("PRS")
#let prog = emit_abbreviation("PROG")
#let proh = emit_abbreviation("PROH")
#let prox = emit_abbreviation("PROX")
#let pst = emit_abbreviation("PST")
#let ptcp = emit_abbreviation("PTCP")
#let purp = emit_abbreviation("PURP")
2023-07-11 01:17:41 -07:00
#let Q = emit_abbreviation("Q")
2023-07-10 02:51:34 -07:00
#let quot = emit_abbreviation("QUOT")
#let recp = emit_abbreviation("RECP")
#let refl = emit_abbreviation("REFL")
#let rel = emit_abbreviation("REL")
#let res = emit_abbreviation("RES")
2023-07-11 01:17:41 -07:00
#let S = emit_abbreviation("S")
2023-07-10 02:51:34 -07:00
#let sbj = emit_abbreviation("SBJ")
#let sbjv = emit_abbreviation("SBJV")
#let sg = emit_abbreviation("SG")
#let top = emit_abbreviation("TOP")
#let tr = emit_abbreviation("TR")
#let voc = emit_abbreviation("VOC")
2023-03-23 21:34:17 -07:00