]> git.lyx.org Git - lyx.git/blob - lib/layouts/linguistics.module
Update layout files to format 58.
[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 58
11
12 # single numbered example with covington.sty
13 Style Numbered_Example_(multiline)
14         LatexType             Environment
15         LatexName             example
16         NextNoIndent          1
17         Margin                Dynamic
18         LabelSep              xx
19         ParSkip               0.0
20         ItemSep               0.2
21         TopSep                0.7
22         BottomSep             0.7
23         ParSep                0.3
24         Align                 Block
25         AlignPossible         Block, Left
26         LabelType             Static
27         LabelString           "Example:"
28         LabelFont
29                 Shape         Italic
30                 Color         Blue
31         EndFont
32         Requires              covington
33         Category              Linguistics
34 End
35
36
37 # multiple numbered examples with covington.sty
38 Style Numbered_Examples_(consecutive)
39         CopyStyle             Numbered_Example_(multiline)
40         LatexType             Item_Environment
41         LatexName             examples
42         LabelString           "Examples:"
43         Argument item:1
44                 LabelString   "Custom Numbering|s"
45                 Tooltip       "Customize the numeration"
46         EndArgument
47 End
48
49
50 # multiple numbered example with covington.sty
51 Style Subexample
52         CopyStyle             Numbered_Examples_(consecutive)
53         LatexName             subexample
54         LabelString           "Subexample:"
55         Requires              covington,enumitem
56         Preamble
57                 \newenvironment{subexample}{%
58                         \begin{example}\begin{enumerate}[leftmargin=1.7em]
59                         \renewcommand\theenumi{\alph{enumi}}
60                         \renewcommand\labelenumi{(\theenumi)}
61                         \renewcommand\p@enumi{\theequation\,}}%
62                         {\end{enumerate}\end{example}}
63         EndPreamble
64 End
65
66
67 # glosse (2 lines) with covington.sty
68 InsetLayout Flex:Glosse
69         LyXType               custom
70         LabelString           Glosse
71         LatexType             environment
72         LatexName             linggloss
73         Decoration            minimalistic
74         LabelFont
75           Size                Small
76         EndFont
77         MultiPar              true
78         CustomPars            false
79         ForcePlain            true
80         ParbreakIsNewline     true
81         FreeSpacing           true
82         Requires              covington
83         Preamble
84                 \def\glosstr{}
85                 \@ifundefined{linggloss}{%
86                 \newenvironment{linggloss}[2][]{
87                         \def\glosstr{\glt #1}%
88                         \gll #2}
89                 {\glosstr\glend}}{}
90         EndPreamble
91         InToc                 true
92         ResetsFont            true
93         Argument 1
94                 Decoration    conglomerate
95                 LabelString   "Translation"
96                 MenuString    "Glosse Translation|s"
97                 Tooltip       "Add a translation for the glosse"
98         EndArgument
99 End
100
101
102 # glosse (3 lines) with covington.sty
103 InsetLayout Flex:Tri-Glosse
104         LyXType               custom
105         LabelString           Tri-Glosse
106         LatexType             environment
107         LatexName             lingglosss
108         Decoration            minimalistic
109         LabelFont
110           Size                Small
111         EndFont
112         MultiPar              true
113         CustomPars            false
114         ForcePlain            true
115         ParbreakIsNewline     true
116         FreeSpacing           true
117         InToc                 true
118         Requires              covington
119         Preamble
120                 \def\glosstr{}
121                 \@ifundefined{lingglosss}{%
122                 \newenvironment{lingglosss}[2][]{
123                         \def\glosstr{\glt #1}%
124                         \glll #2}
125                 {\glosstr\glend}}{}
126         EndPreamble
127         ResetsFont            true
128         Argument 1
129                 Decoration    conglomerate
130                 LabelString   "Translation"
131                 MenuString    "Glosse Translation|s"
132                 Tooltip       "Add a translation for the glosse"
133         EndArgument
134 End
135
136
137 # Structure trees via the forest package
138 InsetLayout Flex:Structure_Tree
139         LyXType               custom
140         LabelString           Tree
141         LatexType             environment
142         LatexName             forest
143         Decoration            classic
144         LabelFont
145           Size                Small
146         EndFont
147         MultiPar              true
148         CustomPars            false
149         ParbreakIsNewline     true
150         FreeSpacing           true
151         Requires              forest
152         ResetsFont            true
153         PassThruChars         []
154 End
155
156
157 # Some semantik markup for Semantics
158 InsetLayout Flex:Expression
159         LyxType               charstyle
160         LabelString           expr.
161         LatexType             command
162         LatexName             lingexpr
163         Font
164           Shape               Italic
165         EndFont
166         Preamble
167                 \newcommand{\lingexpr}[1]{\emph{#1}}
168         EndPreamble
169         InToc                 true
170         ResetsFont true
171 End
172
173
174 InsetLayout Flex:Concepts
175         LyxType               charstyle
176         LabelString           concept
177         LatexType             command
178         LatexName             lingconcept
179         Font
180           Shape               Smallcaps
181         EndFont
182         Preamble
183                 \newcommand{\lingconcept}[1]{\textsc{#1}}
184         EndPreamble
185         InToc                 true
186         ResetsFont true
187 End
188
189
190 InsetLayout Flex:Meaning
191         LyxType               charstyle
192         LabelString           meaning
193         LatexType             command
194         LatexName             lingmeaning
195         Requires              csquotes
196         Preamble
197                 \newcommand{\lingmeaning}[1]{\enquote*{#1}}
198         EndPreamble
199         InToc                 true
200         ResetsFont true
201 End
202
203
204 # A helper to group words in Glosses
205 InsetLayout Flex:GroupGlossedWords
206         LyxType               charstyle
207         LabelString           Group
208         LeftDelim             {
209         RightDelim            }
210         ResetsFont            true
211 End
212
213
214 # Tableaux for Optimality Theory
215 Float
216         Type                  tableau
217         GuiName               Tableau
218         Placement             tbp
219         Extension             otl
220         NumberWithin          none
221         Style                 plain
222         ListName              "List of Tableaux"
223         IsPredefined          false
224         UsesFloatPkg          true
225 End
226