]> git.lyx.org Git - lyx.git/blob - lib/layouts/linguistics.module
43ec54fff04d45cb2e78e84ad6872fdcc5af7e04
[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 102
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 End
162
163 InsetLayout Flex:Subexample_Preamble
164         CopyStyle             Flex:Example_Preamble
165         LatexName             subexpreamble
166         LabelString           "Subex. Preamble"
167         AllowedInLayouts
168             Subexample
169         EndAllowedInLayouts
170 End
171
172
173 InsetLayout Flex:Example_Postamble
174         CopyStyle             Flex:Example_Preamble
175         LatexName             expostamble
176         LabelString           "Ex. Postamble"
177 End
178
179 InsetLayout Flex:Subexample_Postamble
180         CopyStyle             Flex:Example_Preamble
181         LatexName             subexpostamble
182         LabelString           "Subex. Postamble"
183         AllowedInLayouts
184             Subexample
185         EndAllowedInLayouts
186 End
187
188
189 #
190 # Interlinear Glosses
191 #
192
193 # Two-Line gloss with covington.sty
194 InsetLayout Flex:Interlinear_Gloss_(2_Lines)
195         LyXType               custom
196         LabelString           Gloss
197         LatexType             command
198         LatexName             digloss
199         Decoration            minimalistic
200         LabelFont
201           Size                Small
202         EndFont
203         MultiPar              true
204         CustomPars            false
205         ForcePlain            true
206         ParbreakIgnored       true
207         FreeSpacing           true
208         Requires              covington,csquotes
209         InToc                 true
210         ResetsFont            true
211         Argument 1
212                 LabelString   "Gloss options"
213                 MenuString    "Gloss Options|s"
214                 Tooltip       "Add digloss options here"
215         EndArgument
216         Argument post:1
217                 LabelString   "Sentence Comment"
218                 MenuString    "Sentence Comment"
219                 Tooltip       "Add an optional sentence comment here"
220         EndArgument
221         Argument post:2
222                 Decoration    conglomerate
223                 LabelString   "Interlinear Gloss"
224                 MenuString    "Interlinear Gloss"
225                 Tooltip       "Add the inter-linear gloss here"
226                 AutoInsert    true
227                 Mandatory     true
228                 FreeSpacing   true
229                 InsertOnNewline true
230         EndArgument
231         Argument post:3
232                 LabelString   "Gloss Comment"
233                 MenuString    "Gloss Comment"
234                 Tooltip       "Add an optional gloss comment here"
235         EndArgument
236         Argument post:4
237                 Decoration    conglomerate
238                 LabelString   "Translation"
239                 MenuString    "Gloss Translation"
240                 Tooltip       "Add a free translation for the gloss"
241                 AutoInsert    true
242                 Mandatory     true
243                 FreeSpacing   true
244                 InsertOnNewline true
245         EndArgument
246 End
247
248
249 # Three-Line gloss with covington.sty
250 InsetLayout Flex:Interlinear_Gloss_(3_Lines)
251         LyXType               custom
252         LabelString           Tri-Gloss
253         LatexType             command
254         LatexName             trigloss
255         Decoration            minimalistic
256         LabelFont
257           Size                Small
258         EndFont
259         MultiPar              true
260         CustomPars            false
261         ForcePlain            true
262         ParbreakIgnored       true
263         FreeSpacing           true
264         InToc                 true
265         Requires              covington,csquotes
266         ResetsFont            true
267         Argument 1
268                 LabelString   "Gloss options"
269                 MenuString    "Gloss Options|s"
270                 Tooltip       "Add trigloss options here"
271         EndArgument
272         Argument post:1
273                 LabelString   "Sentence Comment"
274                 MenuString    "Sentence Comment"
275                 Tooltip       "Add an optional sentence comment here"
276         EndArgument
277         Argument post:2
278                 Decoration    conglomerate
279                 LabelString   "Interlinear Gloss (1)"
280                 MenuString    "Interlinear Gloss (Line 1)|1"
281                 Tooltip       "Add the first inter-linear gloss line here"
282                 Mandatory     true
283                 AutoInsert    true
284                 FreeSpacing   true
285                 InsertOnNewline true
286         EndArgument
287         Argument post:3
288                 LabelString   "Gloss Comment (1)"
289                 MenuString    "Gloss Comment (Line 1)"
290                 Tooltip       "Add an optional gloss comment here"
291         EndArgument
292         Argument post:4
293                 Decoration    conglomerate
294                 LabelString   "Interlinear Gloss (2)"
295                 MenuString    "Interlinear Gloss (Line 2)|2"
296                 Tooltip       "Add the second inter-linear gloss line here"
297                 Mandatory     true
298                 AutoInsert    true
299                 FreeSpacing   true
300                 InsertOnNewline true
301         EndArgument
302         Argument post:5
303                 LabelString   "Gloss Comment (2)"
304                 MenuString    "Gloss Comment (Line 2)"
305                 Tooltip       "Add an optional gloss comment here"
306         EndArgument
307         Argument post:6
308                 Decoration    conglomerate
309                 LabelString   "Translation"
310                 MenuString    "Gloss Translation"
311                 Tooltip       "Add a translation for the glosse"
312                 Mandatory     true
313                 AutoInsert    true
314                 InsertOnNewline true
315         EndArgument
316 End
317
318
319 # A helper to group words in glosses
320 InsetLayout Flex:GroupGlossedWords
321         LyxType               charstyle
322         LabelString           Group
323         LeftDelim             {
324         RightDelim            }
325         ResetsFont            true
326         AllowedInInsets
327            Flex:Interlinear_Gloss_(2_Lines), Flex:Interlinear_Gloss_(2_Lines)@post:2,
328            Flex:Interlinear_Gloss_(3_Lines), Flex:Interlinear_Gloss_(3_Lines)@post:2,
329            Flex:Interlinear_Gloss_(3_Lines)@post:4
330         EndAllowedInInsets
331 End
332
333
334 #
335 # Trees
336 #
337
338 # Structure trees via the forest package
339 InsetLayout Flex:Structure_Tree
340         LyXType               custom
341         LabelString           Tree
342         LatexType             environment
343         LatexName             forest
344         Decoration            classic
345         LabelFont
346           Size                Small
347         EndFont
348         MultiPar              true
349         CustomPars            false
350         ParbreakIsNewline     true
351         FreeSpacing           true
352         Requires              forest
353         ResetsFont            true
354         PassThruChars         []
355         Preamble
356         % Load forest linguistics library, if available
357         \@ifpackagelater{forest}{2016/02/20}{%
358         \useforestlibrary*{linguistics}
359         }{}
360         EndPreamble
361     DocBookRenderAsImage  true
362 End
363
364
365 #
366 # Discourse Representation Structures
367 #
368
369 InsetLayout Flex:DRS
370         LyXType               custom
371         LabelString           DRS
372         MenuString            "Discourse Representation Structure|D"
373         LatexType             command
374         LatexName             drs
375         Decoration            classic
376         MultiPar              true
377         CustomPars            false
378         ParbreakIsNewline     true
379         FreeSpacing           true
380         Requires              drs
381         ResetsFont            true
382         Argument 1
383                 Decoration    conglomerate
384                 LabelString   "Referents"
385                 MenuString    "DRS Referents"
386                 Tooltip       "Add the DRS referents (universe) here"
387                 Mandatory     true
388                 AutoInsert    true
389         EndArgument
390 End
391
392
393 InsetLayout Flex:DRS*
394         CopyStyle             Flex:DRS
395         LabelString           DRS*
396         MenuString            "Discourse Representation Structure (unspaced)|u"
397         LatexName             drs*
398 End
399
400
401 InsetLayout Flex:IfThen-DRS
402         CopyStyle             Flex:DRS
403         LabelString           "If-Then DRS"
404         MenuString            "If-Then DRS"
405         LatexName             ifdrs
406         Argument post:1
407                 Decoration    classic
408                 LabelString   "Then-Referents"
409                 MenuString    "DRS Then-Referents"
410                 Tooltip       "Add the DRS then-referents (universe) here"
411                 Mandatory     true
412                 AutoInsert    true
413                 InsertOnNewline true
414         EndArgument
415         Argument post:2
416                 Decoration    classic
417                 LabelString   "Then-Conditions"
418                 MenuString    "DRS Then-Referents"
419                 Tooltip       "Add the DRS then-conditions here"
420                 Mandatory     true
421                 AutoInsert    true
422                 InsertOnNewline true
423         EndArgument
424 End
425
426
427 InsetLayout Flex:Cond-DRS
428         CopyStyle             Flex:DRS
429         LabelString           "Cond. DRS"
430         MenuString            "Conditional DRS"
431         LatexName             condrs
432         Argument post:1
433                 Decoration    classic
434                 LabelString   "Cond."
435                 MenuString    "DRS Condition"
436                 Tooltip       "Add the DRS condition here"
437                 Mandatory     true
438                 AutoInsert    true
439                 InsertOnNewline true
440         EndArgument
441         Argument post:2
442                 Decoration    classic
443                 LabelString   "Then-Referents"
444                 MenuString    "DRS Then-Referents"
445                 Tooltip       "Add the DRS then-referents (universe) here"
446                 Mandatory     true
447                 AutoInsert    true
448                 InsertOnNewline true
449         EndArgument
450         Argument post:3
451                 Decoration    classic
452                 LabelString   "Then-Conditions"
453                 MenuString    "DRS Then-Referents"
454                 Tooltip       "Add the DRS then-conditions here"
455                 Mandatory     true
456                 AutoInsert    true
457                 InsertOnNewline true
458         EndArgument
459 End
460
461
462 InsetLayout Flex:QDRS
463         CopyStyle             Flex:DRS
464         LabelString           "Dupl. Cond. DRS"
465         MenuString            "Duplex Condition DRS"
466         LatexName             qdrs
467         Argument post:1
468                 Decoration    classic
469                 LabelString   "Quant."
470                 MenuString    "DRS Quantifier"
471                 Tooltip       "Add the DRS duplex quantifier here"
472                 Mandatory     true
473                 AutoInsert    true
474                 InsertOnNewline true
475         EndArgument
476         Argument post:2
477                 Decoration    classic
478                 LabelString   "Quant. Var."
479                 MenuString    "DRS Quantifier Variable"
480                 Tooltip       "Add the DRS duplex quantifier variables here"
481                 Mandatory     true
482                 AutoInsert    true
483                 InsertOnNewline true
484         EndArgument
485         Argument post:3
486                 Decoration    classic
487                 LabelString   "Then-Referents"
488                 MenuString    "DRS Then-Referents"
489                 Tooltip       "Add the DRS then-referents (universe) here"
490                 Mandatory     true
491                 AutoInsert    true
492                 InsertOnNewline true
493         EndArgument
494         Argument post:4
495                 Decoration    classic
496                 LabelString   "Then-Conditions"
497                 MenuString    "DRS Then-Referents"
498                 Tooltip       "Add the DRS then-conditions here"
499                 Mandatory     true
500                 AutoInsert    true
501                 InsertOnNewline true
502         EndArgument
503         Requires              drs,pict2e
504 End
505
506
507 InsetLayout Flex:NegDRS
508         CopyStyle             Flex:DRS
509         LabelString           "Neg. DRS"
510         MenuString            "Negated DRS"
511         LatexName             negdrs
512 End
513
514
515 InsetLayout Flex:SDRS
516         CopyStyle             Flex:DRS
517         LabelString           "Sent. DRS"
518         MenuString            "DRS with Sentence above"
519         LatexName             sdrs
520         Argument 1
521                 Decoration    conglomerate
522                 LabelString   "Sentence"
523                 MenuString    "DRS Sentence"
524                 Tooltip       "Add the sentence here"
525                 Mandatory     true
526                 AutoInsert    true
527                 InsertOnNewline true
528         EndArgument
529         Argument 2
530                 Decoration    conglomerate
531                 LabelString   "Referents"
532                 MenuString    "DRS Referents"
533                 Tooltip       "Add the DRS referents (universe) here"
534                 Mandatory     true
535                 AutoInsert    true
536                 InsertOnNewline true
537         EndArgument
538 End
539
540
541 #
542 # Semantic Markup
543 #
544
545 InsetLayout Flex:Expression
546         LyxType               charstyle
547         LabelString           expr.
548         LatexType             command
549         LatexName             lexp
550         Requires              covington
551         Font
552           Shape               Italic
553         EndFont
554         InToc                 true
555         ResetsFont            true
556 End
557
558
559 InsetLayout Flex:Concepts
560         LyxType               charstyle
561         LabelString           concept
562         LatexType             command
563         LatexName             lcon
564         Requires              covington
565         Font
566           Shape               Smallcaps
567         EndFont
568         InToc                 true
569         ResetsFont            true
570 End
571
572
573 InsetLayout Flex:Meaning
574         LyxType               charstyle
575         LabelString           meaning
576         LatexType             command
577         LatexName             lmean
578         Requires              covington,csquotes
579         InToc                 true
580         ResetsFont            true
581 End
582
583
584 #
585 # OT Tableaux
586 #
587
588 OutlinerName tableau        "Tableaux" #no AddToToc
589
590 Float
591         Type                  tableau
592         GuiName               Tableau
593         Placement             tbp
594         Extension             otl
595         NumberWithin          none
596         Style                 plain
597         ListName              "List of Tableaux"
598         IsPredefined          false
599         UsesFloatPkg          true
600 End
601