]> git.lyx.org Git - lyx.git/blob - lib/layouts/linguistics.module
Added IBM Plex fonts to lyx-GUI
[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 69
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         \@ifundefined{covexample}{%
59             \newenvironment{covexample}{\begin{example}}{\end{example}}%
60         }{}
61         EndPreamble
62         Category              Linguistics
63 End
64
65
66 # multiple numbered examples with covington.sty
67 Style Numbered_Examples_(consecutive)
68         CopyStyle             Numbered_Example_(multiline)
69         LatexType             Item_Environment
70         LatexName             covexamples
71         LabelType             Enumerate
72         LabelCounter          "example"
73         ResumeCounter         true
74         Argument listpreamble:1
75                 LabelString    "List preamble"
76                 MenuString     "List Preamble"
77                 Tooltip        "LaTeX code to be inserted before the first item"
78                 PassThru       1
79                 Font
80                         Family typewriter
81                         Color latex
82                 EndFont
83         EndArgument
84         Argument item:1
85                 LabelString   "Custom Numbering|s"
86                 Tooltip       "Customize the numeration"
87         EndArgument
88         Preamble
89         % Backwards compatibility with covington < 1.1
90         % This code can be removed eventually
91         \@ifundefined{covexamples}{%
92             \newenvironment{covexamples}{\begin{examples}}{\end{examples}}%
93         }{}
94         EndPreamble
95 End
96
97
98 # multiple numbered example with covington.sty
99 Style Subexample
100         CopyStyle             Numbered_Examples_(consecutive)
101         LatexName             subexample
102         LabelCounter          "subexample"
103         StepMasterCounter     true
104         Requires              covington,enumitem
105         Preamble
106                 \newenvironment{subexample}{%
107                         \begin{example}\begin{enumerate}[leftmargin=1.7em]
108                         \renewcommand\theenumi{\alph{enumi}}
109                         \renewcommand\labelenumi{(\theenumi)}
110                         \renewcommand\p@enumi{\theequation\,}}%
111                         {\end{enumerate}\end{example}}
112         EndPreamble
113 End
114
115
116 # glosse (2 lines) with covington.sty
117 InsetLayout Flex:Glosse
118         LyXType               custom
119         LabelString           Glosse
120         LatexType             environment
121         LatexName             linggloss
122         Decoration            minimalistic
123         LabelFont
124           Size                Small
125         EndFont
126         MultiPar              true
127         CustomPars            false
128         ForcePlain            true
129         ParbreakIsNewline     true
130         FreeSpacing           true
131         Requires              covington
132         Preamble
133                 \def\glosstr{}
134                 \@ifundefined{linggloss}{%
135                 \newenvironment{linggloss}[2][]{
136                         \def\glosstr{\glt #1}%
137                         \gll #2}
138                 {\glosstr\glend}}{}
139         EndPreamble
140         InToc                 true
141         ResetsFont            true
142         Argument 1
143                 Decoration    conglomerate
144                 LabelString   "Translation"
145                 MenuString    "Glosse Translation|s"
146                 Tooltip       "Add a translation for the glosse"
147         EndArgument
148 End
149
150
151 # glosse (3 lines) with covington.sty
152 InsetLayout Flex:Tri-Glosse
153         LyXType               custom
154         LabelString           Tri-Glosse
155         LatexType             environment
156         LatexName             lingglosss
157         Decoration            minimalistic
158         LabelFont
159           Size                Small
160         EndFont
161         MultiPar              true
162         CustomPars            false
163         ForcePlain            true
164         ParbreakIsNewline     true
165         FreeSpacing           true
166         InToc                 true
167         Requires              covington
168         Preamble
169                 \def\glosstr{}
170                 \@ifundefined{lingglosss}{%
171                 \newenvironment{lingglosss}[2][]{
172                         \def\glosstr{\glt #1}%
173                         \glll #2}
174                 {\glosstr\glend}}{}
175         EndPreamble
176         ResetsFont            true
177         Argument 1
178                 Decoration    conglomerate
179                 LabelString   "Translation"
180                 MenuString    "Glosse Translation|s"
181                 Tooltip       "Add a translation for the glosse"
182         EndArgument
183 End
184
185
186 # Structure trees via the forest package
187 InsetLayout Flex:Structure_Tree
188         LyXType               custom
189         LabelString           Tree
190         LatexType             environment
191         LatexName             forest
192         Decoration            classic
193         LabelFont
194           Size                Small
195         EndFont
196         MultiPar              true
197         CustomPars            false
198         ParbreakIsNewline     true
199         FreeSpacing           true
200         Requires              forest
201         ResetsFont            true
202         PassThruChars         []
203         Preamble
204         % Load forest linguistics library, if available
205         \@ifpackagelater{forest}{2016/02/20}{%
206         \useforestlibrary*{linguistics}
207         }{}
208         EndPreamble
209 End
210
211
212 # Some semantik markup for Semantics
213 InsetLayout Flex:Expression
214         LyxType               charstyle
215         LabelString           expr.
216         LatexType             command
217         LatexName             lingexpr
218         Font
219           Shape               Italic
220         EndFont
221         Preamble
222                 \newcommand{\lingexpr}[1]{\emph{#1}}
223         EndPreamble
224         InToc                 true
225         ResetsFont            true
226 End
227
228
229 InsetLayout Flex:Concepts
230         LyxType               charstyle
231         LabelString           concept
232         LatexType             command
233         LatexName             lingconcept
234         Font
235           Shape               Smallcaps
236         EndFont
237         Preamble
238                 \newcommand{\lingconcept}[1]{\textsc{#1}}
239         EndPreamble
240         InToc                 true
241         ResetsFont            true
242 End
243
244
245 InsetLayout Flex:Meaning
246         LyxType               charstyle
247         LabelString           meaning
248         LatexType             command
249         LatexName             lingmeaning
250         Requires              csquotes
251         Preamble
252                 \newcommand{\lingmeaning}[1]{\enquote*{#1}}
253         EndPreamble
254         InToc                 true
255         ResetsFont            true
256 End
257
258
259 # A helper to group words in Glosses
260 InsetLayout Flex:GroupGlossedWords
261         LyxType               charstyle
262         LabelString           Group
263         LeftDelim             {
264         RightDelim            }
265         ResetsFont            true
266 End
267
268
269 # Tableaux for Optimality Theory
270 OutlinerName tableau        "Tableaux" #no AddToToc
271
272 Float
273         Type                  tableau
274         GuiName               Tableau
275         Placement             tbp
276         Extension             otl
277         NumberWithin          none
278         Style                 plain
279         ListName              "List of Tableaux"
280         IsPredefined          false
281         UsesFloatPkg          true
282 End
283