#\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 60
+Format 74
-# FIXME: It is currently not possible to share a
-# counter in layouts with STATIC and ENUMERATE
-# LabelType. The counters are not stepped properly.
Counter example
Within chapter
-# LabelString "(\arabic{example})"
- LabelString "Examples:"
+ LabelString "(\arabic{example})"
End
Counter examplei
Within chapter
-# LabelString "(\arabic{examplei})"
- LabelString "Examples:"
+ LabelString "(\arabic{examplei})"
End
Counter subexample
Within examplei
-# LabelString "\theexamplei (\alph{subexample})"
- LabelString "Subexample:"
+ LabelString "\theexamplei (\alph{subexample})"
End
Counter subexamplei
Within examplei
-# LabelString "\theexamplei (\alph{subexamplei})"
- LabelString "Subexample:"
+ 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
Align Block
AlignPossible Block, Left
LabelType Static
-# LabelCounter "example"
- 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
End
LatexName covexamples
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"
- Requires covington,enumitem
+ 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
# Tableaux for Optimality Theory
+OutlinerName tableau "Tableaux" #no AddToToc
+
Float
Type tableau
GuiName Tableau