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>
12 # FIXME: It is currently not possible to share a
13 # counter in layouts with STATIC and ENUMERATE
14 # LabelType. The counters are not stepped properly.
17 # LabelString "(\arabic{example})"
18 LabelString "Examples:"
23 # LabelString "(\arabic{examplei})"
24 LabelString "Examples:"
29 # LabelString "\theexamplei (\alph{subexample})"
30 LabelString "Subexample:"
35 # LabelString "\theexamplei (\alph{subexamplei})"
36 LabelString "Subexample:"
39 # single numbered example with covington.sty
40 Style Numbered_Example_(multiline)
52 AlignPossible Block, Left
54 # LabelCounter "example"
55 LabelString "Example:"
62 % Backwards compatibility with covington < 1.1
63 % This code can be removed eventually
64 \@ifundefined{covexample}{%
65 \newenvironment{covexample}{\begin{example}}{\end{example}}%
72 # multiple numbered examples with covington.sty
73 Style Numbered_Examples_(consecutive)
74 CopyStyle Numbered_Example_(multiline)
75 LatexType Item_Environment
78 LabelCounter "example"
80 LabelString "Custom Numbering|s"
81 Tooltip "Customize the numeration"
84 % Backwards compatibility with covington < 1.1
85 % This code can be removed eventually
86 \@ifundefined{covexamples}{%
87 \newenvironment{covexamples}{\begin{examples}}{\end{examples}}%
93 # multiple numbered example with covington.sty
95 CopyStyle Numbered_Examples_(consecutive)
97 LabelCounter "subexample"
98 Requires covington,enumitem
100 \newenvironment{subexample}{%
101 \begin{example}\begin{enumerate}[leftmargin=1.7em]
102 \renewcommand\theenumi{\alph{enumi}}
103 \renewcommand\labelenumi{(\theenumi)}
104 \renewcommand\p@enumi{\theequation\,}}%
105 {\end{enumerate}\end{example}}
110 # glosse (2 lines) with covington.sty
111 InsetLayout Flex:Glosse
114 LatexType environment
116 Decoration minimalistic
123 ParbreakIsNewline true
128 \@ifundefined{linggloss}{%
129 \newenvironment{linggloss}[2][]{
130 \def\glosstr{\glt #1}%
137 Decoration conglomerate
138 LabelString "Translation"
139 MenuString "Glosse Translation|s"
140 Tooltip "Add a translation for the glosse"
145 # glosse (3 lines) with covington.sty
146 InsetLayout Flex:Tri-Glosse
148 LabelString Tri-Glosse
149 LatexType environment
151 Decoration minimalistic
158 ParbreakIsNewline true
164 \@ifundefined{lingglosss}{%
165 \newenvironment{lingglosss}[2][]{
166 \def\glosstr{\glt #1}%
172 Decoration conglomerate
173 LabelString "Translation"
174 MenuString "Glosse Translation|s"
175 Tooltip "Add a translation for the glosse"
180 # Structure trees via the forest package
181 InsetLayout Flex:Structure_Tree
184 LatexType environment
192 ParbreakIsNewline true
198 % Load forest linguistics library, if available
199 \@ifpackagelater{forest}{2016/02/20}{%
200 \useforestlibrary*{linguistics}
206 # Some semantik markup for Semantics
207 InsetLayout Flex:Expression
216 \newcommand{\lingexpr}[1]{\emph{#1}}
223 InsetLayout Flex:Concepts
227 LatexName lingconcept
232 \newcommand{\lingconcept}[1]{\textsc{#1}}
239 InsetLayout Flex:Meaning
243 LatexName lingmeaning
246 \newcommand{\lingmeaning}[1]{\enquote*{#1}}
253 # A helper to group words in Glosses
254 InsetLayout Flex:GroupGlossedWords
263 # Tableaux for Optimality Theory
271 ListName "List of Tableaux"