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
58 \@ifundefined{covexample}{%
59 \newenvironment{covexample}{\begin{example}}{\end{example}}%
66 # multiple numbered examples with covington.sty
67 Style Numbered_Examples_(consecutive)
68 CopyStyle Numbered_Example_(multiline)
69 LatexType Item_Environment
72 LabelCounter "example"
74 Argument listpreamble:1
75 LabelString "List preamble"
76 MenuString "List Preamble"
77 Tooltip "LaTeX code to be inserted before the first item"
85 LabelString "Custom Numbering|s"
86 Tooltip "Customize the numeration"
89 % Backwards compatibility with covington < 1.1
90 % This code can be removed eventually
91 \@ifundefined{covexamples}{%
92 \newenvironment{covexamples}{\begin{examples}}{\end{examples}}%
98 # multiple numbered example with covington.sty
100 CopyStyle Numbered_Examples_(consecutive)
102 LabelCounter "subexample"
103 StepMasterCounter true
104 Requires covington,enumitem
106 \newenvironment{subexample}{%
107 \begin{example}\begin{enumerate}[leftmargin=1.7em]
108 \renewcommand\theenumi{\alph{enumi}}
109 \renewcommand\labelenumi{(\theenumi)}
110 \renewcommand\p@enumi{\theequation\,}}%
111 {\end{enumerate}\end{example}}
116 # glosse (2 lines) with covington.sty
117 InsetLayout Flex:Glosse
120 LatexType environment
122 Decoration minimalistic
129 ParbreakIsNewline true
134 \@ifundefined{linggloss}{%
135 \newenvironment{linggloss}[2][]{
136 \def\glosstr{\glt #1}%
143 Decoration conglomerate
144 LabelString "Translation"
145 MenuString "Glosse Translation|s"
146 Tooltip "Add a translation for the glosse"
151 # glosse (3 lines) with covington.sty
152 InsetLayout Flex:Tri-Glosse
154 LabelString Tri-Glosse
155 LatexType environment
157 Decoration minimalistic
164 ParbreakIsNewline true
170 \@ifundefined{lingglosss}{%
171 \newenvironment{lingglosss}[2][]{
172 \def\glosstr{\glt #1}%
178 Decoration conglomerate
179 LabelString "Translation"
180 MenuString "Glosse Translation|s"
181 Tooltip "Add a translation for the glosse"
186 # Structure trees via the forest package
187 InsetLayout Flex:Structure_Tree
190 LatexType environment
198 ParbreakIsNewline true
204 % Load forest linguistics library, if available
205 \@ifpackagelater{forest}{2016/02/20}{%
206 \useforestlibrary*{linguistics}
212 # Some semantik markup for Semantics
213 InsetLayout Flex:Expression
222 \newcommand{\lingexpr}[1]{\emph{#1}}
229 InsetLayout Flex:Concepts
233 LatexName lingconcept
238 \newcommand{\lingconcept}[1]{\textsc{#1}}
245 InsetLayout Flex:Meaning
249 LatexName lingmeaning
252 \newcommand{\lingmeaning}[1]{\enquote*{#1}}
259 # A helper to group words in Glosses
260 InsetLayout Flex:GroupGlossedWords
269 # Tableaux for Optimality Theory
270 OutlinerName tableau "Tableaux" #no AddToToc
279 ListName "List of Tableaux"