summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/covington
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-06-22 21:22:38 +0000
committerKarl Berry <karl@freefriends.org>2019-06-22 21:22:38 +0000
commit1c021a48ce9b3f232c0a4d4e6d49cb028b10271f (patch)
tree36b1eafed85d85b5ebbc6ae34b3366e43d74ad49 /Master/texmf-dist/tex/latex/covington
parent030f06893cc45ed18c81a72ba2c515062434d2df (diff)
covington (22jun19)
git-svn-id: svn://tug.org/texlive/trunk@51422 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/covington')
-rw-r--r--Master/texmf-dist/tex/latex/covington/covington.sty34
1 files changed, 22 insertions, 12 deletions
diff --git a/Master/texmf-dist/tex/latex/covington/covington.sty b/Master/texmf-dist/tex/latex/covington/covington.sty
index b4bc83b3188..3d1b8fc1a31 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/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@key{cov@subex}{preamble}{\def\cov@sxp{#1}}
+\newcommand*\subexpreamblefs{\normalfont}
+
+\newenvironment{covsubexamples}[1][]% % define "subexamples" environment
{%
- \begin{covexample}
+ \ifx#1\empty\else\setkeys{cov@subex}{#1}\fi%
+ \begin{covexample}%
+ \@ifundefined{cov@sxp}{}{\subexpreamblefs\cov@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@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@warning{The subexamples environment was already defined. Redefining it.}
\else
\cov@warning{The subexamples environment was already defined.^^J
@@ -389,7 +396,7 @@
\def\cov@nopagebreak{\let\reserved@e\vadjust\let\reserved@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@glp{}
\newcommand*\glosspreamble[1]{\def\cov@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@emphasized
@@ -908,24 +918,24 @@
}
}
-\newcommand{\sdrs}[3]
+\providecommand{\sdrs}[3]
{\begin{tabular}{l}
\mbox{\cov@emphasized #1} \\
~ \\
\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}}
}