#\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).
# Author: Jürgen Spitzmüller <spitz@lyx.org>
-Format 67
+Format 74
Counter example
Within chapter
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
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"
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