summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-08-30 19:52:05 +0000
committerKarl Berry <karl@freefriends.org>2022-08-30 19:52:05 +0000
commitfe9f9c9c1780102eff942c8319f85872d2dd3e91 (patch)
tree8a586e9c91ddfff5ee6c7bbb3d3533f43df320ea /Master/texmf-dist
parentd838c20c4fdae5db1e2fe6e3e42d17926869fc34 (diff)
covington (30aug22)
git-svn-id: svn://tug.org/texlive/trunk@64241 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/covington/README5
-rw-r--r--Master/texmf-dist/doc/latex/covington/covington.pdfbin495582 -> 513914 bytes
-rw-r--r--Master/texmf-dist/doc/latex/covington/covington.tex63
-rw-r--r--Master/texmf-dist/tex/latex/covington/covington.sty84
4 files changed, 123 insertions, 29 deletions
diff --git a/Master/texmf-dist/doc/latex/covington/README b/Master/texmf-dist/doc/latex/covington/README
index 3a1ac7016a4..0dba592c2d4 100644
--- a/Master/texmf-dist/doc/latex/covington/README
+++ b/Master/texmf-dist/doc/latex/covington/README
@@ -31,6 +31,11 @@ The package consists of the following files:
== CHANGES ==
+* Version 2.8 (2022-08-30):
+ - Add 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.
+
* Version 2.7 (2021-09-01):
- Add postamble gloss macro option for arbitrary text that is appended to the free
translation line (after closing quotation marks).
diff --git a/Master/texmf-dist/doc/latex/covington/covington.pdf b/Master/texmf-dist/doc/latex/covington/covington.pdf
index 002771af5d7..cf67af6da08 100644
--- a/Master/texmf-dist/doc/latex/covington/covington.pdf
+++ b/Master/texmf-dist/doc/latex/covington/covington.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/covington/covington.tex b/Master/texmf-dist/doc/latex/covington/covington.tex
index 5b99e5a73c1..585d38ff47d 100644
--- a/Master/texmf-dist/doc/latex/covington/covington.tex
+++ b/Master/texmf-dist/doc/latex/covington/covington.tex
@@ -94,10 +94,10 @@
%
% Titling
%
-\def\pversion{Version 2.7}
-\def\pdate{September 1, 2021}
+\def\pversion{Version 2.8}
+\def\pdate{August 30, 2022}
-\title{\textbf{The \cvt\ Package\\Macros for Linguistics}}
+\title{\textbf{The \cvt\ Package\\\Large Macros for Linguistics}}
\author{Michael A. Covington \and J\"urgen Spitzm\"uller\thanks{Current maintainer.
Please report issues via \protect\url{https://github.com/jspitz/covington}}}
@@ -160,6 +160,16 @@ The package has the following options:
in the same paper, you get a single continuous series of numbers. While some people (including the original author of this package)
consider this a feature, others might prefer to number equations and linguistic examples separately. If you count to the latter sort,
use this option.
+
+\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.
+
+\item{\joption{ownfncounter*}:} Same as \joption{ownfncounter}, except that this variant resets the counter at each footnote
+ (similar to \textsf{linguex} and \textsf{gb4e}).
+
\end{description}
%
Please note the following package-related caveats:
@@ -270,6 +280,16 @@ 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:
+
+\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}).
+\end{description}
+%
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).
@@ -308,9 +328,9 @@ 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
-difference is that there can be more than one example, and each of them
-has to be introduced by \jfcsmacro{item}, like this:
+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:
\begin{lstlisting}
\begin{examples}
\item This is the first sentence.
@@ -329,6 +349,7 @@ This prints as:
\item This is the first sentence.
\item This is the second sentence.
\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
@@ -431,7 +452,12 @@ You can change the display of the example number by redefining (via \jfcsmacro{r
\end{lstlisting}
%
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}}
+\end{lstlisting}
+%
In the same vein, you can customize the display of the subexample letter by redefining
the macro \jcsmacro{covsubexnumber}, which has the following default definition:
\begin{lstlisting}[moretexcs={covsubexnumber}]
@@ -453,11 +479,22 @@ 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 sub-example preamble text by redefining the macro
-\jcsmacro{subexpreamblefs}, which also defaults to \jfcsmacro{normalfont}. To have it italicized, analogously do:
+Finally, you can customize the markup of the example and sub-example preamble text 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}
\end{lstlisting}
+or
+\begin{lstlisting}[moretexcs={\expreamblefs}]
+\renewcommand*{\expreamblefs}{\itshape}
+\end{lstlisting}
+%
+The separate footnote example number with \joption{ownfncounter} uses roman numbering by default.
+This can be changed by redefining
+\begin{lstlisting}[moretexcs={\thecovfnex}]
+\renewcommand{\thecovfnex}{\roman{covfnex}}
+\end{lstlisting}
\subsection{Referring to examples}\label{sec:ref}
@@ -1128,6 +1165,14 @@ it.
\section{Release history}
+\subsection*{2.8 (2022 August 30)}
+
+\begin{itemize}
+ \item Add \joption{ownfncounter} and \joption{ownfncounter*} options to allow for separate counting of examples
+ in footnotes. The starred option resets the counter at each footnote. See sec.~\ref{sec:intro}.
+ \item Add \joption{preamble} option to \jenv{example} environment. See sec.~\ref{expl}.
+\end{itemize}
+
\subsection*{2.7 (2021 September 1)}
\begin{itemize}
diff --git a/Master/texmf-dist/tex/latex/covington/covington.sty b/Master/texmf-dist/tex/latex/covington/covington.sty
index 687e496155a..fd1921f1820 100644
--- a/Master/texmf-dist/tex/latex/covington/covington.sty
+++ b/Master/texmf-dist/tex/latex/covington/covington.sty
@@ -42,8 +42,8 @@
%%% Metadata
%%%
-\def\filedate{2021/09/01}
-\def\fileversion{2.7}
+\def\filedate{2022/08/30}
+\def\fileversion{2.8}
\def\filename{covington.sty}
% Force redefinition of environments?
@@ -54,6 +54,10 @@
\newif\ifnoglossbreaks\noglossbreaksfalse
% Use own example counter
\newif\ifownexcounter\ownexcounterfalse
+% Use separate counter in footnote
+\newif\ifownfnexcounter\ownfnexcounterfalse
+% Reset separate counter in footnote
+\newif\ifresetownfnexcounter\resetownfnexcounterfalse
\@ifundefined{ProvidesPackage}{%
\typeout{* covington.sty : Covington's linguistic macros, \fileversion\ \filedate *}
@@ -64,6 +68,8 @@
\DeclareOption{keeplayout}{\tweaklayoutfalse}
\DeclareOption{noglossbreaks}{\noglossbreakstrue}
\DeclareOption{owncounter}{\ownexcountertrue}
+\DeclareOption{ownfncounter}{\ownfnexcountertrue}
+\DeclareOption{ownfncounter*}{\ownfnexcountertrue\resetownfnexcountertrue}
\ProcessOptions
}
@@ -166,6 +172,19 @@
\newcommand*\@@exampleno{\ifownexcounter\thecovex\else\theequation\fi}
\newcommand*\exampleno{\@ifstar{\@@exampleno}{\@exampleno}}
+\newif\ifcov@infootnote\cov@infootnotefalse
+\ifownfnexcounter
+ % Check whether we are in a footnote
+ \AddToHook{cmd/@footnotetext/before}{\cov@infootnotetrue}
+ \AddToHook{cmd/@footnotetext/after}{\cov@infootnotefalse}
+ \ifresetownfnexcounter
+ \newcounter{covfnex}[footnote]
+ \else
+ \newcounter{covfnex}
+ \fi
+ \renewcommand{\thecovfnex}{\roman{covfnex}}
+\fi
+
%%%
%%% The 'example' environment
%%%
@@ -200,10 +219,18 @@
% with packages/classes that roll their own example environment
% (such as beamer).
-\newenvironment{covexample}{\begin{covexamples}\item}{\end{covexamples}}
+% 2022-08-20 (v. 2.8): optional preceding example text
+\define@key{cov@ex}{preamble}{\def\cov@xp{#1}}
+\newcommand*\expreamblefs{\normalfont}
+
+\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}}
\@ifundefined{example}{%
- \newenvironment{example}{\begin{covexample}}{\end{covexample}}
+ \newenvironment{example}[1][]{\begin{covexample}[#1]}{\end{covexample}}
}{%
\ifforceredef
\renewenvironment{example}{\begin{covexample}}{\end{covexample}}
@@ -249,27 +276,44 @@
\setlength\exampleind{0pt}
\newcommand*\covexnumber[1]{(#1)}
+\newcommand*\covexnumberfn[1]{\covexnumber{#1}}
\newenvironment{covexamples}% % define "example" environment
{%
-\begin{list}{\covexamplenofs\covexnumber{\@@exampleno}}%
+\begin{list}%
{%
-\addtolength{\labelwidth}{\examplenumbersep}%
-\addtolength{\leftmargin}{\examplenumbersep}%
-\addtolength{\leftmargin}{\exampleind}%
-\ifownexcounter
- \setcounter{covexsave}{\arabic{covex}}%
- \usecounter{covex}% % sets it to zero, unwantedly
- \setcounter{covex}{\arabic{covexsave}}% % restores previous value
-\else
- \setcounter{covexsave}{\arabic{equation}}%
- \usecounter{equation}% % sets it to zero, unwantedly
- \setcounter{equation}{\arabic{covexsave}}% % restores previous value
-\fi
-\setlength{\listparindent}{0pt}%
-\def\makelabel##1{##1\hfil}% % put labels flushleft in space available
+ \covexamplenofs% font
+ \ifcov@infootnote
+ \covexnumberfn{\thecovfnex}%
+ \else
+ \covexnumber{\@@exampleno}%
+ \fi
+}%
+{%
+ \addtolength{\labelwidth}{\examplenumbersep}%
+ \addtolength{\leftmargin}{\examplenumbersep}%
+ \addtolength{\leftmargin}{\exampleind}%
+ \ifcov@infootnote
+ \setcounter{covexsave}{\arabic{covfnex}}%
+ \usecounter{covfnex}%
+ \setcounter{covfnex}{\arabic{covexsave}}%
+ \else
+ \ifownexcounter
+ \setcounter{covexsave}{\arabic{covex}}%
+ \usecounter{covex}% % sets it to zero, unwantedly
+ \setcounter{covex}{\arabic{covexsave}}% % restores previous value
+ \else
+ \setcounter{covexsave}{\arabic{equation}}%
+ \usecounter{equation}% % sets it to zero, unwantedly
+ \setcounter{equation}{\arabic{covexsave}}% % restores previous value
+ \fi
+ \fi
+ \setlength{\listparindent}{0pt}%
+ \def\makelabel##1{##1\hfil}% % put labels flushleft in space available
+}%
+ \raggedright% text is flushleft, not justified
+ \covexamplefs%
}%
-\raggedright\covexamplefs}% % text is flushleft, not justified
{\end{list}}
\@ifundefined{examples}{%