]> git.lyx.org Git - lyx.git/blob - lib/layouts/linguistics.module
a2645cf631698e75a96c8be151bd513bbfe9b37d
[lyx.git] / lib / layouts / linguistics.module
1 #\DeclareLyXModule[covington.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 9
11
12 # single numbered example with covington.sty
13 Style Numbered_Example_(multiline)
14         LatexType             Environment
15         LatexName             example
16         NextNoIndent          1
17         LeftMargin            XExample:
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 End
34
35
36 # multiple numbered examples with covington.sty
37 Style Numbered_Examples_(consecutive)
38         CopyStyle             Numbered_Example_(multiline)
39         Margin                Static
40         LeftMargin            XExamples:
41         LatexType             Item_Environment
42         LatexName             examples
43         LabelString           "Examples:"
44 End
45
46
47 # multiple numbered example with covington.sty
48 Style Subexample
49         CopyStyle             Numbered_Example_(multiline)
50         Margin                Static
51         LatexType             Item_Environment
52         LatexName             subexample
53         LeftMargin            XSubexample:
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 # mandatory translation must be entered verbatim!
69 InsetLayout Custom:Glosse
70         LyXType               custom
71         LabelString           Glosse
72         LatexType             environment
73         LatexName             linggloss
74         Decoration            minimalistic
75         LabelFont
76           Size                Small
77         EndFont
78         MultiPar              true
79         CustomPars            false
80         ForcePlain            false
81         PassThru              true
82         FreeSpacing           true
83         Requires              covington
84         Preamble
85                 \@ifundefined{linggloss}{%
86                 \newenvironment{linggloss}[1]{%
87                         \gll #1}
88                 {\glend}}{}
89         EndPreamble
90 End
91
92
93 # glosse (3 lines) with covington.sty
94 # mandatory translation must be entered verbatim!
95 InsetLayout Custom:Tri-Glosse
96         LyXType               custom
97         LabelString           Tri-Glosse
98         LatexType             environment
99         LatexName             lingglosss
100         Decoration            minimalistic
101         LabelFont
102           Size                Small
103         EndFont
104         MultiPar              true
105         PassThru              true
106         FreeSpacing           true
107         Requires              covington
108         Preamble
109                 \@ifundefined{lingglosss}{%
110                 \newenvironment{lingglosss}[1]{%
111                         \glll #1}
112                 {\glend}}{}
113         EndPreamble
114 End
115
116
117 # Some semantik markup for Semantics
118 InsetLayout CharStyle:Expression
119         LyxType               charstyle
120         LabelString           expr.
121         LatexType             command
122         LatexName             lingexpr
123         Font
124           Shape               Italic
125         EndFont
126         Preamble
127                 \newcommand{\lingexpr}[1]{\emph{#1}}
128         EndPreamble
129 End
130
131
132 InsetLayout CharStyle:Concepts
133         LyxType               charstyle
134         LabelString           concept
135         LatexType             command
136         LatexName             lingconcept
137         Font
138           Shape               Smallcaps
139         EndFont
140         Preamble
141                 \newcommand{\lingconcept}[1]{\textsc{#1}}
142         EndPreamble
143 End
144
145
146 InsetLayout CharStyle:Meaning
147         LyxType               charstyle
148         LabelString           meaning
149         LatexType             command
150         LatexName             lingmeaning
151         Requires              csquotes
152         Preamble
153                 \newcommand{\lingmeaning}[1]{\enquote*{#1}}
154         EndPreamble
155 End
156
157
158 # Tableaux for Optimality Theory
159 Float
160         Type                  tableau
161         GuiName               Tableau
162         Placement             tbp
163         Extension             otl
164         NumberWithin          none
165         Style                 plain
166         ListName              "List of Tableaux"
167         LaTeXBuiltin          false
168 End
169
170 InsetLayout tableau
171         LabelString           Tableau
172         LabelFont
173           Color               collapsable
174           Size                Small
175         EndFont
176         MultiPar              true
177 End