summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/covington/covington.tex
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/covington.tex
parent8057c647880f05a2624b3d04ab0eb38d5cbf8c18 (diff)
CTAN sync 202305270300
Diffstat (limited to 'macros/latex/contrib/covington/covington.tex')
-rw-r--r--macros/latex/contrib/covington/covington.tex186
1 files changed, 152 insertions, 34 deletions
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}