texlive[67226] Master/texmf-dist: covington (26may23)
commits+karl at tug.org
commits+karl at tug.org
Fri May 26 23:08:24 CEST 2023
Revision: 67226
http://tug.org/svn/texlive?view=revision&revision=67226
Author: karl
Date: 2023-05-26 23:08:24 +0200 (Fri, 26 May 2023)
Log Message:
-----------
covington (26may23)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/covington/README
trunk/Master/texmf-dist/doc/latex/covington/covington.pdf
trunk/Master/texmf-dist/doc/latex/covington/covington.tex
trunk/Master/texmf-dist/tex/latex/covington/covington.sty
Modified: trunk/Master/texmf-dist/doc/latex/covington/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/covington/README 2023-05-26 21:08:11 UTC (rev 67225)
+++ trunk/Master/texmf-dist/doc/latex/covington/README 2023-05-26 21:08:24 UTC (rev 67226)
@@ -3,7 +3,7 @@
LaTeX macros for Linguistics
-Copyright 1991--2021 Michael A. Covington
+Copyright 1991--2023 Michael A. Covington
Robin Fairbairns
Juergen Spitzmueller
@@ -31,10 +31,15 @@
== 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
Modified: trunk/Master/texmf-dist/doc/latex/covington/covington.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/covington/covington.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/covington/covington.tex 2023-05-26 21:08:11 UTC (rev 67225)
+++ trunk/Master/texmf-dist/doc/latex/covington/covington.tex 2023-05-26 21:08:24 UTC (rev 67226)
@@ -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 @@
\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 @@
\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 @@
\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 @@
\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,17 +455,21 @@
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}
@@ -407,17 +476,52 @@
\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
@@ -424,14 +528,14 @@
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 @@
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 @@
\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 @@
\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 @@
\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}
Modified: trunk/Master/texmf-dist/tex/latex/covington/covington.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/covington/covington.sty 2023-05-26 21:08:11 UTC (rev 67225)
+++ trunk/Master/texmf-dist/tex/latex/covington/covington.sty 2023-05-26 21:08:24 UTC (rev 67226)
@@ -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 at key{cov at ex}{preamble}{\def\cov at xp{#1}}
\newcommand*\expreamblefs{\normalfont}
+\newcommand\expreamble[1]{\bgroup\expreamblefs#1\egroup\par}
+\newif\if at cov@expst at star\@cov at expst@starfalse
+\define at key{cov at ex}{postamble}{\def\cov at xpst{#1}\@cov at expst@starfalse}
+\define at key{cov at ex}{postamble*}{\def\cov at xpst{#1}\@cov at 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 at ex}{#1}\fi%
\begin{covexamples}
- \item\@ifundefined{cov at xp}{}{\bgroup\expreamblefs\cov at xp\egroup\par}% insert preamble if given
-}{\end{covexamples}}
+ \item\@ifundefined{cov at xp}{}{\expreamble{\cov at xp}}% insert preamble if given
+}{%
+ \@ifundefined{cov at xpst}{}{\if at cov@expst at star\unskip\fi\expostamble{\cov at xpst}}%
+ \end{covexamples}%
+}
\@ifundefined{example}{%
\newenvironment{example}[1][]{\begin{covexample}[#1]}{\end{covexample}}
@@ -353,7 +364,13 @@
% 2019-06-21 (v. 2.3): optional preceding subexample text
\define at key{cov at subex}{preamble}{\def\cov at sxp{#1}}
\newcommand*\subexpreamblefs{\normalfont}
+\newcommand\subexpreamble[1]{\bgroup\subexpreamblefs#1\egroup\par}
+% 2023.05.26 (v. 2.9): optional trailung subexample text
+\define at key{cov at subex}{postamble}{\def\cov at sxpst{#1}}
+\newcommand*\subexpostamblefs{\normalfont}
+\newcommand*\subexpostamble[1]{\bgroup\expostamblefs#1\egroup}
+
\newenvironment{covsubexamples}[1][]% % define "subexamples" environment
{%
\ifx#1\empty\else\setkeys{cov at subex}{#1}\fi%
@@ -370,6 +387,8 @@
{%
\let\cov at sxp\relax
\end{enumerate}
+ \@ifundefined{cov at sxpst}{}{\subexpostamble{\cov at sxpst}}% insert postamble if given
+ \let\cov at sxpst\relax
\end{covexample}
}
More information about the tex-live-commits
mailing list.