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