summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/expex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-06-28 22:11:06 +0000
committerKarl Berry <karl@freefriends.org>2013-06-28 22:11:06 +0000
commit4dc6598ef30e8797fb21995879e4e08d7ba94472 (patch)
tree9cd54d43c2fce3faf71cb18a11aa34297b821352 /Master/texmf-dist/tex/generic/expex
parent0c6a78a9eafdb80c434d4e858bec827d5fc8259a (diff)
expex (28jun13)
git-svn-id: svn://tug.org/texlive/trunk@31011 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/expex')
-rw-r--r--Master/texmf-dist/tex/generic/expex/epltxfn.sty18
-rw-r--r--Master/texmf-dist/tex/generic/expex/eptexfn.tex27
-rw-r--r--Master/texmf-dist/tex/generic/expex/expex-demo.tex825
-rw-r--r--Master/texmf-dist/tex/generic/expex/expex.sty5
-rw-r--r--Master/texmf-dist/tex/generic/expex/expex.tex1291
5 files changed, 2166 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/generic/expex/epltxfn.sty b/Master/texmf-dist/tex/generic/expex/epltxfn.sty
new file mode 100644
index 00000000000..d052f19807a
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/expex/epltxfn.sty
@@ -0,0 +1,18 @@
+\ProvidesPackage{epltxfn}%
+ [2011/12/05 v1.0 LaTex footnote macro for ExPex (JF)]
+\RequirePackage{expex}
+\makeatletter
+\def\everyfootnote{%
+ \keepexcntlocal
+ \excnt=1
+ \lingset{exskip=1ex,exnotype=roman,sampleexno=,
+ labeltype=alpha,labelanchor=numright,labeloffset=.6em,
+ textoffset=.6em}
+}
+\renewcommand{\@makefntext}[1]{%
+ \everyfootnote
+ \parindent=1em
+ \noindent
+ \@thefnmark.\enspace #1%
+}
+\resetatcatcode
diff --git a/Master/texmf-dist/tex/generic/expex/eptexfn.tex b/Master/texmf-dist/tex/generic/expex/eptexfn.tex
new file mode 100644
index 00000000000..2288a0aba85
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/expex/eptexfn.tex
@@ -0,0 +1,27 @@
+\message{2011/12/05 v1.0 Tex footnote macro for ExPex (JF)}
+\makeatletter
+\def\everyfootnote{%
+ \keepexcntlocal
+ \excnt=1
+ \lingset{exskip=1ex,exnotype=roman,sampleexno=,
+ labeltype=alpha,labelanchor=numright,labeloffset=.6em,
+ textoffset=.6em}
+}
+\newcount\fnno \fnno=0
+\def\footnote{\let\@sf\empty
+ \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\/\fi
+ \putfnno\@sf
+ \footnotebody}
+\def\putfnno{\global\advance\fnno by 1 $^{\the\fnno}$}
+\def\footnotebody{\expandafter\vfootnote\expandafter{\the\fnno}}
+\def\vfootnote#1{\insert\footins\bgroup
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\ht\strutbox
+ \splitmaxdepth\dp\strutbox \floatingpenalty\@MM
+ \parindent=1em
+ \leftskip\z@skip \rightskip\z@skip \spaceskip\z@skip \xspaceskip\z@skip
+ \ifx\footnotesize\undefined
+ \@expexerror{\footnotesize must be defined}\fi
+ \footnotesize
+ \everyfootnote \noindent #1.\enspace\footstrut\futurelet\next\fo@t}
+\resetatcatcode
diff --git a/Master/texmf-dist/tex/generic/expex/expex-demo.tex b/Master/texmf-dist/tex/generic/expex/expex-demo.tex
new file mode 100644
index 00000000000..fc86580b693
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/expex/expex-demo.tex
@@ -0,0 +1,825 @@
+
+% The preamble has the effect that the file can either be Texed or
+% LaTexed -- as is.
+
+\ifx\ProvidesFile\undefined
+ % if Tex
+ \input expex
+ \font\eightrm=cmr8
+ \font\eightit=cmti8
+ \font\tensc=cmcsc10
+ \let\sc=\tensc
+ \def\textsc#1{{\sc #1}}
+ \def\footnotesize{\eightrm \let\it=\eightit \baselineskip=9pt}
+ \def\enddemo #1#2{}
+ \magnification=\magstep1
+ \else
+ % if LaTex
+ \documentclass[12pt]{article}
+ \usepackage{expex}
+ \textwidth=6.5in
+ \let\enddemo=\relax
+ \begin{document}
+ \fi
+%--------------------------------------------------------------------
+\filbreak\hrule\medskip
+
+\begingroup
+\vskip\lingaboveexskip
+Example (\nextx) is well-known from the literature on parasitic
+gaps. Here we are concerned with example formatting, not with the
+interesting syntax.
+
+\ex
+I wonder which article John filed {\sl t\/} without reading {\sl e}.
+\xe
+It is beyond the scope of this investigation to determine exactly why
+John did not read the article.
+
+Multipart examples are equally straightforward.
+
+\pex Two examples of parasitic gaps.
+\a He is the man that John did not interview {\sl e\/} before
+he gave the job to {\sl e}.
+\a He is someone who John expected {\sl e\/} to be successful
+though believing {\sl e\/} to be incompetent.
+\xe
+Here, we can speculate on why John did not do an interview before
+recommending the person for a job. It is likely that the person
+was a crony of John. In (\lastx b), perhaps John knew that
+the ``someone'' went to prep school with the owner of the
+business.
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\bigskip
+If examples and parts of examples are tagged, they can be
+referred to by name.
+
+\pex<pg>
+\a This is the man that John interviewed {\sl e\/} before
+telling you that you should give the job to~{\sl e}.
+\a<A> This is someone who John expected {\sl e\/} to be successful
+though believing {\sl e\/} to be incompetent.
+\xe
+
+Now, names can be used. The name/reference pairs can be written
+to a file, making forward reference possible and backwards
+reference at a distance reliable. You can refer to part
+\getref{pg.A} of example (\getref{pg}), or (\getfullref{pg.A}).
+
+If you use a tag that has not been defined, {\sl ExPex\/} will
+let you know. If you try to reference a name which has no
+reference, \getref{pg.B} for example, a warning will be issued
+and the (bracketed) tag printed as shown at the beginning of this
+sentence. If you try to tag a part of an example which has no
+tag, {\sl ExPex\/} will let you know about that as well.
+\bigskip
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\ex
+\begingl
+\gla Mary$_i$ ist sicher, dass es den Hans nicht st\"oren
+w\"urde seiner Freundin ihr$_i$ Herz auszusch\"utten.//
+\glb Mary is sure that it the-{\sc acc} Hans not annoy would
+his-{\sc dat} girlfriend-{\sc dat} her-{\sc acc} heart-{\sc acc} {out to throw}//
+\glft `Mary is sure that it would not annoy John to reveal her
+heart to his girlfriend.'//
+\endgl
+\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\ex
+\begingl
+\gla k- wapm -a -s'i -m -wapunin -uk //
+\glb Cl V Agr Neg Agr Tns Agr //
+\glc 2 see {\sc 3acc} {} {\sc 2pl} preterit {\sc 3pl} //
+\glft `you (pl) didn't see them'//
+\endgl
+\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\pex[interpartskip=3ex]
+\a
+\begingl
+\gla pwa- min -kwa -pun//
+\glb Neg V Agr Tns //
+\glc {} give 2pl{\sc nom}.3pl{\sc acc} preterit //
+\glft `you (pl) didn't give them (something)'//
+\endgl
+\a
+\begingl[everygl=\openup.5ex,everygla=,everyglb=,
+ everyglft=\it,aboveglftskip=1.5ex]
+\gla pwa- min -kwa -pun//
+\glb Neg V Agr Tns //
+\glc {} give 2pl{\sc nom}.3pl{\sc acc} preterit //
+\glft `you (pl) didn't give them (something)'//
+\endgl
+\a
+\begingl[everygl=,everygla=\bf,everyglb=\it,
+ everyglft=,aboveglftskip=0pt]
+\gla pwa- min -kwa -pun //
+\glb Neg V Agr Tns //
+\glc {} give 2pl{\sc nom}.3pl{\sc acc} preterit //
+\glft `you (pl) didn't give them (something)'//
+\endgl
+\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\exdisplay
+The following example is well-known from the literature on
+parasitic gaps. Here we are concerned with example formatting,
+not with the interesting syntax.
+\ex
+I wonder which article John filed {\sl t\/} without reading {\sl e}.
+\xe
+Various aspects of the format are controlled by parameters, which
+can be set either globally or via an optional argument.
+\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\exdisplay
+The following example is well-known from the literature on
+parasitic gaps. Here we are concerned with example formatting,
+not with the interesting syntax.
+
+\ex[numoffset=2em,textoffset=.5em,aboveexskip=1ex,belowexskip=1ex]
+I wonder which article John filed {\sl t\/} without reading {\sl e}.
+\xe
+
+\noindent Various aspects of the format are controlled by
+parameters, which can be set either globally or via an optional
+argument.
+\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\ex
+Und hier k\"onnen wir sehen was f\"ur Unfug wird gemacht
+wenn er einen ganz langen Satz binnen kriegt.\par\nobreak
+\xe
+
+\ex~
+$\alpha$ {\it governs\/} $\beta$ if $\alpha=X^0$ (in the
+sense of X-bar theory), $\alpha$ c-commands $\beta$, and $\beta$
+is not protected by a maximal projection.
+\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\excnt=94
+\ex This is a crucial example.\xe
+It is clear that this example is related to the earlier
+example (14), which is repeated below.
+\ex[exno=14]
+This is an example that was given many pages earlier.\xe
+If we are on the right track, as the saying goes,
+we expect the next example to be grammatical. But it is not.
+\ex * \dots\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\ex[exno=$\Delta$] Earlier example.\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\ex[exno={[14, repeated]},exnoformat=X] Earlier example.\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\pex
+\a This is the first example.
+\a This is the second example.
+\xe
+
+\pex~<Pre> Multipart examples often have a title or preamble of some
+kind.
+\a This is the first example.
+\a This is the second example.
+\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\keepexcntlocal \excnt=9
+\pex
+\a I consider firemen available. (generic only)
+\a I consider firemen intelligent. (generic only)
+\xe
+Exceptional case marking (ECM) verbs seem more or less to allow both
+existential and generic interpretations of complement subjects:
+\pex
+\a I believe firemen to be available. (both generic and existential)
+\a I believe violists to be intelligent. (generic only)
+\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\keepexcntlocal \excnt=9
+\pex[sampleexno=(10)]
+\a I consider firemen available. (generic only)
+\a I consider firemen intelligent. (generic only)
+\xe
+Exceptional case marking (ECM) verbs seem more or less to allow both
+existential and generic interpretations of complement subjects:
+\pex
+\a I believe firemen to be available. (both generic and existential)
+\a I believe violists to be intelligent. (generic only)
+\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\leftline{\vbox{%
+\ex[textoffset=3em]
+\hsize=3in \rightskip=0pt plus 2em \it \advance\baselineskip by 2pt
+Und hier k\"onnen wir sehen was f\"ur Unfug wird gemacht
+wenn er einen ganz langen Satz binnen kriegt.
+\xe
+}\hfil}
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\ex *Jack and Jill wented up the hill.\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\ex \judge* Jack and Jill wented up the hill.\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\pex
+\a There is a pair of pants on the floor.
+\a \judge{?*}There are a pair of pants on the floor.
+\a \judge*There is the pair of pants on the floor.
+\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\pex
+\a There is a pair of pants on the floor.
+\a \ljudge{?*}There are a pair of pants on the floor.
+\a \ljudge*There is the pair of pants on the floor.
+\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\pex[*=?*]
+\a There is a pair of pants on the floor.
+\a \ljudge{?*}There are a pair of pants on the floor.
+\a \ljudge*There is the pair of pants on the floor.
+\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\pex[*]
+\a There is a pair of pants on the floor.
+\a \ljudge* There are a pair of pants on the floor.
+\a \ljudge* There is the pair of pants on the floor.
+\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\pex[*=?*,textoffset=!-.3em]
+\a There is a pair of pants on the floor.
+\a \ljudge{?*} There are a pair of pants on the floor.
+\a \ljudge* There is the pair of pants on the floor.
+\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\ex<wapm>
+\begingl
+\gla k- wapm -a -s'i -m -wapunin -uk //
+\glb CL V AGR NEG AGR TNS AGR //
+\glb 2 see {\sc 3acc} {} {\sc 2pl} preterit {\sc 3pl} //
+\glft `you (pl) didn't see them'//
+\endgl
+\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\ex<sicher>
+\begingl
+\gla Mary$_i$ ist sicher, dass es den Hans nicht st\"oren w\"urde
+seiner Freundin ihr$_i$ Herz auszusch\"utten.//
+\glb Mary is sure that it the-{\sc acc} Hans not annoy would
+his-{\sc dat} girlfriend-{\sc dat} her-{\sc acc} heart-{\sc acc} {out to
+throw}//
+\glft `Mary is sure that it would not annoy John to reveal her
+heart to his girlfriend.'//
+\endgl
+\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\ex<um>
+\begingl
+\glpreamble Um-\"asudda' h\"am yan i taotao ni si Juan
+ilek-\~na nu guahu mal\"agu' gui
+asudd\"a'-\~na.//
+\gla Um-\"asudda' h\"am yan [ i taotao [ {\it O\/} ni si Juan
+ilek-\~na nu guahu [ mal\"agu' gui [ asudd\"a'-\~na {\it
+t\/} ] ] ] ] @ .//
+\glb agr-meet we with the person Op Comp the Juan say-agr Obl me
+agr.want he {\it WH\/}[obl].meet-agr//
+\glft ``I met the person who Juan told me he wanted to
+meet.''//
+\endgl
+\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\ex
+\begingl[glspace=2em]
+\gla[everygla=] k- wapm -a -s'i -m -wapunin -uk //
+\glb[everyglb=\sc,aboveglbskip=-.4ex]
+ cl v agr neg agr tns agr //
+\glb 2 see {\sc 3acc} {} {\sc 2pl} preterit {\sc 3pl} //
+\glft[everyglft=\it,aboveglftskip=0pt] `you (pl) didn't see them'//
+\endgl
+\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\ex[exno={(6), p. 14},exnoformat={[X]}]
+\begingl
+\gla Mary$_i$ ist sicher, dass es den Hans nicht st\"oren w\"urde
+seiner Freundin ihr$_i$ Herz auszusch\"utten.//
+\glb Mary is sure that it the-{\sc acc} Hans not annoy would
+his-{\sc dat} girfriend-{\sc dat} her-{\sc acc} heart-{\sc acc} {out to
+throw}//
+\endgl
+\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\ex
+\begingl
+\gla \rightcomment{[Potawatami]}k- wapm -a -s'i -m -wapunin -uk //
+\glb \rightcomment{category}Cl V Agr$_1$ Neg Agr$_2$ Tns Agr$_3$//
+\glb 2 see {\sc 3acc} {} {\sc 2pl} preterit {\sc 3pl} //
+\glft `you (pl) didn't see them'\trailingcitation{(Hockett 1948,
+ p. 143)}//
+\endgl
+\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\hsize=3.5in
+\ex
+\rightcomment{[Potawatami]}
+\begingl
+\gla k- wapm -a -s'i -m -wapunin -uk //
+\glb \rightcomment{category}Cl V Agr$_1$ Neg Agr$_2$ Tns Agr$_3$//
+\glb 2 see {\sc 3acc} {} {\sc 2pl} preterit {\sc 3pl} //
+\glft `you (pl) didn't see them'\trailingcitation{(Hockett 1948,
+ p. 143)}//
+\endgl
+\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\ex
+\begingl
+\gla Mary$_i$ ist sicher, + dass es den Hans nicht st\"oren w\"urde
++ seiner Freundin ihr$_i$ Herz auszusch\"utten.//
+\glb Mary is sure that it the-{\sc acc} Hans not annoy would
+his-{\sc dat} girlfriend-{\sc dat} her-{\sc acc} heart-{\sc acc} {out to
+throw}//
+\glft `Mary is sure that it would not annoy John to reveal her
+heart to his girlfriend.'//
+\endgl
+\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\ex<wiye>
+\begingl
+\gla wiye kepi e- @ ca//
+\glb two whitemen {\sc 1p:3d}- found//
+\endgl
+\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\pex[everygla=,glhangstyle=normal]<@period>
+\a
+\begingl
+\gla Fa'nu'i yu' ni [ [ {\it O} t{\it in\/}aitai-mu {\it t\/} ] na
+lepblu ] @ .//
+\glb show me Obl Op {\it WH\/}[obj].read-agr {} L book//
+\glft ``Show me the book that you read.''//
+\endgl
+\a \begingl
+\gla Um-\"asudda' h\"am yan [ i taotao [ {\it O\/} ni si Juan
+ilek-\~na nu guahu [ mal\"agu' gui [ asudd\"a'-\~na {\it
+t\/} ] ] ] ] @ .//
+\glb agr-meet we with the person Op Comp the Juan say-agr Obl me
+agr.want he {\it WH\/}[obl].meet-agr//
+\glft ``I met the person who Juan told me he wanted to meet.''//
+\endgl
+\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\defineglwlevels{cat,gloss}
+\lingset{everyglcat=\footnotesize,aboveglcatskip=-.5ex}
+
+\ex
+\begingl
+\gla k- wapm -a -s'i -m -wapunin -uk //
+\glcat Cl V Agr Neg Agr Tns Agr //
+\glgloss 2 see {3\sc acc} {} {2\sc pl} preterit {3\sc pl} //
+\glft `you (pl) didn't see them'//
+\endgl
+\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\ex[glftpos=right,glhangstyle=none]
+\let\\=\textsc
+\begingl
+\gla
+Hom\^{a}o sa \v{c}\^{o} p\^{o} tha \~{n}u nao ng\u{a} hmua. \~{N}u
+dj\u{a} g\u{a}, \~{n}u dj\u{a} \v{c}\u{o}ng \~{n}u, laih gui r\^{e}o
+\~{n}u. Todang bboi r\^{o}k jolan \~{n}u nao hma, \~{n}u bb\^{o}h sa
+droi mr\u{a} d\u{o} bboi gah, a, hruh \~{n}u.//
+\glb
+\\{exist} one \\{clf} person old \\{3s} go do field \\{3s} hold
+machete \\{3s} hold hoe \\{3s} and carry.on.back back.basket \\{3s}
+while at along trail \\{3s} go field \\{3s} see one \\{clf} peacock
+stay at \\{drct} -- nest \\{3s}//
+\glft
+`There was an old person who went to work in the field. He took
+along his machete, he took along his hoe, and he carried his
+basket on his back. While he was on his way to the farm, he saw a
+peacock beside its nest.'//
+\endgl
+\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\ex[everypanel=\footnotesize]<panelex>
+\let\\=\textsc
+\beginglpanel[ssratio=.5,glhangstyle=none]
+\gla Hom\^{a}o$^1$ sa \v{c}\^{o} p\^{o} tha \~{n}u nao ng\u{a}
+hmua. \~{N}u dj\u{a} g\u{a}, \~{n}u dj\u{a} \v{c}\u{o}ng \~{n}u,
+laih gui r\^{e}o \~{n}u. Todang bboi r\^{o}k jolan \~{n}u nao
+hma, \~{n}u bb\^{o}h sa droi mr\u{a} d\u{o}$\,^4$ bboi gah, a, hruh
+\~{n}u.//
+\glb \\{exist} one \\{clf} person old \\{3s} go$^2$ do field
+\\{3s} hold machete \\{3s} hold hoe \\{3s} and$^3$ carry.on.back
+back.basket \\{3s} while at along trail \\{3s} go field \\{3s}
+see one \\{clf} peacock stay at \\{drct} -- nest \\{3s}
+//
+\endgl
+1.\enspace {\it hom\^{a}o} also means `have', reflecting the
+strong tendency across languages to use the same word for
+possession and the existential. {\it hom\^{a}o} is clause-initial
+in existential clauses, but it comes after the subject in
+possession clauses.
+
+2.\enspace All verbs are glossed with a bare form, as Jarai has
+no inflectional morphology. Although Jarai has lexical items that
+encode tense, they are relatively infrequent in text.
+
+3.\enspace The word {\it laih} is literally `after; finish', but
+that is clearly not the meaning here. Probably {\it laih} here is
+an abbreviation for {\it laih an\u{u}n}, `after that; and', hence
+the gloss `and'.
+
+4.\enspace {\it d\u{o}} `sit, stay' is used like a copula in
+locative clauses, which is what I assume here (`a~peacock
+[which was] beside its nest'); however, this could just as well
+mean `a peacock sitting beside its nest', retaining the posture
+semantics.
+\endpanel
+\bigskip
+`There was an old person who went to work in the field. He took
+along his machete, he took along his hoe, and he carried his
+basket on his back. While he was on his way to the farm, he saw a
+peacock beside its nest.'
+\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\ex[glhangstyle=cascade]
+\let\\=\textsc
+\begingl
+\gla
+Hom\^{a}o sa \v{c}\^{o} p\^{o} tha \~{n}u nao ng\u{a} hmua. \~{N}u
+dj\u{a} g\u{a}, \~{n}u dj\u{a} \v{c}\u{o}ng \~{n}u, laih gui r\^{e}o
+\~{n}u. Todang bboi r\^{o}k jolan \~{n}u nao hma, \~{n}u bb\^{o}h sa
+droi mr\u{a} d\u{o} bboi gah, a, hruh \~{n}u.//
+\glb
+\\{exist} one \\{clf} person old \\{3s} go do field \\{3s} hold
+machete \\{3s} hold hoe \\{3s} and carry.on.back back.basket \\{3s}
+while at along trail \\{3s} go field \\{3s} see one \\{clf} peacock
+stay at \\{drct} -- nest \\{3s}//
+\glft
+`There was an old person who went to work in the field. He took
+along his machete, he took along his hoe, and he carried his
+basket on his back. While he was on his way to the farm, he saw a
+peacock beside its nest.'//
+\endgl
+\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\ex[glhangstyle=normal,glufcloseup=.4ex,everygluf=\footnotesize]
+\begingl
+\gla Mary$_i$ ist sicher, dass es den Hans nicht st\"oren
+ w\"urde seiner Freundin ihr$_i$ Herz auszusch\"utten.//
+\glb Mary is sure that it \gluf/the/ACC/ Hans not annoy would
+ \gluf/his/DAT/ \gluf/girlfriend/DAT/ \gluf/her/ACC/
+ \gluf/heart/ACC/ {out to throw}//
+\glft `Mary is sure that to reveal her heart to his girlfriend
+would not damage John.'//
+\endgl
+\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\pex[interpartskip=0pt]
+\a First\deftag{the first part of example \lastx}{FP}
+\a Second\deftagex{snoopy}\deftaglabel{dog}
+\a Third\deftaglabel{a}
+\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\pex[everylabel=\it]
+\a First Example.
+\a Second Example.\deftag{\lastx\lastlabel}{snoopy}
+\a Third Example.
+\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\ex[exno=\getref{snoopy}] Second example.\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\ex[exno={\getref{snoopy}, repeated},exnoformat={[X]}]
+Second example.\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\pex[labeltype=numeric]<dog>
+\a First Example.
+\a<G> Second Example.
+\a Third Example.
+\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\ex[exno={\getfullref{dog.G}}] Second example\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\ex
+\vtop{\halign{#\hfil&& \qquad #\hfil\cr
+baudh& bu-baudh& know, wake\cr
+smai& si-smai& smile\cr
+suap& su-suap& sleep\cr
+miaks& mi-miaks& glitter\cr
+auc& u-auc& please\cr
+}}
+\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\ex The perfect stems of some roots with a
+high vowel in their nucleus\par\nobreak\medskip
+\quad\vbox{\halign{%
+#\hfil&& \hskip3em #\hfil\cr
+\hfil\hwit{root}& \hfil\hwit{perfect stem}&
+ \hfil\hwit{gloss}\cr
+\noalign{\smallskip}
+baudh& bu-baudh& `know, wake'\cr
+smai& si-smai& `smile'\cr
+suap& su-suap& `sleep'\cr
+miaks& mi-miaks& `glitter'\cr
+auc& u-auc& `please'\cr
+}}\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\ex The perfect stems of some roots with a
+high vowel in their nucleus\par\nobreak\medskip
+\quad\vbox{\halign{%
+#\hfil& \quad #\hfil&& \hskip3em #\hfil\cr
+& \hfil\hwit{root}& \hfil\hwit{perfect stem}&
+ \hfil\hwit{gloss}\cr
+\noalign{\smallskip}
+a.& baudh& bu-baudh& `know, wake\cr
+b.& smai& si-smai& `smile'\cr
+c.& suap& su-suap& `sleep'\cr
+d.& miaks& mi-miaks& `glitter'\cr
+e.& auc& u-auc& `please'\cr
+}}\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\ex<Washo>
+\vtop{\labels\halign{\tl #\hfil&& \quad #\hfil\cr
+\nl & \hwit{Root}& \hwit{Plural}& \hwit{Gloss}\cr
+& baloxat& baloxaxat& bows\cr
+& moya& moyaya& shoulder\cr
+\deftaglabel{A}& nent'us& net'unt'us& old women\cr
+\deftaglabel{B}& mokgo& mogokgo& shoes\cr
+}}\xe
+Examples (\getfullref{Washo.A}) and (\getfullref{Washo.B}) are
+the most complex, and therefore the most revealing.
+Examples (\getref{Washo}\getref{Washo.A},\getref{Washo.B}) are
+the most complex, and therefore the most revealing.
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\hsize=4.3in
+\exdisplay[dima=.5em,dimb=.4em,textoffset=.5em]
+\def\\#1{$\acute{\hbox{\=#1}}$}%
+\tabskip=0pt
+\openup.4ex
+\halign to \hsize{\tspace[dima]#\tspace[textoffset]\hfil&
+ #\hfil\tabskip=0pt plus 1fil&
+ #\hfil& #\hfil& \tspace[dimb]#\hfil&
+ #\hfil & #\hfil\tabskip=0pt\cr
+\omit\exnoprint\hidewidth&
+ \multispan6 \hwit{Present Indicative}\crnb
+&\multispan3 \hwit{active}& \multispan3 \hwit{middle}\cr
+& \hwit{sg}& \hwit{du}& \hwit{pl}&
+ \hwit{sg}& \hwit{du}& \hwit{pl}\cr
+\it 1& {\bf dv\'e\.s}-mi& dvi\.s-v\'as& dvi\.s-m\'as&
+ dvi\.s-\'e& dvi\.s-v\'ahe& dvi\.s-m\'ahe\cr
+\it 2& {\bf dv\'ek}-\.si& dvi\.s-\.th\'as& dvi\.s-\.th\'a&
+ dvik\.s-\'e& dvi\.s-\\athe& dvi\.d-\.dhv\'e\cr
+\it 3& {\bf dv\'e\.s}-\.ti& dvi\.s-\.t\'as& dvi\.s-\'anti&
+ dvi\.s-\.t\'e& dvi\.s-\\ate& dvi\.s-\'ate\cr
+}
+\xe
+\endgroup
+\bigskip
+
+\filbreak\hrule\medskip
+
+\begingroup
+\pex[exbreakpenalty=-10,interpartskip=.25ex]
+\a example A
+\a contrast with example A\exbreak
+\a example B
+\a variation on B
+\a another variation on B
+\a a third variation on B\exbreak
+\a example C
+\a contrast with example C
+\xe
+\endgroup
+\bigskip
+
+\enddemo\end{document}\bye
diff --git a/Master/texmf-dist/tex/generic/expex/expex.sty b/Master/texmf-dist/tex/generic/expex/expex.sty
new file mode 100644
index 00000000000..c6e981b457a
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/expex/expex.sty
@@ -0,0 +1,5 @@
+\ProvidesPackage{expex}%
+ [2013/06/27 v4.1b LaTex wrapper for expex.tex (JF)]
+\RequirePackage{xkeyval}
+\input expex
+\endinput
diff --git a/Master/texmf-dist/tex/generic/expex/expex.tex b/Master/texmf-dist/tex/generic/expex/expex.tex
new file mode 100644
index 00000000000..747adaea72b
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/expex/expex.tex
@@ -0,0 +1,1291 @@
+\def\ExPexMessage{2013/06/27 v4.1b ExPex linguistics example formatter (JF)}
+% -------------------------------------------------------
+% jf 2011/12/09 (v4.0a)
+% 1) fixed bug in how exceptional gla items are detected
+% 2) added everytrailingcitation parameter
+% 3) made \glft a long definition to allow \par
+% 4) fixed bug in \printrbrack and \printlbrack, now not math mode
+% jf 2011/12/09 (v4.0b)
+% 1) allow {} gla item
+% jf 2012/03/10 (v4.0c)
+% 1) fixed problem with IJAL \deftaglabel caused by nonexpansion of \@actualexno
+% jf 2012/12/01 (v4.1)
+% 1) added auto glskip mode to glosses
+% /abovemoreglskip/ now obsolete
+% 2) fixed bug in \@setinckey so that value is expanded when set
+% jf 2013/01/13 (v4.1a)
+% 1) added \let\pageno=\c@page to LaTex specializations
+% jf 2013/06/27 (v4.1b)
+% 1) fixed bug in skip over \glft entries
+% --------------------------------------------------------
+\edef\resetatcatcode{\catcode`\noexpand\@\the\catcode`\@\relax}
+\catcode`\@=11\relax
+\ifx\XKeyValLoaded\endinput \else
+ \input xkeyval \fi
+\ifx\ProvidesFile\@undefined
+ \message{\ExPexMessage}
+ \else
+ \ProvidesFile{expex.tex}[\ExPexMessage]
+ \@addtofilelist{expex.tex}
+ \let\it=\itshape
+ \let\pageno=\c@page
+ \fi
+%! define eplain primitives, if necessary
+\ifx\eplain\@undefined % eplain stuff
+ \def\@futurenonspacelet#1{\def\@cs{#1}%
+ \afterassignment\@stepone\let\@nexttoken= }%
+ \def\@stepone{\expandafter\futurelet\@cs\@steptwo}%
+ \def\@steptwo{\expandafter\ifx\@cs\@sptoken\let\@@next=\@stepthree
+ \else\let\@@next=\@nexttoken\fi \@@next}%
+ \def\@stepthree{\afterassignment\@stepone\let\@@next= }%
+ \def\@getoptionalarg#1{%
+ \let\@optionaltemp = #1%
+ \let\@optionalnext = \relax
+ \@futurenonspacelet\@optionalnext\@bracketcheck
+ }
+ \def\@bracketcheck{%
+ \ifx [\@optionalnext
+ \expandafter\@@getoptionalarg
+ \else
+ \let\@optionalarg = \empty
+ \expandafter\@optionaltemp
+ \fi
+}
+\def\@@getoptionalarg[#1]{%
+ \def\@optionalarg{#1}%
+ \@optionaltemp
+}
+\fi
+%----- end of eplain inclusions
+\def\ep@identity#1{#1}
+\def\ep@expandonce{\expandafter\noexpand}
+\def\ep@expandtwice{\expandafter\expandafter\expandafter\noexpand}
+\def\ep@expandafterafter#1{\expandafter#1\expandafter}
+\def\ep@gobble#1{}
+\def\@getoptionaltag#1{%
+ \let\@@optionaltemp = #1%
+ \let\@optionaltag\empty
+ \@ifnextcharacter<\@@gettag\@@optionaltemp
+}
+\def\@@gettag<#1>{\def\@optionaltag{#1}\@@optionaltemp}
+
+\newif\if@tilde
+\def\@tildecheck#1{%
+ \@ifnextcharacter~%
+ {\@tildetrue\expandafter#1\ep@gobble}%
+ {\@tildefalse#1}%
+}
+%------- XKV parametrization ------
+\def\define@lingkey{\define@key{ling}}
+\def\define@ling@cmdkeys{\define@cmdkeys{ling}[ling@]}
+\def\define@lingcmdkeys{\define@cmdkeys{ling}[ling]}
+%
+\def\define@linginckey#1#2{%
+ \define@key{ling}{#2}{%
+ \ep@expandafterafter\@setinckey
+ #1\csname ling#2\endcsname ##1\@nil}%
+}
+\def\define@lingincdimenkeys#1{\XKV@for@n{#1}\@key{%
+ \expandafter\define@linginckey\expandafter\dimen\expandafter{\@key}}}
+\def\define@lingincskipkeys#1{\XKV@for@n{#1}\@key{%
+ \expandafter\define@linginckey\expandafter\skip\expandafter{\@key}}}
+\def\@setinckey#1#2#3#4\@nil{%
+ \ifx#3!%
+ #1 0=#2%
+ \advance#1 0 by #4%
+ \else
+ #1 0=#3#4%
+ \fi
+ \edef#2{\the #10}%
+}
+%
+\def\lingset#1{\setkeys{ling}{#1}\ignorespaces}
+% \Lingset first sets ling keys, if there are non-ling keys
+% remaining, these are then passed to \psset
+\def\Lingset#1{\setkeys*{ling}{#1}%
+ \ifx\XKV@rm\@empty \else
+ \ep@expandafterafter\psset{\XKV@rm}\fi
+}
+\def\Ling@usearg{%
+ \ifx\@optionalarg\empty
+ \else \ep@expandafterafter\Lingset{\@optionalarg}\fi
+}
+\def\ling@usearg{\ep@expandafterafter\lingset{\@optionalarg}}
+% styles
+\def\e@let#1#2{%
+ \ep@expandafterafter\let#1\csname #2\endcsname\ignorespaces
+}
+\define@lingkey{lingstyle}{%
+ \e@let\temp{ling@#1style}
+ \ep@expandafterafter\Lingset{\temp}}
+\def\definelingstyle#1#2{%
+ \expandafter\def\csname ling@#1style\endcsname{#2}}
+% if PST available, allow \psset to set ling parameters,
+% otherwise cancel \Lingset's ability to set PST parameters
+\ifx\PSTricksLoaded\endinput
+ \pst@addfams{ling}
+ \else
+ \let\Lingset=\lingset
+ \fi
+%------ scratch dimensions -----
+\newdimen\epd@a
+% \newdimen\epd@b not yet needed
+%------ \ex -----
+\newcount\excnt
+\excnt=1
+\newbox\numbox
+\newdimen\epd@numright
+\newif\if@specialexno
+\define@lingincskipkeys{aboveexskip,belowexskip}
+\define@lingincdimenkeys{numoffset,textoffset}
+\define@lingcmdkeys{Everyex,everyex,exbreakfil,exbreakpenalty,splitpartspenalty}
+\define@lingkey{exskip}%
+ {\edef\lingaboveexskip{#1}\edef\lingbelowexskip{#1}}
+\def\ep@settosum#1#2#3{#1=#2\relax \advance#1 by#3}
+\define@choicekey{ling}{textanchor}%
+ [\scratch\ep@textanchor]{numleft,normal}{}
+\def\ex{\bgroup \@tildecheck\ex@a}
+\def\ex@a{\def\@optionaltag{}\def\@specialexno{}%
+ \@getoptionalarg\ex@b}
+\def\ex@b{\@getoptionaltag\ex@c}
+\def\ex@c{%
+ \ex@setup
+ \leavevmode
+ \setbox\numbox=\hbox{\hskip\lingnumoffset\ep@actualexnoprint}%
+ \epd@numright=\wd\numbox
+ \ifcase\ep@textanchor % numleft
+ \ep@settosum\leftskip\lingnumoffset\lingtextoffset
+ \or % normal
+ \ep@settosum\leftskip\epd@numright\lingtextoffset
+ \fi
+ \llap{\hbox to\leftskip{\unhbox\numbox \hss}}%
+ \lingeveryex
+ \latex@tagex
+ \ignorespaces
+}
+\def\actualexno
+ {\if@specialexno {\ep@specialexno}\else \the\excnt \fi}
+\def\ep@actualexnoprint{{%
+ \if@specialexno
+ \ep@specialexnoprint
+ \else \ifx\ling@sampleexno\empty
+ \exnoprint
+ \else
+ \hbox to \epd@sampleexnowidth{\exnoprint\hss}%
+ \fi\fi
+}}
+\define@choicekey{ling}{exnotype}[\ling@exnotype\@N]%
+ {arabic,roman}{%
+ \ifcase\@N
+% \let\exnoprint=\ep@arabicexnoprint
+ \def\ep@rawexnoprint{\number\excnt}%
+ \or
+% \let\exnoprint=\ep@romanexnoprint
+ \def\ep@rawexnoprint{\romannumeral\the\excnt}%
+ \fi
+}
+\def\exnoprint{\ep@exnoformat{\ep@rawexnoprint}}
+%\def\ep@arabicexnoprint{\ep@exnoformat{\the\excnt}}
+%\def\ep@romanexnoprint{\ep@exnoformat{\romannumeral\the\excnt}}
+\lingset{exnotype=arabic}
+%\def\romanexnumbers{\let\exnoprint=\ep@romanexnoprint}
+%\def\ep@specialexnoprint{(\ep@specialexno)}
+\def\ep@specialexnoprint{\ep@exnoformat{\ep@specialexno}} % unformatted
+\def\ep@globalstepexcnt{\global\advance\excnt by 1 }
+\def\ep@localstepexcnt{\advance\excnt by 1 }
+\let\stepexcnt=\ep@globalstepexcnt
+\def\keepexcntlocal{\let\stepexcnt=\ep@localstepexcnt}
+\def\ex@setup{% also used by \pex
+ \global\@specialexnofalse
+ \latex@tagex
+ \lingEveryex
+ \let\reset@refproofing\@printref
+ \let\@printref\ep@identity % turn off refproofing
+ \Ling@usearg
+ \let\@printref\reset@refproofing
+ \if@specialexno
+ \def\@actualexno{\ep@specialexno}%
+ \else
+ \edef\@actualexno{\the\excnt}%
+ \fi
+ \ifx\@optionaltag\empty
+ \let\@localextag=\empty
+ \else
+ \edef\@localextag{\@optionaltag}%
+ \deftag{\@actualexno}{\@optionaltag}
+ \fi
+ \exbreak
+ \if@tilde \else \vskip\lingaboveexskip\fi
+ \parindent=0pt
+}
+\def\noexno{\global\advance\excnt by -1}
+\def\exbreak{\endgraf\bgroup\@getoptionalarg\exbreak@a}
+\def\exbreak@a{%
+ \ifx\@optionalarg\empty
+ \skip255=\lingexbreakfil
+ \else
+ \skip255= 0pt plus\@optionalarg
+ \fi
+ \vskip\skip255
+ \penalty\lingexbreakpenalty
+ \vskip-\skip255
+ \egroup
+}
+\def\xe{%
+ \expandafter\vskip\lingbelowexskip
+ \egroup
+ \if@specialexno \else \stepexcnt \fi
+ \allowbreak
+ \prevdepth\dp\strutbox
+ \noindent
+}
+\def\exdisplay{\bgroup\@tildecheck\exdisplay@a}
+\def\exdisplay@a{\@getoptionalarg\exdisplay@b}
+\def\exdisplay@b{\let\@optionaltag=\empty \ex@setup}
+%------ \pex -----
+\newcount\pexcnt
+\newdimen\epd@labelleft
+\newdimen\epd@labelright
+\newdimen\epd@textleft
+\newdimen\epd@preambleleft
+\newif\if@firstlabel
+\define@lingincdimenkeys{preambleoffset,labelwidth,labeloffset}
+\define@lingincskipkeys{belowpreambleskip,interpartskip}
+\define@choicekey{ling}{preambleanchor}
+ [\scratch\ep@preambleanchor]{numright,labelleft,text}{}
+\define@boolkey{ling}[ling@]{avoidnumlabelclash}[true]{}
+\define@ling@cmdkeys{appendtopexarg}
+\newdimen\epd@sampleexnowidth
+\define@lingkey{sampleexno}{%
+ \setbox0=\hbox{#1}%
+ \epd@sampleexnowidth=\wd0
+ \def\ling@sampleexno{#1}%
+}
+\lingset{sampleexno=}
+\define@lingcmdkeys{splitexpenalty}
+%\define@lingcmdkeys{belowpreambleskip,interpartskip,splitexpenalty}
+\define@choicekey{ling}{labelalign}[\ling@labelalign\nr]%
+ {left,center,right}{%
+ \ifcase\nr
+ \def\ep@labelprint{\ep@labelformat\ep@label\hss}%
+ \or
+ \def\ep@labelprint{\hss \ep@labelformat\ep@label\hss}%
+ \or
+ \def\ep@labelprint{\hss \ep@labelformat\ep@label}%
+ \fi
+}
+\define@key{ling}{samplelabel}{%
+ \setbox0=\hbox{#1}%
+ \lingset{labelwidth=\wd0}%
+}
+\define@boolkey{ling}[ling@]{nopreamble}[true]{}
+\def\pex{\bgroup\@tildecheck\pex@a}
+%\def\pexns{\bgroup \@tildetrue\pex@a}
+\def\pex@a{\def\@optionaltag{}\def\@specialexno{}%
+ \@getoptionalarg\pex@b}
+\def\pex@b{%
+ \ifx\ling@appendtopexarg\empty \else
+ \XKV@addtolist@o\@optionalarg{\ling@appendtopexarg}\fi
+ \@getoptionaltag\pex@c}
+\def\pex@c{\ling@nopreambletrue
+ \@futurenonspacelet\temp\pex@d}
+\def\pex@d{%
+ \ifx\temp\a \let\nextpex@\pex@e
+ \else \ifx\temp\label \let\nextpex@\pex@f
+ \else \ling@nopreamblefalse \let\nextpex@\pex@e
+ \fi\fi
+ \ex@setup
+ \nextpex@
+}
+\def\pex@f#1#2{\label{#2}\@futurenonspacelet\temp\pex@g}
+\def\pex@g{\ifx\temp\a \let\next\pex@h
+ \else \let\next\pex@e \ling@nopreamblefalse \fi \next}
+\def\pex@h#1\a{\pex@e\a}
+\def\pex@e{\pex@i \lingeveryex }
+\def\pex@i{%
+ \setbox\numbox=\hbox{\hskip\lingnumoffset\ep@actualexnoprint}%
+ \ep@setdimensions
+ \ep@pexcntinit
+ \@firstlabeltrue
+ \let\a\ep@putlabel
+ \ifling@nopreamble
+ \leftskip=\epd@textleft
+ \else
+ \ep@setdimpreambleleft
+ \leftskip=\epd@preambleleft
+ \fi
+ \def\next{\llap{\hbox to\leftskip{\unhbox\numbox \hss}}}%
+ \ifling@nopreamble
+ \ifling@avoidnumlabelclash \let\next\relax \fi\fi
+ \leavevmode
+ \next
+}
+\def\ep@setdimensions{%
+ \epd@numright=\wd\numbox
+ \epd@labelleft=\linglabeloffset
+ \advance\epd@labelleft by \ifcase\ep@labelanchor
+ \epd@numright\or \lingnumoffset\or 0pt \fi
+% \ep@setdimlabelleft
+ \ep@settosum\epd@labelright\epd@labelleft\linglabelwidth
+ \ifcase\ep@textanchor % numleft
+ \ep@settosum\epd@textleft\lingnumoffset\lingtextoffset
+ \or % normal
+ \ep@settosum\epd@textleft\epd@labelright\lingtextoffset
+ \fi
+% \ep@setdimtextleft
+}
+%\def\lingnumrightoffset{\the\epd@numright}%
+\def\ep@setdimpreambleleft{%
+ \epd@preambleleft=\lingpreambleoffset
+ \advance\epd@preambleleft by \ifcase\ep@preambleanchor
+ \epd@numright\or \epd@labelleft\or \epd@textleft \fi
+}
+\def\ep@pexcntinit{\ifnum\ep@labelgen=2\else
+ \pexcnt=\ling@pexcnt
+ \advance\pexcnt by -1 \fi}
+\define@key[epx@]{labels}{tag}{\def\@optionaltag{#1}}
+\define@key[epx@]{labels}{label}{\def\@specialexno{#1}}
+\def\ep@setlabelkeys{\setkeys[epx@]{labels}}
+\def\ep@useoptionallabelarg{%
+ \expandafter\ep@setlabelkeys\expandafter{\@optionalarg}}
+\define@lingkey{tag}{\def\@optionaltag{#1}}
+\newtoks\ep@everylabel % \ep@everylabel is a token list
+\define@lingkey{everylabel}{\ep@everylabel{#1}}
+%
+\def\ep@putlabel{%
+ \if@firstlabel
+ \ifling@nopreamble \else
+ \vskip\lingbelowpreambleskip
+ \leftskip=\epd@textleft
+ \fi
+ \@firstlabelfalse
+ \else
+ \par\penalty\lingsplitpartspenalty
+ \vskip\linginterpartskip
+ \fi
+ \def\@specialexno{}\def\@optionaltag{}%
+ \@getoptionalarg\ep@putlabel@a
+}
+\def\ep@putlabel@a{%
+ \ep@useoptionallabelarg
+ \ifx\@specialexno\empty
+ \ifcase\ep@labelgen
+ \def\ep@label{\the\ep@everylabel \char\the\pexcnt}%
+ \advance\pexcnt by 1
+ \or
+ \def\ep@label{\the\ep@everylabel \number\pexcnt}%
+ \advance\pexcnt by 1
+ \or
+ \ep@popLL
+ \or
+ \def\ep@label{\the\ep@everylabel \romannumeral\pexcnt}%
+ \advance\pexcnt by 1
+ \fi
+ \else
+ \def\ep@label{\the\ep@everylabel\@specialexno}%
+ \fi
+ \xdef\resumepexcnt{\noexpand\pexcnt\the\pexcnt}%
+ \@getoptionaltag
+ \ep@putlabel@b
+}
+\def\ep@putlabel@b{%
+ \ifx\@optionaltag\empty \else
+ \deftaglabel{\@optionaltag}%
+ \fi
+ \leavevmode
+ \llap{\hbox to\leftskip{\hskip\epd@labelleft
+ \hbox to\linglabelwidth{\ep@labelprint}%
+ \hfil}}%
+ \latex@tagexlabel
+ \ignorespaces
+}
+%
+\define@choicekey{ling}{labelanchor}[\scratch\ep@labelanchor]%
+ {numright,numleft,margin}[]{}
+\define@lingkey{pexcnt}{\edef\ling@pexcnt{#1}}
+%-----------------------------------------
+%----- judgments -----
+\def\judge#1{\rm #1\kern .1em \ignorespaces}
+\def\ljudge#1{\llap{\judge{#1}}\ignorespaces}
+\define@key{ling}{*}[*]%
+ {\setbox0=\hbox{#1}%
+ \lingset{textoffset=!\wd0}%
+}
+%------ table support -----
+\define@lingcmdkeys{dima,dimb,dimc}
+\lingset{dima=2.4em}
+\def\tspace{\@getoptionalarg\ep@tabelspace}
+\def\ep@tabelspace{\hskip
+ \ifx\@optionalarg\empty
+ \lingdima
+ \else
+ \csname ling\@optionalarg\endcsname
+ \fi
+}
+\def\labels{\@getoptionalarg\ep@labels}
+\def\ep@labels{%
+ \ifcase\ep@labelgen
+ \def\ep@label{\the\ep@everylabel \char\the\pexcnt}%
+ \or
+ \def\ep@label{\the\ep@everylabel \number\pexcnt}
+ \or
+ \or
+ \def\ep@label{\the\ep@everylabel \romannumeral\pexcnt}
+ \fi
+ \ling@usearg
+ \dimen0=\lingtextoffset
+ \advance\dimen0 by \linglabelwidth
+ \edef\ling@labelskip{\the\dimen0}%
+ \ep@pexcntinit
+ \let\tl\ep@inserttabellabel
+ \let\nl\ep@omitlabel
+ \ignorespaces
+}
+\def\ep@inserttabellabel{\@getoptionaltag\ep@inserttablelabel@a}
+\def\ep@inserttablelabel@a{%
+ \global\advance\pexcnt by 1
+ \ifx\@optionaltag\empty \else
+ \deftaglabel{\@optionaltag}%
+ \fi
+ \edef\foop{\ep@label.}\foop
+}
+\def\ep@omitlabel{\omit\hskip\linglabeloffset\hfil}
+%\def\endpextable{\egroup\egroup \par \prevdepth=\dp\strutbox}
+\def\hwit#1{\hidewidth \it #1\hidewidth}
+\define@ling@cmdkeys{crskip}
+\lingset{crskip=.6em}
+\def\crs{\cr\noalign{\vskip\ling@crskip}}
+\def\crnb{\cr\noalign{\par\nobreak}}
+% LL is "label list"
+\define@lingkey{labellist}{%
+ \edef\ling@LL{#1,}%
+ \edef\@currLL{#1,}% current LL
+}
+\def\ep@popLL{%
+ \ifx\@currLL\empty
+ \@expexwarn{Not enough labels in labellist}%
+ \let\@currLL=\ling@LL % start over
+ \ep@popLL
+ \else
+ \expandafter\ep@popLL@a\@currLL\@nil
+ \fi
+}
+\def\ep@popLL@a#1,#2\@nil{%
+ \def\ep@label{\the\ep@everylabel #1}\def\@currLL{#2}}
+\define@choicekey{ling}{labelgen}[\ling@labelgen\ep@labelgen]%
+ {char,number,list,romannumeral}{}
+\define@choicekey{ling}{labeltype}[\ling@labeltype\@N]%
+ {alpha,caps,numeric}{%
+ \ifcase\@N
+ \lingset{labelgen=char,pexcnt=97,labelformat=A.,
+ fullrefformat=XA,labelalign=left}%
+ \or
+ \lingset{labelgen=char,pexcnt=65,labelformat=A.,
+ fullrefformat=XA,labeloffset=!.3em,labelalign=left}%
+ \or
+ \lingset{labelgen=number,pexcnt=1,labelformat=A.,
+ fullrefformat=X.A,labelalign=right}%
+ \fi
+}
+\def\definelabeltype#1#2{%
+ \expandafter\def\csname ling@#1labeltype\endcsname{#2}}
+\define@lingkey{labeltype}{%
+ \e@let\temp{ling@#1labeltype}%
+ \ep@expandafterafter\Lingset{\temp}}
+\define@lingkey{labelformat}{\ep@omitlabelformat #1\@nil}
+\def\ep@omitlabelformat #1A#2\@nil{%
+ \def\ep@labelformat##1{#1{##1}#2}}
+\define@lingkey{exnoformat}{\ep@mkexnoformater #1\@nil}
+\def\ep@mkexnoformater #1X#2\@nil{%
+ \def\ep@exnoformat##1{#1{##1}#2}}
+\lingset{exnoformat=(X)}
+\define@lingkey{fullrefformat}{\@fullrefformat #1\@nil}
+\def\@fullrefformat #1X#2A#3\@nil{%
+ \def\ep@fullrefformat##1##2{#1##1#2##2#3}}
+%------ support for LaTex \label macro -----
+\let\latex@tagex\relax
+\let\latex@tagexlabel\relax
+\ifx\label\relax \else % else = LaTex is loaded
+ \def\latex@tagexlabel{\def\@currentlabel
+ {\ep@fullrefformat{{\the\excnt}}{\ep@label}}}%
+ \def\latex@tagex{\edef\@currentlabel{\the\excnt}}%
+ \fi
+%-----------------------------------------
+\definelabeltype{alpha}{labelgen=char,pexcnt=`a,labelformat=A.,
+ fullrefformat=XA,labelalign=left,labelwidth=.72em}
+\definelabeltype{caps}{labelgen=char,pexcnt=`A,labelformat=A.,
+ fullrefformat=XA,labelalign=left,labelwidth=.92em}
+\definelabeltype{numeric}{labelgen=number,pexcnt=1,labelformat=A.,
+ fullrefformat=X.A,labelalign=right,labelwidth=.75em}
+\definelabeltype{roman}{labelgen=romannumeral,pexcnt=1,labelformat=(A),
+ fullrefformat=XA,labelalign=left,labelwidth=1.5em}
+%-- tags and reference -----
+%----- local reference to example numbers -----
+%\def\nextx{{\@printref{\number\excnt}}}
+%\def\anextx{{\@printref{\advance\excnt by 1 \number\excnt}}}
+%\def\lastx{{\@printref{\advance\excnt by -1 \number\excnt}}}
+%\def\blastx{{\@printref{\advance\excnt by -2 \number\excnt}}}
+%\def\bblastx{{\@printref{\advance\excnt by -3 \number\excnt}}}
+\def\nextx{{\@printref{\ep@rawexnoprint}}}
+\def\anextx{{\@printref{\advance\excnt by 1 \ep@rawexnoprint}}}
+\def\lastx{{\@printref{\advance\excnt by -1 \ep@rawexnoprint}}}
+\def\blastx{{\@printref{\advance\excnt by -2 \ep@rawexnoprint}}}
+\def\bblastx{{\@printref{\advance\excnt by -3 \ep@rawexnoprint}}}
+%------ defining tags -----
+\def\deftag#1#2{%
+ {\let\@printref=\ep@identity
+ \expandafter\xdef\csname lingtag@#2\endcsname{#1}%
+ \if@g@thertags
+ \immediate\write@tags{\noexpand\@fd@f {#2} {{#1}} }%
+ \fi}%
+ \ignorespaces
+}
+\def\deftaglabel#1{%
+ \expandafter\xdef\csname lingtag@\@localextag.#1\endcsname%
+ {{{\ep@label}}%
+ {{\ep@fullrefformat{\@actualexno}\ep@label}}%
+ }%
+ \if@g@thertags
+ \immediate\write@tags{%
+ \noexpand\@fd@f
+ {\@localextag.#1}
+ {{{\ep@label}}%
+ {{\ep@fullrefformat{\@actualexno}\ep@label}}}%
+ }%
+ \fi
+ \ignorespaces
+}
+\def\deftagex#1{\edef\@localextag{#1}%
+ \expandafter\xdef\csname lingtag@#1\endcsname{{\the\excnt}}%
+ \if@g@thertags
+ \immediate\write@tags{\noexpand\@fd@f {#1} {{\the\excnt}}}%
+ \fi
+ \ignorespaces
+}
+\def\deftagpage#1{%
+ \if@g@thertags
+ \write@tags{\noexpand\@fd@f #1 {{\the\pageno}}}%
+ \fi
+ \ignorespaces
+}
+\def\lastlabel{{\ep@label}}
+\def\@expexwarn#1{\immediate\write16{====> EXPEX WARNING: #1.}}
+\def\@expexerror#1{\immediate\write16{====> Fatal EXPEX ERROR: #1.}}
+\newif\ifep@highlightref
+\ep@highlightreffalse
+\def\refproofing{\ep@highlightreftrue}
+\def\mathhigh@lightref#1{$\overline{\underline{\hbox{#1}}}$}
+\def\psthigh@lightref{\psframebox[boxsep=false,framesep=2pt,linewidth=.2ex]}
+\ifx\PSTricksLoaded\endinput
+ \let\@highlightprint\psthigh@lightref
+ \else
+ \let\@highlightprint\mathhigh@lightref
+ \fi
+\def\@printref#1{%
+ \ifep@highlightref \@highlightprint{#1}\else #1\fi}
+%%%%
+\newbox\exnobox
+\define@key{ling}{exno}{%
+ \global\@specialexnotrue
+ \let\latex@tagexlabel\ep@gobble
+ \let\latex@tagex\ep@gobble
+ \setbox\exnobox=\hbox{#1}%
+ \def\ep@specialexno{\unhcopy\exnobox}%
+}
+%------ opening the tag file -----
+\newif\if@g@thertags
+\@g@thertagsfalse
+\newwrite\ling@tagsfile
+\def\write@tags{\write\ling@tagsfile}
+\def\tagfilesuffix#1{\edef\@tagfilesuffix{#1}}
+\def\@tagfilesuffix{-tags}
+\def\gathertags{%
+ \@setupreadtags
+ \@g@thertagstrue
+ \immediate\openout\ling@tagsfile=\jobname\@tagfilesuffix\relax
+ \immediate\write@tags{\noexpand\relax}%
+}
+%------ reading the tag file and defining the tags it encodes -----
+\newif\if@epx@goodtagsfile
+\newread\ling@tagsin
+\gdef\@fd@f#1 #2 {%
+ \expandafter\ifx\csname lingtag@#1\endcsname\relax
+ \expandafter\gdef\csname lingtag@#1\endcsname{#2}%
+ \fi
+}
+\newif\if@readtags
+\@readtagstrue
+\def\@setupreadtags{\if@readtags
+ \do@readtags \global\@readtagsfalse \fi}
+\def\do@readtags{%
+ \immediate\openin\ling@tagsin=\jobname\@tagfilesuffix\relax
+ \ifeof\ling@tagsin \else
+ \closein\ling@tagsin
+ {\catcode`@=11 \input \jobname\@tagfilesuffix\relax}%
+ \fi
+}
+%!
+%!------ tagging sections, adapt to your needs -----
+%! If \tagsec is used with section macros that do not define
+%! counters \secno,\subsecno,\subsubsecno, and \subsubsubsecno,
+%! then \currsec must be redefined to whatever is appropriate.
+%!\def\chapscurrsec{\ifnum\chapno>0 \the\chapno
+%! \ifnum\secno>0 .\the\secno
+%! \ifnum\subsecno>0 .\the\subsecno
+%! \ifnum\subsubsecno>0 .\the\subsubsecno \fi\fi\fi\fi}
+%!\def\nochapscurrsec{\ifnum\secno>0 .\the\secno
+%! \ifnum\subsecno>0 .\the\subsecno
+%! \ifnum\subsubsecno>0 .\the\subsubsecno \fi\fi\fi}
+%! choose one of the following twos
+%!\let\currsec\nochapscurrsec
+%!\let\currsec\chapscurrsec
+%!\def\deftagsec#1{\deftag\currsec{#1}}
+%!/
+%\def\deftaglabel#1{%
+% \expandafter\xdef\csname lingtag@\@localextag.#1\endcsname
+% {%
+% {\ep@expandonce\ep@label}%
+% {\ep@fullrefformat{\@actualexno}\ep@expandonce\ep@label}%
+% }%
+% \ignorespaces
+%}
+% Uncomment and use the following for debugging if needed
+%\def\reporttag#1%
+% {\writeln{\expandafter\meaning\csname lingtag@#1\endcsname}}
+\def\getref@aa#1#2{#1}%
+\def\getref@ab#1#2{#2}%
+\def\getref#1{\getref@a{#1}\getref@aa}
+\def\getfullref#1{\getref@a{#1}\getref@ab}
+\def\getref@a#1#2{%
+ \if@readtags \@setupreadtags \fi
+ \expandafter \ifcsname lingtag@#1\endcsname
+ \edef\temp{\ep@expandtwice\csname lingtag@#1\endcsname}%
+ \ifx\temp\empty
+ \@expexwarn{+++tag #1 has no full reference}%
+ \@printref{Missing!}%
+ \else
+ {\@printref{\temp}}%
+ \fi
+ \else
+ \@expexwarn{tag #1 is called but not defined}%
+ {\@printref{\tt [#1]}}%
+ \fi
+}
+\newif\ifpartlabel
+\newif\iffullref
+\def\ep@ispartlabelcheck#1{\ep@ispart@a#1.\@nil}
+\def\ep@ispart@a#1.#2\@nil{\def\temp{#2}%
+ \ifx\temp\empty \partlabelfalse \else \partlabeltrue\fi}
+\def\getref{\fullreffalse \getref@a}
+\def\getfullref{\fullreftrue \getref@a}
+%\def\getref@a#1{%
+% \if@readtags \@setupreadtags \fi
+% \ep@ispartlabelcheck{#1}%
+% \ifpartlabel
+% \iffullref
+% \let\@chooseref\chooseref@a
+% \else
+% \let\@chooseref\chooseref@g
+% \fi
+% \else
+% \let\@chooseref\relax
+% \fi
+% \expandafter \ifcsname lingtag@#1\endcsname
+% \edef\temp{\ep@expandtwice\csname lingtag@#1\endcsname}%
+% \ifx\temp\empty
+% \@expexwarn{+++tag #1 has no full reference}%
+% \@printref{Missing!}%
+% \else
+% {\@printref{\expandafter\@chooseref\temp}}%
+% \fi
+% \else
+% \@expexwarn{tag #1 is called but not defined}%
+% {\@printref{\tt [#1]}}%
+% \fi
+%}
+\def\getref@a#1{%
+ \if@readtags \@setupreadtags \fi
+ \ep@ispartlabelcheck{#1}%
+ \ifpartlabel
+ \iffullref
+ \let\@chooseref\chooseref@a
+ \else
+ \let\@chooseref\chooseref@g
+ \fi
+ \else
+ \let\@chooseref\relax
+ \fi
+ \expandafter\ifx\csname lingtag@#1\endcsname \relax
+ \@expexwarn{tag #1 is called but not defined}%
+ {\@printref{\tt [#1]}}%
+ \else
+ \expandafter\let\expandafter\temp
+ \csname lingtag@#1\endcsname
+ \@printref{\expandafter\@chooseref\temp}%
+ \fi
+}
+\def\chooseref@a#1#2{#2}
+\def\chooseref@g#1#2{#1}
+%------ glosses
+% Presently, the glstyle key is a dummy and can only be set to the
+% value wrap. It is anticipated that in the future there will be
+% other glstyles. It must set \gl@beginstyle, which is inserted
+% immediately after \begingl is called, the various level macros
+% (\gla,\glb,\glft,etc.) and \endgl.
+\define@choicekey{ling}{glstyle}[\ling@glstyle\gl@stylenum]{wrap}{%
+ \ifcase\gl@stylenum
+ \let\gl@beginglstyle\glw@begingl
+ \let\endgl\glw@endgl
+ \glw@assignlevels
+ \let\glft=\glw@glft
+ \fi
+}
+%
+\def\begingl{\bgroup\@getoptionalarg\gl@begingl}
+\def\gl@begingl{%
+ \ling@everygl
+ \ling@usearg
+ \gl@beginglstyle
+}
+\define@ling@cmdkeys{everygl,everyglpreamble,everygla,everyglb,
+ everyglc,everygl,everyglft,everyglword,glrightskip}
+\define@ling@cmdkeys{glhangindent,glwidth}
+\define@lingincskipkeys{glspace,aboveglftskip,belowglpreambleskip}
+\define@lingincdimenkeys{extraglskip,gllineskip}
+\define@lingkey{abovemoreglskip}{\lingset{gllineskip=#1}} % obsolete
+\define@boolkey{ling}[ling@]{autoglskip}{}
+\define@boolkey{ling}[ling@]{glstruts}{%
+ \ifling@glstruts \let\glstrut=\strut
+ \else \let\glstrut=\relax \fi}
+\define@choicekey{ling}{glhangstyle}[\temp\ep@glhangstyle]%
+ {none,normal,cascade}{}
+\lingset{glhangstyle=normal,glrightskip=0pt plus .1\hsize}
+%----- wrap style (the only style for the present) -----
+% The input (something like the following)
+% \gla x1 x2 x3 //
+% \glb y1 y2 y3 //
+% \glc z1 z2 z3 //
+% gets converted into a list of lists (using Knuth's list macros)
+% {{x1,y1,z1},{x2,y2,z2},{x3,y3,z3}}
+% auxiliary lists are also made at the same time
+% list of struts, list of "everygl?"
+% Then these lists are popped, one position at a time, and vboxes
+% are built. The vboxes are fed into Tex's regular paragraph
+% building machinary.
+\newtoks\gltoks@a
+\newtoks\gltoks@b
+\def\glw@append #1\to #2{%
+ \gltoks@a={\\{#1}}%
+ \gltoks@b=\expandafter{#2}%
+ \xdef#2{\the\gltoks@b\the\gltoks@a}%
+}
+\def\glw@lop#1\to#2{\ifx#1\empty
+ \let#2\empty \else\expandafter\glw@lopoff#1\glw@lopoff#1#2\fi}
+\long\def\glw@lopoff\\#1#2\glw@lopoff#3#4{\def#4{#1}\def#3{#2}}
+\newif\ifgl@loopmore
+\def\glw@mergerow#1\to #2{%
+ \let\alist=#1%
+ \let\blist=#2%
+ \let\clist=\empty
+ \gl@loopmoretrue
+ \loop \ifgl@loopmore\glw@mergerow@a \repeat
+ \global\let#2=\clist
+}
+\def\glw@mergerow@a{%
+ \glw@lop\blist\to\tempb
+ \ifx\tempb\ep@Linebreak
+ \expandafter\glw@append\ep@Linebreak\to\clist
+ \else\ifx\tempb\ep@Closeup
+ \expandafter\glw@append\ep@Closeup\to\clist
+ \else\ifx\tempb\ep@Lbrack
+ \expandafter\glw@append\ep@Lbrack\to\clist
+ \else\ifx\tempb\ep@Rbrack
+ \expandafter\glw@append\ep@Rbrack\to\clist
+ \else
+ \glw@lop\alist\to\tempa
+ \expandafter\glw@append \tempa \to \tempb
+ \expandafter\glw@append \tempb \to \clist
+ \fi\fi\fi\fi
+ \ifx\alist\empty \ifx\blist\empty \gl@loopmorefalse \fi\fi
+}
+%\def\\{\par}
+% As the list of lists is assembled, heights and depths of each
+% item are computed and maximum row heights and maximum row depths
+% are computed in each row. These are used to make struts which
+% are used to assemble the vboxes.
+\newdimen\glw@maxht
+\newdimen\glw@maxdp
+% exceptional items
+\def\ep@Closeup{@}\@onelevel@sanitize\ep@Closeup
+\def\ep@Linebreak{+}\@onelevel@sanitize\ep@Linebreak
+\def\ep@Lbrack{[}\@onelevel@sanitize\ep@Lbrack
+\def\ep@Rbrack{]}\@onelevel@sanitize\ep@Rbrack
+\def\@alinelabel{a}
+\def\glw@gla{%
+ \if@glpreamble \vskip\lingbelowglpreambleskip \fi
+ \def\lingaboveglaskip{0pt}%
+ \def\gl@linelabel{a}%
+ \glw@maxht=0pt
+ \glw@maxdp=0pt
+ \@getoptionalarg
+ \glw@gla@a
+}
+\def\glw@gla@a #1//{\bgroup\ling@usearg
+ \glw@gla@b #1 \@nil }
+\def\glw@gla@b{\@ifnextchar\@nil\glw@gla@c\glw@gla@d}
+\def\glw@gla@c#1{\glw@updatelists \egroup \ignorespaces}
+\newif\ifglw@word
+% 2011-12-09 fixed bug in the way that exceptional gla items were detected
+% 2011-12-09 (later) fixed bug when #1 is empty (i.e gla item is {})
+\def\glw@gla@d #1 {%
+ \glw@wordtrue
+ \def\temp{#1}%
+ \ifx\temp\empty \else \glw@gla@e #1\@nil \fi
+ \ifglw@word
+ \gltoks@a={#1}%
+ \gltoks@b=\expandafter{\ling@everygla}%
+ \glw@append \\{\glstrut #1}\to\mainlist
+% \glw@append \\{#1}\to\mainlist
+ \setbox0=\hbox{\ling@everygla #1}%
+ \ifdim\glw@maxht<\ht0 \glw@maxht=\ht0 \fi
+ \ifdim\glw@maxdp<\dp0 \glw@maxdp=\dp0 \fi
+ \fi
+ \glw@gla@b
+}
+\def\glw@gla@e #1#2\@nil{%
+ \def\temp{#1}%
+ \def\tempa{#2}%
+ \ifx\tempa\empty
+ \glw@wordfalse
+ \@onelevel@sanitize\temp
+ \ifx\temp\ep@Linebreak
+ \expandafter\glw@append\ep@Linebreak\to\mainlist
+ \else\ifx\temp\ep@Closeup
+ \expandafter\glw@append\ep@Closeup\to\mainlist
+ \else\ifx\temp\ep@Lbrack
+ \expandafter\glw@append\ep@Lbrack\to\mainlist
+ \else\ifx\temp\ep@Rbrack
+ \expandafter\glw@append\ep@Rbrack\to\mainlist
+ \else \glw@wordtrue
+ \fi\fi\fi\fi\fi
+}
+%\def\glw@gla@d #1#2 {%
+% \glw@wordtrue
+% \def\temp{#2}%
+% \ifx\temp\empty
+% \glw@wordfalse
+% \def\tempa{#1}%
+% \@onelevel@sanitize\tempa
+% \ifx\tempa\ep@Linebreak
+% \expandafter\glw@append\ep@Linebreak\to\mainlist
+% \else\ifx\tempa\ep@Closeup
+% \expandafter\glw@append\ep@Closeup\to\mainlist
+% \else\ifx\tempa\ep@Lbrack
+% \expandafter\glw@append\ep@Lbrack\to\mainlist
+% \else\ifx\tempa\ep@Rbrack
+% \expandafter\glw@append\ep@Rbrack\to\mainlist
+% \else \glw@wordtrue
+% \fi\fi\fi\fi\fi
+% \ifglw@word
+% \gltoks@a={#1#2}%
+% \gltoks@b=\expandafter{\ling@everygla}%
+% \glw@append \\{#1#2}\to\mainlist
+% \setbox0=\hbox{\ling@everygla #1#2}%
+% \ifdim\glw@maxht<\ht0 \glw@maxht=\ht0 \fi
+% \ifdim\glw@maxdp<\dp0 \glw@maxdp=\dp0 \fi
+% \fi
+% \glw@gla@b
+%}
+\newdimen\gl@maxdplast
+\def\glw@updatelists{%
+ \edef\temp{\csname lingabovegl\gl@linelabel skip\endcsname}%
+ \expandafter\glw@append\temp \to\aboveskiplist
+ \edef\temp{\vrule width0pt height\the\glw@maxht\space depth\the\glw@maxdp\space }%
+ \global\gl@maxdplast=\glw@maxdp
+ \expandafter\glw@append\temp\to\strutlist
+ \expandafter\expandafter\expandafter
+ \glw@append\csname ling@everygl\gl@linelabel\endcsname
+ \to\everylist
+ \gltoks@a=\expandafter{\everylist}%
+}
+\def\glw@assignlevels{%
+ \expandafter\XKV@for@n\expandafter{\glw@levels}\levelname
+ {\glw@assign@level\levelname}%
+}
+\def\glw@assign@level#1{%
+ \edef\temp{\noexpand\let
+ \expandafter\noexpand\csname gl#1\endcsname
+ \expandafter\noexpand\csname glw@gl#1\endcsname}%
+ \temp
+}
+% \glw@gla and \glw@glft get their definitions directly
+% \glw@glx gets defined via \defineglwlevels, which adds x to the
+% list \glw@levels of defined glw levels
+\def\glw@levels{a,ft}
+\def\define@glw@level#1{%
+ \expandafter\ifx\csname glw@gl#1\endcsname\relax
+ \define@ling@cmdkeys{everygl#1}%
+ \define@linginckey\skip{abovegl#1skip}%
+ \XKV@addtolist@o\glw@levels{#1}%
+ \lingset{everygl#1=,abovegl#1skip=0pt}
+ \expandafter\def\csname glw@gl#1\endcsname{\glw@glx{#1}}%
+ \ifx\gl@stylenum\undefined \else
+ \ifnum\gl@stylenum=0 \glw@assign@level{#1}\fi\fi
+ \else
+ \@expexwarn{Level #1 is already defined}
+ \fi
+}
+% It is anticipated that \definegl?levels will be defined in the
+% future.
+\def\defineglwlevels#1{\XKV@for@n{#1}\thislevel
+ {\expandafter\define@glw@level\expandafter{\thislevel}}%
+}
+\def\glw@glx#1{% x suggests any label (as argument to \glw@glx)
+ \def\worklist{}%
+ \glw@maxht=0pt
+ \glw@maxdp=0pt
+ \def\gl@linelabel{#1}%
+ \@getoptionalarg\glw@glx@a
+}
+\def\glw@glx@a #1// {\bgroup
+ \ling@usearg
+ \expandafter\let\expandafter\@every
+ \csname ling@everygl\gl@linelabel\endcsname
+ \glw@glx@b #1 \@nil }
+\def\glw@glx@b{\@ifnextchar\@nil\glw@glx@c\glw@glx@d}
+\def\glw@glx@c#1{\glw@updatelists \glw@mergerow\worklist\to\mainlist\egroup}
+\def\glw@glx@d #1 {%
+ \setbox0=\hbox{\@every #1}%
+ \ifdim\glw@maxht<\ht0 \glw@maxht=\ht0 \fi
+ \ifdim\glw@maxdp<\dp0 \glw@maxdp=\dp0 \fi
+ \glw@append {\glstrut #1}\to\worklist
+% \glw@append #1\to\worklist
+ \glw@glx@b
+}
+\defineglwlevels{b,c}
+\newif\ifglw@spacebefore
+\def\glw@begingl{%
+ \parindent=0pt
+ \glw@begingl@a
+}
+\newdimen\epd@gllineskip
+
+\def\glw@begingl@a{%
+ \vtop\bgroup
+ \@glpreamblefalse
+ \ifdim\ling@glwidth=0pt
+ \advance\hsize by -\leftskip
+ \advance\hsize by -\rightskip
+ \else
+ \hsize=\ling@glwidth
+ \fi
+ \leftskip=0pt
+ \rightskip=\ling@glrightskip
+ \lineskiplimit=0pt
+ \ifling@autoglskip
+ \let\glstrut=\strut
+ \epd@gllineskip=\baselineskip
+ \advance\epd@gllineskip by -\dp\strutbox
+ \advance\epd@gllineskip by -\ht\strutbox
+ \advance\epd@gllineskip by \lingextraglskip
+ \else
+ \epd@gllineskip=\linggllineskip
+ \fi
+ \edef\gl@lineskipsave{\noexpand\lineskip=\the\lineskip}%
+ \ifcase\ep@glhangstyle
+ \or
+ \hangindent=\ling@glhangindent
+ \hangafter=1
+ \or
+ \glwcascade@makeshape
+ \parshape 9
+ \glwcascade@parshapetarget
+ \fi
+ \let\mainlist=\empty
+ \let\aboveskiplist=\empty
+ \let\strutlist=\empty
+ \let\everylist=\empty
+}
+\newif\if@glpreamble
+\def\glpreamble #1// {%
+ \@glpreambletrue
+ {\hangindent=0pt \ling@everyglpreamble #1\par}%
+}
+\def\glw@glft{\@getoptionalarg\glw@glft@a}
+% 2011-12-09 make \glw@glft@a a long definition to allow \par's
+\long\def\glw@glft@a#1//{%
+ \lineskip=\epd@gllineskip
+ \glw@print \par
+% 2013-06-27 bug fix
+% \prevdepth=\gl@maxdplast
+\ifx\glstrut\strut
+ \ifdim\gl@maxdplast>\dp\strutbox \prevdepth=\gl@maxdplast \fi
+ \fi
+ \ling@usearg
+ \vskip\lingaboveglftskip
+ \ling@everyglft
+ \hangindent=0pt
+ \let\endgl=\glw@endglB
+ #1\par
+}
+\def\glw@endgl{\glw@endglA \glw@endglB}
+\def\glw@endglA{\lineskip=\epd@gllineskip
+ \ifx\mainlist\empty \else \glw@print \par \fi }
+\def\glw@endglB{\egroup\egroup}
+\def\glw@print{%
+ \glw@spacebeforefalse
+ \@glpostbrackfalse
+ \leavevmode
+ \gl@loopmoretrue
+ \@glaparsestate=1
+ \loop\ifgl@loopmore
+ \glw@lop\mainlist\to\tempa\relax % \tempa is one column
+ \ifx\tempa\ep@Linebreak
+ \vskip\epd@gllineskip
+ \@glaparsestate=1
+ \leavevmode
+ \else\ifx\tempa\ep@Closeup
+ \@glaparsestate=1
+ \else\ifx\tempa\ep@Lbrack
+ \ifnum\@glaparsestate=0 \hskip\lingglspace
+ \else\ifnum\@glaparsestate=2 \hskip\lingglbrackbracksep
+ \else\ifnum\@glaparsestate=3 \hskip\lingglspace
+ \fi\fi\fi
+ \printlbrack\nobreak
+ \@glaparsestate=2
+ \else\ifx\tempa\ep@Rbrack
+ \nobreak
+ \ifnum\@glaparsestate=0 \hskip\lingglbrackwordsep
+ \else\ifnum\@glaparsestate=2 \hskip\lingglspace
+ \else\ifnum\@glaparsestate=3 \hskip\lingglbrackbracksep
+ \fi\fi\fi
+ \printrbrack
+ \@glaparsestate=3
+ \else
+ \ifnum\@glaparsestate=0 \hskip\lingglspace
+ \else\ifnum\@glaparsestate=2 \hskip\lingglbrackwordsep
+ \else\ifnum\@glaparsestate=3 \hskip\lingglspace
+ \fi\fi\fi
+ \@glaparsestate=0
+ \glw@printcol
+ \fi\fi\fi\fi
+ \ifx\mainlist\empty \gl@loopmorefalse \fi
+ \repeat
+}
+\def\glw@printcol{%
+ \vtop{%
+ \gl@lineskipsave
+ \ling@everyglword
+ \gl@loopmoretrue
+ \loop\ifgl@loopmore
+ \glw@lop\tempa\to\@tempa
+ \glw@lop\aboveskiplist\to\@aboveskip
+ \glw@lop\strutlist\to\@strut
+ \glw@lop\everylist\to\@every
+ \expandafter\ifdim\@aboveskip=0pt \else
+ \vskip\@aboveskip \fi
+ \hbox{\@strut\@every\@tempa}%
+ \ifx\tempa\empty \gl@loopmorefalse \fi
+ \repeat
+ }%
+}
+% ----- brackets -----
+\newif\if@glpostbrack
+\newcount\@glaparsestate % 0 normal, 1 post @, 2 post [, 3 post ]
+\define@lingincdimenkeys{glbrackbracksep,glbrackwordsep}
+\lingset{glbrackbracksep=.05em,glbrackwordsep=.1em}
+% 2011-12-09 introduce hook into \printlback and \printrbrack to allow font selection
+\define@ling@cmdkeys{everybrack}
+\def\printlbrack{{\ling@everybrack [}}
+\def\printrbrack{{\ling@everybrack ]}}
+\lingset{everybrack=\rm}
+%\def\printrbrack{$]$}
+%\def\printlbrack{$[$}
+% ----- cascading hanging indentation -----
+\newdimen\glwcascade@pshapeindent
+\newdimen\glwcascade@pshapelinewd
+\def\glwcascade@parshapetarget{}
+\def\glwcascade@mkshapeaux{%
+ \edef\glwcascade@parshapetarget
+ {\glwcascade@parshapetarget\space
+ \the\glwcascade@pshapeindent\space\the\glwcascade@pshapelinewd}%
+ \advance\glwcascade@pshapeindent by \ling@glhangindent
+ \advance\glwcascade@pshapelinewd by -\ling@glhangindent
+}
+\def\glwcascade@mkshapeauxaux{\glwcascade@mkshapeaux\glwcascade@mkshapeaux
+ \glwcascade@mkshapeaux}
+\def\glwcascade@makeshape{%
+ \glwcascade@pshapeindent=0pt
+ \glwcascade@pshapelinewd=\hsize
+ \glwcascade@mkshapeaux\glwcascade@mkshapeaux
+ \glwcascade@mkshapeaux\glwcascade@mkshapeaux
+}
+\def\glwcascade@makeshape{%
+ \glwcascade@pshapeindent=0pt
+ \glwcascade@pshapelinewd=\hsize
+ \glwcascade@mkshapeauxaux\glwcascade@mkshapeauxaux\glwcascade@mkshapeauxaux
+}
+% ----- side by side (ss) gloss style -----
+\define@choicekey{ling}{glftpos}[\temp\ep@glftpos]%
+ {below,right}{%
+ \ifcase\ep@glftpos
+ \let\gl@beginglstyle\glw@begingl
+ \let\endgl\glw@endgl
+ \let\glft=\glw@glft
+ \or
+ \let\gl@beginglstyle=\glw@ss@begingl
+ \let\endgl=\glw@ss@endgl
+ \let\glft\glw@ss@glft
+ \fi
+}
+\define@lingcmdkeys{sssep,ssratio,ssrightskip}
+\lingset{sssep=2em,ssratio=.6,ssrightskip=0pt plus 2em}
+\newdimen\ssleftwd
+\newdimen\ssrightwd
+\def\glw@ss@begingl{%
+ \ep@setssdims
+ \leavevmode\bgroup\hbox\bgroup
+ \hsize=\ssleftwd
+ \lingset{glwidth=\ssleftwd}
+ \glw@begingl
+}
+\def\ep@setssdims{%
+ \dimen0 =\hsize
+ \advance\dimen0 by -\leftskip
+ \advance\dimen0 by -\lingsssep
+ \ssleftwd=\lingssratio\dimen0
+ \ssrightwd=\dimen0
+ \advance\ssrightwd by -\ssleftwd
+}
+\def\glw@ss@endgl{\egroup\egroup}
+\def\glw@ss@glft #1//{%
+ \glw@endgl
+ \hskip\lingsssep
+ \vtop{%
+ \leftskip=0pt
+ \rightskip=\lingssrightskip
+ \parindent=0pt
+ \hsize=\ssrightwd
+ \ling@everyglft
+ #1}%
+ \ignorespaces
+}
+% ----- gloss with a side panel
+\define@lingcmdkeys{everypanel}
+\lingset{everypanel={}}
+\def\beginglpanel{\@getoptionalarg\beginglpanel@a}
+\def\beginglpanel@a{%
+ \bgroup
+ \let\endgl=\endgl@panel
+ \ling@usearg
+ \ep@setssdims
+ \leavevmode
+ \lingset{glwidth=\ssleftwd}
+ \begingl
+}
+\def\endgl@panel{%
+ \glw@endgl
+ \hfill
+ \vtop\bgroup
+ \hsize=\ssrightwd
+ \leftskip=0pt
+ \rightskip=\lingssrightskip
+ \lingeverypanel
+}
+\def\endpanel{\egroup\egroup\par}
+% ----- underfixes -----
+\def\gluf/#1/#2/{%
+ \vtop{\offinterlineskip\halign{\hfil##\hfil\cr
+ \strut #1\cr
+ \noalign{\vskip-\ling@glufcloseup}
+ \ling@everygluf \strut#2\cr
+}}}
+\define@ling@cmdkeys{everygluf,glufcloseup}
+%\lingset{glufcloseup=.4ex,everygluf=\sc}
+% ----- gloss comments and citations -----
+\def\rightcomment#1{\leavevmode\rlap{%
+ \hbox to\hsize{\hfil \rm #1\hskip\leftskip}}\ignorespaces}
+\let\rightcite=\rightcomment % for backwards compatability
+\define@ling@cmdkeys{mincitesep}
+\lingset{mincitesep=1.5em}
+% jf 2011-12-09 introduce everytrailingcitation hook
+\define@ling@cmdkeys{everytrailingcitation}
+\def\trailingcitation#1{%
+ \hskip\ling@mincitesep plus 1fill
+ \penalty100\null\nobreak \hskip 0pt plus 1fill
+ \hbox{\ling@everytrailingcitation #1}%
+}
+\lingset{everytrailingcitation=}
+\resetatcatcode
+%! ----- initial settings -----
+\definelingstyle{factorysettings}{%
+ aboveexskip=2.7ex plus .8ex minus .8ex,
+ belowexskip=2.7ex plus .8ex minus .8ex,
+ Everyex=,
+ everyex=,
+ numoffset=0pt,
+ labelanchor=numright,
+ labeloffset=1em,
+ labelwidth=.78em,
+ textanchor=normal,
+ textoffset=1em,
+ preambleanchor=numright,
+ preambleoffset=1em,
+ avoidnumlabelclash=false,
+ appendtopexarg=,
+ labeltype=alpha,
+ everylabel=,
+ labelalign=left,
+ belowpreambleskip=1ex,
+ interpartskip=1ex,
+ splitexpenalty=200,
+ exbreakfil=0pt plus 4ex,
+ exbreakpenalty=-50,
+ splitpartspenalty=200,
+% parameters used in glosses
+ glspace=.5em plus.4em minus.15em,
+ glrightskip=0pt plus .1\hsize,
+ aboveglcskip=0pt,
+ aboveglftskip=1ex,
+ belowglpreambleskip=1ex,
+ everyglpreamble=,
+ glhangindent=1em,
+ everygla=\it,
+ everyglb=,
+ everyglc=,
+ everyglft=,
+ everygl=,
+ everyglword=,
+ autoglskip=true,
+ glwidth=0pt,
+ glufcloseup=.4ex,
+ everygluf=,
+% everybracket=\rm,
+% glbracketsep=.15em,
+ glstyle=wrap,
+% moregloffset=0pt,
+ gllineskip=1ex,
+ extraglskip=0pt,
+ mincitesep=1.5em,
+% auxiliary parameters used for building tables
+ dima=2.4em,
+ crskip=.6em
+}
+\lingset{lingstyle=factorysettings}
+% restores version 4.0 gloss behaviour
+\def\gloldstyle{%
+ \lingset{abovemoreglskip=1ex,autoglskip=false,
+ glstruts=false,glspace=.6em}}
+%
+%!
+%! addons can be put in expex-add.tex
+%! can be used to override factory settings and make
+%! definitions and redefinitions that the user wants to alway be available
+%! expex-add.tex can be put in the main Tex tree, or in the local
+%! directory, depending on where the user wants it to have force
+%!
+%\newread\expexadd
+%\openin\expexadd = expex-add.tex
+%\ifeof\expexadd \else
+% \closein\expexadd \input expex-add \fi
+