]> git.lyx.org Git - lyx.git/blob - lib/layouts/linguistics.module
New layout for aastex6.cls. Fixes #10027.
[lyx.git] / lib / layouts / linguistics.module
1 #\DeclareLyXModule[covington.sty,elocalloc.sty,enumitem.sty,forest.sty,pgfopts.sty,trimspaces.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 60
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         Preamble
155         % Load forest linguistics library, if available
156         \@ifpackagelater{forest}{2016/02/20}{%
157         \useforestlibrary*{linguistics}
158         }{}
159         EndPreamble
160 End
161
162
163 # Some semantik markup for Semantics
164 InsetLayout Flex:Expression
165         LyxType               charstyle
166         LabelString           expr.
167         LatexType             command
168         LatexName             lingexpr
169         Font
170           Shape               Italic
171         EndFont
172         Preamble
173                 \newcommand{\lingexpr}[1]{\emph{#1}}
174         EndPreamble
175         InToc                 true
176         ResetsFont            true
177 End
178
179
180 InsetLayout Flex:Concepts
181         LyxType               charstyle
182         LabelString           concept
183         LatexType             command
184         LatexName             lingconcept
185         Font
186           Shape               Smallcaps
187         EndFont
188         Preamble
189                 \newcommand{\lingconcept}[1]{\textsc{#1}}
190         EndPreamble
191         InToc                 true
192         ResetsFont            true
193 End
194
195
196 InsetLayout Flex:Meaning
197         LyxType               charstyle
198         LabelString           meaning
199         LatexType             command
200         LatexName             lingmeaning
201         Requires              csquotes
202         Preamble
203                 \newcommand{\lingmeaning}[1]{\enquote*{#1}}
204         EndPreamble
205         InToc                 true
206         ResetsFont            true
207 End
208
209
210 # A helper to group words in Glosses
211 InsetLayout Flex:GroupGlossedWords
212         LyxType               charstyle
213         LabelString           Group
214         LeftDelim             {
215         RightDelim            }
216         ResetsFont            true
217 End
218
219
220 # Tableaux for Optimality Theory
221 Float
222         Type                  tableau
223         GuiName               Tableau
224         Placement             tbp
225         Extension             otl
226         NumberWithin          none
227         Style                 plain
228         ListName              "List of Tableaux"
229         IsPredefined          false
230         UsesFloatPkg          true
231 End
232