diff options
author | Karl Berry <karl@freefriends.org> | 2017-06-17 23:46:41 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-06-17 23:46:41 +0000 |
commit | a70c3b1833479b4409e5b938d82f0dbb3539f4c4 (patch) | |
tree | 7b480db99f5ea96f5fbbe32372f72a6c8b687035 /Master/texmf-dist/tex/latex/leipzig | |
parent | 6af599a81babf26727b20aa5c22f32e84f039f7d (diff) |
leipzig (17jun17
git-svn-id: svn://tug.org/texlive/trunk@44625 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/leipzig')
-rw-r--r-- | Master/texmf-dist/tex/latex/leipzig/leipzig.sty | 605 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/leipzig/leipzig.tex | 241 |
2 files changed, 605 insertions, 241 deletions
diff --git a/Master/texmf-dist/tex/latex/leipzig/leipzig.sty b/Master/texmf-dist/tex/latex/leipzig/leipzig.sty index 4dd8d510df8..c6b0b8387b1 100644 --- a/Master/texmf-dist/tex/latex/leipzig/leipzig.sty +++ b/Master/texmf-dist/tex/latex/leipzig/leipzig.sty @@ -5,8 +5,6 @@ %% The original source files were: %% %% leipzig.dtx (with options: `package') -%% This is a generated file. -%% %% ---------------------------------------------------------------- %% leipzig --- A package to typeset and index linguistic gloss abbreviations. %% E-mail: natalie.a.weber@gmail.com @@ -14,8 +12,7 @@ %% See http://www.latex-project.org/lppl.txt %% ---------------------------------------------------------------- %% -%% -%% Copyright (C) 2013 by Natalie Weber +%% Copyright (C) 2017 by Natalie Weber <natalie.a.weber@gmail.com> %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -31,175 +28,479 @@ %% %% The Current Maintainer of this work is Natalie Weber. %% -%% This work consists of the files leipzig.dtx, -%% leipzig.ins -%% leipzig.tex -%% -%% and the derived files leipzig.sty and leipzig.pdf. +%% This work consists of the file leipzig.dtx, +%% and the derived files +%% README.md, +%% leipzig.ins, +%% leipzig.tex, +%% leipzig.sty, and +%% leipzig.pdf %% \NeedsTeXFormat{LaTeX2e}[1996/10/24]% \ProvidesPackage{leipzig}% - [2013/05/26 v1.0 Leipzig package for linguistic abbreviations]% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% This is a simple list of newcommands which create shortcuts for %% -%% standard linguistic glosses (see the Leipzig Glossing rules, %% -%% http://www.eva.mpg.de/lingua/resources/glossing-rules.php %% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\long\def\tlist@if@empty@nTF #1{% - \expandafter\ifx\expandafter\\\detokenize{#1}\\% - \expandafter\@firstoftwo% - \else% - \expandafter\@secondoftwo% - \fi% -}% -\newif\ifleipzig@glossaries\leipzig@glossariesfalse + [2017/06/16 v2.0 Leipzig package for linguistic abbreviations]% + + + + +\newif\ifleipzig@glossaries\leipzig@glossariestrue \newif\ifleipzig@noglossaries\leipzig@noglossariesfalse -\newif\ifleipzig@donotindex\leipzig@donotindexfalse +\newif\ifleipzig@sepglosses\leipzig@sepglossesfalse +\newif\ifleipzig@nostandards\leipzig@nostandardsfalse +\newif\ifleipzigdonotindex\leipzigdonotindexfalse +\newcommand*{\@leipzig@default@style}{inline} +\newif\ifleipzighyper\leipzighyperfalse +\newif\ifleipzignonumbers\leipzignonumberstrue +\newcommand{\leipzigfont}[1]{\textsc{#1}}% \DeclareOption{glossaries}{\leipzig@glossariestrue} -\DeclareOption{noglossaries}{\leipzig@noglossariestrue} -\DeclareOption{nostandards}{\leipzig@donotindextrue} +\DeclareOption{noglossaries}{% + \leipzig@glossariesfalse + \leipzig@noglossariestrue +}% +\DeclareOption{glosses}{\leipzig@sepglossestrue} +\DeclareOption{leipzig}{\leipzig@sepglossestrue} +\DeclareOption{nostandards}{\leipzig@nostandardstrue} +\DeclareOption{block}{% + \renewcommand*{\@leipzig@default@style}{leipzigalttree}% +}% +\DeclareOption{mcolblock}{% + \renewcommand*{\@leipzig@default@style}{leipzigmcolalttree}% +}% +\DeclareOption{inline}{% + \renewcommand*{\@leipzig@default@style}{inline}% +}% +\DeclareOption{leipzighyper}{\leipzighypertrue} +\DeclareOption{leipzignohyper}{\leipzighyperfalse} \DeclareOption*{% - \PassOptionsToPackage{\CurrentOption}{glossaries}% + \PassOptionsToPackage{\CurrentOption}{glossaries}% }% \ProcessOptions\relax -\@ifpackageloaded{glossaries}{% true text - \ifleipzig@noglossaries\leipzig@glossariesfalse\relax - \else\leipzig@glossariestrue\relax\fi -}{% false text - \ifleipzig@glossaries\PackageWarning{leipzig}{% - glossaries package not loaded. Load glossaries - package at some point.}% - \else\leipzig@glossariesfalse\relax\fi -}% -\@ifpackageloaded{glossary-inline}{% renew inline -\renewglossarystyle{inline}{% - \renewenvironment{theglossary}% - {% - \def\gls@inlinesep{}% - \def\gls@inlinesubsep{}% - \def\gls@inlineshortlongsep{% - \glsinlineshortlongseparator}% added this - }% - {\glspostinline}% - \renewcommand*{\glossaryheader}{}% - \renewcommand*{\glsgroupheading}[1]{}% - \renewcommand*{\glossaryentryfield}[5]{% - \gls@inlinesep - \glsentryitem{##1}\glstarget{##1}{##2}% - \def\glo@desc{##3}% - \def\@no@post@desc{\nopostdesc}% - \ifx\glo@desc\@no@post@desc +\ifleipzig@noglossaries\relax +\else + \ifleipzig@glossaries + \@ifpackageloaded{glossaries}% + {\relax}% + {\IfFileExists{glossaries.sty}{% + \RequirePackage{glossaries}% + }% + {\PackageError{leipzig}% + {glossaries.sty not found.}% + {Install glossaries.sty or use [noglossaries] option.}% + }% + \IfFileExists{glossary-tree.sty}{% + \RequirePackage{glossary-tree}% + }% + {\PackageWarning{leipzig}% + {glossary-tree.sty not found.}% + {Install glossary-tree.sty to use leipzigalttree style.}% + }% + \IfFileExists{glossary-mcols.sty}{% + \RequirePackage{glossary-mcols}% + }% + {\PackageWarning{leipzig}% + {glossary-mcols.sty not found.}% + {Install glossary-mcols.sty to use leipzigmcolalttree style.}% + }% + \IfFileExists{glossary-inline.sty}{% + \RequirePackage{glossary-inline}% + }% + {\PackageWarning{leipzig}% + {glossary-inline.sty not found.}% + {Install glossary-inline.sty to use inline style.}% + }% + }% + \fi +\fi +\@ifpackageloaded{glossaries}{% + \newcommand*{\leipzigtype}{\glsdefaulttype}% + \newcommand{\leipzigname}{Abbreviations}% + \providecommand*{\printglosses}[1][]{}% + \providecommand*{\printleipzig}[1][]{}% + \newcommand{\firstleipzigfont}[1]{\leipzigfont{#1}}% + \newif\ifleipzigdesccapitalize\leipzigdesccapitalizefalse + \newcommand*{\leipzig@glossentrydesc}[1]{% + \ifleipzigdesccapitalize + \expandafter\ifx#1\nopostdesc + \glossentrydesc{#1}% + \else\Glossentrydesc{#1}% + \fi \else - \ifstrempty{##3}{}{\gls@inlineshortlongsep##3}% + \glossentrydesc{#1}% \fi - \ifglshaschildren{##1}% + }% + \newcommand*{\glspostnamespace}{\space}% +}{}% +\@ifpackageloaded{glossaries}{% + \ifleipzig@sepglosses + \newglossary[lpz]{leipzig}{lzs}{lzo}{\leipzigname}% + \renewcommand*{\leipzigtype}{leipzig}% + \newcommand*{\gls@tr@set@leipzig@toctitle}{% + \translatelet{\glossarytoctitle}{Abbreviations}% + }% + \else + \renewcommand*{\glossaryname}{\leipzigname} + \fi + \DeclareAcronymList{\leipzigtype}% + \newacronymstyle{long-lpz-short}% {% - \glsresetsubentrycounter - \glsinlineparentchildseparator - \def\gls@inlinesubsep{}% + \GlsUseAcrEntryDispStyle{long-short}% + }% + {% + \GlsUseAcrStyleDefs{long-short}% + \renewcommand{\acronymfont}[1]{\leipzigfont{##1}}% + \renewcommand{\firstacronymfont}[1]{\firstleipzigfont{##1}}% + \renewcommand*{\acrpluralsuffix}{\glstextup{\glspluralsuffix}}% + }% + \setacronymstyle{long-lpz-short} +\AtBeginDocument{% + \if\@glossary@default@style\relax + \setglossarystyle{\@leipzig@default@style}% + \fi + \ifx\@leipzig@default@style\relax + \renewcommand*{\printglosses}[1][]{% + \printglossary[type=\leipzigtype,#1]% + }% + \else + \ifleipzignonumbers + \renewcommand*{\printglosses}[1][]{% + \printglossary[type=\leipzigtype,% + style=\@leipzig@default@style,% + nonumberlist,#1] + }% + \else + \renewcommand*{\printglosses}[1][]{% + \printglossary[type=\leipzigtype,% + style=\@leipzig@default@style,#1] + }% + \fi + \fi + \let\printleipzig\printglosses + \renewcommand*{\printglossaries}{% + \forallglossaries{\@@glo@type}{% + \edef\tempa{\@@glo@type}% + \edef\tempb{\leipzigtype}% + \ifx\tempa\tempb% + \printglosses% + \else + \printglossary[type=\@@glo@type]% + \fi% }% - {}% - \def\gls@inlinesep{\glsinlineseparator}% }% - \renewcommand*{\glossarysubentryfield}[6]{% - \gls@inlinesubsep% - \glstarget{##2}{}% - \glssubentryitem{##2}##4% - \def\gls@inlinesubsep{\glsinlinesubseparator}% +}% +}% +{\relax}% +\@ifpackageloaded{glossaries}{% + \forallglossaries[\leipzigtype]{\@@glo@type}{% + \glsnogroupskiptrue + \glsnopostdottrue }% - \renewcommand*{\glsgroupskip}{}% -} -\newcommand*{\glsinlineshortlongseparator}{\,=\,\linebreak[1]}% added this -\renewcommand*{\glsinlineseparator}{,\space}% changed from ;\space -\renewcommand*{\glsinlinesubseparator}{,\space} -\renewcommand*{\glsinlineparentchildseparator}{:\space} -\renewcommand*{\glspostinline}{.\space}% changed from . -\renewcommand{\glsnamefont}[1]{\textsc{#1}}% abbrv in glossary are \sc -\renewcommand*{\glossarysection}[2][]{}% no section name -}{\relax}% if glossary-inline not loaded -\newcommand{\leipzigfont}[1]{\textsc{#1}}% -\newcommand{\firstleipzigfont}[1]{\leipzigfont{#1}}% -\ifleipzig@glossaries %if glossaries package loaded - \renewcommand*{\acrpluralsuffix}{\textup{\glspluralsuffix}}% - \newcommand{\leipzigname}{Abbreviations} - \newglossary{leipzig}{lzs}{lzo}{\leipzigname} - \newcommand{\leipzigtype}{leipzig} -%% The following commands are based on the Custom Acronym commands in the glossaries package. -\newcommand*{\SetLeipzigDisplayStyle}[1]{% - \defglsdisplay[#1]{\leipzigfont{##1}##4}% - \defglsdisplayfirst[#1]{\firstleipzigfont{##1}##4}% -} -\newcommand*{\CustomLeipzigFields}{% - name={\the\glsshorttok},% - description={\the\glslongtok},% - symbol={\the\glsshorttok},% - first={\firstleipzigfont{\the\glsshorttok}},% - firstplural={\firstleipzigfont{\the\glsshorttok}\noexpand\acrpluralsuffix},% - text={\leipzigfont{\the\glsshorttok}},% - plural={\leipzigfont{\the\glsshorttok}\noexpand\acrpluralsuffix}% -} -\newcommand*{\LeipzigAcronymDef}{% - \protected@edef\@do@newglossaryentry{% - \noexpand\newglossaryentry{\the\glslabeltok}% - {% - type=\leipzigtype,% - short={\leipzigfont{\the\glsshorttok}},% used in e.g. \acrshort - shortplural={\leipzigfont{\the\glsshorttok}\noexpand\acrpluralsuffix},% - long={\the\glslongtok},% - longplural={\the\glslongtok\noexpand\acrpluralsuffix},% - user1={\the\glsshorttok},% - user2={\the\glsshorttok\noexpand\acrpluralsuffix},% - user3={\the\glslongtok},% - user4={\the\glslongtok\noexpand\acrpluralsuffix},% - \CustomLeipzigFields,% - \the\glskeylisttok +}{\relax}% +\@ifpackageloaded{glossary-tree}{% + \newglossarystyle{leipzigalttree}{% + \setglossarystyle{alttree}% + \renewenvironment{theglossary}% + {\def\@gls@prevlevel{-1}% + \mbox{}\par + }% + {\par}% + \renewcommand*{\glstreenamefmt}[1]{##1} + \renewcommand{\glossentry}[2]{% + \ifnum\@gls@prevlevel=0\relax + \else + \settowidth{\glstreeindent}{% + \glstreenamefmt{\@glswidestname\glspostnamespace}% + }% + \fi + \hangindent\glstreeindent + \parindent\glstreeindent + \makebox[0pt][r]{% + \glstreenamebox{\glstreeindent}{% + \glsentryitem{##1}\glstreenamefmt{% + \glstarget{##1}{\glossentryname{##1}}% + }% + }% + }% + \ifglshassymbol{##1}{(\glossentrysymbol{##1})\space}{}% + \leipzig@glossentrydesc{##1}\glspostdescription\space ##2\par + \def\@gls@prevlevel{0}% + }% + \renewcommand{\subglossentry}[3]{% + \ifnum##1=1\relax + \glssubentryitem{##2}% + \fi + \ifnum\@gls@prevlevel=##1\relax + \else + \@ifundefined{@glswidestname\romannumeral##1}{% + \settowidth{\gls@tmplen}{% + \glstreenamefmt{\@glswidestname\glspostnamespace}}% + }{% + \settowidth{\gls@tmplen}{\glstreenamefmt{% + \csname @glswidestname\romannumeral##1\endcsname + \glspostnamespace}}% + }% + \ifnum\@gls@prevlevel<##1\relax + \setlength\glstreeindent\gls@tmplen + \addtolength\glstreeindent\parindent + \parindent\glstreeindent + \else + \@ifundefined{@glswidestname\romannumeral\@gls@prevlevel}{% + \settowidth{\glstreeindent}{\glstreenamefmt{% + \@glswidestname\glspostnamespace}}}{% + \settowidth{\glstreeindent}{\glstreenamefmt{% + \csname @glswidestname\romannumeral\@gls@prevlevel + \endcsname\glspostnamespace}}}% + \addtolength\parindent{-\glstreeindent}% + \setlength\glstreeindent\parindent + \fi + \fi + \hangindent\glstreeindent + \makebox[0pt][r]{\glstreenamebox{\gls@tmplen}{% + \glstreenamefmt{\glstarget{##2}{\glossentryname{##2}}}}}% + \ifglshassymbol{##2}{(\glossentrysymbol{##2})\space}{}% + \leipzig@glossentrydesc{##2}\glspostdescription\space ##3\par + \def\@gls@prevlevel{##1}% }% }% - \@do@newglossaryentry -} -\newcommand*{\SetLeipzigStyle}{% - \renewcommand{\newacronym}[4][]{% - \ifx\@glsacronymlists\@empty - \def\@glo@type{\leipzigtype}% - \setkeys{glossentry}{##1}% - \DeclareAcronymList{\@glo@type}% - \SetLeipzigDisplayStyle{\@glo@type}% - \fi - \glskeylisttok{##1}% - \glslabeltok{##2}% - \glsshorttok{##3}% - \glslongtok{##4}% - \newacronymhook - \LeipzigAcronymDef + \newglossarystyle{block}{% + \setglossarystyle{leipzigalttree}% }% -%% \@for\@gls@type:=\@glsacronymlists\do{% sets style for all acronymlists? -%%%% \SetCustomDisplayStyle{\@gls@type}% -%% \SetLeipzigDisplayStyle{\@gls@type}% -%% }% }% -\SetLeipzigStyle -%%Normally would have |\leipzigfont{#2}|, but I coded the leipzigfont directly into the short form. How else to do it? -\renewcommand{\acrfullformat}[2]{#1\space(#2)} -\newcommand{\newleipzig}[4][]{% - \bgroup - \tlist@if@empty@nTF{#1}% - {\newacronym[type=\leipzigtype]{#2}{#3}{#4}}% - {\newacronym[type=\leipzigtype,#1]{#2}{#3}{#4}}% - % \newacronym[type=\leipzigtype][#1]{n#2}{n#3}{Non-#4} - \@newleipzig(#3)#2\@nil}% - \def\@newleipzig(#1)#2#3\@nil{% - \ifleipzig@donotindex - \uppercase{\expandafter\gdef\csname #2}#3\endcsname{\leipzigfont{#1}} +{\relax}% +\@ifpackageloaded{glossary-tree}{% + \@ifpackageloaded{glossary-mcols}{% + \newglossarystyle{leipzigmcolalttree}{% + \setglossarystyle{leipzigalttree}% + \renewenvironment{theglossary}% + {% + \begin{multicols}{\glsmcols}% + \raggedcolumns + \def\@gls@prevlevel{-1}% + \mbox{}\par + \vspace{-\baselineskip}% + }% + {\par + \end{multicols}}% + }% + \newglossarystyle{mcolblock}{% + \setglossarystyle{leipzigmcolalttree}% + }% + }% + {\relax}% +}% +{\relax}% +\@ifpackageloaded{glossary-inline}{% if glossary-inline loaded + \providecommand{\renewglossarystyle}[2]{% + \ifcsundef{@glsstyle@#1}% + {% + \PackageError{glossaries}{Glossary style `#1' isn't already defined}{}% + }% + {% + \csdef{@glsstyle@#1}{#2}% + }% + } + \@ifpackagelater{glossaries}{2012/05/22}{% + \renewglossarystyle{inline}{% + \renewenvironment{theglossary}% + {% + \def\gls@inlinesep{}% + \def\gls@inlinesubsep{}% + \def\gls@inlinepostchild{}% + }% + {\glspostinline}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% + \renewcommand{\glossentry}[2]{% + \glsinlinedopostchild + \gls@inlinesep + \glsentryitem{##1}% + \glsinlinenameformat{##1}{% + \glossentryname{##1}% + }% + \ifglsdescsuppressed{##1}% + {% + \glsinlineemptydescformat + {% + \glossentrysymbol{##1}% + }% + {% + ##2% + }% + }% + {% + \ifglshasdesc{##1}% + {\glsinlinedescformat{\leipzig@glossentrydesc{##1}}{\glossentrysymbol{##1}}{##2}}% + {\glsinlineemptydescformat{\glossentrysymbol{##1}}{##2}}% + }% + \ifglshaschildren{##1}% + {% + \glsresetsubentrycounter + \glsinlineparentchildseparator + \def\gls@inlinesubsep{}% + \def\gls@inlinepostchild{\glsinlinepostchild}% + }% + {}% + \def\gls@inlinesep{\glsinlineseparator}% + }% + \renewcommand{\subglossentry}[3]{% + \gls@inlinesubsep% + \glsinlinesubnameformat{##2}{% + \glossentryname{##2}}% + \glssubentryitem{##2}% + \glsinlinesubdescformat{\leipzig@glossentrydesc{##2}}{\glossentrysymbol{##2}}{##3}% + \def\gls@inlinesubsep{\glsinlinesubseparator}% + }% + \renewcommand*{\glsgroupskip}{}% + \renewcommand*{\glsinlineseparator}{,\space}% original: ;\space + \renewcommand*{\glsinlinesubseparator}{,\space}% + \renewcommand*{\glsinlineparentchildseparator}{:\space}% + \renewcommand*{\glsinlinepostchild}{}% + \renewcommand*{\glspostinline}{.\space}% original: \glspostdescription\space + \renewcommand*{\glsinlinenameformat}[2]{\glstarget{##1}{##2}}% + \renewcommand*{\glsinlinedescformat}[3]{% + \,=\,\linebreak[1]##1}% original: \space#1 + \renewcommand*{\glsinlineemptydescformat}[2]{}% + \renewcommand*{\glsinlinesubnameformat}[2]{% + \glstarget{##1}{##2}}%original: \glstarget{#1}{} + \renewcommand*{\glsinlinesubdescformat}[3]{% + \,=\,\linebreak[1]##1}%original: #1 + \renewcommand*{\glossarysection}[2][\@gls@title]{}% no section header + }% + }% + {% + \renewglossarystyle{inline}{% + \renewenvironment{theglossary}% + {% + \def\gls@inlinesep{}% + \def\gls@inlinesubsep{}% + \def\gls@inlineshortlongsep{% + \glsinlineshortlongseparator}% added this v1.0 + }% + {\glspostinline}% + \renewcommand*{\glossaryheader}{}% + \renewcommand*{\glsgroupheading}[1]{}% + \renewcommand*{\glossaryentryfield}[5]{% + \gls@inlinesep + \glsentryitem{##1}\glstarget{##1}{##2}% + \def\glo@desc{##3}% + \def\@no@post@desc{\nopostdesc}% + \ifx\glo@desc\@no@post@desc + \else + \ifstrempty{##3}{}{\gls@inlineshortlongsep##3}% + \fi + \ifglshaschildren{##1}% + {% + \glsresetsubentrycounter + \glsinlineparentchildseparator + \def\gls@inlinesubsep{}% + }% + {}% + \def\gls@inlinesep{\glsinlineseparator}% + }% + \renewcommand*{\glossarysubentryfield}[6]{% + \gls@inlinesubsep% + \glstarget{##2}{}% + \glssubentryitem{##2}##4% + \def\gls@inlinesubsep{\glsinlinesubseparator}% + }% + \renewcommand*{\glsgroupskip}{}% + \newcommand*{\glsinlineshortlongseparator}{% + \,=\,\linebreak[1]}% added this v1.0 + \renewcommand*{\glsinlineseparator}{,\space}% original: ;\space + \renewcommand*{\glsinlinesubseparator}{,\space}% + \renewcommand*{\glsinlineparentchildseparator}{:\space}% + \renewcommand*{\glspostinline}{.\space}% changed from . + % \renewcommand{\glsnamefont}[1]{\textsc{##1}}% removed v2.0 + \renewcommand*{\glossarysection}[2][\@gls@title]{}% added v1.0 + }% + }% +}{\relax}% +\@ifpackageloaded{glossaries}{% + \newcommand{\newleipzig}[4][]{% + \bgroup + {\newacronym[type=\leipzigtype,#1]{#2}{#3}{#4}}% + \@newleipzig#2\@nil% + }% + \def\@newleipzig#1#2\@nil{% + \ifleipzigdonotindex + \uppercase{\expandafter\gdef\csname #2}#2\endcsname{% + \leipzigfont{\glsentryshort{#1#2}}% + }% + \else + \ifleipzighyper + \uppercase{\expandafter\gdef\csname #1}#2\endcsname{% + \acrshort{#1#2}% + }% \else - \uppercase{\expandafter\gdef\csname #2}#3\endcsname{\gls{#2#3}} + \uppercase{\expandafter\gdef\csname #1}#2\endcsname{% + \acrshort*{#1#2}% + }% \fi - \egroup - }% end if glossaries loaded -\else % if glossaries not loaded + \fi + \egroup + }% +\newcommand{\renewleipzig}[2][]{% + \if@leipzig@defined{#2} + {% + \renew@leipzig{#1}{#2}% + }% + {% + \PackageError{leipzig} + {Abbreviation `#2' undefined} + {No `#2` abbreviation is defined, use \string\newleipzig}% + \@gobbletwo + }% +} +\def\if@leipzig@defined#1{% + \uppercase\expandafter{\expandafter\ifcsname\@car#1\@nil}\@cdr#1\@nil\endcsname + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi +} +\def\renew@leipzig#1#2{% + \ifcsname glo@\glsdetoklabel{#2}@name\endcsname + \csundef{glo@\glsdetoklabel{#2}@name} + \fi + \if\relax\detokenize{#2}\relax + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + {\newleipzig{#2}}{\newleipzig[#1]{#2}}% +}% +}{% \newcommand{\newleipzig}[4][]{\@newleipzig(#3)#2\@nil}% + \newcommand{\renewleipzig}[4][]{% + \if@leipzig@defined{#2} + {% + \@newleipzig(#3)#2\@nil% + }% + {% + \PackageError{leipzig} + {Abbreviation `#2' undefined} + {No `#2` abbreviation is defined, use \string\newleipzig}% + \@gobbletwo + }% + } \def\@newleipzig(#1)#2#3\@nil{% \uppercase{\expandafter\gdef\csname #2}#3\endcsname{\leipzigfont{#1}} }% -\fi -\input{leipzig.tex} -\ifleipzig@donotindex\leipzig@donotindexfalse\fi +} +\@ifpackageloaded{glossaries}{% + \loadglsentries{leipzig.tex}% + }% + {\input{leipzig.tex}}% +%% +%% Copyright (C) 2017 by Natalie Weber <natalie.a.weber@gmail.com> +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% End of file `leipzig.sty'. diff --git a/Master/texmf-dist/tex/latex/leipzig/leipzig.tex b/Master/texmf-dist/tex/latex/leipzig/leipzig.tex index 812f1cb1830..ba6a4e8091a 100644 --- a/Master/texmf-dist/tex/latex/leipzig/leipzig.tex +++ b/Master/texmf-dist/tex/latex/leipzig/leipzig.tex @@ -1,94 +1,135 @@ -% Format of examples: % -% -% All leipzig gloss macros are of the form {\Abbrv} -% -% where Abbrv starts with a capital letter, and is equivalent to -% the gloss abbreviations suggested in the Leipzig glossing rules. -% -% That is, \Acc{} will print \textsc{acc}, etc. -% +%% +%% This is file `leipzig.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% leipzig.dtx (with options: `abbrvs') +%% ---------------------------------------------------------------- +%% leipzig --- A package to typeset and index linguistic gloss abbreviations. +%% E-mail: natalie.a.weber@gmail.com +%% Released under the LaTeX Project Public License v1.3c or later +%% See http://www.latex-project.org/lppl.txt +%% ---------------------------------------------------------------- +%% +%% Copyright (C) 2017 by Natalie Weber <natalie.a.weber@gmail.com> +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Natalie Weber. +%% +%% This work consists of the file leipzig.dtx, +%% and the derived files +%% README.md, +%% leipzig.ins, +%% leipzig.tex, +%% leipzig.sty, and +%% leipzig.pdf +%% -\newleipzig{abl}{abl}{ablative} %ablative -\newleipzig{abs}{abs}{absolutive} %absolutive -\newleipzig{acc}{acc}{accusative} %accusative -\newleipzig{adj}{adj}{adjective} %adjective -\newleipzig{adv}{adv}{adverbial} %adverb(ial) -\newleipzig{aarg}{a}{agent} %agent-like argument of canonical transitive verb -\newleipzig{agr}{agr}{agreement} %agreement -\newleipzig{all}{all}{allative} %allative -\newleipzig{antip}{antip}{antipassive} %antipassive -\newleipzig{appl}{appl}{applicative} %applicative -\newleipzig{art}{art}{article} %article -\newleipzig{aux}{aux}{auxiliary} %auxiliary -\newleipzig{ben}{ben}{benefactive} %benefactive -\newleipzig{caus}{caus}{causative} %causative -\newleipzig{clf}{clf}{classifier} %classifier -\newleipzig{com}{com}{comitative} %comitative -\newleipzig{comp}{comp}{complementizer} %complementizer -\newleipzig{compl}{compl}{completive} %completive -\newleipzig{cond}{cond}{conditional} %conditional -\newleipzig{cop}{cop}{copula} %copula -\newleipzig{cvb}{cvb}{converb} %converb -\newleipzig{dat}{dat}{dative} %dative -\newleipzig{decl}{decl}{declarative} %declarative -\newleipzig{def}{def}{definite} %definite -\newleipzig{dem}{dem}{demonstrative} %demonstrative -\newleipzig{det}{det}{determiner} %determiner -\newleipzig{dist}{dist}{distal} %distal -\newleipzig{distr}{distr}{distributive} %distributive -\newleipzig{du}{du}{dual} %dual -\newleipzig{dur}{dur}{durative} %durative -\newleipzig{erg}{erg}{ergative} %ergative -\newleipzig{excl}{excl}{exclusive} %exclusive -\newleipzig{f}{f}{feminine} %feminine -\newleipzig{foc}{foc}{focus} %focus -\newleipzig{fut}{fut}{future} %future -\newleipzig{gen}{gen}{genitive} %genitive -\newleipzig{imp}{imp}{imperative} %imperative -\newleipzig{incl}{incl}{inclusive} %inclusive -\newleipzig{ind}{ind}{indicative} %indicative -\newleipzig{indf}{indf}{indefinite} %indefinite -\newleipzig{inf}{inf}{infinitive} %infinitive -\newleipzig{ins}{ins}{instrumental} %instrumental -\newleipzig{intr}{intr}{intransitive} %intransitive -\newleipzig{impf}{impf}{imperfective} %imperfective -\newleipzig{irr}{irr}{irrealis} %irrealis -\newleipzig{loc}{loc}{locative} %locative -\newleipzig{m}{m}{masculine} %masculine -\newleipzig{n}{n}{neuter} %neuter -\newleipzig{neg}{neg}{negative} %negation, negative -\newleipzig{nmlz}{nmlz}{nominalizer} %nominalizer/nominalization -\newleipzig{nom}{nom}{nominative} %nominative -\newleipzig{obj}{obj}{object} %object -\newleipzig{obl}{obl}{oblique} %oblique + + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% This is a simple list of newcommands which create shortcuts for %% +%% standard linguistic glosses (see the Leipzig Glossing rules, %% +%% http://www.eva.mpg.de/lingua/resources/glossing-rules.php %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\makeatletter\ifleipzig@nostandards\leipzigdonotindextrue\fi\makeatother + +\newleipzig{abl}{abl}{ab\-la\-tive} %ablative +\newleipzig{abs}{abs}{ab\-so\-lu\-tive} %absolutive +\newleipzig{acc}{acc}{ac\-cusa\-tive} %accusative +\newleipzig{adj}{adj}{ad\-jec\-tive} %adjective +\newleipzig{adv}{adv}{ad\-ver\-bial} %adverb(ial) +\newleipzig{aarg}{a}{agent} %agent-like argument of +\newleipzig{agr}{agr}{agreement} %agreement +\newleipzig{all}{all}{al\-la\-tive} %allative +\newleipzig{antip}{antip}{anti\-pas\-sive} %antipassive +\newleipzig{appl}{appl}{ap\-plica\-tive} %applicative +\newleipzig{art}{art}{article} %article +\newleipzig{aux}{aux}{aux\-il\-iary} %auxiliary +\newleipzig{ben}{ben}{bene\-fac\-tive} %benefactive +\newleipzig{caus}{caus}{causative} %causative +\newleipzig{clf}{clf}{clas\-si\-fi\-er} %classifier +\newleipzig{com}{com}{comi\-ta\-tive} %comitative +\newleipzig{comp}{comp}{com\-ple\-men\-ti\-zer} %complementizer +\newleipzig{compl}{compl}{com\-ple\-tive} %completive +\newleipzig{cond}{cond}{con\-di\-tion\-al} %conditional +\newleipzig{cop}{cop}{cop\-u\-la} %copula +\newleipzig{cvb}{cvb}{con\-verb} %converb +\newleipzig{dat}{dat}{da\-tive} %dative +\newleipzig{decl}{decl}{declarative} %declarative +\newleipzig{def}{def}{definite} %definite +\newleipzig{dem}{dem}{demonstrative} %demonstrative +\newleipzig{det}{det}{determiner} %determiner +\newleipzig{dist}{dist}{dis\-tal} %distal +\newleipzig{distr}{distr}{dis\-tri\-bu\-tive} %distributive +\newleipzig{du}{du}{dual} %dual +\newleipzig{dur}{dur}{dur\-ative} %durative +\newleipzig{erg}{erg}{erg\-ative} %ergative +\newleipzig{excl}{excl}{ex\-clu\-sive} %exclusive +\newleipzig{f}{f}{feminine} %feminine +\newleipzig{foc}{foc}{focus} %focus +\newleipzig{fut}{fut}{future} %future +\newleipzig{gen}{gen}{gen\-i\-tive} %genitive +\newleipzig{imp}{imp}{imperative} %imperative +\newleipzig{incl}{incl}{inclusive} %inclusive +\newleipzig{ind}{ind}{indicative} %indicative +\newleipzig{indf}{indf}{indefinite} %indefinite +\newleipzig{inf}{inf}{in\-fini\-tive} %infinitive +\newleipzig{ins}{ins}{instrumental} %instrumental +\newleipzig{intr}{intr}{in\-tran\-si\-tive} %intransitive +\newleipzig{ipfv}{ipfv}{im\-per\-fec\-tive} %imperfective +\newleipzig{irr}{irr}{ir\-real\-is} %irrealis +\newleipzig{loc}{loc}{loc\-ative} %locative +\newleipzig{m}{m}{masculine} %masculine +\newleipzig{n}{n}{neuter} %neuter +\newleipzig{neg}{neg}{negative} %negation, negative +\newleipzig{nmlz}{nmlz}{nom\-i\-nal\-iz\-er} %nominalizer/nominalization +\newleipzig{nom}{nom}{nom\-in\-ative} %nominative +\newleipzig{obj}{obj}{object} %object +\newleipzig{obl}{obl}{ob\-lique} %oblique \newleipzig{pass}{pass}{passive} %passive -\newleipzig{parg}{p}{patient} %patient -\newleipzig{pfv}{pfv}{perfective} %perfective -\newleipzig{pl}{pl}{plural} %plural -\newleipzig{poss}{poss}{possessive} %possessive -\newleipzig{pred}{pred}{predicative} %predicative -\newleipzig{prf}{prf}{perfect} %perfect -\newleipzig{prs}{prs}{present} %present -\newleipzig{prog}{prog}{progressive} %progressive -\newleipzig{proh}{proh}{prohibitive} %prohibitive -\newleipzig{prox}{prox}{proximal} %proximal/proximate -\newleipzig{pst}{pst}{past} %past -\newleipzig{ptcp}{ptcp}{participle} %participle -\newleipzig{purp}{purp}{purposive} %purposive -\newleipzig{q}{q}{question particle} %question particle/marker -\newleipzig{quot}{quot}{quotative} %quotative -\newleipzig{recp}{recp}{reciprocal} %reciprocal -\newleipzig{refl}{refl}{reflexive} %reflexive -\newleipzig{rel}{rel}{relative} %relative -\newleipzig{res}{res}{resultative} %resultative -\newleipzig{sbj}{sbj}{subject} %subject -\newleipzig{subj}{subj}{subjunctive} %subjunctive -\newleipzig{sg}{sg}{singular} %singular -\newleipzig{sarg}{s}{argument of intransitive verb} +\newleipzig{parg}{p}{patient} %patient +\newleipzig{pfv}{pfv}{per\-fec\-tive} %perfective +\newleipzig{pl}{pl}{plural} %plural +\newleipzig{poss}{poss}{possessive} %possessive +\newleipzig{pred}{pred}{pred\-i\-ca\-tive} %predicative +\newleipzig{prf}{prf}{perfect} %perfect +\newleipzig{prs}{prs}{present} %present +\newleipzig{prog}{prog}{progressive} %progressive +\newleipzig{proh}{proh}{prohibitive} %prohibitive +\newleipzig{prox}{prox}{prox\-i\-mal} %proximal/proximate +\newleipzig{pst}{pst}{past} %past +\newleipzig{ptcp}{ptcp}{participle} %participle +\newleipzig{purp}{purp}{pur\-po\-sive} %purposive +\newleipzig{q}{q}{question particle} %question particle/marker +\newleipzig{quot}{quot}{quot\-ative} %quotative +\newleipzig{recp}{recp}{recip\-ro\-cal} %reciprocal +\newleipzig{refl}{refl}{reflexive} %reflexive +\newleipzig{rel}{rel}{relative} %relative +\newleipzig{res}{res}{re\-sul\-ta\-tive} %resultative +\newleipzig{sbj}{sbj}{subject} %subject +\newleipzig{subj}{subj}{sub\-junc\-tive} %subjunctive +\newleipzig{sg}{sg}{singular} %singular +\newleipzig{sarg}{s}{argument of intransitive verb} %single argument of intransitive verb -\newleipzig{top}{top}{topic} %topic -\newleipzig{tr}{tr}{transitive} %transitive -\newleipzig{voc}{voc}{vocative} %vocative +\newleipzig{top}{top}{topic} %topic +\newleipzig{tr}{tr}{tran\-si\-tive} %transitive +\newleipzig{voc}{voc}{voc\-ative} %vocative %% Define short versions of person + number: \newleipzig{first}{1}{first person}% @@ -103,4 +144,26 @@ \newcommand{\Spl}{{\Second}{\Pl}}% \newcommand{\Tsg}{{\Third}{\Sg}}% \newcommand{\Tdu}{{\Third}{\Du}}% -\newcommand{\Tpl}{{\Third}{\Pl}}%
\ No newline at end of file +\newcommand{\Tpl}{{\Third}{\Pl}}% + +\makeatletter +\@ifpackageloaded{glossaries}{% if glossary-tree loaded + \glsfindwidesttoplevelname[\leipzigtype]% +}{\relax}% +\leipzigdonotindexfalse +\makeatother + +%% +%% Copyright (C) 2017 by Natalie Weber <natalie.a.weber@gmail.com> +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% End of file `leipzig.tex'. |