texlive[69091] Master/texmf-dist: covington (11dec23)

commits+karl at tug.org commits+karl at tug.org
Mon Dec 11 22:09:05 CET 2023


Revision: 69091
          https://tug.org/svn/texlive?view=revision&revision=69091
Author:   karl
Date:     2023-12-11 22:09:04 +0100 (Mon, 11 Dec 2023)
Log Message:
-----------
covington (11dec23)

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-12-11 21:08:54 UTC (rev 69090)
+++ trunk/Master/texmf-dist/doc/latex/covington/README	2023-12-11 21:09:04 UTC (rev 69091)
@@ -31,6 +31,11 @@
 
 == CHANGES ==
 
+* Version 2.14 (2023 December 11)
+	- Add \ownexcounterprep macro to add a prefix (e.g., the chapter)
+	  to the (owncounter) example counter.
+	- Document how to (not) number examples per chapter.
+
 * Version 2.13 (2023-12-02)
 	- Fix example numbering with chapters (#16).
 

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-12-11 21:08:54 UTC (rev 69090)
+++ trunk/Master/texmf-dist/doc/latex/covington/covington.tex	2023-12-11 21:09:04 UTC (rev 69091)
@@ -97,8 +97,8 @@
 %
 % Titling
 %
-\def\pversion{Version 2.13}
-\def\pdate{December 2, 2023}
+\def\pversion{Version 2.14}
+\def\pdate{December 11, 2023}
 
 \title{\textbf{The \cvt\ Package\\\Large Macros for Linguistics}}
 \author{Michael A. Covington \and J\"urgen Spitzm\"uller\thanks{Current maintainer.
@@ -163,7 +163,8 @@
 		By default, \cvt\ uses \LaTeX's equation counter for example numbering, so that if you use equations and numbered examples
 		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.
+		use this option. Note that the default appearance of the own counter and the equation counter differs if the document has chapters.
+		See sec.~\ref{sec:cbc} for details.
 	\item{\joption{fnexamplecounter=\jparam{main|own|own-reset}}} Default: \emph{main}.
 		Specifics of the counter for numbered examples in footnotes.
 	
@@ -890,6 +891,24 @@
 \end{lstlisting}
 
 
+\subsection{Numbering per chapter or continuously}\label{sec:cbc}
+
+With the default (equation) counter which is used for examples, examples automatically get numbered
+per chapter if the document has chapters (e.g., (2.1) for the first example in chapter~2).
+If you want continuously numbered examples instead, use
+\begin{lstlisting}[moretexcs={counterwithout}]
+\counterwithout{equation}{chapter}
+\end{lstlisting}
+which also will change the equation numbering behavior.
+
+With \joption{owncounter}, on the other hand, examples are always continuously numbered by default.
+If you want examples numbered per chapter, do:
+\begin{lstlisting}[moretexcs={counterwithin,ownexcounterprep}]
+\counterwithin*{covex}{chapter}
+\renewcommand\ownexcounterprep{\thechapter.}
+\end{lstlisting}
+
+
 \section{Glossing sentences word-by-word}\label{sec:gloss}
 
 To gloss a sentence is to annotate it word-by-word.  Most commonly, a 
@@ -1647,6 +1666,13 @@
 
 \section{Release history}
 
+\subsection*{2.14 (2023 December 11)}
+\begin{itemize}
+	\item Add \jcsmacro{ownexcounterprep} macro to add a prefix (e.g., the chapter)
+	      to the (owncounter) example counter. See sec.~\ref{sec:cbc}.
+	\item Document how to (not) number examples per chapter.
+\end{itemize}
+
 \subsection*{2.13 (2023 December 2)}
 \begin{itemize}
 	\item Fix example numbering with chapters.

Modified: trunk/Master/texmf-dist/tex/latex/covington/covington.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/covington/covington.sty	2023-12-11 21:08:54 UTC (rev 69090)
+++ trunk/Master/texmf-dist/tex/latex/covington/covington.sty	2023-12-11 21:09:04 UTC (rev 69091)
@@ -42,8 +42,8 @@
 %%% Metadata
 %%%
 
-\def\filedate{2023/12/02}
-\def\fileversion{2.13}
+\def\filedate{2023/12/11}
+\def\fileversion{2.14}
 \def\filename{covington.sty}
 
 % Macro to issue warnings
@@ -189,8 +189,10 @@
 % Counter to generate unique example ID
 \newcounter{explid}
 
+\def\ownexcounterprep{}
 \ifownexcounter
   \newcounter{covex}
+  \renewcommand{\thecovex}{\ownexcounterprep\arabic{covex}}%
   \newcommand{\@exampleno}{\stepcounter{explid}\refstepcounter{covex}\thecovex}
 \else
   \newcommand{\@exampleno}{\stepcounter{explid}\refstepcounter{equation}\theequation}
@@ -538,7 +540,9 @@
       \setcounter{covfnex}{\arabic{covexsave}}%
     \else
       \ifownexcounter
-        \renewcommand{\thecovex}{\exfmt{covex}}%
+        \ifexfmtchanged%
+           \renewcommand{\thecovex}{\ownexcounterprep\exfmt{covex}}%
+        \fi%
         \setcounter{covexsave}{\arabic{covex}}%
         \usecounter{covex}%                          % sets it to zero, unwantedly
         \setcounter{covex}{\arabic{covexsave}}%   % restores previous value



More information about the tex-live-commits mailing list.