]> git.lyx.org Git - lyx.git/blob - lib/layouts/linguistics.module
Update layouts
[lyx.git] / lib / layouts / linguistics.module
1 #\DeclareLyXModule[covington.sty,drs.sty,forest.sty,pict2e.sty,varwidth.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 Help > Specific Manuals > Linguistics.
7 #DescriptionEnd
8
9 # Author: Jürgen Spitzmüller <spitz@lyx.org>
10
11 Format 103
12
13 #
14 # Counters
15 #
16
17 Counter example
18         GuiName Example
19         Within               chapter
20         LabelString          "(\arabic{example})"
21 End
22
23 Counter examplei
24         GuiName              "Numbered Example (Multiline)"
25         Within               chapter
26         LabelString          "(\arabic{examplei})"
27 End
28
29 Counter subexample
30         GuiName              Subexample
31         Within               examplei
32         LabelString          "\theexamplei (\alph{subexample})"
33 End
34
35 Counter subexamplei
36         GuiName              Subexample
37         Within               examplei
38         LabelString          "\theexamplei (\alph{subexamplei})"
39 End
40
41 Counter subexampleii
42         GuiName              Subexample
43         Within               examplei
44         LabelString          "\theexamplei (\alph{subexampleii})"
45 End
46
47 Counter subexampleiii
48         GuiName              Subexample
49         Within               examplei
50         LabelString          "\theexamplei (\alph{subexampleiii})"
51 End
52
53 Counter subexampleiv
54         GuiName              Subexample
55         Within               examplei
56         LabelString          "\theexamplei (\alph{subexampleiv})"
57 End
58
59 #
60 # Numbered Examples
61 #
62
63 # Single numbered example with covington.sty
64 Style Numbered_Example_(multiline)
65         LatexType             Environment
66         LatexName             covexample
67         NextNoIndent          1
68         Margin                First_Dynamic
69         ParIndent             (1)x
70         LabelSep              xx
71         ParSkip               0.0
72         ItemSep               0.2
73         TopSep                0.7
74         BottomSep             0.7
75         ParSep                0.3
76         Align                 Block
77         AlignPossible         Block, Left
78         LabelType             Static
79         LabelCounter          "examplei"
80         LabelFont
81                 Color         textlabel1
82         EndFont
83         Requires              covington
84         Argument 1
85                 LabelString   "Example options"
86                 MenuString    "Examples options|s"
87                 Tooltip       "Add examples options here"
88                 PassThru       1
89         EndArgument
90         Category              Linguistics
91         DocBookWrapperTag     informalexample
92         DocBookWrapperAttr    role='numbered'
93         DocBookWrapperMergeWithPrevious  true
94         DocBookTag            para
95 End
96
97
98 # Multiple numbered examples with covington.sty
99 Style Numbered_Examples_(consecutive)
100         CopyStyle             Numbered_Example_(multiline)
101         LatexType             Item_Environment
102         LatexName             covexamples
103         LabelType             Enumerate
104         LabelCounter          "example"
105         ResumeCounter         true
106         Argument listpreamble:1
107                 LabelString    "List preamble"
108                 MenuString     "List Preamble"
109                 Tooltip        "LaTeX code to be inserted before the first item"
110                 PassThru       1
111                 Font
112                         Family typewriter
113                         Color latex
114                 EndFont
115         EndArgument
116         Argument item:1
117                 LabelString   "Judgment|J"
118                 Tooltip       "Grammaticality judgment marker"
119                 LeftDelim     <
120                 RightDelim    >
121         EndArgument
122         Argument item:2
123                 LabelString   "Custom Numbering|s"
124                 Tooltip       "Customize the numeration"
125         EndArgument
126         DocBookWrapperTag     informalexample
127         DocBookWrapperAttr    role='consecutive'
128         DocBookWrapperMergeWithPrevious  true
129         DocBookTag            para
130         HTMLClass             NumberedExample
131 End
132
133
134 # Sub-examples with covington.sty
135 Style Subexample
136         CopyStyle             Numbered_Examples_(consecutive)
137         LatexName             covsubexamples
138         LabelCounter          "subexample"
139         StepParentCounter     true
140         Requires              covington
141         Argument 1
142                 LabelString   "Subexamples options"
143                 MenuString    "Subexamples options|s"
144                 Tooltip       "Add subexamples options here"
145                 PassThru       1
146         EndArgument
147         HTMLClass          SubExample
148 End
149
150 InsetLayout Flex:Example_Preamble
151         LyXType               custom
152         Decoration            classic
153         LatexType             command
154         LatexName             expreamble
155         LabelString           "Ex. Preamble"
156         ResetsFont            true
157         AllowedInLayouts
158             Numbered_Example_(multiline), Numbered_Examples_(consecutive)
159         EndAllowedInLayouts
160         AllowedOccurrences   1
161         AllowedOccurrencesPerItem  true
162 End
163
164 InsetLayout Flex:Subexample_Preamble
165         CopyStyle             Flex:Example_Preamble
166         LatexName             subexpreamble
167         LabelString           "Subex. Preamble"
168         AllowedInLayouts
169             Subexample
170         EndAllowedInLayouts
171 End
172
173
174 InsetLayout Flex:Example_Postamble
175         CopyStyle             Flex:Example_Preamble
176         LatexName             expostamble
177         LabelString           "Ex. Postamble"
178 End
179
180 InsetLayout Flex:Subexample_Postamble
181         CopyStyle             Flex:Example_Preamble
182         LatexName             subexpostamble
183         LabelString           "Subex. Postamble"
184         AllowedInLayouts
185             Subexample
186         EndAllowedInLayouts
187 End
188
189
190 #
191 # Interlinear Glosses
192 #
193
194 # Two-Line gloss with covington.sty
195 InsetLayout Flex:Interlinear_Gloss_(2_Lines)
196         LyXType               custom
197         LabelString           Gloss
198         LatexType             command
199         LatexName             digloss
200         Decoration            minimalistic
201         LabelFont
202           Size                Small
203         EndFont
204         MultiPar              true
205         CustomPars            false
206         ForcePlain            true
207         ParbreakIgnored       true
208         FreeSpacing           true
209         Requires              covington,csquotes
210         InToc                 true
211         ResetsFont            true
212         Argument 1
213                 LabelString   "Gloss options"
214                 MenuString    "Gloss Options|s"
215                 Tooltip       "Add digloss options here"
216         EndArgument
217         Argument post:1
218                 LabelString   "Sentence Comment"
219                 MenuString    "Sentence Comment"
220                 Tooltip       "Add an optional sentence comment here"
221         EndArgument
222         Argument post:2
223                 Decoration    conglomerate
224                 LabelString   "Interlinear Gloss"
225                 MenuString    "Interlinear Gloss"
226                 Tooltip       "Add the inter-linear gloss here"
227                 AutoInsert    true
228                 Mandatory     true
229                 FreeSpacing   true
230                 InsertOnNewline true
231         EndArgument
232         Argument post:3
233                 LabelString   "Gloss Comment"
234                 MenuString    "Gloss Comment"
235                 Tooltip       "Add an optional gloss comment here"
236         EndArgument
237         Argument post:4
238                 Decoration    conglomerate
239                 LabelString   "Translation"
240                 MenuString    "Gloss Translation"
241                 Tooltip       "Add a free translation for the gloss"
242                 AutoInsert    true
243                 Mandatory     true
244                 FreeSpacing   true
245                 InsertOnNewline true
246         EndArgument
247 End
248
249
250 # Three-Line gloss with covington.sty
251 InsetLayout Flex:Interlinear_Gloss_(3_Lines)
252         LyXType               custom
253         LabelString           Tri-Gloss
254         LatexType             command
255         LatexName             trigloss
256         Decoration            minimalistic
257         LabelFont
258           Size                Small
259         EndFont
260         MultiPar              true
261         CustomPars            false
262         ForcePlain            true
263         ParbreakIgnored       true
264         FreeSpacing           true
265         InToc                 true
266         Requires              covington,csquotes
267         ResetsFont            true
268         Argument 1
269                 LabelString   "Gloss options"
270                 MenuString    "Gloss Options|s"
271                 Tooltip       "Add trigloss options here"
272         EndArgument
273         Argument post:1
274                 LabelString   "Sentence Comment"
275                 MenuString    "Sentence Comment"
276                 Tooltip       "Add an optional sentence comment here"
277         EndArgument
278         Argument post:2
279                 Decoration    conglomerate
280                 LabelString   "Interlinear Gloss (1)"
281                 MenuString    "Interlinear Gloss (Line 1)|1"
282                 Tooltip       "Add the first inter-linear gloss line here"
283                 Mandatory     true
284                 AutoInsert    true
285                 FreeSpacing   true
286                 InsertOnNewline true
287         EndArgument
288         Argument post:3
289                 LabelString   "Gloss Comment (1)"
290                 MenuString    "Gloss Comment (Line 1)"
291                 Tooltip       "Add an optional gloss comment here"
292         EndArgument
293         Argument post:4
294                 Decoration    conglomerate
295                 LabelString   "Interlinear Gloss (2)"
296                 MenuString    "Interlinear Gloss (Line 2)|2"
297                 Tooltip       "Add the second inter-linear gloss line here"
298                 Mandatory     true
299                 AutoInsert    true
300                 FreeSpacing   true
301                 InsertOnNewline true
302         EndArgument
303         Argument post:5
304                 LabelString   "Gloss Comment (2)"
305                 MenuString    "Gloss Comment (Line 2)"
306                 Tooltip       "Add an optional gloss comment here"
307         EndArgument
308         Argument post:6
309                 Decoration    conglomerate
310                 LabelString   "Translation"
311                 MenuString    "Gloss Translation"
312                 Tooltip       "Add a translation for the glosse"
313                 Mandatory     true
314                 AutoInsert    true
315                 InsertOnNewline true
316         EndArgument
317 End
318
319
320 # A helper to group words in glosses
321 InsetLayout Flex:GroupGlossedWords
322         LyxType               charstyle
323         LabelString           Group
324         LeftDelim             {
325         RightDelim            }
326         ResetsFont            true
327         AllowedInInsets
328            Flex:Interlinear_Gloss_(2_Lines), Flex:Interlinear_Gloss_(2_Lines)@post:2,
329            Flex:Interlinear_Gloss_(3_Lines), Flex:Interlinear_Gloss_(3_Lines)@post:2,
330            Flex:Interlinear_Gloss_(3_Lines)@post:4
331         EndAllowedInInsets
332 End
333
334
335 #
336 # Trees
337 #
338
339 # Structure trees via the forest package
340 InsetLayout Flex:Structure_Tree
341         LyXType               custom
342         LabelString           Tree
343         LatexType             environment
344         LatexName             forest
345         Decoration            classic
346         LabelFont
347           Size                Small
348         EndFont
349         MultiPar              true
350         CustomPars            false
351         ParbreakIsNewline     true
352         FreeSpacing           true
353         Requires              forest
354         ResetsFont            true
355         PassThruChars         []
356         Preamble
357         % Load forest linguistics library, if available
358         \@ifpackagelater{forest}{2016/02/20}{%
359         \useforestlibrary*{linguistics}
360         }{}
361         EndPreamble
362     DocBookRenderAsImage  true
363 End
364
365
366 #
367 # Discourse Representation Structures
368 #
369
370 InsetLayout Flex:DRS
371         LyXType               custom
372         LabelString           DRS
373         MenuString            "Discourse Representation Structure|D"
374         LatexType             command
375         LatexName             drs
376         Decoration            classic
377         MultiPar              true
378         CustomPars            false
379         ParbreakIsNewline     true
380         FreeSpacing           true
381         Requires              drs
382         ResetsFont            true
383         Argument 1
384                 Decoration    conglomerate
385                 LabelString   "Referents"
386                 MenuString    "DRS Referents"
387                 Tooltip       "Add the DRS referents (universe) here"
388                 Mandatory     true
389                 AutoInsert    true
390         EndArgument
391 End
392
393
394 InsetLayout Flex:DRS*
395         CopyStyle             Flex:DRS
396         LabelString           DRS*
397         MenuString            "Discourse Representation Structure (unspaced)|u"
398         LatexName             drs*
399 End
400
401
402 InsetLayout Flex:IfThen-DRS
403         CopyStyle             Flex:DRS
404         LabelString           "If-Then DRS"
405         MenuString            "If-Then DRS"
406         LatexName             ifdrs
407         Argument post:1
408                 Decoration    classic
409                 LabelString   "Then-Referents"
410                 MenuString    "DRS Then-Referents"
411                 Tooltip       "Add the DRS then-referents (universe) here"
412                 Mandatory     true
413                 AutoInsert    true
414                 InsertOnNewline true
415         EndArgument
416         Argument post:2
417                 Decoration    classic
418                 LabelString   "Then-Conditions"
419                 MenuString    "DRS Then-Referents"
420                 Tooltip       "Add the DRS then-conditions here"
421                 Mandatory     true
422                 AutoInsert    true
423                 InsertOnNewline true
424         EndArgument
425 End
426
427
428 InsetLayout Flex:Cond-DRS
429         CopyStyle             Flex:DRS
430         LabelString           "Cond. DRS"
431         MenuString            "Conditional DRS"
432         LatexName             condrs
433         Argument post:1
434                 Decoration    classic
435                 LabelString   "Cond."
436                 MenuString    "DRS Condition"
437                 Tooltip       "Add the DRS condition here"
438                 Mandatory     true
439                 AutoInsert    true
440                 InsertOnNewline true
441         EndArgument
442         Argument post:2
443                 Decoration    classic
444                 LabelString   "Then-Referents"
445                 MenuString    "DRS Then-Referents"
446                 Tooltip       "Add the DRS then-referents (universe) here"
447                 Mandatory     true
448                 AutoInsert    true
449                 InsertOnNewline true
450         EndArgument
451         Argument post:3
452                 Decoration    classic
453                 LabelString   "Then-Conditions"
454                 MenuString    "DRS Then-Referents"
455                 Tooltip       "Add the DRS then-conditions here"
456                 Mandatory     true
457                 AutoInsert    true
458                 InsertOnNewline true
459         EndArgument
460 End
461
462
463 InsetLayout Flex:QDRS
464         CopyStyle             Flex:DRS
465         LabelString           "Dupl. Cond. DRS"
466         MenuString            "Duplex Condition DRS"
467         LatexName             qdrs
468         Argument post:1
469                 Decoration    classic
470                 LabelString   "Quant."
471                 MenuString    "DRS Quantifier"
472                 Tooltip       "Add the DRS duplex quantifier here"
473                 Mandatory     true
474                 AutoInsert    true
475                 InsertOnNewline true
476         EndArgument
477         Argument post:2
478                 Decoration    classic
479                 LabelString   "Quant. Var."
480                 MenuString    "DRS Quantifier Variable"
481                 Tooltip       "Add the DRS duplex quantifier variables here"
482                 Mandatory     true
483                 AutoInsert    true
484                 InsertOnNewline true
485         EndArgument
486         Argument post:3
487                 Decoration    classic
488                 LabelString   "Then-Referents"
489                 MenuString    "DRS Then-Referents"
490                 Tooltip       "Add the DRS then-referents (universe) here"
491                 Mandatory     true
492                 AutoInsert    true
493                 InsertOnNewline true
494         EndArgument
495         Argument post:4
496                 Decoration    classic
497                 LabelString   "Then-Conditions"
498                 MenuString    "DRS Then-Referents"
499                 Tooltip       "Add the DRS then-conditions here"
500                 Mandatory     true
501                 AutoInsert    true
502                 InsertOnNewline true
503         EndArgument
504         Requires              drs,pict2e
505 End
506
507
508 InsetLayout Flex:NegDRS
509         CopyStyle             Flex:DRS
510         LabelString           "Neg. DRS"
511         MenuString            "Negated DRS"
512         LatexName             negdrs
513 End
514
515
516 InsetLayout Flex:SDRS
517         CopyStyle             Flex:DRS
518         LabelString           "Sent. DRS"
519         MenuString            "DRS with Sentence above"
520         LatexName             sdrs
521         Argument 1
522                 Decoration    conglomerate
523                 LabelString   "Sentence"
524                 MenuString    "DRS Sentence"
525                 Tooltip       "Add the sentence here"
526                 Mandatory     true
527                 AutoInsert    true
528                 InsertOnNewline true
529         EndArgument
530         Argument 2
531                 Decoration    conglomerate
532                 LabelString   "Referents"
533                 MenuString    "DRS Referents"
534                 Tooltip       "Add the DRS referents (universe) here"
535                 Mandatory     true
536                 AutoInsert    true
537                 InsertOnNewline true
538         EndArgument
539 End
540
541
542 #
543 # Semantic Markup
544 #
545
546 InsetLayout Flex:Expression
547         LyxType               charstyle
548         LabelString           expr.
549         LatexType             command
550         LatexName             lexp
551         Requires              covington
552         Font
553           Shape               Italic
554         EndFont
555         InToc                 true
556         ResetsFont            true
557 End
558
559
560 InsetLayout Flex:Concepts
561         LyxType               charstyle
562         LabelString           concept
563         LatexType             command
564         LatexName             lcon
565         Requires              covington
566         Font
567           Shape               Smallcaps
568         EndFont
569         InToc                 true
570         ResetsFont            true
571 End
572
573
574 InsetLayout Flex:Meaning
575         LyxType               charstyle
576         LabelString           meaning
577         LatexType             command
578         LatexName             lmean
579         Requires              covington,csquotes
580         InToc                 true
581         ResetsFont            true
582 End
583
584
585 #
586 # OT Tableaux
587 #
588
589 OutlinerName tableau        "Tableaux" #no AddToToc
590
591 Float
592         Type                  tableau
593         GuiName               Tableau
594         Placement             tbp
595         Extension             otl
596         NumberWithin          none
597         Style                 plain
598         ListName              "List of Tableaux"
599         IsPredefined          false
600         UsesFloatPkg          true
601 End
602