1 #\DeclareLyXModule[covington.sty,enumitem.sty,forest.sty]{Linguistics}
3 #Defines some special environments useful for linguistics (numbered examples,
4 #glosses, semantic markup, tableau floats).
5 #See linguistics.lyx file in examples.
8 # Author: Jürgen Spitzmüller <spitz@lyx.org>
14 LabelString "(\arabic{example})"
19 LabelString "(\arabic{examplei})"
24 LabelString "\theexamplei (\alph{subexample})"
29 LabelString "\theexamplei (\alph{subexamplei})"
32 OutlinerName tableau "Tableaux" #no AddToToc (built-in)
34 # single numbered example with covington.sty
35 Style Numbered_Example_(multiline)
48 AlignPossible Block, Left
50 LabelCounter "examplei"
56 % Backwards compatibility with covington < 1.1
57 % This code can be removed eventually
59 \@ifundefined{covexample}{%
60 \newenvironment{covexample}{\begin{example}}{\end{example}}%
68 # multiple numbered examples with covington.sty
69 Style Numbered_Examples_(consecutive)
70 CopyStyle Numbered_Example_(multiline)
71 LatexType Item_Environment
74 LabelCounter "example"
76 Argument listpreamble:1
77 LabelString "List preamble"
78 MenuString "List Preamble"
79 Tooltip "LaTeX code to be inserted before the first item"
87 LabelString "Custom Numbering|s"
88 Tooltip "Customize the numeration"
91 % Backwards compatibility with covington < 1.1
92 % This code can be removed eventually
94 \@ifundefined{covexamples}{%
95 \newenvironment{covexamples}{\begin{examples}}{\end{examples}}%
102 # multiple numbered examples with covington.sty
104 CopyStyle Numbered_Examples_(consecutive)
105 LatexName covsubexamples
106 LabelCounter "subexample"
107 StepMasterCounter true
110 % Backwards compatibility with covington < 1.6
111 % This code can be removed eventually
113 \@ifundefined{covsubexamples}{%
114 \newenvironment{covsubexamples}{%
115 \addtolength{\examplenumbersep}{-0.5em}%
118 \renewcommand\theenumi{\alph{enumi}}
119 \renewcommand\labelenumi{(\theenumi)}
120 \renewcommand\p@enumi{\theequation\,}}%
121 {\end{enumerate}\end{covexample}}
128 # glosse (2 lines) with covington.sty
129 InsetLayout Flex:Glosse
132 LatexType environment
134 Decoration minimalistic
141 ParbreakIsNewline true
146 \@ifundefined{linggloss}{%
147 \newenvironment{linggloss}[2][]{
148 \def\glosstr{\glt #1}%
155 Decoration conglomerate
156 LabelString "Translation"
157 MenuString "Glosse Translation|s"
158 Tooltip "Add a translation for the glosse"
163 # glosse (3 lines) with covington.sty
164 InsetLayout Flex:Tri-Glosse
166 LabelString Tri-Glosse
167 LatexType environment
169 Decoration minimalistic
176 ParbreakIsNewline true
182 \@ifundefined{lingglosss}{%
183 \newenvironment{lingglosss}[2][]{
184 \def\glosstr{\glt #1}%
190 Decoration conglomerate
191 LabelString "Translation"
192 MenuString "Glosse Translation|s"
193 Tooltip "Add a translation for the glosse"
198 # Structure trees via the forest package
199 InsetLayout Flex:Structure_Tree
202 LatexType environment
210 ParbreakIsNewline true
216 % Load forest linguistics library, if available
217 \@ifpackagelater{forest}{2016/02/20}{%
218 \useforestlibrary*{linguistics}
224 # Some semantik markup for Semantics
225 InsetLayout Flex:Expression
234 \newcommand{\lingexpr}[1]{\emph{#1}}
241 InsetLayout Flex:Concepts
245 LatexName lingconcept
250 \newcommand{\lingconcept}[1]{\textsc{#1}}
257 InsetLayout Flex:Meaning
261 LatexName lingmeaning
264 \newcommand{\lingmeaning}[1]{\enquote*{#1}}
271 # A helper to group words in Glosses
272 InsetLayout Flex:GroupGlossedWords
281 # Tableaux for Optimality Theory
282 OutlinerName tableau "Tableaux" #no AddToToc
291 ListName "List of Tableaux"