]> git.lyx.org Git - lyx.git/blob - lib/layouts/linguistics.module
convertDefault.py: remove ancient restriction
[lyx.git] / lib / layouts / linguistics.module
1 #\DeclareLyXModule[covington.sty,enumitem.sty,forest.sty]{Linguistics}
2 #DescriptionBegin
3 #Defines some special environments useful for linguistics (numbered examples,
4 #glosses, semantic markup, tableau floats).
5 #See linguistics.lyx file in examples.
6 #DescriptionEnd
7
8 # Author: Jürgen Spitzmüller <spitz@lyx.org>
9
10 Format 71
11
12 Counter example
13         Within               chapter
14         LabelString          "(\arabic{example})"
15 End
16
17 Counter examplei
18         Within               chapter
19         LabelString          "(\arabic{examplei})"
20 End
21
22 Counter subexample
23         Within               examplei
24         LabelString          "\theexamplei (\alph{subexample})"
25 End
26
27 Counter subexamplei
28         Within               examplei
29         LabelString          "\theexamplei (\alph{subexamplei})"
30 End
31
32 OutlinerName tableau    "Tableaux" #no AddToToc (built-in)
33
34 # single numbered example with covington.sty
35 Style Numbered_Example_(multiline)
36         LatexType             Environment
37         LatexName             covexample
38         NextNoIndent          1
39         Margin                First_Dynamic
40         ParIndent             (1)x
41         LabelSep              xx
42         ParSkip               0.0
43         ItemSep               0.2
44         TopSep                0.7
45         BottomSep             0.7
46         ParSep                0.3
47         Align                 Block
48         AlignPossible         Block, Left
49         LabelType             Static
50         LabelCounter          "examplei"
51         LabelFont
52                 Color         Blue
53         EndFont
54         Requires              covington
55         Preamble
56         % Backwards compatibility with covington < 1.1
57         % This code can be removed eventually
58         \AtBeginDocument{%
59                 \@ifundefined{covexample}{%
60                     \newenvironment{covexample}{\begin{example}}{\end{example}}%
61                 }{}
62         }
63         EndPreamble
64         Category              Linguistics
65 End
66
67
68 # multiple numbered examples with covington.sty
69 Style Numbered_Examples_(consecutive)
70         CopyStyle             Numbered_Example_(multiline)
71         LatexType             Item_Environment
72         LatexName             covexamples
73         LabelType             Enumerate
74         LabelCounter          "example"
75         ResumeCounter         true
76         Argument listpreamble:1
77                 LabelString    "List preamble"
78                 MenuString     "List Preamble"
79                 Tooltip        "LaTeX code to be inserted before the first item"
80                 PassThru       1
81                 Font
82                         Family typewriter
83                         Color latex
84                 EndFont
85         EndArgument
86         Argument item:1
87                 LabelString   "Custom Numbering|s"
88                 Tooltip       "Customize the numeration"
89         EndArgument
90         Preamble
91         % Backwards compatibility with covington < 1.1
92         % This code can be removed eventually
93         \AtBeginDocument{%
94                 \@ifundefined{covexamples}{%
95                     \newenvironment{covexamples}{\begin{examples}}{\end{examples}}%
96                 }{}
97         }
98         EndPreamble
99 End
100
101
102 # multiple numbered examples with covington.sty
103 Style Subexample
104         CopyStyle             Numbered_Examples_(consecutive)
105         LatexName             covsubexamples
106         LabelCounter          "subexample"
107         StepMasterCounter     true
108         Requires              covington
109         Preamble
110                 % Backwards compatibility with covington < 1.6
111                 % This code can be removed eventually
112                 \AtBeginDocument{%
113                         \@ifundefined{covsubexamples}{%
114                                 \newenvironment{covsubexamples}{%
115                                         \addtolength{\examplenumbersep}{-0.5em}%
116                                         \begin{covexample}%
117                                         \begin{enumerate}
118                                         \renewcommand\theenumi{\alph{enumi}}
119                                         \renewcommand\labelenumi{(\theenumi)}
120                                         \renewcommand\p@enumi{\theequation\,}}%
121                                 {\end{enumerate}\end{covexample}}
122                         }{}
123                 }
124         EndPreamble
125 End
126
127
128 # glosse (2 lines) with covington.sty
129 InsetLayout Flex:Glosse
130         LyXType               custom
131         LabelString           Glosse
132         LatexType             environment
133         LatexName             linggloss
134         Decoration            minimalistic
135         LabelFont
136           Size                Small
137         EndFont
138         MultiPar              true
139         CustomPars            false
140         ForcePlain            true
141         ParbreakIsNewline     true
142         FreeSpacing           true
143         Requires              covington
144         Preamble
145                 \def\glosstr{}
146                 \@ifundefined{linggloss}{%
147                 \newenvironment{linggloss}[2][]{
148                         \def\glosstr{\glt #1}%
149                         \gll #2}
150                 {\glosstr\glend}}{}
151         EndPreamble
152         InToc                 true
153         ResetsFont            true
154         Argument 1
155                 Decoration    conglomerate
156                 LabelString   "Translation"
157                 MenuString    "Glosse Translation|s"
158                 Tooltip       "Add a translation for the glosse"
159         EndArgument
160 End
161
162
163 # glosse (3 lines) with covington.sty
164 InsetLayout Flex:Tri-Glosse
165         LyXType               custom
166         LabelString           Tri-Glosse
167         LatexType             environment
168         LatexName             lingglosss
169         Decoration            minimalistic
170         LabelFont
171           Size                Small
172         EndFont
173         MultiPar              true
174         CustomPars            false
175         ForcePlain            true
176         ParbreakIsNewline     true
177         FreeSpacing           true
178         InToc                 true
179         Requires              covington
180         Preamble
181                 \def\glosstr{}
182                 \@ifundefined{lingglosss}{%
183                 \newenvironment{lingglosss}[2][]{
184                         \def\glosstr{\glt #1}%
185                         \glll #2}
186                 {\glosstr\glend}}{}
187         EndPreamble
188         ResetsFont            true
189         Argument 1
190                 Decoration    conglomerate
191                 LabelString   "Translation"
192                 MenuString    "Glosse Translation|s"
193                 Tooltip       "Add a translation for the glosse"
194         EndArgument
195 End
196
197
198 # Structure trees via the forest package
199 InsetLayout Flex:Structure_Tree
200         LyXType               custom
201         LabelString           Tree
202         LatexType             environment
203         LatexName             forest
204         Decoration            classic
205         LabelFont
206           Size                Small
207         EndFont
208         MultiPar              true
209         CustomPars            false
210         ParbreakIsNewline     true
211         FreeSpacing           true
212         Requires              forest
213         ResetsFont            true
214         PassThruChars         []
215         Preamble
216         % Load forest linguistics library, if available
217         \@ifpackagelater{forest}{2016/02/20}{%
218         \useforestlibrary*{linguistics}
219         }{}
220         EndPreamble
221 End
222
223
224 # Some semantik markup for Semantics
225 InsetLayout Flex:Expression
226         LyxType               charstyle
227         LabelString           expr.
228         LatexType             command
229         LatexName             lingexpr
230         Font
231           Shape               Italic
232         EndFont
233         Preamble
234                 \newcommand{\lingexpr}[1]{\emph{#1}}
235         EndPreamble
236         InToc                 true
237         ResetsFont            true
238 End
239
240
241 InsetLayout Flex:Concepts
242         LyxType               charstyle
243         LabelString           concept
244         LatexType             command
245         LatexName             lingconcept
246         Font
247           Shape               Smallcaps
248         EndFont
249         Preamble
250                 \newcommand{\lingconcept}[1]{\textsc{#1}}
251         EndPreamble
252         InToc                 true
253         ResetsFont            true
254 End
255
256
257 InsetLayout Flex:Meaning
258         LyxType               charstyle
259         LabelString           meaning
260         LatexType             command
261         LatexName             lingmeaning
262         Requires              csquotes
263         Preamble
264                 \newcommand{\lingmeaning}[1]{\enquote*{#1}}
265         EndPreamble
266         InToc                 true
267         ResetsFont            true
268 End
269
270
271 # A helper to group words in Glosses
272 InsetLayout Flex:GroupGlossedWords
273         LyxType               charstyle
274         LabelString           Group
275         LeftDelim             {
276         RightDelim            }
277         ResetsFont            true
278 End
279
280
281 # Tableaux for Optimality Theory
282 OutlinerName tableau        "Tableaux" #no AddToToc
283
284 Float
285         Type                  tableau
286         GuiName               Tableau
287         Placement             tbp
288         Extension             otl
289         NumberWithin          none
290         Style                 plain
291         ListName              "List of Tableaux"
292         IsPredefined          false
293         UsesFloatPkg          true
294 End
295