summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-06-05 21:43:03 +0000
committerKarl Berry <karl@freefriends.org>2019-06-05 21:43:03 +0000
commit4a7fdd8af3211f8144b2286e1a0b19bc0c754b6c (patch)
tree7e551a88d76aa5ca370c7b26ae49126dadb5e12b
parent624e7c8cbd7ac030cd4955065c5f2724fcf40d57 (diff)
covington (5jun19)
git-svn-id: svn://tug.org/texlive/trunk@51324 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/covington/README8
-rw-r--r--Master/texmf-dist/doc/latex/covington/covington.pdfbin552074 -> 553497 bytes
-rw-r--r--Master/texmf-dist/doc/latex/covington/covington.tex42
-rw-r--r--Master/texmf-dist/tex/latex/covington/covington.sty47
4 files changed, 75 insertions, 22 deletions
diff --git a/Master/texmf-dist/doc/latex/covington/README b/Master/texmf-dist/doc/latex/covington/README
index e9bda5efc03..76677fdf80f 100644
--- a/Master/texmf-dist/doc/latex/covington/README
+++ b/Master/texmf-dist/doc/latex/covington/README
@@ -31,6 +31,14 @@ The package consists of the following files:
== 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
diff --git a/Master/texmf-dist/doc/latex/covington/covington.pdf b/Master/texmf-dist/doc/latex/covington/covington.pdf
index 4016207e8dc..5c4589506ca 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 c874e5e96f5..40b671292a1 100644
--- a/Master/texmf-dist/doc/latex/covington/covington.tex
+++ b/Master/texmf-dist/doc/latex/covington/covington.tex
@@ -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 @@ The package has the following options:
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 @@ Please note the following package-related caveats:
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 @@ Here's what you get:
\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 @@ 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.
-\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 @@ for instance, will come out like this:
\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 @@ the alias environment \jenv{covexercise} which can be used in order to produce \
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 @@ it.
\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}
diff --git a/Master/texmf-dist/tex/latex/covington/covington.sty b/Master/texmf-dist/tex/latex/covington/covington.sty
index 5925f74eb08..b4bc83b3188 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{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@enumi{\theequation\,}%
+ \renewcommand\labelenumi{\covexamplenofs\covsubexnumber{\theenumi}}
+ \renewcommand\p@enumi{\@@exampleno\,}%
\setlength{\listparindent}{0pt}%
\def\makelabel##1{##1\hfil}% % put labels flushleft in space available
}%