texlive[51324] Master/texmf-dist: covington (5jun19)

commits+karl at tug.org commits+karl at tug.org
Wed Jun 5 23:43:03 CEST 2019


Revision: 51324
          http://tug.org/svn/texlive?view=revision&revision=51324
Author:   karl
Date:     2019-06-05 23:43:03 +0200 (Wed, 05 Jun 2019)
Log Message:
-----------
covington (5jun19)

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	2019-06-05 14:50:09 UTC (rev 51323)
+++ trunk/Master/texmf-dist/doc/latex/covington/README	2019-06-05 21:43:03 UTC (rev 51324)
@@ -31,6 +31,14 @@
 
 == CHANGES ==
 
+* Version 2.2 (2019-06-04):
+	- Add new option owncounter that makes covington use an own counter for examples
+	  (rather than the equation counter).
+	- Add starred \exampleno* command that outputs the current example number value
+	  without stepping it.
+	- Add macros \covexamplefs and \covexamplenofs for global setting of example text
+	  markup.
+
 * Version 2.1 (2019-05-12):
 	- Add new option noglossbreaks that tries to prevent page breaks within glosses.
 	- Add \glosspreamble command and preamble gloss macro option for arbitrary text

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	2019-06-05 14:50:09 UTC (rev 51323)
+++ trunk/Master/texmf-dist/doc/latex/covington/covington.tex	2019-06-05 21:43:03 UTC (rev 51324)
@@ -94,8 +94,8 @@
 %
 % Titling
 %
