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