]> git.lyx.org Git - lyx.git/blobdiff - lib/layouts/linguistics.module
Fix grammar
[lyx.git] / lib / layouts / linguistics.module
index b20288cfd062c6008ea6a5a3cc3e389e55f2f788..33d6c09ed5bc2254dd0fce7dfdfbb14221160eb7 100644 (file)
@@ -1,4 +1,5 @@
-#\DeclareLyXModule[covington.sty,elocalloc.sty,enumitem.sty,forest.sty,pgfopts.sty,trimspaces.sty]{Linguistics}
+#\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,14 +8,37 @@
 
 # Author: Jürgen Spitzmüller <spitz@lyx.org>
 
-Format 60
+Format 74
+
+Counter example
+       Within               chapter
+       LabelString          "(\arabic{example})"
+End
+
+Counter examplei
+       Within               chapter
+       LabelString          "(\arabic{examplei})"
+End
+
+Counter subexample
+       Within               examplei
+       LabelString          "\theexamplei (\alph{subexample})"
+End
+
+Counter subexamplei
+       Within               examplei
+       LabelString          "\theexamplei (\alph{subexamplei})"
+End
+
+OutlinerName tableau    "Tableaux" #no AddToToc (built-in)
 
 # single numbered example with covington.sty
 Style Numbered_Example_(multiline)
        LatexType             Environment
        LatexName             covexample
        NextNoIndent          1
-       Margin                Dynamic
+       Margin                First_Dynamic
+       ParIndent             (1)x
        LabelSep              xx
        ParSkip               0.0
        ItemSep               0.2
@@ -24,17 +48,18 @@ Style Numbered_Example_(multiline)
        Align                 Block
        AlignPossible         Block, Left
        LabelType             Static
-       LabelString           "Example:"
+       LabelCounter          "examplei"
        LabelFont
-               Shape         Italic
                Color         Blue
        EndFont
        Requires              covington
        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
@@ -46,7 +71,19 @@ Style Numbered_Examples_(consecutive)
        CopyStyle             Numbered_Example_(multiline)
        LatexType             Item_Environment
        LatexName             covexamples
-       LabelString           "Examples:"
+       LabelType             Enumerate
+       LabelCounter          "example"
+       ResumeCounter         true
+       Argument listpreamble:1
+               LabelString    "List preamble"
+               MenuString     "List Preamble"
+               Tooltip        "LaTeX code to be inserted before the first item"
+               PassThru       1
+               Font
+                       Family typewriter
+                       Color latex
+               EndFont
+       EndArgument
        Argument item:1
                LabelString   "Custom Numbering|s"
                Tooltip       "Customize the numeration"
@@ -54,26 +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
-       LabelString           "Subexample:"
-       Requires              covington,enumitem
+       LatexName             covsubexamples
+       LabelCounter          "subexample"
+       StepMasterCounter     true
+       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
 
@@ -232,6 +280,8 @@ End
 
 
 # Tableaux for Optimality Theory
+OutlinerName tableau        "Tableaux" #no AddToToc
+
 Float
        Type                  tableau
        GuiName               Tableau