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