]> git.lyx.org Git - lyx.git/blobdiff - lib/layouts/linguistics.module
Fix grammar
[lyx.git] / lib / layouts / linguistics.module
index ead4a422553c19e7e4a49abcdb2462a3fb1c3289..33d6c09ed5bc2254dd0fce7dfdfbb14221160eb7 100644 (file)
@@ -1,4 +1,5 @@
 #\DeclareLyXModule[covington.sty,enumitem.sty,forest.sty]{Linguistics}
+#\DeclareCategory{Academic Field Specifics}
 #DescriptionBegin
 #Defines some special environments useful for linguistics (numbered examples,
 #glosses, semantic markup, tableau floats).
@@ -7,7 +8,7 @@
 
 # Author: Jürgen Spitzmüller <spitz@lyx.org>
 
-Format 69
+Format 74
 
 Counter example
        Within               chapter
@@ -55,9 +56,11 @@ Style Numbered_Example_(multiline)
        Preamble
        % Backwards compatibility with covington < 1.1
        % This code can be removed eventually
-       \@ifundefined{covexample}{%
-           \newenvironment{covexample}{\begin{example}}{\end{example}}%
-       }{}
+       \AtBeginDocument{%
+               \@ifundefined{covexample}{%
+                   \newenvironment{covexample}{\begin{example}}{\end{example}}%
+               }{}
+       }
        EndPreamble
        Category              Linguistics
 End
@@ -88,27 +91,37 @@ Style Numbered_Examples_(consecutive)
        Preamble
        % Backwards compatibility with covington < 1.1
        % This code can be removed eventually
-       \@ifundefined{covexamples}{%
-           \newenvironment{covexamples}{\begin{examples}}{\end{examples}}%
-       }{}
+       \AtBeginDocument{%
+               \@ifundefined{covexamples}{%
+                   \newenvironment{covexamples}{\begin{examples}}{\end{examples}}%
+               }{}
+       }
        EndPreamble
 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
+               \AtBeginDocument{%
+                       \@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