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