-\def\pversion{Version 2.1}
-\def\pdate{May 12, 2019}
+\def\pversion{Version 2.2}
+\def\pdate{June 4, 2019}
 
 \title{\textbf{The \cvt\ Package\\Macros for Linguistics}}
 \author{Michael A. Covington \and J\"urgen Spitzm\"uller\thanks{Current maintainer.
@@ -153,6 +153,13 @@
 	Nonetheless the option is not set by default. This is for backwards compatibility reasons (in order to not change
 	page breaking of existing documents). Note that page breaks might still occur in some cases even if the option is set.
 	In order to prevent them definitely, you can put the gloss in a parbox or minipage.
+	
+\item{\joption{owncounter}:} Use an own counter for numbered examples.
+
+	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.
 \end{description}
 %
 Please note the following package-related caveats:
@@ -164,8 +171,6 @@
 In what follows we presume that you know how to use \LaTeX\ and have 
 access to \LaTeX\ manuals.
 
-\pagebreak[4]
- 
 \section{Stacked diacritics}\label{sec:accents}
 
 \LaTeX\ provides a generous range of diacritics that can be placed on or below any
@@ -235,15 +240,13 @@
 \begin{flushleft}
 This is a sentence. \hfill (\exampleno)
 \end{flushleft}
-The example counter is actually the same as \LaTeX's equation counter, 
-so that if you use equations and numbered examples in the same
-paper, you get a single continuous series of numbers. If you want to 
-output the number without stepping it, use \jfcsmacro{theequation}.
+If you want to output the number without stepping it, the starred form \jcsmacro{exampleno*} will do that. 
 
 Normally, however, you do not need to manually place \jcsmacro{exampleno} yourselves,
 as in the example above. For the common case where example numbers in parentheses are
 placed left to the example, \cvt\ provides more convenient solutions. These are described in turn.
 
+
 \subsection[The \texttt{example} environment]{The \jenv{example} environment}\label{sec:ex}
 
 The \jenv{example} environment (alias \jenv{covexample}) displays a single example
@@ -358,7 +361,7 @@
 existing \jenv{subexamples} environments. The package will issue a warning if \jenv{subexamples} is already defined.
 
 
-\subsection{Customizing the numbering}\label{sec:custno}
+\subsection{Customizing numbering and markup}\label{sec:custno}
 
 You can change the display of the example number by redefining (via \jfcsmacro{renewcommand*}) the macro
 \jcsmacro{covexnumber} which has the following default definition:
@@ -392,6 +395,16 @@
 	\item This is the second sentence.
 \end{subexamples}
 \egroup
+%
+\noindent You can also customize the markup of the example sentences by redefining the macro
+\jcsmacro{covexamplefs} (which is empty by default). To have all example sentences italicized, for instance, do this:
+\begin{lstlisting}[moretexcs={covexamplefs}]
+\renewcommand*{\covexamplefs}{\itshape}
+\end{lstlisting}
+%
+Note that this does, deliberately, not include the numbers, since those are controlled by another font setting macro,
+\jcsmacro{covexamplenofs}, which defaults to \jfcsmacro{normalfont}. Of course you are free to redefine this as well,
+if you wish do to so.
 
 
 \subsection{Referring to examples}\label{sec:ref}
@@ -865,7 +878,6 @@
 If you use the package option \joption{force}, \cvt\ will override existing \jenv{exercise}
 environments. In any case, the package will issue a warning if \jenv{exercise} is already defined.
 
-\clearpage
 \section{Reference Lists}\label{sec:reflists}
 
 To type a simple \textsc{lsa}-style hanging-indented reference list, you can use the \jenv{reflist}
@@ -976,6 +988,16 @@
 
 \section{Release history}
 
+\subsection*{2.2 (2019 June 4)}
+
+\begin{itemize}
+	\item Add new option \joption{owncounter} that makes \cvt\ use an own counter for examples (rather than the equation counter).
+	\item Add starred \jcsmacro{exampleno*} command that outputs the current example number value without stepping it.
+	      See sec.~\ref{sec:exno}.
+	\item Add macros \jcsmacro{covexamplefs} and \jcsmacro{covexamplenofs} for global setting of example text markup.
+	      See sec.~\ref{sec:custno}.
+\end{itemize}
+
 \subsection*{2.1 (2019 May 12)}
 
 \begin{itemize}

Modified: trunk/Master/texmf-dist/tex/latex/covington/covington.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/covington/covington.sty	2019-06-05 14:50:09 UTC (rev 51323)
+++ trunk/Master/texmf-dist/tex/latex/covington/covington.sty	2019-06-05 21:43:03 UTC (rev 51324)
@@ -42,8 +42,8 @@
 %%% Metadata
 %%%
 
-\def\filedate{2019/05/12}
-\def\fileversion{2.1}
+\def\filedate{2019/06/04}
+\def\fileversion{2.2}
 \def\filename{covington.sty}
 
 % Force redefinition of environments?
@@ -52,6 +52,8 @@
 \newif\iftweaklayout\tweaklayouttrue
 % Prevent page breaks in glosses
 \newif\ifnoglossbreaks\noglossbreaksfalse
+% Use own example counter
+\newif\ifownexcounter\ownexcounterfalse
 
 \@ifundefined{ProvidesPackage}{%
 \typeout{* covington.sty : Covington's linguistic macros, \fileversion\ \filedate *}
@@ -61,6 +63,7 @@
 \DeclareOption{force}{\forceredeftrue}
 \DeclareOption{keeplayout}{\tweaklayoutfalse}
 \DeclareOption{noglossbreaks}{\noglossbreakstrue}
+\DeclareOption{owncounter}{\ownexcountertrue}
 \ProcessOptions
 }
 
@@ -129,9 +132,12 @@
 %%% Example numbering
 %%%
 
-% Example numbering uses the same counter as LaTeX's equation numbering.
+% Example numbering uses the same counter as LaTeX's equation numbering
+% by default.
 % Thus, you can use \label and \ref to refer to numbered examples in
 % exactly the same way as with equations.
+% As of v. 2.2, it is also possible to use an own counter and thus separate
+% equations from linguistic examples.
 
 % \exampleno  increments the counter and gives you its current value.
 %             You can use it anywhere to generate an example number.
@@ -143,12 +149,23 @@
 %             This is a sentence.  \hfill (\exampleno)
 %             \end{flushleft}
 
-\newcommand{\exampleno}{\refstepcounter{equation}\theequation}
+\ifownexcounter
+  \newcounter{covex}
+  \newcommand{\@exampleno}{\refstepcounter{covex}\thecovex}
+\else
+  \newcommand{\@exampleno}{\refstepcounter{equation}\theequation}
+\fi
+\newcommand*\@@exampleno{\ifownexcounter\thecovex\else\theequation\fi}
+\newcommand*\exampleno{\@ifstar{\@@exampleno}{\@exampleno}}
 
 %%%
 %%% The 'example' environment
 %%%
 
+% Font setting possibility for example sentences
+\newcommand*\covexamplefs{}
+\newcommand*\covexamplenofs{\normalfont}
+
 % example     is an environment for displaying a single numbered 
 %             example, preceded by its number.  Example of use:
 %
@@ -215,7 +232,7 @@
 %
 % New in 1.8 (2018-12-07): Allow to redefine label (\covexnumber)
 
-\newcounter{equationsave}          % used in trick with equation number
+\newcounter{covexsave}          % used in trick with example number
 
 \newlength\examplenumbersep
 \setlength\examplenumbersep{0pt}
@@ -224,17 +241,23 @@
 
 \newenvironment{covexamples}%         % define "example" environment
 {%
-\begin{list}{\covexnumber{\theequation}}%
+\begin{list}{\covexamplenofs\covexnumber{\@@exampleno}}%
 {%
 \addtolength{\labelwidth}{\examplenumbersep}%
 \addtolength{\leftmargin}{\examplenumbersep}%
-\setcounter{equationsave}{\arabic{equation}}%
-\usecounter{equation}%                          % sets it to zero, unwantedly
-\setcounter{equation}{\arabic{equationsave}}%   % restores previous value
+\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
 }%
-\raggedright}%                     % text is flushleft, not justified
+\raggedright\covexamplefs}%     % text is flushleft, not justified
 {\end{list}}
 
 \@ifundefined{examples}{%
@@ -277,8 +300,8 @@
     \begin{enumerate}
     \addtolength{\labelsep}{\subexamplenumbersep}%
     \renewcommand\theenumi{\alph{enumi}}
-    \renewcommand\labelenumi{\covsubexnumber{\theenumi}}
-    \renewcommand\p at enumi{\theequation\,}%
+    \renewcommand\labelenumi{\covexamplenofs\covsubexnumber{\theenumi}}
+    \renewcommand\p at enumi{\@@exampleno\,}%
     \setlength{\listparindent}{0pt}%
     \def\makelabel##1{##1\hfil}%       % put labels flushleft in space available
 }%



More information about the tex-live-commits mailing list