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