summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/covington/covington.sty
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-06-26 03:01:58 +0000
committerNorbert Preining <norbert@preining.info>2023-06-26 03:01:58 +0000
commita2ebe77da32f4499676953174f774795b0d054fb (patch)
treef4fdcc85ff2094087365d264261b4581ae2dab40 /macros/latex/contrib/covington/covington.sty
parentaf81f7c9824b89002c882d1425479009b3186b4b (diff)
CTAN sync 202306260301
Diffstat (limited to 'macros/latex/contrib/covington/covington.sty')
-rw-r--r--macros/latex/contrib/covington/covington.sty89
1 files changed, 51 insertions, 38 deletions
diff --git a/macros/latex/contrib/covington/covington.sty b/macros/latex/contrib/covington/covington.sty
index b676c7e836..b024830bfc 100644
--- a/macros/latex/contrib/covington/covington.sty
+++ b/macros/latex/contrib/covington/covington.sty
@@ -42,8 +42,8 @@
%%% Metadata
%%%
-\def\filedate{2023/06/17}
-\def\fileversion{2.11}
+\def\filedate{2023/06/25}
+\def\fileversion{2.12}
\def\filename{covington.sty}
% Macro to issue warnings
@@ -593,6 +593,10 @@
preamble.store = \cov@sxp,
% postamble text
postamble.store = \cov@sxpst,
+ % preamble text (alias)
+ subpreamble.store = \cov@sxp,
+ % postamble text (alias)
+ subpostamble.store = \cov@sxpst,
% preamble font settings
fspreamble.store = \subexpreamblefs,
% postamble font settings
@@ -1023,13 +1027,9 @@
\newif\ifnotdone
% Font settings for gloss lines
-\newcommand*\glosslineone@global{\cov@emphasized}
-\newcommand*\glosslinetwo@global{\cov@normalfont}
-\newcommand*\glosslinethree@global{\cov@normalfont}
-
-\let\glosslineone\glosslineone@global
-\let\glosslinetwo\glosslinetwo@global
-\let\glosslinethree\glosslinethree@global
+\newcommand*\glosslineone{\cov@emphasized}
+\newcommand*\glosslinetwo{\cov@normalfont}
+\newcommand*\glosslinethree{\cov@normalfont}
\def\eachwordone{\glosslineone}
\def\eachwordtwo{\glosslinetwo}
@@ -1243,9 +1243,9 @@
% tlr*=<true|false>
tlr*.if = cov@tlr@star,
% font settings for gloss line i, ii, iii
- fsi.store = \lglosslineone,
- fsii.store = \lglosslinetwo,
- fsiii.store = \lglosslinethree,
+ fsi.store = \glosslineone@local,
+ fsii.store = \glosslinetwo@local,
+ fsiii.store = \glosslinethree@local,
% Gloss preamble text
preamble.code = { \edef\cov@gl@preamble{#1} },
% Gloss postamble text
@@ -1350,6 +1350,9 @@
%
% General setting option
\newcommand*\setglossoptions[1]{\SetKeys[gcovgloss]{#1}}
+
+% Empty environment (to keep changes local)
+\newenvironment{covgloss}{}{}
%
% 1. \digloss[<opts>]{<line 1>}[linepostamble1]
% {<line 2>}[linepostamble2]
@@ -1361,12 +1364,12 @@
\@ifundefined{cov@judge@gloss@text@global}%
{\let\cov@judge@gloss@text\relax}%
{\let\cov@judge@gloss@text\cov@judge@gloss@text@global}%
- \let\lglosslineone\relax%
- \let\lglosslinetwo\relax%
- \let\lglosslinethree\relax%
- \let\glosslineone\glosslineone@global%
- \let\glosslinetwo\glosslinetwo@global%
- \let\glosslinethree\glosslinethree@global%
+ \let\glosslineone@local\relax%
+ \let\glosslinetwo@local\relax%
+ \let\glosslinethree@local\relax%
+ \@ifundefined{glosslineone@global}{}{\def\glosslineone{\glosslineone@global}}%
+ \@ifundefined{glosslinetwo@global}{}{\def\glosslinetwo{\glosslinetwo@global}}%
+ \@ifundefined{glosslinethree@global}{}{\def\glosslinethree{\glosslinethree@global}}%
\setlength\cov@glossline@sepi@local{\cov@glossline@sepi}%
\setlength\cov@glossline@sepii@local{\cov@glossline@sepii}%
\setlength\cov@glossline@sepiii@local{\cov@glossline@sepiii}%
@@ -1401,10 +1404,12 @@
\IfNoValueF{#1}{\SetKeys[covgloss]{#1}}%
\ifcov@ex@gloss
\begin{covexample}
+ \else%
+ \begin{covgloss}
\fi%
- \@ifundefined{lglosslineone}{}{\def\glosslineone{\lglosslineone}}%
- \@ifundefined{lglosslinetwo}{}{\def\glosslinetwo{\lglosslinetwo}}%
- \@ifundefined{lglosslinethree}{}{\def\glosslinethree{\lglosslinethree}}%
+ \@ifundefined{glosslineone@local}{}{\def\glosslineone{\glosslineone@local}}%
+ \@ifundefined{glosslinetwo@local}{}{\def\glosslinetwo{\glosslinetwo@local}}%
+ \@ifundefined{glosslinethree@local}{}{\def\glosslinethree{\glosslinethree@local}}%
\edef\cov@gl@preamble@text{\cov@gl@preamble}%
\def\cov@gl@postamble@text{\cov@gl@postamble}%
\@ifundefined{cov@fsglpreamble@local}%
@@ -1426,8 +1431,10 @@
}%
\def\linetwopa{\strut}%
\else%
- \IfNoValueTF{#3}{\def\lineonepa{\strut}}{\@cov@glossplinetrue\def\lineonepa{\cov@closscomments@fs#3}}%
- \IfNoValueTF{#5}{\def\linetwopa{\strut}}{\@cov@glossplinetrue\def\linetwopa{\cov@closscomments@fs#5}}%
+ \IfNoValueTF{#3}{\def\lineonepa{\strut}}%
+ {\@cov@glossplinetrue\def\lineonepa{\cov@closscomments@fs#3}}%
+ \IfNoValueTF{#5}{\def\linetwopa{\strut}}%
+ {\@cov@glossplinetrue\def\linetwopa{\cov@closscomments@fs#5}}%
\fi%
\if@cov@glosspline%
\savebox{\pline}{%
@@ -1461,10 +1468,12 @@
\glend
\ifcov@ex@gloss
\end{covexample}
+ \else%
+ \end{covgloss}
\fi%
- \let\lglosslineone\relax%
- \let\lglosslinetwo\relax%
- \let\lglosslinethree\relax%
+ \let\glosslineone@local\relax%
+ \let\glosslinetwo@local\relax%
+ \let\glosslinethree@local\relax%
\let\cov@fsglpreamble@local\relax%
\let\cov@fsglpostamble@local\relax%
\let\cov@fstl@local\relax%
@@ -1482,12 +1491,12 @@
\@ifundefined{cov@judge@gloss@text@global}%
{\let\cov@judge@gloss@text\relax}%
{\let\cov@judge@gloss@text\cov@judge@gloss@text@global}%
- \let\lglosslineone\relax%
- \let\lglosslinetwo\relax%
- \let\lglosslinethree\relax%
- \let\glosslineone\glosslineone@global%
- \let\glosslinetwo\glosslinetwo@global%
- \let\glosslinethree\glosslinethree@global%
+ \let\glosslineone@local\relax%
+ \let\glosslinetwo@local\relax%
+ \let\glosslinethree@local\relax%
+ \@ifundefined{glosslineone@global}{}{\def\glosslineone{\glosslineone@global}}%
+ \@ifundefined{glosslinetwo@global}{}{\def\glosslinetwo{\glosslinetwo@global}}%
+ \@ifundefined{glosslinethree@global}{}{\def\glosslinethree{\glosslinethree@global}}%
\setlength\cov@glossline@sepi@local{\cov@glossline@sepi}%
\setlength\cov@glossline@sepii@local{\cov@glossline@sepii}%
\setlength\cov@glossline@sepiii@local{\cov@glossline@sepiii}%
@@ -1522,10 +1531,12 @@
\IfNoValueF{#1}{\SetKeys[covgloss]{#1}}%
\ifcov@ex@gloss
\begin{covexample}
+ \else
+ \begin{covgloss}
\fi%
- \@ifundefined{lglosslineone}{}{\def\glosslineone{\lglosslineone}}%
- \@ifundefined{lglosslinetwo}{}{\def\glosslinetwo{\lglosslinetwo}}%
- \@ifundefined{lglosslinethree}{}{\def\glosslinethree{\lglosslinethree}}%
+ \@ifundefined{glosslineone@local}{}{\def\glosslineone{\glosslineone@local}}%
+ \@ifundefined{glosslinetwo@local}{}{\def\glosslinetwo{\glosslinetwo@local}}%
+ \@ifundefined{glosslinethree@local}{}{\def\glosslinethree{\glosslinethree@local}}%
\edef\cov@gl@preamble@text{\cov@gl@preamble}%
\def\cov@gl@postamble@text{\cov@gl@postamble}%
\@ifundefined{cov@fsglpreamble@local}%
@@ -1586,10 +1597,12 @@
\glend
\ifcov@ex@gloss
\end{covexample}
+ \else%
+ \end{covgloss}
\fi%
- \let\lglosslineone\relax%
- \let\lglosslinetwo\relax%
- \let\lglosslinethree\relax%
+ \let\glosslineone@local\relax%
+ \let\glosslinetwo@local\relax%
+ \let\glosslinethree@local\relax%
\let\cov@fsglpreamble@local\relax%
\let\cov@fsglpostamble@local\relax%
\let\cov@fstl@local\relax%