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 # single numbered example with covington.sty
13 Style Numbered_Example_(multiline)
25 AlignPossible Block, Left
27 LabelString "Example:"
34 % Backwards compatibility with covington < 1.1
35 % This code can be removed eventually
36 \@ifundefined{covexample}{%
37 \newenvironment{covexample}{\begin{example}}{\end{example}}%
44 # multiple numbered examples with covington.sty
45 Style Numbered_Examples_(consecutive)
46 CopyStyle Numbered_Example_(multiline)
47 LatexType Item_Environment
49 LabelString "Examples:"
51 LabelString "Custom Numbering|s"
52 Tooltip "Customize the numeration"
55 % Backwards compatibility with covington < 1.1
56 % This code can be removed eventually
57 \@ifundefined{covexamples}{%
58 \newenvironment{covexamples}{\begin{examples}}{\end{examples}}%
64 # multiple numbered example with covington.sty
66 CopyStyle Numbered_Examples_(consecutive)
68 LabelString "Subexample:"
69 Requires covington,enumitem
71 \newenvironment{subexample}{%
72 \begin{example}\begin{enumerate}[leftmargin=1.7em]
73 \renewcommand\theenumi{\alph{enumi}}
74 \renewcommand\labelenumi{(\theenumi)}
75 \renewcommand\p@enumi{\theequation\,}}%
76 {\end{enumerate}\end{example}}
81 # glosse (2 lines) with covington.sty
82 InsetLayout Flex:Glosse
87 Decoration minimalistic
94 ParbreakIsNewline true
99 \@ifundefined{linggloss}{%
100 \newenvironment{linggloss}[2][]{
101 \def\glosstr{\glt #1}%
108 Decoration conglomerate
109 LabelString "Translation"
110 MenuString "Glosse Translation|s"
111 Tooltip "Add a translation for the glosse"
116 # glosse (3 lines) with covington.sty
117 InsetLayout Flex:Tri-Glosse
119 LabelString Tri-Glosse
120 LatexType environment
122 Decoration minimalistic
129 ParbreakIsNewline true
135 \@ifundefined{lingglosss}{%
136 \newenvironment{lingglosss}[2][]{
137 \def\glosstr{\glt #1}%
143 Decoration conglomerate
144 LabelString "Translation"
145 MenuString "Glosse Translation|s"
146 Tooltip "Add a translation for the glosse"
151 # Structure trees via the forest package
152 InsetLayout Flex:Structure_Tree
155 LatexType environment
163 ParbreakIsNewline true
169 % Load forest linguistics library, if available
170 \@ifpackagelater{forest}{2016/02/20}{%
171 \useforestlibrary*{linguistics}
177 # Some semantik markup for Semantics
178 InsetLayout Flex:Expression
187 \newcommand{\lingexpr}[1]{\emph{#1}}
194 InsetLayout Flex:Concepts
198 LatexName lingconcept
203 \newcommand{\lingconcept}[1]{\textsc{#1}}
210 InsetLayout Flex:Meaning
214 LatexName lingmeaning
217 \newcommand{\lingmeaning}[1]{\enquote*{#1}}
224 # A helper to group words in Glosses
225 InsetLayout Flex:GroupGlossedWords
234 # Tableaux for Optimality Theory
242 ListName "List of Tableaux"