diff options
Diffstat (limited to 'macros/latex/contrib/covington')
-rw-r--r-- | macros/latex/contrib/covington/README | 4 | ||||
-rw-r--r-- | macros/latex/contrib/covington/covington.pdf | bin | 550730 -> 552996 bytes | |||
-rw-r--r-- | macros/latex/contrib/covington/covington.sty | 89 | ||||
-rw-r--r-- | macros/latex/contrib/covington/covington.tex | 82 |
4 files changed, 98 insertions, 77 deletions
diff --git a/macros/latex/contrib/covington/README b/macros/latex/contrib/covington/README index 0911cf90a9..9bc61de3e3 100644 --- a/macros/latex/contrib/covington/README +++ b/macros/latex/contrib/covington/README @@ -31,6 +31,10 @@ The package consists of the following files: == CHANGES == +* Version 2.12 (2023-06-25) + - Fix issue with redefinitions of \glosslineone/\glosslinetwo/\glosslinethree, + which could get lost along the text (#13). + * Version 2.11 (2023-06-17) - Add support for judgment markers in examples and glosses. - Add support for customization of spacing between gloss lines. diff --git a/macros/latex/contrib/covington/covington.pdf b/macros/latex/contrib/covington/covington.pdf Binary files differindex 2fddb771fb..318cddfef2 100644 --- a/macros/latex/contrib/covington/covington.pdf +++ b/macros/latex/contrib/covington/covington.pdf 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% diff --git a/macros/latex/contrib/covington/covington.tex b/macros/latex/contrib/covington/covington.tex index 865305f981..81911c6001 100644 --- a/macros/latex/contrib/covington/covington.tex +++ b/macros/latex/contrib/covington/covington.tex @@ -97,8 +97,8 @@ % % Titling % -\def\pversion{Version 2.11} -\def\pdate{June 17, 2023} +\def\pversion{Version 2.12} +\def\pdate{June 25, 2023} \title{\textbf{The \cvt\ Package\\\Large Macros for Linguistics}} \author{Michael A. Covington \and J\"urgen Spitzm\"uller\thanks{Current maintainer. @@ -139,10 +139,10 @@ To use \cvt, load the package as usual by adding the command to your document preamble. The package has the following options to customize its behavior: \begin{description} \item{\joption{force=\jparam{true|false}}} Default: \emph{false}. - Force the redefinition of environments that have already been defined by other packages or the class. + Enforce the redefinition of environments that have already been defined by other packages or the class. This applies to the \jenv{example}, \jenv{examples}, \jenv{subexamples} and \jenv{exercise} environments, - which are by default not touched if they are already defined before \cvt\ is loaded. + which are by default not touched if they have already been defined before \cvt\ is loaded. See sec.~\ref{sec:ex}, \ref{sec:exs}, \ref{sec:subexs} and \ref{sec:exercises} for details. \item{\joption{keeplayout=\jparam{true|false}}} Default: \emph{false}. Do not tweak the layout. @@ -369,8 +369,8 @@ The \jenv{example} environment provides the following options which also allow f and example is in a footnote. For the template format, see \joption{numberformat}. \end{description} % -If you pass these as optional argument to an environment, they will only apply to the current environment. -If you want to make a global change, you can use the macro +If you pass them to an environment (as optional argument of the environment), the options will only apply to that +very environment. If you want to make a global change, you can use the macro \begin{lstlisting}[moretexcs={setexampleoptions}] \setexampleoptions{<options>} \end{lstlisting} @@ -411,15 +411,15 @@ Besides to the normal optional item argument (see below), the examples environme argument which allows you to pass a judgment marker. Consider: \begin{lstlisting} \begin{examples} -\item<*> Ein ungrammatischem Satz. -\item Ein grammatischer Satz. +\item<*> This sentence not is well-formed. +\item This is a well-formed sentence. \end{examples} \end{lstlisting} % This is printed as: \begin{examples} - \item<*> Ein ungrammatischem Satz. - \item Ein grammatischer Satz. + \item<*> This sentence not is well-formed. + \item This is a well-formed sentence. \end{examples} % If you use a wider marker such as \jparam{??}, you need to adjust the width of the reserved space for the marker. @@ -437,9 +437,10 @@ in a row here: It also sets the appropriate \joption{judgewidth} for the selected marker. Use the aforementioned angular \jcsmacro{item} option to overwrite the preset marker or to set one for indivual examples only. - \item \joption{preamble} and \joption{postamble[*]} do not have any effect at all, as such text needs to - be set for individual examples in the set; to this end, we provide a specific solution, as documented - in what follows. + \item \joption{preamble} and \joption{postamble[*]} do not have any effect at all. Preambles and postambles, + after all, belong to individual examples in the set rather than to the whole set of examples (or their + first and last item, respectively). + Instead of these options, we thus provide per-item solutions, which are documented in what follows. \end{itemize} % For preambles and postambles, we provide specific macros, namely \jcsmacro{expreamble} and \jcsmacro{expostamble}, @@ -448,9 +449,9 @@ via \joption{preamble} or \joption{postamble} option in the \jenv{example} envir Hence, also here, the advantage over just adding text as is in the example is that an own, globally settable markup is used. This is particularly relevant if you globally set examples to be italicized via the \joption{fs} option (as we have done it -in our examples in sec.~\ref{sec:exex}). Also, judgment markers are properly set after the preamble. +in our examples in sec.~\ref{sec:exex}). Also, judgment markers are properly set after the preamble.\pagebreak[2] -Consider: +\noindent Consider: \begin{lstlisting}[moretexcs={expreamble}] \begin{examples} \item \expreamble{Here is Jakobson's famous poetic example:} @@ -606,6 +607,8 @@ Also note that, if you set options globally via \jcsmacro{setexampleoptions}, th should be used to distinguish the \jenv{subexample} from the \jenv{example} case. \begin{description} \item[\joption{subjudge=\{\jparam{text}\}}] sets the default judge marker for subexamples. + \item[\joption{subpreamble=\{\jparam{arbitrary text}\}}] For a global preamble presetting in subexamples. + \item[\joption{subpostamble=\{\jparam{arbitrary text}\}}] For a global postamble presetting in subexamples. \item[\joption{fssubpreamble=\{\jparam{font settings}\}}] Default: \verb|{\normalfont\upshape}|. Adjusts the font settings of subexample's preamble text and the \jcsmacro{subexpreamble} macro described below. @@ -614,10 +617,6 @@ should be used to distinguish the \jenv{subexample} from the \jenv{example} case Tweaks the sub\-example's postamble text font settings and the \jcsmacro{subexpostamble} macro described below. Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc. - \item[\joption{fssubpostamble=\{\jparam{font settings}\}}] Default: \verb|{\normalfont\upshape}|. - Tweaks the sub\-example's postamble text font settings and the \jcsmacro{subexpostamble} - macro described below. - Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc. \end{description} % For convenience, all these options actually also work (as aliases) in optional arguments passed to @@ -707,34 +706,34 @@ Let us briefly demonstrate the judgment feature. If we want to mark an example a we use the conventional asterisk mark, like this: \begin{lstlisting}[morekeywords=judge] \begin{example}[judge=*] -Ein ungrammatischem Satz. +Dies ein ungrammatischem Satz ist. \end{example} \end{lstlisting} % or, shorter: \begin{lstlisting}[morekeywords={*}, alsoletter={*}] \begin{example}[*] -Ein ungrammatischem Satz. +Dies ein ungrammatischem Satz ist. \end{example} \end{lstlisting} % to get: \begin{example}[judge=*] - Ein ungrammatischem Satz. + Dies ein ungrammatischem Satz ist. \end{example} % With the \jenv{examples} and \jenv{subexamples} environment, we need to pass the marker to the item's angular argument instead, as already demonstrated in sec.~\ref{sec:exs}: \begin{lstlisting} \begin{examples} -\item<*> Ein ungrammatischem Satz. -\item Ein grammatischer Satz. +\item<*> Dies ein ungrammatischem Satz ist. +\item Dies ist ein grammatisch wohlgeformter Satz. \end{examples} \end{lstlisting} % \begin{examples} - \item<*> Ein ungrammatischem Satz. - \item Ein grammatischer Satz. + \item<*> Dies ein ungrammatischem Satz ist. + \item Dies ist ein grammatisch wohlgeformter Satz. \end{examples} % With wider markers, we need to adjust the marker width via \joption{judgewidth}, and @@ -758,10 +757,8 @@ to have a good space to the number: % \begin{lstlisting}[moretexcs={expreamble}] \begin{examples} -\item \expreamble{Compare this:} - Oh, I am so well-formed! -\item<*> \expreamble{with this:} - Lucky are you! +\item \expreamble{Compare this:} Oh, I am so well-formed! +\item<*> \expreamble{with this:} Lucky are you! \end{examples} \end{lstlisting} % @@ -1053,10 +1050,11 @@ Note that: \item[\joption{glosswidth=\{\jparam{length}\}}] Default: \verb|{0.6\textwidth}|. Sets the maximum width the gloss takes if optional comments or \joption{tlr*=true} are used. \item[\joption{glosssep=\{\jparam{length}\}}] Default: \verb|{1em}|. - Sets space between gloss and optional comments or free translation in case of \joption{tlr*=true}. + Sets space between gloss and optional comments, or between gloss and free translation in + case of \joption{tlr*=true}, respectively. \item[\joption{glosscommentwidth=\{\jparam{length}\}}] - Sets the maximum width of gloss comments or free translation in case of \joption{tlr*=true}. - By default this is automatically calculated from the above two lengths. + Sets the maximum width of gloss comments, or of free translation in case of \joption{tlr*=true}, + respectively. By default this is automatically calculated from the above two lengths. \item[\joption{fscomments=\{\jparam{font settings}\}}] Default: \verb|{\normalfont\upshape}|. Adjusts the font settings of the gloss comments. Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc. @@ -1227,19 +1225,19 @@ That one was typed using the option \joption{tlr}: {(\exampleno)} \end{lstlisting} % -Third, we showcase the \joption{tlr*} option which is usable if +Third, we showcase the \joption{tlr*} option which is handy if you want the free translation to the right: \digloss[tlr*,glosscommentwidth={.6\textwidth}] - {Tres facet collegium} + {Tres faciunt collegium} {Three make society} {Three persons constitute a group.} % This has been entered like this: -\begin{lstlisting}[moretexcs={digloss,exampleno},morekeywords=tlr] +\begin{lstlisting}[moretexcs={digloss,exampleno},morekeywords={tlr,glosscommentwidth}] \digloss[tlr*,glosscommentwidth={.6\textwidth}] - {Tres facet collegium} - {Three make society} - {Three persons constitute a group.} + {Tres faciunt collegium} + {Three make society} + {Three persons constitute a group.} \end{lstlisting} % As you note, we also used the \joption{glosscommentwidth} option to @@ -1645,6 +1643,12 @@ it. \section{Release history} +\subsection*{2.12 (2023 June 25)} +\begin{itemize} + \item Fix issue with redefinitions of \jcsmacro{glosslineone}\slash\jcsmacro{glosslinetwo}\slash + \jcsmacro{glosslinethree}, which could get lost along the text. +\end{itemize} + \subsection*{2.11 (2023 June 17)} \begin{itemize} \item Add support for judgment markers in examples and glosses. |