texlive[51422] Master/texmf-dist: covington (22jun19)

commits+karl at tug.org commits+karl at tug.org
Sat Jun 22 23:22:38 CEST 2019


Revision: 51422
          http://tug.org/svn/texlive?view=revision&revision=51422
Author:   karl
Date:     2019-06-22 23:22:38 +0200 (Sat, 22 Jun 2019)
Log Message:
-----------
covington (22jun19)

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-22 21:22:25 UTC (rev 51421)
+++ trunk/Master/texmf-dist/doc/latex/covington/README	2019-06-22 21:22:38 UTC (rev 51422)
@@ -31,6 +31,11 @@
 
 == CHANGES ==
 
+* Version 2.3 (2019-06-21):
+	- Add preamble option to subexamples environment.
+	- Allow to use covington together with the drs package.
+	- Documentation fixes and restructuring.
+
 * Version 2.2 (2019-06-04):
 	- Add new option owncounter that makes covington use an own counter for examples
 	  (rather than the equation counter).

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-22 21:22:25 UTC (rev 51421)
+++ trunk/Master/texmf-dist/doc/latex/covington/covington.tex	2019-06-22 21:22:38 UTC (rev 51422)
@@ -94,8 +94,8 @@
 %
 % Titling
 %
-\def\pversion{Version 2.2}
-\def\pdate{June 4, 2019}
+\def\pversion{Version 2.3}
+\def\pdate{June 21, 2019}
 
 \title{\textbf{The \cvt\ Package\\Macros for Linguistics}}
 \author{Michael A. Covington \and J\"urgen Spitzm\"uller\thanks{Current maintainer.
@@ -166,6 +166,7 @@
 \begin{itemize}
 	\item If you are using \cvt\ and the \textsf{uga} (University of Georgia thesis style) package together, you should load \textsf{uga} before \cvt.
 	\item If you are using \cvt\ with \textsf{beamer-article}, you should load \textsf{beamer-article} before \cvt.
+	\item If you are using \cvt\ with the \textsf{drs} package, you should load \textsf{drs} before \cvt. See sec.~\ref{sec:drs}.
 \end{itemize}
 %
 In what follows we presume that you know how to use \LaTeX\ and have 
@@ -240,7 +241,7 @@
 \begin{flushleft}
 This is a sentence. \hfill (\exampleno)
 \end{flushleft}
-If you want to output the number without stepping it, the starred form \jcsmacro{exampleno*} will do that. 
+If you want to output the (current) 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
@@ -297,7 +298,7 @@
 \item[(b)] This is the second sentence.
 \end{itemize}
 \end{example}
-However, the \jenv{examples} and \jenv{subexamples} environments, described in turn, are usually more 
+However, the \jenv{subexamples} environment, described in sec.~\ref{sec:subexs}, is usually more 
 convenient for this task.
 
 \subsection[The \texttt{examples} environment]{The \jenv{examples} environment}\label{sec:exs}
@@ -355,26 +356,41 @@
 	\item This is the first sentence.\label{sbex}
 	\item This is the second sentence.
 \end{subexamples}
+%
 Again, \cvt\ checks if there is already an \jenv{subexamples} environment defined,
 and if this is the case, \cvt\ does not define its own one. The alias environment \jenv{covsubexamples}
 is always available as a fallback. If you use the package option \joption{force}, \cvt\ will override
 existing \jenv{subexamples} environments. The package will issue a warning if \jenv{subexamples} is already defined.
 
-
-\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:
-\begin{lstlisting}[moretexcs={covexnumber}]
-\newcommand*\covexnumber[1]{(#1)}
+\medskip
+\noindent The \jenv{subexamples} environment provides the following option:
+\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}).
+\end{description}
+%
+For instance,
+\begin{lstlisting}
+\begin{subexamples}[preamble={Here are two sentences}]
+\item This is the first sentence.
+\item This is the second sentence.
+\end{subexamples}
 \end{lstlisting}
-
-In the same vein, you can customize the display of the subexample letter by redefining (also via \jfcsmacro{renewcommand*})
-the macro \jcsmacro{covsubexnumber} which has the following default definition:
-\begin{lstlisting}[moretexcs={covsubexnumber}]
-\newcommand*\covsubexnumber[1]{(#1)}
+or, respectively:
+\begin{lstlisting}
+\begin{covsubexamples}[preamble={Here are two sentences}]
+\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}]
+	\item This is the first sentence.
+	\item This is the second sentence.
+\end{subexamples}
+%
 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
@@ -395,9 +411,31 @@
 	\item This is the second sentence.
 \end{subexamples}
 \egroup
+
+
+\subsection{Customizing number display and example 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:
+\begin{lstlisting}[moretexcs={covexnumber}]
+\newcommand*\covexnumber[1]{(#1)}
+\end{lstlisting}
 %
+with the variable \texttt{\#1} representing the number.
+
+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}]
+\newcommand*\covsubexnumber[1]{(#1)}
+\end{lstlisting}
+%
+To remove the parentheses from the subexample letter, for instance, to this:
+\begin{lstlisting}[moretexcs={covsubexnumber}]
+\renewcommand*\covsubexnumber[1]{#1}
+\end{lstlisting}
+%
 \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:
+\jcsmacro{covexamplefs} (which is empty by default). To have all example sentences italicized, for instance, do:
 \begin{lstlisting}[moretexcs={covexamplefs}]
 \renewcommand*{\covexamplefs}{\itshape}
 \end{lstlisting}
@@ -406,7 +444,13 @@
 \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:
+\begin{lstlisting}[moretexcs={\subexpreamblefs}]
+\renewcommand*{\subexpreamblefs}{\itshape}
+\end{lstlisting}
 
+
 \subsection{Referring to examples}\label{sec:ref}
 
 References to examples and sub-examples can be made the usual way via the \jcsmacro{ref} command
@@ -469,10 +513,32 @@
     \item By default, page breaks might occur within glosses. In order to prevent it, the option
           \joption{noglossbreaks} (see sec.~\ref{sec:intro}) will help in many cases.
           If it doesn't, you can wrap the whole gloss into a minipage or parbox.
+    \item The words do not have to be typed lining up; \TeX\ counts and aligns them.
+    \item On the other hand, multiple blanks are ignored, so you can, but do not need to,
+          use the space key to line up the words to your liking in the \TeX\ file.
+          The example above could thus also have been input like this, with no change to the output:
+\begin{lstlisting}[moretexcs={digloss}]
+\digloss{Dit  is een Nederlands voorbeeld}
+        {This is a   Dutch      example}
+        {This is an example in Dutch.}
+\end{lstlisting}
+    \item If the words in the two languages do not correspond one-to-one, you can use curly brackets
+          to group words and a pair of empty curly brackets to mark null forms.
+          For example, to print
+          \digloss{Dit  is een voorbeeldje      in het Nederlands}
+                  {This is a   {little example} in {}  Dutch}
+                  {This is a little example in Dutch.}
+          you would type:
+\begin{lstlisting}[moretexcs={digloss}]
+\digloss{Dit  is een voorbeeldje      in het Nederlands}
+        {This is a   {little example} in {}  Dutch}
+        {This is a little example in Dutch.}
+\end{lstlisting}
 \end{itemize}
 
 \medskip
-\noindent The following \joption{\jparam{options}} (key-value pairs) are provided for either macro:
+\noindent The following \joption{\jparam{options}} (key-value pairs) are provided for the two gloss macro:%
+\footnote{Please consult sec.~\ref{sec:glossex} below for examples that showcase these options.}
 
 \begin{description}
 	\item[\joption{ex=\jparam{true|false}}] Default: \emph{false}. Wraps the gloss in an example environment
@@ -483,20 +549,22 @@
           first line of the gloss. This can be useful when no translation, but an aligned number or something similar,
           is to be inserted right to the gloss (please refer to sec.~\ref{sec:glossex} for an example).
 	\item[\joption{fsi=\{\jparam{font settings}\}}] Adjusts the font settings of the first gloss line.
-	        Valid values are \LaTeX\ font switches such as \jfcsmacro{textit}, \jfcsmacro{bfseries} etc.
+	        Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc.
 	\item[\joption{fsii=\{\jparam{font settings}\}}] Adjusts the font settings of the second gloss line.
-	        Valid values are \LaTeX\ font switches such as \jfcsmacro{textit}, \jfcsmacro{bfseries} etc.
+	        Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc.
 	\item[\joption{fsiii=\{\jparam{font settings}\}}] Adjusts the font settings of the third gloss line.
-	        Valid values are \LaTeX\ font switches such as \jfcsmacro{textit}, \jfcsmacro{bfseries} etc.
+	        Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc.
 	\item[\joption{preamble=\{\jparam{arbitrary text}\}}] Arbitrary text that is inserted on an own line
 	     before the interlinearized gloss. This might be useful, for instance, to give context information,
-	     to specify the language or the source in case of cited glosses. The advantages over just adding a
-	     line manually above the gloss are that you can globally set the markup (see sec.~\ref{sec:glossfc})
-	     and that such lines are kept on the same page than the gloss with the option \joption{noglossbreaks}
-	     (at least as long as preamble does not exceed one line).
+	     to specify the language or the source in case of cited glosses. 
+	     
+	     The advantages over just adding a line manually above the gloss are that you can globally set the
+	     markup (see sec.~\ref{sec:glossfc}), and that such lines are kept on the same page than the gloss
+	     with the option \joption{noglossbreaks} (at least as long as preamble does not exceed one line). 
+	     Furthermore, this option is the only way to add such text when the \joption{ex} option is used.
 \end{description}
 %
-If given as the argument to a \jcsmacro{digloss} or \jcsmacro{trigloss} macro, the options will only apply to
+If given as optional arguments to a \jcsmacro{digloss} or \jcsmacro{trigloss} macro, the options will only apply to
 this very gloss. If you want to make a permanent change, you can use the macro
 \begin{itemize}
 	\item \jcsmacro{setglossoptions\{\jparam{options}\}}
@@ -504,22 +572,6 @@
 and pass either of the above options to it. This will apply to all subsequent glosses (until further global
 change and unless the setting is altered locally via macro option).
 
-Notice, finally, that the words do not have to be typed lining up; instead, \TeX\ 
-counts them.  If the words in the two languages do not correspond 
-one-to-one, you can use curly brackets to group words.
-For example, to print
-\digloss{Dit  is een voorbeeldje      in het Nederlands}
-        {This is a   {little example} in {}  Dutch}
-        {This is a little example in Dutch.}
-you would type:
-\begin{lstlisting}[moretexcs={digloss}]
-\digloss{Dit  is een voorbeeldje      in het Nederlands}
-        {This is a   {little example} in {}  Dutch}
-        {This is a little example in Dutch.}
-\end{lstlisting}
-%
-Please consult sec.~\ref{sec:glossex} below for more examples.
-
 \subsection{Glossing with low-level commands}\label{sec:glosscmds}
 
 The gloss macros described above build on low-level commands\footnote{The commands are adapted
@@ -571,7 +623,7 @@
 	\item[\jcsmacro{glend}] ends the special \jfenv{flushleft}-like environment.
 \end{description}
 %
-Using the low-level commands, the examples given above would be
+Using the low-level commands, the examples given in the previous section would be
 coded as follows:
 \begin{lstlisting}[moretexcs={gll,glt,glend}]
 \gll Dit is een Nederlands voorbeeld. 
@@ -743,7 +795,7 @@
 \fs{case:nom \\ person:P}
 \end{lstlisting}
 
-The feature structure can appear anywhere --- in continuous text, in a
+The feature structure can appear anywhere -- in continuous text, in a
 displayed environment such as \jfenv{flushleft}, or inside a
 phrase-structure rule, or even inside another feature structure.
 
@@ -769,76 +821,109 @@
 \end{lstlisting}
 
 
-\section{Discourse Representation Structures}
+\section{Discourse Representation Structures}\label{sec:drs}
 
-Several macros in \cvt\ facilitate display of discourse 
-Representation Structures (\textsc{drs}es) in the box notation introduced by 
-Hans Kamp.  The simplest one is \jcsmacro{drs}, which takes two arguments:
+Several macros in \cvt\ facilitate display of \emph{Discourse Representation Structures}
+(\textsc{drs}es) in the box notation introduced by Hans Kamp \cite{kamp}.
+The simplest one is \jcsmacro{drs}, which takes two arguments:
 a list of discourse variables joined by \verb"~", and a list of \textsc{drs} 
-conditions separated by \verb"\\".  Nesting is permitted.  Note that the 
-\jcsmacro{drs} macro itself does not give you a displayed environment; you 
+conditions separated by \verb"\\".  Nesting is permitted.  
+
+Note that the \jcsmacro{drs} macro itself does not give you a displayed environment; you 
 must use \jfenv{flushleft} or the like to display the \textsc{drs}.
-Here are some examples:
 
-\begin{minipage}{.5\textwidth}
+\medskip
+\noindent Here are some examples:
+
 \begin{lstlisting}[moretexcs={drs}]
 \begin{flushleft}
-  \drs{X}{donkey(X)\\green(X)}
+  \drs{X}
+      {
+       donkey(X)\\
+       green(X)
+      }
 \end{flushleft}
 \end{lstlisting}
-\end{minipage}\hfill
-\begin{minipage}{.4\textwidth}
+%
+prints as:
 \begin{flushleft}
-\drs{X}{donkey(X)\\green(X)}
+\drs{X}
+    {
+     donkey(X)\\
+     green(X)
+    }
 \end{flushleft}
-\end{minipage}
 
 \medskip
 
-\begin{minipage}{.5\textwidth}
 \begin{lstlisting}[moretexcs={drs}]
 \begin{flushleft}
   \drs{X}
-  {named(X,`Pedro') \\
-    \drs{Y}{donkey(Y)\\owns(X,Y)}~~
-    {\large $\Rightarrow$}~
-    \drs{~}{feeds(X,Y)}
-  }
+      {
+       named(X,`Pedro')\\
+       \drs{Y}
+           {
+            donkey(Y)\\
+            owns(X,Y)
+           }
+       ~~{\large $\Rightarrow$}~
+       \drs{~}
+           {feeds(X,Y)}
+      }
 \end{flushleft}
 \end{lstlisting}
-\end{minipage}\hfill
-\begin{minipage}{.4\textwidth}
-	\begin{flushleft}
-		\drs{X}
-		{named(X,`Pedro') \\
-			\drs{Y}{donkey(Y)\\owns(X,Y)}~~
-			{\large $\Rightarrow$}~
-			\drs{~}{feeds(X,Y)}
-		}
-	\end{flushleft}
-\end{minipage}
+%
+comes out as:
+\begin{flushleft}
+  \drs{X}
+      {
+       named(X,`Pedro')\\
+	   \drs{Y}
+	       {
+	       	donkey(Y)\\
+	       	owns(X,Y)
+       	   }
+	   ~~{\large $\Rightarrow$}~
+	   \drs{~}
+	   {feeds(X,Y)}
+      }
+\end{flushleft}
+%
+Note that the alignment of the input is fairly free, so you can also write the
+two arguments of \jcsmacro{drs} in one line, like:
+\begin{lstlisting}[moretexcs={drs}]
+\drs{X}{donkey(X)\\green(X)}
+\end{lstlisting}
 
 \medskip
-
-\noindent To display a sentence above the \textsc{drs}, use \jcsmacro{sdrs}, as in:
-
+\noindent To display a sentence above the \textsc{drs}, use \jcsmacro{sdrs}, which has one
+extra argument for this purpose, as in:
 \begin{lstlisting}[moretexcs={sdrs}]
 \begin{flushleft}
-  \sdrs{A donkey is green.}{X}{donkey(X)\\green(X)}
+  \sdrs{A donkey is green.}
+       {X}
+       {donkey(X)\\green(X)}
 \end{flushleft}
 \end{lstlisting}
 which prints as:
-
+%
 \begin{flushleft}
-		\sdrs{A donkey is green.}{X}{donkey(X)\\green(X)}
+	\sdrs{A donkey is green.}{X}{donkey(X)\\green(X)}
 \end{flushleft}
-
+%
 Some \textsc{drs} connectives are also provided (normally for forming
 \textsc{drs}es that are to be nested within other \textsc{drs}es).
-The macro \jcsmacro{negdrs} forms a \textsc{drs} preceded by a negation symbol:
+The macro \jcsmacro{negdrs} forms a \textsc{drs} preceded by a negation symbol, so
 \begin{lstlisting}[moretexcs={negdrs}]
-\negdrs{X}{donkey(X)\\green(X)}
+\negdrs{X}
+       {
+        donkey(X)\\
+        green(X)
+       }
 \end{lstlisting}
+%
+comes out as
+%
 \begin{flushleft}
 \negdrs{X}{donkey(X)\\green(X)}
 \end{flushleft}
@@ -845,8 +930,13 @@
 Finally, \jcsmacro{ifdrs} forms a pair of \textsc{drs}es joined by a big arrow,
 like this:
 \begin{lstlisting}[moretexcs={ifdrs}]
-\ifdrs{X}{donkey(X)\\hungry(X)}
-      {~}{feeds(Pedro,X)}
+\ifdrs{X}
+      {
+       donkey(X)\\
+       hungry(X)
+      }
+      {~}
+      {feeds(Pedro,X)}
 \end{lstlisting}
 \begin{flushleft}
 \ifdrs{X}{donkey(X)\\hungry(X)}
@@ -854,8 +944,25 @@
 \end{flushleft}
 If you have an ``if''-structure appearing among ordinary predicates 
 inside a \textsc{drs}, you may prefer to use \jcsmacro{alifdrs}, which is just like 
-\jcsmacro{ifdrs} but shifted slightly to the left for better alignment.
+\jcsmacro{ifdrs} but shifted slightly to the left for better alignment:
+\begin{flushleft}
+\alifdrs{X}{donkey(X)\\hungry(X)}
+        {~}{feeds(Pedro,X)}
+\end{flushleft}
 
+\medskip
+\noindent Note that for more extended \textsc{drs} representations, dedicated packages are meanwhile available,
+most notably the \textsf{drs} \cite{drs} and the \textsf{sdrt} \cite{sdrt} package.
+Both packages actually draw on \cvt, add some additional features and, in some cases, tweak the layout to
+(what strikes those package authors) the better. If the rather basic \textsc{drs} macros provided by \cvt\
+do not suit you, please check if one of those packages does.
+
+Note, though, that while \textsf{sdrt} introduces new (capitalized) macro naming which lets the package peacefully
+coexist with \cvt, \textsf{drs} simply re-uses \cvt's macro names, which makes the two packages incompatible.
+In order to fix this, \cvt\ checks whether the \textsc{drs} macros are already defined when it is loaded; if so, it does not define its own ones.
+So if you want to use the \textsc{drs} macros of the \textsf{drs} package together with \cvt's non-\textsc{drs} features, you can do so,
+provided that \textsf{drs} is loaded \emph{before} \cvt. In that case, \cvt's own \textsc{drs} macros are disabled.
+
 \section{Exercises}\label{sec:exercises}
 
 The \jenv{exercise} environment (alias \jenv{covexercise}) generates an exercise numbered according 
@@ -979,7 +1086,7 @@
 \begin{flushleft}
 \lstinline[moretexcs={either,psr}]"\psr{A}{B~\either{C}{D}~E} " $=$ \psr{A}{B~\either{C}{D}~E}
 \end{flushleft}
-
+%
 That's all there is for now.
 Suggestions for improving \cvt\ are welcome, and bug
 reports are actively solicited (via \url{https://github.com/jspitz/covington}).  Please note, however, that this is free
@@ -988,6 +1095,14 @@
 
 \section{Release history}
 
+\subsection*{2.3 (2019 June 21)}
+
+\begin{itemize}
+	\item Add preamble option to subexamples environment. See sec.~\ref{sec:subexs}.
+	\item Allow to use \cvt\ together with the \textsf{drs} package.
+	\item Documentation fixes and restructuring.
+\end{itemize}
+
 \subsection*{2.2 (2019 June 4)}
 
 \begin{itemize}
@@ -1133,6 +1248,13 @@
 		by morpheme glosses}. Revised version of February 2008. Department
 		of Linguistics, Max Plank Institute for Evolutionary Anthropology.
 		\url{http://www.eva.mpg.de/lingua/resources/glossing-rules.php}.
+	\bibitem{drs} Dimitradis, Alexis: \emph{drs -- Typeset Discourse Representation Structures (DRS)}.
+	     June 10, 2010. \url{https://ctan.org/pkg/drs}.
+	\bibitem{sdrt} Isambert, Paul: \emph{sdrt -- Macros for Segmented Discourse Representation Theory}.
+	     May 13, 2007. \url{https://ctan.org/pkg/sdrt}.
+	\bibitem{kamp} Kamp, Hans: A Theory of Truth and Semantic Representation.
+	      In Jeroen A.\,G. Groenendijk, Theo M.\,V. Janssen, and Martin J.\,B. Stokhof (eds.):
+	      Formal Methods in the Study of Language. Amsterdam: Mathematics Center, 1981, 277--322.
 	\bibitem{csquotes} Lehman, Philipp and Joseph Wright:
 	    \emph{csquotes: Context sensitive quotation facilities}. April 4, 2018.
 	    \url{https://www.ctan.org/pkg/csquotes}.

Modified: trunk/Master/texmf-dist/tex/latex/covington/covington.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/covington/covington.sty	2019-06-22 21:22:25 UTC (rev 51421)
+++ trunk/Master/texmf-dist/tex/latex/covington/covington.sty	2019-06-22 21:22:38 UTC (rev 51422)
@@ -42,8 +42,8 @@
 %%% Metadata
 %%%
 
-\def\filedate{2019/06/04}
-\def\fileversion{2.2}
+\def\filedate{2019/06/21}
+\def\fileversion{2.3}
 \def\filename{covington.sty}
 
 % Force redefinition of environments?
@@ -294,9 +294,15 @@
 
 \newcommand*\covsubexnumber[1]{(#1)}
 
-\newenvironment{covsubexamples}%         % define "subexamples" environment
+% 2019-06-21 (v. 2.3): optional preceding subexample text
+\define at key{cov at subex}{preamble}{\def\cov at sxp{#1}}
+\newcommand*\subexpreamblefs{\normalfont}
+
+\newenvironment{covsubexamples}[1][]%         % define "subexamples" environment
 {%
-    \begin{covexample}
+    \ifx#1\empty\else\setkeys{cov at subex}{#1}\fi%
+    \begin{covexample}%
+    \@ifundefined{cov at sxp}{}{\subexpreamblefs\cov at sxp}% insert preamble if given
     \begin{enumerate}
     \addtolength{\labelsep}{\subexamplenumbersep}%
     \renewcommand\theenumi{\alph{enumi}}
@@ -306,15 +312,16 @@
     \def\makelabel##1{##1\hfil}%       % put labels flushleft in space available
 }%
 {%
+    \let\cov at sxp\relax
     \end{enumerate}
     \end{covexample}
 }
 
 \@ifundefined{subexamples}{%
-  \newenvironment{subexamples}{\begin{covsubexamples}}{\end{covsubexamples}}
+  \newenvironment{subexamples}[1][]{\begin{covsubexamples}[#1]}{\end{covsubexamples}}
 }{%
 \ifforceredef
-  \renewenvironment{subexamples}{\begin{covsubexamples}}{\end{covsubexamples}}
+  \renewenvironment{subexamples}[1][]{\begin{covsubexamples}[#1]}{\end{covsubexamples}}
   \cov at warning{The subexamples environment was already defined. Redefining it.}
 \else
   \cov at warning{The subexamples environment was already defined.^^J
@@ -389,7 +396,7 @@
 \def\cov at nopagebreak{\let\reserved at e\vadjust\let\reserved at f\nobreak}
 \fi
 
-% 2019-05.07: optional preceding gloss text (non-interlinearized)
+% 2019-05-07: optional preceding gloss text (non-interlinearized)
 \newcommand*\glosslinepreamble[1]{#1}
 \def\cov at glp{}
 \newcommand*\glosspreamble[1]{\def\cov at glp{#1}}
@@ -887,8 +894,11 @@
 %
 %             Example:   \negdrs{X}{donkey(X)\\green(X)}
 
+% 2019-06-21 (v. 2.3): Do not define the macros if already defined.
+%                      This allows to use covington with the drs package.
 
-\newcommand{\drs}[2]
+
+\providecommand{\drs}[2]
 {
     {
     \cov at emphasized
@@ -908,7 +918,7 @@
     }
 }
 
-\newcommand{\sdrs}[3]
+\providecommand{\sdrs}[3]
 {\begin{tabular}{l}
 \mbox{\cov at emphasized #1} \\
 ~ \\
@@ -915,17 +925,17 @@
 \drs{#2}{#3}
 \end{tabular}}
 
-\newcommand{\ifdrs}[4]
+\providecommand{\ifdrs}[4]
 {
   \mbox{\drs{#1}{#2}~~{\large $\Rightarrow$}~\drs{#3}{#4}}
 }
 
-\newcommand{\alifdrs}[4]
+\providecommand{\alifdrs}[4]
 {
   \mbox{$\!\!\!$\drs{#1}{#2}~~{\large $\Rightarrow$}~\drs{#3}{#4}}
 }
 
-\newcommand{\negdrs}[2]
+\providecommand{\negdrs}[2]
 {
   \mbox{{\large $\neg$}\drs{#1}{#2}}
 }



More information about the tex-live-commits mailing list