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