From: Juergen Spitzmueller Date: Sat, 8 Sep 2018 07:50:48 +0000 (+0200) Subject: Covington now provides subexamples itself X-Git-Tag: lyx-2.4.0dev-acb2ca7b~3067 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=ab16bb7eb98731be25413f9410e61e7d4fe75439;p=features.git Covington now provides subexamples itself Candidate for stable. --- diff --git a/lib/layouts/linguistics.module b/lib/layouts/linguistics.module index ead4a42255..c26f7da51b 100644 --- a/lib/layouts/linguistics.module +++ b/lib/layouts/linguistics.module @@ -95,20 +95,26 @@ Style Numbered_Examples_(consecutive) End -# multiple numbered example with covington.sty +# multiple numbered examples with covington.sty Style Subexample CopyStyle Numbered_Examples_(consecutive) - LatexName subexample + LatexName covsubexamples LabelCounter "subexample" StepMasterCounter true - Requires covington,enumitem + Requires covington Preamble - \newenvironment{subexample}{% - \begin{example}\begin{enumerate}[leftmargin=1.7em] - \renewcommand\theenumi{\alph{enumi}} - \renewcommand\labelenumi{(\theenumi)} - \renewcommand\p@enumi{\theequation\,}}% - {\end{enumerate}\end{example}} + % Backwards compatibility with covington < 1.6 + % This code can be removed eventually + \@ifundefined{covsubexamples}{% + \newenvironment{covsubexamples}{% + \addtolength{\examplenumbersep}{-0.5em}% + \begin{covexample}% + \begin{enumerate} + \renewcommand\theenumi{\alph{enumi}} + \renewcommand\labelenumi{(\theenumi)} + \renewcommand\p@enumi{\theequation\,}}% + {\end{enumerate}\end{covexample}} + }{} EndPreamble End