]> git.lyx.org Git - lyx.git/blob - lib/layouts/linguistics.module
specify a background color for listings and allow the user to change it, patch by...
[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 #DescriptionEnd
6
7 # Author: Jürgen Spitzmüller <spitz@lyx.org>
8
9 Format 8
10
11 # single numbered example with covington.sty
12 Style Numbered_Example_(multiline)
13         LatexType             Environment
14         LatexName             example
15         NextNoIndent          1
16         LeftMargin            XExample:
17         LabelSep              xx
18         ParSkip               0.0
19         ItemSep               0.2
20         TopSep                0.7
21         BottomSep             0.7
22         ParSep                0.3
23         Align                 Block
24         AlignPossible         Block, Left
25         LabelType             Static
26         LabelString           "Example:"
27         LabelFont
28                 Shape         Italic
29                 Color         Blue
30         EndFont
31         Requires              covington
32 End
33
34
35 # multiple numbered examples with covington.sty
36 Style Numbered_Examples_(consecutive)
37         CopyStyle             Numbered_Example_(multiline)
38         Margin                Static
39         LeftMargin            XExamples:
40         LatexType             Item_Environment
41         LatexName             examples
42         LabelString           "Examples:"
43 End
44
45
46 # multiple numbered example with covington.sty
47 Style Subexample
48         CopyStyle             Numbered_Example_(multiline)
49         Margin                Static
50         LatexType             Item_Environment
51         LatexName             subexample
52         LeftMargin            XSubexample:
53         LabelString           "Subexample:"
54         Requires              covington,enumitem
55         Preamble
56                 \newenvironment{subexample}{%
57                         \begin{example}\begin{enumerate}[leftmargin=1.7em]
58                         \renewcommand\theenumi{\alph{enumi}}
59                         \renewcommand\labelenumi{(\theenumi)}
60                         \renewcommand\p@enumi{\theequation\,}}%
61                         {\end{enumerate}\end{example}}
62         EndPreamble
63 End
64
65
66 # glosse (2 lines) with covington.sty
67 # mandatory translation must be entered verbatim!
68 InsetLayout Custom: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         PassThru              true
79         FreeSpacing           true
80         Requires              covington
81         Preamble
82                 \@ifundefined{linggloss}{%
83                 \newenvironment{linggloss}[1]{%
84                         \gll #1}
85                 {\glend}}{}
86         EndPreamble
87 End
88
89
90 # glosse (3 lines) with covington.sty
91 # mandatory translation must be entered verbatim!
92 InsetLayout Custom:Tri-Glosse
93         LyXType               custom
94         LabelString           Tri-Glosse
95         LatexType             environment
96         LatexName             lingglosss
97         Decoration            minimalistic
98         LabelFont
99           Size                Small
100         EndFont
101         MultiPar              true
102         PassThru              true
103         FreeSpacing           true
104         Requires              covington
105         Preamble
106                 \@ifundefined{lingglosss}{%
107                 \newenvironment{lingglosss}[1]{%
108                         \glll #1}
109                 {\glend}}{}
110         EndPreamble
111 End
112
113
114 # Some semantik markup for Semantics
115 InsetLayout CharStyle:Expression
116         LyxType               charstyle
117         LabelString           expr.
118         LatexType             command
119         LatexName             lingexpr
120         Font
121           Shape               Italic
122         EndFont
123         Preamble
124                 \newcommand{\lingexpr}[1]{\emph{#1}}
125         EndPreamble
126 End
127
128
129 InsetLayout CharStyle:Concepts
130         LyxType               charstyle
131         LabelString           concept
132         LatexType             command
133         LatexName             lingconcept
134         Font
135           Shape               Smallcaps
136         EndFont
137         Preamble
138                 \newcommand{\lingconcept}[1]{\textsc{#1}}
139         EndPreamble
140 End
141
142
143 InsetLayout CharStyle:Meaning
144         LyxType               charstyle
145         LabelString           meaning
146         LatexType             command
147         LatexName             lingmeaning
148         Requires              csquotes
149         Preamble
150                 \newcommand{\lingmeaning}[1]{\enquote*{#1}}
151         EndPreamble
152 End
153
154
155 # Tableaux for Optimality Theory
156 Float
157         Type                  tableau
158         GuiName               Tableau
159         Placement             tbp
160         Extension             otl
161         NumberWithin          none
162         Style                 plain
163         ListName              "List of Tableaux"
164         LaTeXBuiltin          false
165 End
166
167 InsetLayout tableau
168         LabelString           Tableau
169         LabelFont
170           Color               collapsable
171           Size                Small
172         EndFont
173         MultiPar              true
174 End