diff options
author | Karl Berry <karl@freefriends.org> | 2018-09-07 21:00:01 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-09-07 21:00:01 +0000 |
commit | 935dd6891957aa897c36b37f09206e98a8588b56 (patch) | |
tree | 63a41ada0bfa13b721ac452754dfacceb9acdb6a /Master/texmf-dist/tex/latex | |
parent | 163bdfd50eb64698abe901f90298557278ed3f4c (diff) |
covington (7sep18)
git-svn-id: svn://tug.org/texlive/trunk@48616 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/covington/covington.sty | 75 |
1 files changed, 67 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/latex/covington/covington.sty b/Master/texmf-dist/tex/latex/covington/covington.sty index 47ad2f56323..02505eb94ac 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{2018/08/24} -\def\fileversion{1.5} +\def\filedate{2018/09/07} +\def\fileversion{1.6} \def\filename{covington.sty} % Force redefinition of environments? @@ -239,6 +239,65 @@ \fi } + +%%% +%%% The 'subexamples' environment +%%% + +% New in v1.6 (2018-09-07) +% subexamples is an environment for displaying a series of examples +% that belong together and thus share an example number +% (with an alphabetic subcounter). Usage: +% +% \begin{subexamples} +% \item This is the first subexample. +% \item This is the second subexample. +% \end{subexamples} + +\newlength\subexamplenumbersep +\setlength\subexamplenumbersep{0pt} + +\newcommand*\covsubexnumber[1]{(#1)} + +\newenvironment{covsubexamples}% % define "subexamples" environment +{% + \addtolength{\examplenumbersep}{-0.75em}% + \begin{covexample} + \begin{enumerate} + \addtolength{\labelsep}{\subexamplenumbersep}% + \renewcommand\theenumi{\alph{enumi}} + \renewcommand\labelenumi{\covsubexnumber{\theenumi}} + \renewcommand\p@enumi{\theequation\,}% +}% +{% + \end{enumerate} + \end{covexample} +} + +\@ifundefined{subexamples}{% + \newenvironment{subexamples}{\begin{covsubexamples}}{\end{covsubexamples}} +}{% +\ifforceredef + \renewenvironment{subexamples}{\begin{covsubexamples}}{\end{covsubexamples}} + \cov@warning{The subexamples environment was already defined. Redefining it.} +\else + \cov@warning{The subexamples environment was already defined.^^J + Covington does not touch it.^^J + Use covsubexamples if you want to access covington's^^J + version, or use the force package option.} +\fi +} + + + +%%% +%%% Reference to examples including parentheses +%%% + +% New in v1.6 (2018-09-07) +\providecommand*\pxref[1]{(\ref{#1})} + + %%% %%% Sentences with word-by-word glosses %%% @@ -720,12 +779,12 @@ \setlength\reflistparsep{\parsep} \@ifundefined{reflist}{ \newenvironment{reflist}{\begin{list}{}% -{\setlength{\labelwidth}{0pt} - \setlength{\labelsep}{0pt} - \setlength{\leftmargin}{\reflistindent} - \setlength{\itemindent}{-\reflistindent} - \setlength{\listparindent}{-\reflistindent} - \setlength{\itemsep}{\reflistitemsep} +{\setlength{\labelwidth}{0pt}% + \setlength{\labelsep}{0pt}% + \setlength{\leftmargin}{\reflistindent}% + \setlength{\itemindent}{-\reflistindent}% + \setlength{\listparindent}{-\reflistindent}% + \setlength{\itemsep}{\reflistitemsep}% \setlength{\parsep}{\reflistparsep}}\item}{\end{list}} } % Modified 1992 Nov 8 to skip defining reflist if reflist is already |