1 #\DeclareLyXModule[covington.sty,enumitem.sty,forest.sty]{Linguistics}
2 #\DeclareCategory{Academic Field Specifics}
4 #Defines some special environments useful for linguistics (numbered examples,
5 #glosses, semantic markup, tableau floats).
6 #See linguistics.lyx file in examples.
9 # Author: Jürgen Spitzmüller <spitz@lyx.org>
15 LabelString "(\arabic{example})"
20 LabelString "(\arabic{examplei})"
25 LabelString "\theexamplei (\alph{subexample})"
30 LabelString "\theexamplei (\alph{subexamplei})"
33 OutlinerName tableau "Tableaux" #no AddToToc (built-in)
35 # single numbered example with covington.sty
36 Style Numbered_Example_(multiline)
49 AlignPossible Block, Left
51 LabelCounter "examplei"
57 % Backwards compatibility with covington < 1.1
58 % This code can be removed eventually
60 \@ifundefined{covexample}{%
61 \newenvironment{covexample}{\begin{example}}{\end{example}}%
69 # multiple numbered examples with covington.sty
70 Style Numbered_Examples_(consecutive)
71 CopyStyle Numbered_Example_(multiline)
72 LatexType Item_Environment
75 LabelCounter "example"
77 Argument listpreamble:1
78 LabelString "List preamble"
79 MenuString "List Preamble"
80 Tooltip "LaTeX code to be inserted before the first item"
88 LabelString "Custom Numbering|s"
89 Tooltip "Customize the numeration"
92 % Backwards compatibility with covington < 1.1
93 % This code can be removed eventually
95 \@ifundefined{covexamples}{%
96 \newenvironment{covexamples}{\begin{examples}}{\end{examples}}%
103 # multiple numbered examples with covington.sty
105 CopyStyle Numbered_Examples_(consecutive)
106 LatexName covsubexamples
107 LabelCounter "subexample"
108 StepMasterCounter true
111 % Backwards compatibility with covington < 1.6
112 % This code can be removed eventually
114 \@ifundefined{covsubexamples}{%
115 \newenvironment{covsubexamples}{%
116 \addtolength{\examplenumbersep}{-0.5em}%
119 \renewcommand\theenumi{\alph{enumi}}
120 \renewcommand\labelenumi{(\theenumi)}
121 \renewcommand\p@enumi{\theequation\,}}%
122 {\end{enumerate}\end{covexample}}
129 # glosse (2 lines) with covington.sty
130 InsetLayout Flex:Glosse
133 LatexType environment
135 Decoration minimalistic
142 ParbreakIsNewline true
147 \@ifundefined{linggloss}{%
148 \newenvironment{linggloss}[2][]{
149 \def\glosstr{\glt #1}%
156 Decoration conglomerate
157 LabelString "Translation"
158 MenuString "Glosse Translation|s"
159 Tooltip "Add a translation for the glosse"
164 # glosse (3 lines) with covington.sty
165 InsetLayout Flex:Tri-Glosse
167 LabelString Tri-Glosse
168 LatexType environment
170 Decoration minimalistic
177 ParbreakIsNewline true
183 \@ifundefined{lingglosss}{%
184 \newenvironment{lingglosss}[2][]{
185 \def\glosstr{\glt #1}%
191 Decoration conglomerate
192 LabelString "Translation"
193 MenuString "Glosse Translation|s"
194 Tooltip "Add a translation for the glosse"
199 # Structure trees via the forest package
200 InsetLayout Flex:Structure_Tree
203 LatexType environment
211 ParbreakIsNewline true
217 % Load forest linguistics library, if available
218 \@ifpackagelater{forest}{2016/02/20}{%
219 \useforestlibrary*{linguistics}
225 # Some semantik markup for Semantics
226 InsetLayout Flex:Expression
235 \newcommand{\lingexpr}[1]{\emph{#1}}
242 InsetLayout Flex:Concepts
246 LatexName lingconcept
251 \newcommand{\lingconcept}[1]{\textsc{#1}}
258 InsetLayout Flex:Meaning
262 LatexName lingmeaning
265 \newcommand{\lingmeaning}[1]{\enquote*{#1}}
272 # A helper to group words in Glosses
273 InsetLayout Flex:GroupGlossedWords
282 # Tableaux for Optimality Theory
283 OutlinerName tableau "Tableaux" #no AddToToc
292 ListName "List of Tableaux"