Debian Codegraph @

texmf-dist/source/generic/expex-acro/expex-acro.dtx

raw
1 % \iffalse meta-comment
2 %
3 % Copyright (C) 2022 by Florian Matter
4 %
5 % This file may be distributed and/or modified under the
6 % conditions of the LaTeX Project Public License, either
7 % version 1.3 of this license or (at your option) any later
8 % version. The latest version of this license is in:
9 %
10 % http://www.latex-project.org/lppl.txt
11 %
12 % and version 1.3 or later is part of all distributions of
13 % LaTeX version 2005/12/01 or later.
14 %
15 % \fi
16 % \iffalse
17 %<package>\NeedsTeXFormat{LaTeX2e}[1994/06/01]
18 %<package>\ProvidesPackage{expex-acro}
19 %<package> [2023/08/23 v0.0.3 ]
20 %<*package>
21 %</package>
22 %<*driver>
23 \ProvidesFile{expex-acro.dtx}
24 \documentclass{ltxdoc}
25 \usepackage{showexpl}
26 \lstset{%
27 basicstyle=\ttfamily\small,
28 commentstyle=\itshape\ttfamily\small,
29 showspaces=false,
30 showstringspaces=false,
31 breaklines=true,
32 breakautoindent=true,
33 captionpos=t
34 }
35 \usepackage{fontspec}
36 \usepackage[abbrevs=leipzig]{expex-acro}
37 \lingset{belowglpreambleskip=0ex,aboveglftskip=-0.2ex,aboveexskip=-0.2ex,belowexskip=-1ex}
38 \usepackage{hyperref}
39 \EnableCrossrefs
40 \CodelineIndex
41 \RecordChanges
42 \begin{document}
43 \DocInput{expex-acro.dtx}
44 \end{document}
45 %</driver>
46 % \fi
47
48 %\CheckSum{0}
49
50 %\changes{v0.0.3}{2023/08/23}{More versatile exref command in LaTeX label mode; removed underscores from abbreviations.}
51 %\changes{v0.0.2}{2022/05/17}{Options for predefined abbreviations and exref modes.}
52 %\changes{v0.0.1}{2022/04/28}{Initial release}
53
54 %\GetFileInfo{expex-acro.sty}
55
56 %\DoNotIndex{\#,\$,\%,\&,\@,\\,\{,\},\^,\_,\~,\ }
57 %\DoNotIndex{\@ne}
58 %\DoNotIndex{\advance,\begingroup,\catcode,\closein}
59 %\DoNotIndex{\closeout,\day,\def,\edef,\else,\empty,\endgroup}
60 %\title{The \textsf{expex-acro} package\thanks{This document
61 %corresponds to \textsf{expex-acro}~\fileversion,
62 %dated~\filedate.}}
63 %\author{Florian Matter \\ \texttt{[email protected]}}
64 %
65 %\maketitle
66 %\tableofcontents
67 %\section{Introduction}
68 %
69 %\textsf{expex-acro}, as the name suggests, combines the \textsf{expex} (for typesetting linguistic examples) and \textsf{acro} (for acronyms) packages.
70 %It provides commands for the following functionalities: referring to examples (Section \ref{sec:exref}), registering and using glossing abbreviations (Section \ref{sec:abbrevs}), and common notations in linguistics (Section \ref{sec:commands}).
71 %For detailed instructions, refer to the respective documentations of \textsf{expex} and \textsf{acro}.
72 %
73 %Below is a multipart example typeset using \textsf{expex} and the |\gl{}| command.
74 %Note that it uses two distinct labeling mechanisms, the native \textsf{expex} |<tag>| notation, and the \LaTeX{} |\label{tag}| notation.
75 %Usually, you would use only one of the two in your examples.
76 % \iffalse
77 %<*example>
78 % \fi
79 \let\orilabel\label
80 \begin{LTXexample}[preset=\let\label\orilabel]
81 \pex<ex1> \label{ex:1}
82 \a<bernese> \label{ex:bernese}
83 \begingl
84 \glpreamble Bernese German//
85 \glpreamble \obj{üsne Vättere}//
86 \gla üs-ne vätter-e//
87 \glb our-\gl{dat}.\gl{pl} father.\gl{pl}-\gl{dat}.\gl{pl}//
88 \glft \qu{to our fathers}//
89 \endgl
90 \a<latin> \label{ex:latin}
91 \begingl
92 \glpreamble Latin//
93 \glpreamble \obj{insularum}//
94 \gla insul-arum //
95 \glb island-\gl{gen};\gl{pl}//
96 \glft \qu{of the islands}//
97 \endgl
98 \xe
99 \end{LTXexample}
100 % \iffalse
101 %</example>
102 % \fi
103 %
104 %\section{Referring to examples}\label{sec:exref}
105 %\DescribeMacro{\exref} The |\exref| command can be used to refer to examples in text.
106 %The package option |refmode| determines how |\exref| will behave:
107 % \iffalse
108 %<*example>
109 % \fi
110 To use the built-in tag system (default):
111 \begin{lstlisting}
112 \usepackage[refmode=expex]{expex-acro}
113 \end{lstlisting}
114 To use \LaTeX{} |\label|s:
115 \begin{lstlisting}
116 \usepackage[refmode=latex]{expex-acro}
117 \end{lstlisting}
118 % \iffalse
119 %</example>
120 % \fi
121 %\subsection{Using native \texttt{expex} tags}
122 % \textsf{expex} has its own tag system, e.g.\ |<ex1>| in \exref{ex1} above.
123 % The corresponding usage is |\exref|\oarg{id1}\marg{id2}.
124 % Note that when using the \textsf{expex} mechanism, subexamples need to be referred to by their |\pex|'s tag and a period:
125 % \iffalse
126 %<*example>
127 % \fi
128 \begin{LTXexample}
129 \exref{ex1}, \exref{ex1.bernese}, and \exref{ex1.latin}.
130 \end{LTXexample}
131 % \iffalse
132 %</example>
133 % \fi
134 % If an optional argument is given, |\exref| will assume that these are two examples in a range:
135 % \iffalse
136 %<*example>
137 % \fi
138 \begin{LTXexample}
139 \exref[ex1.bernese]{ex1.latin}
140 \end{LTXexample}
141 % \iffalse
142 %</example>
143 % \fi
144 %\subsection{Using \LaTeX{} labels}
145 %\RenewDocumentCommand{\exref}{ o m }{
146 % \IfValueTF{#1} {(\ref{#2}#1)}{(\ref{#2})}}
147 % The alternative is to use the usual \LaTeX{} |\label| commands in your examples, like |\label{ex:1}| in \exref{ex:1} above.
148 % The corresponding usage is |\exref|\oarg{range}\oarg{id2}\marg{id}.
149 % In this mode, one can directly refer to subexamples:
150 % \iffalse
151 %<*example>
152 % \fi
153 \begin{LTXexample}
154 \exref{ex:1}, \exref{ex:bernese}, and \exref{ex:latin}.
155 \end{LTXexample}
156 % \iffalse
157 %</example>
158 % \fi
159 %The first optional argument is simply inserted after the mandatory argument; ranges of subexamples can be done this way.
160 % \iffalse
161 %<*example>
162 % \fi
163 \begin{LTXexample}
164 \exref[a--b]{ex:1}
165 \end{LTXexample}
166 % \iffalse
167 %</example>
168 % \fi
169 % The second optional argument is interpreted as the start of an example range, ending with the mandatory argument.
170 %\section{Glossing abbreviations}\label{sec:abbrevs}
171 %\textsf{expex-acro} loads the \textsf{acro} package for defining glossing abbreviations, displaying them in running text, and printing a list of the ones used.
172 %\subsection{Package options}
173 %\DescribeMacro{abbrevs}
174 % By default, \textsf{expex-acro} loads no pre-defined glossing abbreviations.
175 % This can be changed by using either
176 % \iffalse
177 %<*example>
178 % \fi
179 \begin{lstlisting}
180 \usepackage[abbrevs=leipzig]{expex-acro}
181 \end{lstlisting}
182 or
183 \begin{lstlisting}
184 \usepackage[abbrevs=all]{expex-acro}
185 \end{lstlisting}
186 % \iffalse
187 %</example>
188 % \fi
189 %Note that the current version of \textsf{acro} becomes significantly slower when loading long abbreviation lists (\url{https://github.com/cgnieder/acro/issues/205}).
190 %Thus, there is a trade-off between having to manually define every glossing abbreviation you use, and speed.
191 %\subsection{Commands}
192 %\DescribeMacro{\newGlossingAbbrev} Define a new glossing abbreviation.
193 % Usage: |\newGlossingAbbrev|\marg{key}\marg{meaning}.
194 %Example: |\newGlossingAbbrev{occ}{occultive}|.\\
195 %\DescribeMacro{\gl} Render a glossing abbreviation.
196 % Usage: |\gl|\marg{key}.
197 %Example: |\gl{occ}|.\\
198 %\DescribeMacro{\glossingAbbrevsList} Print list of used glossing abbreviations.
199 % Usage: |\glossingAbbrevsList|. Demo:
200 % \iffalse
201 %<*example>
202 % \fi
203 \begin{LTXexample}
204 \glossingAbbrevsList
205 \end{LTXexample}
206 % \iffalse
207 %</example>
208 % \fi
209 %\section{Semantic commands for linguistic texts}\label{sec:commands}
210 %An oft-cited advantage of using \LaTeX{} is the separation of content and formatting.
211 %That principle is broken by using things like |\textit| for object language.
212 %Of course, italics are a wide-spread standard, but what if you need or want to change how object language is displayed for some reason?
213 %Apart from |\gl| for glosses, the following commands are built into \textsf{expex-acro}:
214 % \iffalse
215 %<*example>
216 % \fi
217 \begin{LTXexample}
218 \begin{enumerate}
219 \item \obj{xats} (object language)
220 \item \qu{cat} (free translation)
221 \item \rc{katta} (reconstructed form)
222 \item \ort{Chatz} (orthographic representation)
223 \item \lxm{chatz} (lexeme)
224 \end{enumerate}
225 \end{LTXexample}
226 % \iffalse
227 %</example>
228 % \fi
229 % \StopEventually{^^A
230 % \PrintChanges
231 % \PrintIndex}
232 % \section{Implementation}
233 % \begin{macrocode}
234 \RequirePackage{expex}
235 \RequirePackage{etoolbox}
236 \RequirePackage{xspace}
237 \RequirePackage{l3keys2e}
238 \RequirePackage{acro}
239 \RequirePackage{enumitem}
240
241 \NewAcroTemplate[list]{glossinglist}{%
242 \acroheading
243 \acropreamble
244 \begin{description}[font=\normalfont]
245 \acronymsmapF{%
246 \item[\acrowrite{short}\acroifT{alt}{/\acrowrite{alt}}]
247 \acrowrite{list}%
248 \acroifanyT{foreign,extra}{ (}%
249 \acroifT{foreign}{\acrowrite{foreign}\acroifT{extra}{, }}%
250 \acroifT{extra}{\acrowrite{extra}}%
251 \acroifanyT{foreign,extra}{)}%
252 \acropagefill
253 \acropages
254 {\acrotranslate{page}\nobreakspace}
255 {\acrotranslate{pages}\nobreakspace}%
256 }
257 {\item\AcroRerun}
258 \end{description}
259 }
260
261 \ExplSyntaxOn
262 \keys_define:nn { expex-acro }{
263 abbrevs .tl_set:N = \l_abbrevs_tl,
264 abbrevs .initial:n = none,
265 refmode .tl_set:N = \l_refmode_tl,
266 refmode .initial:n = expex,
267 }
268 \ProcessKeysOptions{expex-acro}
269 \str_if_eq:VnT \l_abbrevs_tl {leipzig} {
270 \DeclareAcronym{1}{short=1,long=first~person,short-format=\scshape}
271 \DeclareAcronym{2}{short=2,long=second~person,short-format=\scshape}
272 \DeclareAcronym{3}{short=3,long=third~person,short-format=\scshape}
273 \DeclareAcronym{a}{short=a,long=agent-like~argument~of~canonical~transitive~verb,short-format=\scshape}
274 \DeclareAcronym{abl}{short=abl,long=ablative,short-format=\scshape}
275 \DeclareAcronym{abs}{short=abs,long=absolutive,short-format=\scshape}
276 \DeclareAcronym{acc}{short=acc,long=accusative,short-format=\scshape}
277 \DeclareAcronym{adj}{short=adj,long=adjective,short-format=\scshape}
278 \DeclareAcronym{adv}{short=adv,long=adverb(ial),short-format=\scshape}
279 \DeclareAcronym{agr}{short=agr,long=agreement,short-format=\scshape}
280 \DeclareAcronym{all}{short=all,long=allative,short-format=\scshape}
281 \DeclareAcronym{antip}{short=antip,long=antipassive,short-format=\scshape}
282 \DeclareAcronym{appl}{short=appl,long=applicative,short-format=\scshape}
283 \DeclareAcronym{art}{short=art,long=article,short-format=\scshape}
284 \DeclareAcronym{aux}{short=aux,long=auxiliary,short-format=\scshape}
285 \DeclareAcronym{ben}{short=ben,long=benefactive,short-format=\scshape}
286 \DeclareAcronym{caus}{short=caus,long=causative,short-format=\scshape}
287 \DeclareAcronym{clf}{short=clf,long=classifier,short-format=\scshape}
288 \DeclareAcronym{com}{short=com,long=comitative,short-format=\scshape}
289 \DeclareAcronym{comp}{short=comp,long=complementizer,short-format=\scshape}
290 \DeclareAcronym{compl}{short=compl,long=completive,short-format=\scshape}
291 \DeclareAcronym{cond}{short=cond,long=conditional,short-format=\scshape}
292 \DeclareAcronym{cop}{short=cop,long=copula,short-format=\scshape}
293 \DeclareAcronym{cvb}{short=cvb,long=converb,short-format=\scshape}
294 \DeclareAcronym{dat}{short=dat,long=dative,short-format=\scshape}
295 \DeclareAcronym{decl}{short=decl,long=declarative,short-format=\scshape}
296 \DeclareAcronym{def}{short=def,long=definite,short-format=\scshape}
297 \DeclareAcronym{dem}{short=dem,long=demonstrative,short-format=\scshape}
298 \DeclareAcronym{det}{short=det,long=determiner,short-format=\scshape}
299 \DeclareAcronym{dist}{short=dist,long=distal,short-format=\scshape}
300 \DeclareAcronym{distr}{short=distr,long=distributive,short-format=\scshape}
301 \DeclareAcronym{du}{short=du,long=dual,short-format=\scshape}
302 \DeclareAcronym{dur}{short=dur,long=durative,short-format=\scshape}
303 \DeclareAcronym{erg}{short=erg,long=ergative,short-format=\scshape}
304 \DeclareAcronym{excl}{short=excl,long=exclusive,short-format=\scshape}
305 \DeclareAcronym{f}{short=f,long=feminine,short-format=\scshape}
306 \DeclareAcronym{foc}{short=foc,long=focus,short-format=\scshape}
307 \DeclareAcronym{fut}{short=fut,long=future,short-format=\scshape}
308 \DeclareAcronym{gen}{short=gen,long=genitive,short-format=\scshape}
309 \DeclareAcronym{imp}{short=imp,long=imperative,short-format=\scshape}
310 \DeclareAcronym{incl}{short=incl,long=inclusive,short-format=\scshape}
311 \DeclareAcronym{ind}{short=ind,long=indicative,short-format=\scshape}
312 \DeclareAcronym{indf}{short=indf,long=indefinite,short-format=\scshape}
313 \DeclareAcronym{inf}{short=inf,long=infinitive,short-format=\scshape}
314 \DeclareAcronym{ins}{short=ins,long=instrumental,short-format=\scshape}
315 \DeclareAcronym{intr}{short=intr,long=intransitive,short-format=\scshape}
316 \DeclareAcronym{ipfv}{short=ipfv,long=imperfective,short-format=\scshape}
317 \DeclareAcronym{irr}{short=irr,long=irrealis,short-format=\scshape}
318 \DeclareAcronym{loc}{short=loc,long=locative,short-format=\scshape}
319 \DeclareAcronym{m}{short=m,long=masculine,short-format=\scshape}
320 \DeclareAcronym{n}{short=n,long=neuter,short-format=\scshape}
321 \DeclareAcronym{neg}{short=neg,long=negation,short-format=\scshape}
322 \DeclareAcronym{nmlz}{short=nmlz,long=nominalizer/nominalization,short-format=\scshape}
323 \DeclareAcronym{nom}{short=nom,long=nominative,short-format=\scshape}
324 \DeclareAcronym{obj}{short=obj,long=object,short-format=\scshape}
325 \DeclareAcronym{obl}{short=obl,long=oblique,short-format=\scshape}
326 \DeclareAcronym{p}{short=p,long=patient-like~argument~of~canonical~transitive~verb,short-format=\scshape}
327 \DeclareAcronym{pass}{short=pass,long=passive,short-format=\scshape}
328 \DeclareAcronym{pfv}{short=pfv,long=perfective,short-format=\scshape}
329 \DeclareAcronym{pl}{short=pl,long=plural,short-format=\scshape}
330 \DeclareAcronym{poss}{short=poss,long=possessive,short-format=\scshape}
331 \DeclareAcronym{pred}{short=pred,long=predicative,short-format=\scshape}
332 \DeclareAcronym{prf}{short=prf,long=perfect,short-format=\scshape}
333 \DeclareAcronym{prs}{short=prs,long=present,short-format=\scshape}
334 \DeclareAcronym{prog}{short=prog,long=progressive,short-format=\scshape}
335 \DeclareAcronym{proh}{short=proh,long=prohibitive,short-format=\scshape}
336 \DeclareAcronym{prox}{short=prox,long=proximal/proximate,short-format=\scshape}
337 \DeclareAcronym{pst}{short=pst,long=past,short-format=\scshape}
338 \DeclareAcronym{ptcp}{short=ptcp,long=participle,short-format=\scshape}
339 \DeclareAcronym{purp}{short=purp,long=purposive,short-format=\scshape}
340 \DeclareAcronym{q}{short=q,long=question~particle/marker,short-format=\scshape}
341 \DeclareAcronym{quot}{short=quot,long=quotative,short-format=\scshape}
342 \DeclareAcronym{recp}{short=recp,long=reciprocal,short-format=\scshape}
343 \DeclareAcronym{refl}{short=refl,long=reflexive,short-format=\scshape}
344 \DeclareAcronym{rel}{short=rel,long=relative,short-format=\scshape}
345 \DeclareAcronym{res}{short=res,long=resultative,short-format=\scshape}
346 \DeclareAcronym{s}{short=s,long=single~argument~of~canonical~intransitive~verb,short-format=\scshape}
347 \DeclareAcronym{sbj}{short=sbj,long=subject,short-format=\scshape}
348 \DeclareAcronym{sbjv}{short=sbjv,long=subjunctive,short-format=\scshape}
349 \DeclareAcronym{sg}{short=sg,long=singular,short-format=\scshape}
350 \DeclareAcronym{top}{short=top,long=topic,short-format=\scshape}
351 \DeclareAcronym{tr}{short=tr,long=transitive,short-format=\scshape}
352 \DeclareAcronym{voc}{short=voc,long=vocative,short-format=\scshape}
353 }
354 \str_if_eq:VnT \l_abbrevs_tl {all} {
355 \DeclareAcronym{1}{short=1,long=first~person,short-format=\scshape}
356 \DeclareAcronym{2}{short=2,long=second~person,short-format=\scshape}
357 \DeclareAcronym{3}{short=3,long=third~person,short-format=\scshape}
358 \DeclareAcronym{a}{short=a,long=agent-like~argument~of~canonical~transitive~verb,short-format=\scshape}
359 \DeclareAcronym{abl}{short=abl,long=ablative,short-format=\scshape}
360 \DeclareAcronym{abs}{short=abs,long=absolutive,short-format=\scshape}
361 \DeclareAcronym{acc}{short=acc,long=accusative,short-format=\scshape}
362 \DeclareAcronym{adj}{short=adj,long=adjective,short-format=\scshape}
363 \DeclareAcronym{adv}{short=adv,long=adverb(ial),short-format=\scshape}
364 \DeclareAcronym{agr}{short=agr,long=agreement,short-format=\scshape}
365 \DeclareAcronym{all}{short=all,long=allative,short-format=\scshape}
366 \DeclareAcronym{antip}{short=antip,long=antipassive,short-format=\scshape}
367 \DeclareAcronym{appl}{short=appl,long=applicative,short-format=\scshape}
368 \DeclareAcronym{art}{short=art,long=article,short-format=\scshape}
369 \DeclareAcronym{aux}{short=aux,long=auxiliary,short-format=\scshape}
370 \DeclareAcronym{ben}{short=ben,long=benefactive,short-format=\scshape}
371 \DeclareAcronym{caus}{short=caus,long=causative,short-format=\scshape}
372 \DeclareAcronym{clf}{short=clf,long=classifier,short-format=\scshape}
373 \DeclareAcronym{com}{short=com,long=comitative,short-format=\scshape}
374 \DeclareAcronym{comp}{short=comp,long=complementizer,short-format=\scshape}
375 \DeclareAcronym{compl}{short=compl,long=completive,short-format=\scshape}
376 \DeclareAcronym{cond}{short=cond,long=conditional,short-format=\scshape}
377 \DeclareAcronym{cop}{short=cop,long=copula,short-format=\scshape}
378 \DeclareAcronym{cvb}{short=cvb,long=converb,short-format=\scshape}
379 \DeclareAcronym{dat}{short=dat,long=dative,short-format=\scshape}
380 \DeclareAcronym{decl}{short=decl,long=declarative,short-format=\scshape}
381 \DeclareAcronym{def}{short=def,long=definite,short-format=\scshape}
382 \DeclareAcronym{dem}{short=dem,long=demonstrative,short-format=\scshape}
383 \DeclareAcronym{det}{short=det,long=determiner,short-format=\scshape}
384 \DeclareAcronym{dist}{short=dist,long=distal,short-format=\scshape}
385 \DeclareAcronym{distr}{short=distr,long=distributive,short-format=\scshape}
386 \DeclareAcronym{du}{short=du,long=dual,short-format=\scshape}
387 \DeclareAcronym{dur}{short=dur,long=durative,short-format=\scshape}
388 \DeclareAcronym{erg}{short=erg,long=ergative,short-format=\scshape}
389 \DeclareAcronym{excl}{short=excl,long=exclusive,short-format=\scshape}
390 \DeclareAcronym{f}{short=f,long=feminine,short-format=\scshape}
391 \DeclareAcronym{foc}{short=foc,long=focus,short-format=\scshape}
392 \DeclareAcronym{fut}{short=fut,long=future,short-format=\scshape}
393 \DeclareAcronym{gen}{short=gen,long=genitive,short-format=\scshape}
394 \DeclareAcronym{imp}{short=imp,long=imperative,short-format=\scshape}
395 \DeclareAcronym{incl}{short=incl,long=inclusive,short-format=\scshape}
396 \DeclareAcronym{ind}{short=ind,long=indicative,short-format=\scshape}
397 \DeclareAcronym{indf}{short=indf,long=indefinite,short-format=\scshape}
398 \DeclareAcronym{inf}{short=inf,long=infinitive,short-format=\scshape}
399 \DeclareAcronym{ins}{short=ins,long=instrumental,short-format=\scshape}
400 \DeclareAcronym{intr}{short=intr,long=intransitive,short-format=\scshape}
401 \DeclareAcronym{ipfv}{short=ipfv,long=imperfective,short-format=\scshape}
402 \DeclareAcronym{irr}{short=irr,long=irrealis,short-format=\scshape}
403 \DeclareAcronym{loc}{short=loc,long=locative,short-format=\scshape}
404 \DeclareAcronym{m}{short=m,long=masculine,short-format=\scshape}
405 \DeclareAcronym{n}{short=n,long=neuter,short-format=\scshape}
406 \DeclareAcronym{neg}{short=neg,long=negation,short-format=\scshape}
407 \DeclareAcronym{nmlz}{short=nmlz,long=nominalizer/nominalization,short-format=\scshape}
408 \DeclareAcronym{nom}{short=nom,long=nominative,short-format=\scshape}
409 \DeclareAcronym{obj}{short=obj,long=object,short-format=\scshape}
410 \DeclareAcronym{obl}{short=obl,long=oblique,short-format=\scshape}
411 \DeclareAcronym{p}{short=p,long=patient-like~argument~of~canonical~transitive~verb,short-format=\scshape}
412 \DeclareAcronym{pass}{short=pass,long=passive,short-format=\scshape}
413 \DeclareAcronym{pfv}{short=pfv,long=perfective,short-format=\scshape}
414 \DeclareAcronym{pl}{short=pl,long=plural,short-format=\scshape}
415 \DeclareAcronym{poss}{short=poss,long=possessive,short-format=\scshape}
416 \DeclareAcronym{pred}{short=pred,long=predicative,short-format=\scshape}
417 \DeclareAcronym{prf}{short=prf,long=perfect,short-format=\scshape}
418 \DeclareAcronym{prs}{short=prs,long=present,short-format=\scshape}
419 \DeclareAcronym{prog}{short=prog,long=progressive,short-format=\scshape}
420 \DeclareAcronym{proh}{short=proh,long=prohibitive,short-format=\scshape}
421 \DeclareAcronym{prox}{short=prox,long=proximal/proximate,short-format=\scshape}
422 \DeclareAcronym{pst}{short=pst,long=past,short-format=\scshape}
423 \DeclareAcronym{ptcp}{short=ptcp,long=participle,short-format=\scshape}
424 \DeclareAcronym{purp}{short=purp,long=purposive,short-format=\scshape}
425 \DeclareAcronym{q}{short=q,long=question~particle/marker,short-format=\scshape}
426 \DeclareAcronym{quot}{short=quot,long=quotative,short-format=\scshape}
427 \DeclareAcronym{recp}{short=recp,long=reciprocal,short-format=\scshape}
428 \DeclareAcronym{refl}{short=refl,long=reflexive,short-format=\scshape}
429 \DeclareAcronym{rel}{short=rel,long=relative,short-format=\scshape}
430 \DeclareAcronym{res}{short=res,long=resultative,short-format=\scshape}
431 \DeclareAcronym{s}{short=s,long=single~argument~of~canonical~intransitive~verb,short-format=\scshape}
432 \DeclareAcronym{sbj}{short=sbj,long=subject,short-format=\scshape}
433 \DeclareAcronym{sbjv}{short=sbjv,long=subjunctive,short-format=\scshape}
434 \DeclareAcronym{sg}{short=sg,long=singular,short-format=\scshape}
435 \DeclareAcronym{top}{short=top,long=topic,short-format=\scshape}
436 \DeclareAcronym{tr}{short=tr,long=transitive,short-format=\scshape}
437 \DeclareAcronym{voc}{short=voc,long=vocative,short-format=\scshape}
438 %BREAK
439 \DeclareAcronym{1+2}{short=1+2,long=first~and~second~person,short-format=\scshape}
440 \DeclareAcronym{1+3}{short=1+3,long=first~and~third~person,short-format=\scshape}
441 \DeclareAcronym{abort}{short=abort,long=abortive,short-format=\scshape}
442 \DeclareAcronym{act}{short=act,long=Actor,short-format=\scshape}
443 \DeclareAcronym{ade}{short=ade,long=adessive,short-format=\scshape}
444 \DeclareAcronym{adjz}{short=adjz,long=adjectivizer,short-format=\scshape}
445 \DeclareAcronym{adm}{short=adm,long=admonitive,short-format=\scshape}
446 \DeclareAcronym{adp}{short=adp,long=adposition,short-format=\scshape}
447 \DeclareAcronym{advz}{short=advz,long=adverbalizer,short-format=\scshape}
448 \DeclareAcronym{aff}{short=aff,long=affirmative,short-format=\scshape}
449 \DeclareAcronym{agt}{short=agt,long=agent,short-format=\scshape}
450 \DeclareAcronym{ana}{short=ana,long=anaphoric,short-format=\scshape}
451 \DeclareAcronym{and}{short=and,long=andative,short-format=\scshape}
452 \DeclareAcronym{anim}{short=anim,long=animate,short-format=\scshape}
453 \DeclareAcronym{antiappl}{short=antiappl,long=antiapplicative,short-format=\scshape}
454 \DeclareAcronym{antic}{short=antic,long=anticausative,short-format=\scshape}
455 \DeclareAcronym{asp}{short=asp,long=aspect,short-format=\scshape}
456 \DeclareAcronym{ass}{short=ass,long=associative,short-format=\scshape}
457 \DeclareAcronym{atten}{short=atten,long=attenuative,short-format=\scshape}
458 \DeclareAcronym{attr}{short=attr,long=attributive,short-format=\scshape}
459 \DeclareAcronym{attrz}{short=attrz,long=attributivizer,short-format=\scshape}
460 \DeclareAcronym{aug}{short=aug,long=augmentative,short-format=\scshape}
461 \DeclareAcronym{av}{short=av,long=actor~voice,short-format=\scshape}
462 \DeclareAcronym{cap}{short=cap,long=(cap-)ability,short-format=\scshape}
463 \DeclareAcronym{cert}{short=cert,long=certainty,short-format=\scshape}
464 \DeclareAcronym{cess}{short=cess,long=cessative,short-format=\scshape}
465 \DeclareAcronym{circ}{short=circ,long=circumstantial,short-format=\scshape}
466 \DeclareAcronym{cisl}{short=cisl,long=cislocative,short-format=\scshape}
467 \DeclareAcronym{cit}{short=cit,long=citation~form,short-format=\scshape}
468 \DeclareAcronym{cntr}{short=cntr,long=contrastive,short-format=\scshape}
469 \DeclareAcronym{col}{short=col,long=collective,short-format=\scshape}
470 \DeclareAcronym{compr}{short=compr,long=comparative,short-format=\scshape}
471 \DeclareAcronym{conc}{short=conc,long=concessive,short-format=\scshape}
472 \DeclareAcronym{cont}{short=cont,long=continuative,short-format=\scshape}
473 \DeclareAcronym{cor}{short=cor,long=coreference,short-format=\scshape}
474 \DeclareAcronym{cpl}{short=cpl,long=completive,short-format=\scshape}
475 \DeclareAcronym{dei}{short=dei,long=deixis/deictic,short-format=\scshape}
476 \DeclareAcronym{denmlz}{short=denmlz,long=denominalizer,short-format=\scshape}
477 \DeclareAcronym{dep}{short=dep,long=dependent,short-format=\scshape}
478 \DeclareAcronym{des}{short=des,long=desiderative,short-format=\scshape}
479 \DeclareAcronym{detrz}{short=detrz,long=detransitivizer,short-format=\scshape}
480 \DeclareAcronym{dim}{short=dim,long=diminutive,short-format=\scshape}
481 \DeclareAcronym{dir}{short=dir,long=direct,short-format=\scshape}
482 \DeclareAcronym{ditr}{short=ditr,long=ditransitive,short-format=\scshape}
483 \DeclareAcronym{dm}{short=dm,long=discourse~marker,short-format=\scshape}
484 \DeclareAcronym{do}{short=do,long=direct~object,short-format=\scshape}
485 \DeclareAcronym{ds}{short=ds,long=different~subject,short-format=\scshape}
486 \DeclareAcronym{dub}{short=dub,long=dubitative,short-format=\scshape}
487 \DeclareAcronym{ela}{short=ela,long=elative,short-format=\scshape}
488 \DeclareAcronym{emp}{short=emp,long=emphatic,short-format=\scshape}
489 \DeclareAcronym{ep}{short=ep,long=epenthetic,short-format=\scshape}
490 \DeclareAcronym{epis}{short=epis,long=epistemic~mood,short-format=\scshape}
491 \DeclareAcronym{ess}{short=ess,long=essive,short-format=\scshape}
492 \DeclareAcronym{evid}{short=evid,long=evidentiality,short-format=\scshape}
493 \DeclareAcronym{exist}{short=exist,long=existential,short-format=\scshape}
494 \DeclareAcronym{exp}{short=exp,long=experiental~or~direct~evidentiality,short-format=\scshape}
495 \DeclareAcronym{eyewit}{short=eyewit,long=eyewitness,short-format=\scshape}
496 \DeclareAcronym{fam}{short=fam,long=familiar~register,short-format=\scshape}
497 \DeclareAcronym{fin}{short=fin,long=finite,short-format=\scshape}
498 \DeclareAcronym{form}{short=form,long=formal~register,short-format=\scshape}
499 \DeclareAcronym{freq}{short=freq,long=frequentative,short-format=\scshape}
500 \DeclareAcronym{frust}{short=frust,long=frustrative,short-format=\scshape}
501 \DeclareAcronym{g}{short=g,long=gender,short-format=\scshape}
502 \DeclareAcronym{ger}{short=ger,long=gerund,short-format=\scshape}
503 \DeclareAcronym{gno}{short=gno,long=gnomic,short-format=\scshape}
504 \DeclareAcronym{goal}{short=goal,long=goal,short-format=\scshape}
505 \DeclareAcronym{hab}{short=hab,long=habitual,short-format=\scshape}
506 \DeclareAcronym{hest}{short=hest,long=hesternal~past,short-format=\scshape}
507 \DeclareAcronym{hist}{short=hist,long=historical~past,short-format=\scshape}
508 \DeclareAcronym{hod}{short=hod,long=hodiernal~past,short-format=\scshape}
509 \DeclareAcronym{hon}{short=hon,long=honorative,short-format=\scshape}
510 \DeclareAcronym{hort}{short=hort,long=hortative,short-format=\scshape}
511 \DeclareAcronym{hsy}{short=hsy,long=hearsay/indirect~evidentiality,short-format=\scshape}
512 \DeclareAcronym{hum}{short=hum,long=human,short-format=\scshape}
513 \DeclareAcronym{hyp}{short=hyp,long=hypothetical,short-format=\scshape}
514 \DeclareAcronym{ideo}{short=ideo,long=ideophone,short-format=\scshape}
515 \DeclareAcronym{ignor}{short=ignor,long=ignorative,short-format=\scshape}
516 \DeclareAcronym{ill}{short=ill,long=illative,short-format=\scshape}
517 \DeclareAcronym{imm}{short=imm,long=immediate~past,short-format=\scshape}
518 \DeclareAcronym{imperf}{short=imperf,long=imperfect,short-format=\scshape}
519 \DeclareAcronym{imprs}{short=imprs,long=impersonal,short-format=\scshape}
520 \DeclareAcronym{inal}{short=inal,long=inalienable,short-format=\scshape}
521 \DeclareAcronym{inan}{short=inan,long=inanimate,short-format=\scshape}
522 \DeclareAcronym{inch}{short=inch,long=inchoative,short-format=\scshape}
523 \DeclareAcronym{incpl}{short=incpl,long=incompletive,short-format=\scshape}
524 \DeclareAcronym{ine}{short=ine,long=inessive,short-format=\scshape}
525 \DeclareAcronym{infr}{short=infr,long=inferred/conjectured~evidentiality,short-format=\scshape}
526 \DeclareAcronym{int}{short=int,long=intermediate~past,short-format=\scshape}
527 \DeclareAcronym{inten}{short=inten,long=intentional,short-format=\scshape}
528 \DeclareAcronym{interj}{short=interj,long=interjection,short-format=\scshape}
529 \DeclareAcronym{ints}{short=ints,long=intensifier,short-format=\scshape}
530 \DeclareAcronym{inv}{short=inv,long=inverse,short-format=\scshape}
531 \DeclareAcronym{invis}{short=invis,long=invisible,short-format=\scshape}
532 \DeclareAcronym{io}{short=io,long=indirect~object,short-format=\scshape}
533 \DeclareAcronym{iter}{short=iter,long=iterative,short-format=\scshape}
534 \DeclareAcronym{jus}{short=jus,long=jussive,short-format=\scshape}
535 \DeclareAcronym{lat}{short=lat,long=lative,short-format=\scshape}
536 \DeclareAcronym{lk}{short=lk,long=linker,short-format=\scshape}
537 \DeclareAcronym{med}{short=med,long=medial,short-format=\scshape}
538 \DeclareAcronym{mid}{short=mid,long=middle,short-format=\scshape}
539 \DeclareAcronym{min}{short=min,long=minimal,short-format=\scshape}
540 \DeclareAcronym{mir}{short=mir,long=(ad)mirative,short-format=\scshape}
541 \DeclareAcronym{mod}{short=mod,long=modal,short-format=\scshape}
542 \DeclareAcronym{motimp}{short=motimp,long=motional~imperative,short-format=\scshape}
543 \DeclareAcronym{mvt}{short=mvt,long=movement,short-format=\scshape}
544 \DeclareAcronym{narr}{short=narr,long=narrative,short-format=\scshape}
545 \DeclareAcronym{ncor}{short=ncor,long=non-coreference,short-format=\scshape}
546 \DeclareAcronym{nfut}{short=nfut,long=non-future,short-format=\scshape}
547 \DeclareAcronym{nhum}{short=nhum,long=non-human,short-format=\scshape}
548 \DeclareAcronym{nonf}{short=nonf,long=nonfinite,short-format=\scshape}
549 \DeclareAcronym{nposs}{short=nposs,long=unpossessed,short-format=\scshape}
550 \DeclareAcronym{npst}{short=npst,long=non-past,short-format=\scshape}
551 \DeclareAcronym{nrec}{short=nrec,long=non-recent~past,short-format=\scshape}
552 \DeclareAcronym{nsg}{short=nsg,long=non-singular,short-format=\scshape}
553 \DeclareAcronym{nspec}{short=nspec,long=non-specific,short-format=\scshape}
554 \DeclareAcronym{obv}{short=obv,long=obviative,short-format=\scshape}
555 \DeclareAcronym{opt}{short=opt,long=optative,short-format=\scshape}
556 \DeclareAcronym{part}{short=part,long=particle,short-format=\scshape}
557 \DeclareAcronym{pat}{short=pat,long=patient,short-format=\scshape}
558 \DeclareAcronym{pauc}{short=pauc,long=paucal,short-format=\scshape}
559 \DeclareAcronym{pej}{short=pej,long=pejorativre,short-format=\scshape}
560 \DeclareAcronym{per}{short=per,long=perlative,short-format=\scshape}
561 \DeclareAcronym{perm}{short=perm,long=permissive,short-format=\scshape}
562 \DeclareAcronym{pert}{short=pert,long=pertensive,short-format=\scshape}
563 \DeclareAcronym{plup}{short=plup,long=pluperfect,short-format=\scshape}
564 \DeclareAcronym{pnct}{short=pnct,long=punctual,short-format=\scshape}
565 \DeclareAcronym{po}{short=po,long=primary~object,short-format=\scshape}
566 \DeclareAcronym{pol}{short=pol,long=polite,short-format=\scshape}
567 \DeclareAcronym{posimp}{short=posimp,long=positional~imperative,short-format=\scshape}
568 \DeclareAcronym{poste}{short=poste,long=postessive,short-format=\scshape}
569 \DeclareAcronym{postp}{short=postp,long=postposition,short-format=\scshape}
570 \DeclareAcronym{pot}{short=pot,long=potential,short-format=\scshape}
571 \DeclareAcronym{prep}{short=prep,long=preposition,short-format=\scshape}
572 \DeclareAcronym{priv}{short=priv,long=privative,short-format=\scshape}
573 \DeclareAcronym{pro}{short=pro,long=pronoun,short-format=\scshape}
574 \DeclareAcronym{prob}{short=prob,long=probability,short-format=\scshape}
575 \DeclareAcronym{pros}{short=pros,long=prosecutive,short-format=\scshape}
576 \DeclareAcronym{ptv}{short=ptv,long=partitive,short-format=\scshape}
577 \DeclareAcronym{r}{short=R,long=recipient-like~argument~in~ditransitive~clause,short-format=\scshape}
578 \DeclareAcronym{real}{short=real,long=realis,short-format=\scshape}
579 \DeclareAcronym{reas}{short=reas,long=reason,short-format=\scshape}
580 \DeclareAcronym{rec}{short=rec,long=recent~past,short-format=\scshape}
581 \DeclareAcronym{ref}{short=ref,long=referential,short-format=\scshape}
582 \DeclareAcronym{reit}{short=reit,long=reiterative,short-format=\scshape}
583 \DeclareAcronym{rem}{short=rem,long=remote~past,short-format=\scshape}
584 \DeclareAcronym{rep}{short=rep,long=repetitive,short-format=\scshape}
585 \DeclareAcronym{resum}{short=resum,long=resumptive,short-format=\scshape}
586 \DeclareAcronym{rev}{short=rev,long=reversative,short-format=\scshape}
587 \DeclareAcronym{sa}{short=S\textsubscript{A},long=S~marked~like~A,short-format=\scshape}
588 \DeclareAcronym{sp}{short=S\textsubscript{P},long=S~marked~like~P,short-format=\scshape}
589 \DeclareAcronym{sap}{short=sap,long=speech~act~participant,short-format=\scshape}
590 \DeclareAcronym{sem}{short=sem,long=semelfactive,short-format=\scshape}
591 \DeclareAcronym{seq}{short=seq,long=sequential,short-format=\scshape}
592 \DeclareAcronym{sim}{short=sim,long=similative,short-format=\scshape}
593 \DeclareAcronym{so}{short=so,long=secondary~object,short-format=\scshape}
594 \DeclareAcronym{spec}{short=spec,long=specifier,short-format=\scshape}
595 \DeclareAcronym{src}{short=src,long=source,short-format=\scshape}
596 \DeclareAcronym{ss}{short=ss,long=same~subject,short-format=\scshape}
597 \DeclareAcronym{stat}{short=stat,long=stative,short-format=\scshape}
598 \DeclareAcronym{subr}{short=subr,long=subordinator,short-format=\scshape}
599 \DeclareAcronym{sup}{short=sup,long=supine,short-format=\scshape}
600 \DeclareAcronym{supl}{short=supl,long=superlative,short-format=\scshape}
601 \DeclareAcronym{t}{short=T,long=theme-like~argument~in~ditransitive~clause,short-format=\scshape}
602 \DeclareAcronym{tel}{short=tel,long=telic,short-format=\scshape}
603 \DeclareAcronym{temp}{short=temp,long=temporal,short-format=\scshape}
604 \DeclareAcronym{term}{short=term,long=terminative,short-format=\scshape}
605 \DeclareAcronym{tns}{short=tns,long=tense,short-format=\scshape}
606 \DeclareAcronym{transl}{short=transl,long=translative,short-format=\scshape}
607 \DeclareAcronym{trl}{short=trl,long=trial,short-format=\scshape}
608 \DeclareAcronym{trz}{short=trz,long=transitivizer,short-format=\scshape}
609 \DeclareAcronym{uncert}{short=uncert,long=uncertainty,short-format=\scshape}
610 \DeclareAcronym{und}{short=und,long=Undergoer,short-format=\scshape}
611 \DeclareAcronym{uv}{short=uv,long=undergoer~voice,short-format=\scshape}
612 \DeclareAcronym{v}{short=v,long=verb(al),short-format=\scshape}
613 \DeclareAcronym{vbz}{short=vbz,long=verbalizer,short-format=\scshape}
614 \DeclareAcronym{ven}{short=ven,long=venitive,short-format=\scshape}
615 \DeclareAcronym{vet}{short=vet,long=vetative,short-format=\scshape}
616 \DeclareAcronym{vis}{short=vis,long=visible,short-format=\scshape}
617 }
618 \ExplSyntaxOff
619 % \end{macrocode}
620
621
622 \gathertags
623 \lingset{everygla=}
624
625 %\begin{macro}{\exref}
626 %Refer to examples, e.g. |\exref{kwaza-3}|. Use |\exref[a]{b}| to get (Xa-b).
627 % \begin{macrocode}
628 \ExplSyntaxOn
629 \str_if_eq:VnTF \l_refmode_tl {expex} {
630 \ProvideDocumentCommand{\exref}{ o m }{
631 \IfValueTF{#1} {
632 (\getfullref{#1}--\getref{#2})
633 }{
634 (\getfullref{#2})
635 }
636 }
637 } {
638 \ProvideDocumentCommand{\exref}{ o o m }{
639 \IfValueTF{#1} {
640 \IfValueTF{#2} {
641 (\ref{#3}-\ref{#2}#1)
642 }{
643 (\ref{#3}#1)
644 }
645 }{
646 \IfValueTF{#2} {
647 (\ref{#3}-\ref{#2})
648 }{
649 (\ref{#3})
650 }
651
652 }
653
654 }
655 }
656
657 % \end{macrocode}
658 %\end{macro}
659
660 %\begin{macro}{\exrefnil}
661 %Refer to examples without explicit numbers.
662 % \begin{macrocode}
663 \ProvideDocumentCommand{\exrefnil}{ o m }{
664 \IfValueTF{#1} {
665 (\getref{#1}--\getref{#2})
666 }{
667 (\getref{#2})
668 }
669 }
670 % \end{macrocode}
671 %\end{macro}
672
673
674 %\begin{macro}{\mexref}
675 %For multiple, non-adjacent examples.
676 % \begin{macrocode}
677 \providecommand{\mexref}[2][, ]{%
678 (%
679 \def\nextitem{\def\nextitem{#1}}% Separator
680 \renewcommand*{\do}[1]{\nextitem\getfullref{##1}}% How to process each item
681 \docsvlist{#2}% Process list
682 )%
683 }
684 % \end{macrocode}
685 %\end{macro}
686
687 %\begin{macro}{\gl}
688 % \begin{macrocode}
689 \providecommand{\gl}[1]{\acs{#1}}
690 % \end{macrocode}
691 %\end{macro}
692
693 %\begin{macro}{\newGlossingAbbrev}
694 %Define a new glossing abbreviation: |\newGlossingAbbrev{occ}{occultive}|.
695 % \begin{macrocode}
696 \providecommand{\newGlossingAbbrev}[2]{
697 \DeclareAcronym{#1}{
698 short=#1,
699 long=#2,
700 short-format=\scshape,
701 }
702 }
703 % \end{macrocode}
704 %\end{macro}
705
706 %\begin{macro}{\glossingAbbrevsList}
707 %Print the list of glossing abbreviations.
708 % \begin{macrocode}
709 \newcommand{\glossingAbbrevsList}{
710 \printacronyms[
711 template=glossinglist,
712 name=Glossing abbreviations,
713 heading=none
714 ]
715 }
716 % \end{macrocode}
717 %\end{macro}
718
719 %\begin{macro}{\obj}
720 %Object language.
721 % \begin{macrocode}
722 \providecommand{\obj}[1]{\textit{#1}}
723 % \end{macrocode}
724 %\end{macro}
725
726 %\begin{macro}{\qu}
727 %Translations.
728 % \begin{macrocode}
729 \providecommand{\qu}[1]{‘#1’}
730 % \end{macrocode}
731 %\end{macro}
732
733 %\begin{macro}{\rc}
734 %Reconstructed forms.
735 % \begin{macrocode}
736 \newcommand{\rc}[1]{*\textit{#1}}
737 % \end{macrocode}
738 %\end{macro}
739
740 %\begin{macro}{\ort}
741 %Orthographic forms.
742 % \begin{macrocode}
743 \providecommand{\ort}[1]{$\langle$#1$\rangle$}
744 % \end{macrocode}
745 %\end{macro}
746
747 %\begin{macro}{\pnt}
748 %Phonetic brackets.
749 % \begin{macrocode}
750 \providecommand{\pnt}[1]{[#1]}
751 % \end{macrocode}
752 %\end{macro}
753
754 %\begin{macro}{\pnm}
755 %Phonemic slashes.
756 % \begin{macrocode}
757 \providecommand{\pnm}[1]{/#1/}
758 % \end{macrocode}
759 %\end{macro}
760
761 %\begin{macro}{\dbqu}
762 %Double quotation marks.
763 % \begin{macrocode}
764 \providecommand{\dbqu}[1]{“#1”}
765 % \end{macrocode}
766 %\end{macro}
767
768 %\begin{macro}{\ungr}
769 %Grammatically incorrect forms.
770 % \begin{macrocode}
771 \providecommand{\ungr}[1]{*\textit{#1}}
772 % \end{macrocode}
773 %\end{macro}
774
775 %\begin{macro}{\bad}
776 %Grammatically questionable forms.
777 % \begin{macrocode}
778 \providecommand{\bad}[1]{?\textit{#1}}
779 % \end{macrocode}
780 %\end{macro}
781
782 %\begin{macro}{\lxm}
783 %Lexemes.
784 % \begin{macrocode}
785 \providecommand{\lxm}[1]{\textsc{#1}}
786 % \end{macrocode}
787 %\end{macro}
788 % \Finale
789 \endinput