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"
75 LabelString "Custom Numbering|s"
76 Tooltip "Customize the numeration"
79 % Backwards compatibility with covington < 1.1
80 % This code can be removed eventually
81 \@ifundefined{covexamples}{%
82 \newenvironment{covexamples}{\begin{examples}}{\end{examples}}%
88 # multiple numbered example with covington.sty
90 CopyStyle Numbered_Examples_(consecutive)
92 LabelCounter "subexample"
93 StepMasterCounter true
94 Requires covington,enumitem
96 \newenvironment{subexample}{%
97 \begin{example}\begin{enumerate}[leftmargin=1.7em]
98 \renewcommand\theenumi{\alph{enumi}}
99 \renewcommand\labelenumi{(\theenumi)}
100 \renewcommand\p@enumi{\theequation\,}}%
101 {\end{enumerate}\end{example}}
106 # glosse (2 lines) with covington.sty
107 InsetLayout Flex:Glosse
110 LatexType environment
112 Decoration minimalistic
119 ParbreakIsNewline true
124 \@ifundefined{linggloss}{%
125 \newenvironment{linggloss}[2][]{
126 \def\glosstr{\glt #1}%
133 Decoration conglomerate
134 LabelString "Translation"
135 MenuString "Glosse Translation|s"
136 Tooltip "Add a translation for the glosse"
141 # glosse (3 lines) with covington.sty
142 InsetLayout Flex:Tri-Glosse
144 LabelString Tri-Glosse
145 LatexType environment
147 Decoration minimalistic
154 ParbreakIsNewline true
160 \@ifundefined{lingglosss}{%
161 \newenvironment{lingglosss}[2][]{
162 \def\glosstr{\glt #1}%
168 Decoration conglomerate
169 LabelString "Translation"
170 MenuString "Glosse Translation|s"
171 Tooltip "Add a translation for the glosse"
176 # Structure trees via the forest package
177 InsetLayout Flex:Structure_Tree
180 LatexType environment
188 ParbreakIsNewline true
194 % Load forest linguistics library, if available
195 \@ifpackagelater{forest}{2016/02/20}{%
196 \useforestlibrary*{linguistics}
202 # Some semantik markup for Semantics
203 InsetLayout Flex:Expression
212 \newcommand{\lingexpr}[1]{\emph{#1}}
219 InsetLayout Flex:Concepts
223 LatexName lingconcept
228 \newcommand{\lingconcept}[1]{\textsc{#1}}
235 InsetLayout Flex:Meaning
239 LatexName lingmeaning
242 \newcommand{\lingmeaning}[1]{\enquote*{#1}}
249 # A helper to group words in Glosses
250 InsetLayout Flex:GroupGlossedWords
259 # Tableaux for Optimality Theory
260 OutlinerName tableau "Tableaux" #no AddToToc
269 ListName "List of Tableaux"