From 7a7a5e7046af2a9e0116d7a558d31df96caf45f8 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 10 Jun 2019 21:17:44 +0000 Subject: leipzig (10jun19) git-svn-id: svn://tug.org/texlive/trunk@51357 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/leipzig/leipzig.dtx | 64 ++++++++++++---------- 1 file changed, 35 insertions(+), 29 deletions(-) (limited to 'Master/texmf-dist/source/latex/leipzig') diff --git a/Master/texmf-dist/source/latex/leipzig/leipzig.dtx b/Master/texmf-dist/source/latex/leipzig/leipzig.dtx index 249ef478dea..4dfb3a4970e 100644 --- a/Master/texmf-dist/source/latex/leipzig/leipzig.dtx +++ b/Master/texmf-dist/source/latex/leipzig/leipzig.dtx @@ -106,7 +106,7 @@ version 2005/12/01 or later. %\NeedsTeXFormat{LaTeX2e}[1996/10/24]% %\ProvidesPackage{leipzig}% %<*package> - [2017/06/16 v2.0 Leipzig package for linguistic abbreviations]% + [2019/06/09 v2.2 Leipzig package for linguistic abbreviations]% %\AtBeginDocument{% % \MakeShortVerb{\|} % \DeleteShortVerb{"}} @@ -161,7 +161,7 @@ version 2005/12/01 or later. % % \fi % -%\CheckSum{844} +%\CheckSum{855} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -465,7 +465,7 @@ version 2005/12/01 or later. %\ex|\renewcommand{\leipzigfont}[1]{\textit{\MakeUppercase{#1}}}|\xe % %\renewcommand{\leipzigfont}[1]{{\textit{\MakeUppercase{#1}}}}% -%This can occur anywhere in your document and it affects the short forms of of any following abbreviations, e.g.\ further instances of |{\Verbz}| from~\refp{ex:verbz} will expand to \Verbz{}. +%This can occur anywhere in your document and it affects the short forms of any following abbreviations, e.g.\ further instances of |{\Verbz}| from~\refp{ex:verbz} will expand to \Verbz{}. %\renewcommand{\leipzigfont}[1]{\textsc{#1}}% % %Note that the name of each glossary entry in the glossary will also be printed using the final redefinition of \cs{leipzigfont}. You can redefine \cs{glsnamefont} to control how glossary names are displayed. See \autoref{printglossary} for more information on glossary display. @@ -538,7 +538,7 @@ version 2005/12/01 or later. % To disable or enable all hyperlinks to glossaries, use \cs{glsdisablehyper} or \cs{glsenablehyper}. The effect can be localised by placing the commands within a group. % %\DescribeMacro{[nohypertypes]} -%To disable hyperlinks only for certain glossaries, use the package option (from \glossaries{}) \hbox{[nohypertypes]}. This is a key that take a list of comma-separated glossary names as a value. Make sure you enclose the value in braces if it contains any commas. The values must be fully expanded, so something like \hbox{|[nohypertypes=\leipzigtype]|} \emph{won't} work. Instead use \hbox{|[nohypertypes=main]|} if the \hbox{[glosses]} option has not been used, or \hbox{|[nohypertypes=leipzig]|} if the \hbox{[glosses]} option has been used. Instead of or in addition to the package option \hbox{[nohypertypes]}, you can also use |\GlsDeclareNoHyperList{|\meta{list}|}|. +%To disable hyperlinks only for certain glossaries, use the package option (from \glossaries{}) \hbox{[nohypertypes]}. This is a key that takes a list of comma-separated glossary names as a value. Make sure you enclose the value in braces if it contains any commas. The values must be fully expanded, so something like \hbox{|[nohypertypes=\leipzigtype]|} \emph{won't} work. Instead use \hbox{|[nohypertypes=main]|} if the \hbox{[glosses]} option has not been used, or \hbox{|[nohypertypes=leipzig]|} if the \hbox{[glosses]} option has been used. Instead of or in addition to the package option \hbox{[nohypertypes]}, you can also use |\GlsDeclareNoHyperList{|\meta{list}|}|. % %\DescribeMacro{[nohyperfirst]} %To disable hyperlinks only on the first use, use the package options (from \glossaries{}) \hbox{[nohyperfirst]}. This is a key that take a list of comma-separated glossary names as a value. Make sure you enclose the value in braces if it contains any commas. @@ -682,7 +682,7 @@ version 2005/12/01 or later. %\DescribeMacro{\glsinlinedescformat} %\DescribeMacro{\glsinlinesubdescformat} %\DescribeMacro{\glsinlineemptydescformat} -%Short and long forms of abbreviations are separated by \cs{glsinlinedescformat}. The default is to print an equals sign with small spaces on either side, and to encourage linebreaks \emph{after} the equals sign so that new lines do not begin with an equals sign. The short and long forms of child entries are separated by \cs{glsinlinesubdescformat}, which is defined the same as \cs{glsinlinedescformat}. Finally,\cs{glsinlineemptydescformat} controls what happens if there is no description at all. Defaults: +%Short and long forms of abbreviations are separated by \cs{glsinlinedescformat}. The default is to print an equals sign with small spaces on either side, and to encourage linebreaks \emph{after} the equals sign so that new lines do not begin with an equals sign. The short and long forms of child entries are separated by \cs{glsinlinesubdescformat}, which is defined the same as \cs{glsinlinedescformat}. Finally, \cs{glsinlineemptydescformat} controls what happens if there is no description at all. Defaults: % %\begin{verbatim}\renewcommand*{\glsinlinedescformat}[3]{\,=\,\linebreak[1]##1} %\renewcommand*{\glsinlinesubdescformat}[3]{\,=\,\linebreak[1]##1} @@ -788,7 +788,7 @@ version 2005/12/01 or later. %\begin{description} %\item[Q:] Why don't the abbreviations display in smallcaps? %\item[A:] Did you define abbreviations using ALL CAPS for the short form? The short form is displayed in \cs{leipzigfont}, which uses |\textsc|, but |\textsc| cannot make smallcaps out of capital letters: |\textsc{abc}| produces \textsc{abc}, but |\textsc{ABC}| produces \textsc{ABC}. Solution: change the \cs{newleipzig} definitions to use lowercase letters in the second argument. -%\item[A:] Not all font families contain a smallcaps font. For instance, only some version of Times New Roman contain a smallcaps font; the versionson Windows XP and Mac OS X do not. Solution: try changing the smallcaps font, or at least using |\usepackage[T1]{fontenc}| in your preamble. +%\item[A:] Not all font families contain a smallcaps font. For instance, only some version of Times New Roman contain a smallcaps font; the versions on Windows XP and Mac OS X do not. Solution: try changing the smallcaps font, or at least using |\usepackage[T1]{fontenc}| in your preamble. %\end{description} % % \begin{thebibliography}{9} @@ -1663,7 +1663,7 @@ version 2005/12/01 or later. % % \begin{macrocode} \ifleipzigdonotindex - \uppercase{\expandafter\gdef\csname #2}#2\endcsname{% + \uppercase{\expandafter\gdef\csname #1}#2\endcsname{% \leipzigfont{\glsentryshort{#1#2}}% }% % \end{macrocode} @@ -1724,12 +1724,12 @@ version 2005/12/01 or later. \fi {\newleipzig{#2}}{\newleipzig[#1]{#2}}% }% +}% % \end{macrocode} % \end{macro} %If \glossaries{} not loaded, then the code for \cs{newleipzig} and \cs{renewleipzig} is much shorter. -% % \begin{macrocode} -}{% +{% \newcommand{\newleipzig}[4][]{\@newleipzig(#3)#2\@nil}% \newcommand{\renewleipzig}[4][]{% \if@leipzig@defined{#2} @@ -1743,6 +1743,16 @@ version 2005/12/01 or later. \@gobbletwo }% } +% \end{macrocode} +%\changes{2.2}{2019/06/09}{Added definition of \cs{if@leipzig@defined} here. This fixes an error that occurred if \cs{renewcommand} was used with package option [noglossaries].} +% \begin{macrocode} + \def\if@leipzig@defined#1{% + \uppercase\expandafter{\expandafter\ifcsname\@car#1\@nil}\@cdr#1\@nil\endcsname + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + } \def\@newleipzig(#1)#2#3\@nil{% \uppercase{\expandafter\gdef\csname #2}#3\endcsname{\leipzigfont{#1}} }% @@ -1753,7 +1763,22 @@ version 2005/12/01 or later. % % \begin{macrocode} \@ifpackageloaded{glossaries}{% +% \end{macrocode} +% If the \hbox{[nostandards]} option was used, then do not index the abbreviations in leipzig.tex. +% +% \begin{macrocode} + \ifleipzig@nostandards\leipzigdonotindextrue\fi \loadglsentries{leipzig.tex}% +% \end{macrocode} +% Calculate the widest name based on this set of pre-defined abbreviations. It is probably vaguely accurate; if the author needs to, they can always redefine this in the preamble. +% +% \begin{macrocode} + \glsfindwidesttoplevelname[\leipzigtype]% +% \end{macrocode} +% Turn indexing back on if it was off. +% +% \begin{macrocode} + \leipzigdonotindexfalse }% {\input{leipzig.tex}}% % \end{macrocode} @@ -1786,10 +1811,6 @@ version 2005/12/01 or later. % % In a few cases, the label does not match the abbreviation, because the % macro that would have been created is already defined in LaTeX. -% \end{macrocode} -% If the \hbox{[nostandards]} option was used, then do not index the following. -% \begin{macrocode} -\makeatletter\ifleipzig@nostandards\leipzigdonotindextrue\fi\makeatother \newleipzig{abl}{abl}{ab\-la\-tive} %ablative \newleipzig{abs}{abs}{ab\-so\-lu\-tive} %absolutive @@ -1889,21 +1910,6 @@ version 2005/12/01 or later. \newcommand{\Tdu}{{\Third}{\Du}}% \newcommand{\Tpl}{{\Third}{\Pl}}% -\makeatletter -% \end{macrocode} -%If \glossaries{} is loaded, calculate the widest name based on this set of pre-defined abbreviations. It is probably vaguely accurate; if the author needs to, they can always redefine this in the preamble. -% -% \begin{macrocode} -\@ifpackageloaded{glossaries}{% if glossary-tree loaded - \glsfindwidesttoplevelname[\leipzigtype]% -}{\relax}% -% \end{macrocode} -% Turn indexing back on if it was off. -% -% \begin{macrocode} -\leipzigdonotindexfalse -\makeatother - % \end{macrocode} % \iffalse % @@ -1977,4 +1983,4 @@ version 2005/12/01 or later. \setglossarypreamble[\leipzigtype]{}% }% }{}% if glossaries not loaded, do nothing -% \end{macrocode} \ No newline at end of file +% \end{macrocode} -- cgit v1.2.3