commit ab16bb7eb98731be25413f9410e61e7d4fe75439
Author: Juergen Spitzmueller <[email protected]>
Date: Sat Sep 8 09:50:48 2018 +0200
Covington now provides subexamples itself
Candidate for stable.
---
lib/layouts/linguistics.module | 24 +++++++++++++++---------
1 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/lib/layouts/linguistics.module b/lib/layouts/linguistics.module
index ead4a42..c26f7da 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