summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/covington
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-05-27 03:00:50 +0000
committerNorbert Preining <norbert@preining.info>2023-05-27 03:00:50 +0000
commitae89135e23ed84909287c5d84a2c38c044789b51 (patch)
tree95b05bd94ed8d8406242a7018fe1fd237dd518ce /macros/latex/contrib/covington
parent8057c647880f05a2624b3d04ab0eb38d5cbf8c18 (diff)
CTAN sync 202305270300
Diffstat (limited to 'macros/latex/contrib/covington')
-rw-r--r--macros/latex/contrib/covington/README11
-rw-r--r--macros/latex/contrib/covington/covington.pdfbin513914 -> 520384 bytes
-rw-r--r--macros/latex/contrib/covington/covington.sty31
-rw-r--r--macros/latex/contrib/covington/covington.tex186
4 files changed, 185 insertions, 43 deletions
diff --git a/macros/latex/contrib/covington/README b/macros/latex/contrib/covington/README
index 0dba592c2d..4d1636aa59 100644
--- a/macros/latex/contrib/covington/README
+++ b/macros/latex/contrib/covington/README
@@ -3,7 +3,7 @@ The covington package
LaTeX macros for Linguistics
-Copyright 1991--2021 Michael A. Covington
+Copyright 1991--2023 Michael A. Covington
Robin Fairbairns
Juergen Spitzmueller
@@ -31,10 +31,15 @@ The package consists of the following files:
== CHANGES ==
+* Version 2.9 (2023-05-26):
+ - Add postamble and postamble* options to example and subexamples environment.
+ - Add \expreamble, \subexpreamble, \expostamble and \subexpostamble macros.
+ - Some documentation fixes.
+
* Version 2.8 (2022-08-30):
- - Add Add ownfncounter and ownfncounter* options to allow for separate counting
+ - Add ownfncounter and ownfncounter* options to allow for separate counting
of examples in footnotes. The starred option resets the counter at each footnote.
- - Add preamble option to example environment.
+ - Add preamble option to example environment.
* Version 2.7 (2021-09-01):
- Add postamble gloss macro option for arbitrary text that is appended to the free
diff --git a/macros/latex/contrib/covington/covington.pdf b/macros/latex/contrib/covington/covington.pdf
index cf67af6da0..a802c03ff1 100644
--- a/macros/latex/contrib/covington/covington.pdf
+++ b/macros/latex/contrib/covington/covington.pdf
Binary files differ
diff --git a/macros/latex/contrib/covington/covington.sty b/macros/latex/contrib/covington/covington.sty
index fd1921f182..5218249db1 100644
--- a/macros/latex/contrib/covington/covington.sty
+++ b/macros/latex/contrib/covington/covington.sty
@@ -42,8 +42,8 @@
%%% Metadata
%%%
-\def\filedate{2022/08/30}
-\def\fileversion{2.8}
+\def\filedate{2023/05/26}
+\def\fileversion{2.9}
\def\filename{covington.sty}
% Force redefinition of environments?
@@ -60,10 +60,10 @@
\newif\ifresetownfnexcounter\resetownfnexcounterfalse
\@ifundefined{ProvidesPackage}{%
-\typeout{* covington.sty : Covington's linguistic macros, \fileversion\ \filedate *}
+\typeout{* covington.sty -- Macros for Linguistics, \fileversion\ \filedate *}
}{%
\ProvidesPackage{covington}
- [\filedate\space v\fileversion\space Covington's linguistic macros]
+ [\filedate\space v\fileversion\space Macros for Linguistics]
\DeclareOption{force}{\forceredeftrue}
\DeclareOption{keeplayout}{\tweaklayoutfalse}
\DeclareOption{noglossbreaks}{\noglossbreakstrue}
@@ -222,12 +222,23 @@
% 2022-08-20 (v. 2.8): optional preceding example text
\define@key{cov@ex}{preamble}{\def\cov@xp{#1}}
\newcommand*\expreamblefs{\normalfont}
+\newcommand\expreamble[1]{\bgroup\expreamblefs#1\egroup\par}
+
+\newif\if@cov@expst@star\@cov@expst@starfalse
+\define@key{cov@ex}{postamble}{\def\cov@xpst{#1}\@cov@expst@starfalse}
+\define@key{cov@ex}{postamble*}{\def\cov@xpst{#1}\@cov@expst@startrue}
+% 2023.05.26 (v. 2.9): optional trailung subexample text
+\newcommand*\expostamblefs{\normalfont}
+\newcommand*\expostamble[1]{\bgroup\expostamblefs#1\egroup}
\newenvironment{covexample}[1][]{%
\ifx#1\empty\else\setkeys{cov@ex}{#1}\fi%
\begin{covexamples}
- \item\@ifundefined{cov@xp}{}{\bgroup\expreamblefs\cov@xp\egroup\par}% insert preamble if given
-}{\end{covexamples}}
+ \item\@ifundefined{cov@xp}{}{\expreamble{\cov@xp}}% insert preamble if given
+}{%
+ \@ifundefined{cov@xpst}{}{\if@cov@expst@star\unskip\fi\expostamble{\cov@xpst}}%
+ \end{covexamples}%
+}
\@ifundefined{example}{%
\newenvironment{example}[1][]{\begin{covexample}[#1]}{\end{covexample}}
@@ -353,6 +364,12 @@
% 2019-06-21 (v. 2.3): optional preceding subexample text
\define@key{cov@subex}{preamble}{\def\cov@sxp{#1}}
\newcommand*\subexpreamblefs{\normalfont}
+\newcommand\subexpreamble[1]{\bgroup\subexpreamblefs#1\egroup\par}
+
+% 2023.05.26 (v. 2.9): optional trailung subexample text
+\define@key{cov@subex}{postamble}{\def\cov@sxpst{#1}}
+\newcommand*\subexpostamblefs{\normalfont}
+\newcommand*\subexpostamble[1]{\bgroup\expostamblefs#1\egroup}
\newenvironment{covsubexamples}[1][]% % define "subexamples" environment
{%
@@ -370,6 +387,8 @@
{%
\let\cov@sxp\relax
\end{enumerate}
+ \@ifundefined{cov@sxpst}{}{\subexpostamble{\cov@sxpst}}% insert postamble if given
+ \let\cov@sxpst\relax
\end{covexample}
}
diff --git a/macros/latex/contrib/covington/covington.tex b/macros/latex/contrib/covington/covington.tex
index 585d38ff47..5dbc41c275 100644
--- a/macros/latex/contrib/covington/covington.tex
+++ b/macros/latex/contrib/covington/covington.tex
@@ -94,8 +94,8 @@
%
% Titling
%
-\def\pversion{Version 2.8}
-\def\pdate{August 30, 2022}
+\def\pversion{Version 2.9}
+\def\pdate{May 26, 2023}
\title{\textbf{The \cvt\ Package\\\Large Macros for Linguistics}}
\author{Michael A. Covington \and J\"urgen Spitzm\"uller\thanks{Current maintainer.
@@ -164,8 +164,8 @@ The package has the following options:
\item{\joption{ownfncounter}:} Use a separate counter for numbered examples in footnotes.
By default, \cvt\ numbers examples in footnotes in sequence with the numbering used in the main text. With this option,
- examples in footnotes get a different numbering. This uses by default roman numbering (see sec.~\ref{sec:custno} on how
- to change this) and is incremented throughout the whole footnote apparatus.
+ examples in footnotes get a different numbering. This uses by default lowercase Roman numbering (see sec.~\ref{sec:custno}
+ on how to change this) and is incremented throughout the whole footnote apparatus.
\item{\joption{ownfncounter*}:} Same as \joption{ownfncounter}, except that this variant resets the counter at each footnote
(similar to \textsf{linguex} and \textsf{gb4e}).
@@ -280,16 +280,26 @@ This is a sentence.\label{expl}
\end{example}
The example can be of any length; it can consist of many lines (separated by \verb"\\"), or even whole paragraphs.
-The \jenv{example} environment provides the following option:
+The \jenv{example} environment provides the following options:
\begin{description}
\item[\joption{preamble=\{\jparam{arbitrary text}\}}] Arbitrary text that is inserted on an own line
- after the example number (preceding the actual example text). This might be useful, for instance,
- to give context information, to specify the language or the source in case of cited examples.
- The advantage over just adding a line manually in the example is that you can globally set the markup
- (see sec.~\ref{sec:custno}).
+ after the example number (preceding the actual example text). This might be useful, for instance,
+ to give context information, to specify the language or the source in case of cited examples.
+ The advantage over just adding a line manually in the example is that you can globally set the markup
+ (see sec.~\ref{sec:custno}).
+ \item[\joption{postamble=\{\jparam{arbitrary text}\}}] Arbitrary text that is appended to example (on the
+ same line after a space).
+ This might be useful to add a reference or an explanation to the translation.
+ The advantage over just adding text manually in the example is that this uses its own markup
+ (see sec.~\ref{sec:custno}).
+ \item[\joption{postamble*=\{\jparam{arbitrary text}\}}] A variant of \joption{postamble} that does not add
+ a space. This might be preferred if you want to add a footnote.
+ Note that \joption{postamble} and \joption{postamble*} are mutually exclusive.
\end{description}
%
+If you want the postamble text be on a line of its own, simply add a line break (i.\,e., \verb|postamble={\\Text}|).
+
If you need more space between the example number and the text, you can increase it by means of
the length \jcsmacro{examplenumbersep} (which is preset to \texttt{0pt}). Doing \lstinline|\setlength\examplenumbersep{1em}|,
for instance, will increase the space by 1\,em (negative values will decrease the space accordingly).
@@ -327,10 +337,10 @@ convenient for this task.
\subsection[The \texttt{examples} environment]{The \jenv{examples} environment}\label{sec:exs}
-To display a series of examples together, each with its own example
-number, use \jenv{examples} (or \jenv{covexamples}) instead of \jenv{example} or \jenv{covexample}.
-The only drawback is that there is no \joption{preamble} option. On the other hand, there can be more
-than one example with this environment, and each of them has to be introduced by \jfcsmacro{item}, like this:
+To display a series of examples together, each with its own example number, use \jenv{examples}
+(or \jenv{covexamples}) instead of \jenv{example} or \jenv{covexample}.
+There can be more than one example with this environment, and each of them has to be introduced
+by \jfcsmacro{item}, like this:
\begin{lstlisting}
\begin{examples}
\item This is the first sentence.
@@ -350,6 +360,61 @@ This prints as:
\item This is the second sentence.
\end{examples}
%
+To add additional text to specific items (analogous to the \joption{preamble} option of the \jenv{example} environment),
+you can use the \jcsmacro{expreamble} macro, like this:
+\begin{lstlisting}[moretexcs={expreamble}]
+\begin{examples}
+\item \expreamble{Here is Jakobson's famous poetic example:}
+ I like Ike
+\item \expreamble{Here is the less poetic variant:}
+ I am in favor of Mr. Eisenhover
+\end{examples}
+\end{lstlisting}
+%
+which prints:
+\begin{examples}
+ \item \expreamble{Here is Jakobson's famous poetic example:}
+ I like Ike
+ \item \expreamble{Here is the less poetic variant:}
+ I am in favor of Mr. Eisenhover
+\end{examples}
+%
+Again, the advantage over just adding a line manually in the example is that you can globally set the markup
+(see sec.~\ref{sec:custno}).
+
+Along the same line, trailing text (analogous to the \joption{postamble} option of the \jenv{example} environment)
+can be added to specific items via the \jcsmacro{expostamble} macro, like this:
+\begin{lstlisting}[moretexcs={expostamble}]
+\begin{examples}
+\item I like Ike \expostamble{(Jakobson 1960: 357)}
+\item I am in favor of Mr. Eisenhover\expostamble{\footnote{He actually didn't.}}
+\end{examples}
+\end{lstlisting}
+%
+which results in:
+\begin{examples}
+ \item I like Ike \expostamble{(Jakobson 1960: 357)}
+ \item I am in favor of Mr. Eisenhover\expostamble{\footnote{He actually didn't.}}
+\end{examples}
+%
+The advantage over just adding text as is in the example is that this has its own, globally settable markup,
+which is particularly relevant if you globally set examples to be italicized (see sec.~\ref{sec:custno}).
+
+Like in any other \LaTeX\ list, the numbering can be freely set via the optional argument of \jfcsmacro{item}.
+For a somewhat practical example, consider
+\begin{lstlisting}[moretexcs={covexnumber,exampleno}]
+\begin{examples}
+\item A proposition.
+\item[\covexnumber{\exampleno*'}] An alternative proposition.
+\end{examples}
+\end{lstlisting}
+%
+which results in:
+\begin{examples}
+ \item A proposition.
+ \item[\covexnumber{\exampleno*'}] An alternative proposition.
+\end{examples}
+%
As for \jenv{example}, \cvt\ checks if there is already an \jenv{examples} environment defined,
and if this is the case, \cvt\ does not define its own one. The alias environment \jenv{covexamples}
is always available as a fallback. If you use the package option \joption{force}, \cvt\ will override
@@ -390,48 +455,87 @@ is always available as a fallback. If you use the package option \joption{force}
existing \jenv{subexamples} environments. The package will issue a warning if \jenv{subexamples} is already defined.
\medskip
-\noindent The \jenv{subexamples} environment provides the following option:
+\noindent The \jenv{subexamples} environment provides the following options:
\begin{description}
\item[\joption{preamble=\{\jparam{arbitrary text}\}}] Arbitrary text that is inserted in the first line
- (after the main number and before the first sub-example, which then follows in a new line).
- This might be useful, for instance, to give context information, to specify the language or the source
- in case of cited sub-examples. You can globally set the markup of this preamble text (see sec.~\ref{sec:custno}).
+ (after the main number and before the first sub-example, which then follows in a new line).
+ This might be useful, for instance, to give context information, to specify the language or the source
+ in case of cited sub-examples. You can globally set the markup of this preamble text (see sec.~\ref{sec:custno}).
+ \item[\joption{postamble=\{\jparam{arbitrary text}\}}] Arbitrary text that is appended after all sub-examples (on a
+ new line). This might be useful to add a reference or an explanation to the set.
+ The advantage over just adding text manually in the example is that this uses its own markup
+ (see sec.~\ref{sec:custno}).
\end{description}
%
For instance,
\begin{lstlisting}
-\begin{subexamples}[preamble={Here are two sentences}]
+\begin{subexamples}[preamble={Here are two sentences},postamble={(Doe 1974: 12)}]
\item This is the first sentence.
\item This is the second sentence.
\end{subexamples}
\end{lstlisting}
or, respectively:
\begin{lstlisting}
-\begin{covsubexamples}[preamble={Here are two sentences}]
+\begin{covsubexamples}[preamble={Here are two sentences},postamble={(Doe 1974: 12)}]
\item This is the first sentence.
\item This is the second sentence.
\end{covsubexamples}
\end{lstlisting}
prints as:
-\begin{subexamples}[preamble={Here are two sentences}]
+\begin{subexamples}[preamble={Here are two sentences},postamble={(Doe 1974: 12)}]
\item This is the first sentence.
\item This is the second sentence.
\end{subexamples}
%
+To add additional text to specific subitems, you can use the \jcsmacro{subexpreamble} macro, which uses the
+same markup than the \joption{preamble} option, like this:
+\begin{lstlisting}[moretexcs={subexpreamble}]
+\begin{covsubexamples}[preamble={Here are two sentences}]
+\item This is the first sentence.
+\item \subexpreamble{Note particular this one}
+ This is the second sentence.
+\end{covsubexamples}
+\end{lstlisting}
+%
+which prints:
+\begin{covsubexamples}[preamble={Here are two sentences}]
+ \item This is the first sentence.
+ \item \subexpreamble{Note particular this one}
+ This is the second sentence.
+\end{covsubexamples}
+%
+Along the same line, trailing text (analogous to the \joption{postamble} option)
+can be added to specific subitems via the \jcsmacro{subexpostamble} macro, like this:
+\begin{lstlisting}[moretexcs={subexpostamble}]
+\begin{subexamples}
+\item This is the first sentence. \subexpostamble{(Miller 2022: 15)}
+\item This is the second sentence.\subexpostamble{\footnote{My own.}}
+\end{subexamples}
+\end{lstlisting}
+%
+which results in:
+\begin{subexamples}
+ \item This is the first sentence. \subexpostamble{(Miller 2022: 15)}
+ \item This is the second sentence.\subexpostamble{\footnote{My own.}}
+\end{subexamples}
+%
+Again, the advantage over just adding text as is is that this has its own, globally settable markup,
+which is particularly relevant if you globally set examples to be italicized (see sec.~\ref{sec:custno}).
+
The distance between example number and subnumber (letter) can be changed via the length \jcsmacro{examplenumbersep}
(which is preset to \texttt{0pt}). The distance between example subnumber and text can be changed via the length
\jcsmacro{subexamplenumbersep} (preset to \texttt{0pt} as well). In both cases, a positive value will increase, a negative
value will decrease the respective distance.
Doing
\begin{lstlisting}[moretexcs={setlength,examplenumbersep,subexamplenumbersep}]
-\setlength{\examplenumbersep}{-0.5em}
-\setlength{\subexamplenumbersep}{0.5em}
+\setlength{\examplenumbersep}{-0.4em}
+\setlength{\subexamplenumbersep}{0.4em}
\end{lstlisting}
for instance, will come out like this:
\bgroup
-\setlength{\examplenumbersep}{-0.5em}
-\setlength{\subexamplenumbersep}{0.5em}
+\setlength{\examplenumbersep}{-0.4em}
+\setlength{\subexamplenumbersep}{0.4em}
\begin{subexamples}
\item This is the first sentence.
@@ -454,8 +558,8 @@ You can change the display of the example number by redefining (via \jfcsmacro{r
with the variable \texttt{\#1} representing the number.
If you use \joption{ownfncounter}, example numbers in footnote use this macro as well. If you want
a different display, you can redefine
-\begin{lstlisting}[moretexcs={covexfnnumber}]
-\newcommand*\covexfnnumber[1]{\covennumber{#1}}
+\begin{lstlisting}[moretexcs={covexnumberfn,covexnumber}]
+\newcommand*\covexnumberfn[1]{\covexnumber{#1}}
\end{lstlisting}
%
In the same vein, you can customize the display of the subexample letter by redefining
@@ -479,20 +583,25 @@ Note that this does, deliberately, not include the numbers, since those are cont
\jcsmacro{covexamplenofs}, which defaults to \jfcsmacro{normalfont}. Of course you are free to redefine this as well,
if you wish do to so.
-Finally, you can customize the markup of the example and sub-example preamble text by redefining the macro
+Furthermore, you can customize the markup of the example and sub-example preamble text (supplied via the \joption{preamble}
+option or the \jcsmacro{expreamble} or \jcsmacro{subexpreamble} macro) by redefining the macro
\jcsmacro{expreamblefs} or \jcsmacro{subexpreamblefs}, which also both default to \jfcsmacro{normalfont}.
To have them italicized, analogously do:
-\begin{lstlisting}[moretexcs={\subexpreamblefs}]
-\renewcommand*{\subexpreamblefs}{\itshape}
+\begin{lstlisting}[moretexcs={expreamblefs}]
+\renewcommand*{\expreamblefs}{\itshape}
\end{lstlisting}
or
-\begin{lstlisting}[moretexcs={\expreamblefs}]
-\renewcommand*{\expreamblefs}{\itshape}
+\begin{lstlisting}[moretexcs={subexpreamblefs}]
+\renewcommand*{\subexpreamblefs}{\itshape}
\end{lstlisting}
%
-The separate footnote example number with \joption{ownfncounter} uses roman numbering by default.
+Likewise, you can customize the markup of the example and sub-example postamble text (supplied via the
+\joption{postamble[*]} option or the \jcsmacro{expostamble} or \jcsmacro{subexpostamble} macro) by redefining the macro
+\jcsmacro{expostamblefs} or \jcsmacro{subexpostamblefs}, which also both default to \jfcsmacro{normalfont}.
+
+The separate footnote example number with \joption{ownfncounter} uses lowercase Roman numbering by default.
This can be changed by redefining
-\begin{lstlisting}[moretexcs={\thecovfnex}]
+\begin{lstlisting}[moretexcs={thecovfnex}]
\renewcommand{\thecovfnex}{\roman{covfnex}}
\end{lstlisting}
@@ -588,7 +697,7 @@ Note that:
\begin{description}
\item[\joption{ex=\jparam{true|false}}] Default: \emph{false}. Wraps the gloss in an example environment
- (i.\,e., it is numberered).
+ (i.\,e., it is numbered).
\item[\joption{tlr=\jparam{true|false}}] Default: \emph{false}. If set to true, the translation line (content
of the \jparam{free translation} argument) is set right to the gloss lines, rather than into a new line below.
Since the gloss itself is set in a box, this means the \jparam{free translation} will appear lined up with the
@@ -1165,6 +1274,15 @@ it.
\section{Release history}
+\subsection*{2.9 (2023 May 26)}
+\begin{itemize}
+ \item Add \joption{postamble} and \joption{postamble*} options to \jenv{example} and \jenv{subexamples} environment
+ (sec.~\ref{sec:exs} and \ref{sec:subexs}).
+ \item Add \jcsmacro{expreamble}, \jcsmacro{subexpreamble}, \jcsmacro{expostamble} and \jcsmacro{subexpostamble}
+ macros (sec.~\ref{sec:exs} and \ref{sec:subexs}).
+ \item Some documentation fixes.
+\end{itemize}
+
\subsection*{2.8 (2022 August 30)}
\begin{itemize}