]> git.lyx.org Git - lyx.git/blob - lib/layouts/linguistics.module
Add note.
[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 8
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         PassThru              true
80         FreeSpacing           true
81         Requires              covington
82         Preamble
83                 \@ifundefined{linggloss}{%
84                 \newenvironment{linggloss}[1]{%
85                         \gll #1}
86                 {\glend}}{}
87         EndPreamble
88 End
89
90
91 # glosse (3 lines) with covington.sty
92 # mandatory translation must be entered verbatim!
93 InsetLayout Custom:Tri-Glosse
94         LyXType               custom
95         LabelString           Tri-Glosse
96         LatexType             environment
97         LatexName             lingglosss
98         Decoration            minimalistic
99         LabelFont
100           Size                Small
101         EndFont
102         MultiPar              true
103         PassThru              true
104         FreeSpacing           true
105         Requires              covington
106         Preamble
107                 \@ifundefined{lingglosss}{%
108                 \newenvironment{lingglosss}[1]{%
109                         \glll #1}
110                 {\glend}}{}
111         EndPreamble
112 End
113
114
115 # Some semantik markup for Semantics
116 InsetLayout CharStyle:Expression
117         LyxType               charstyle
118         LabelString           expr.
119         LatexType             command
120         LatexName             lingexpr
121         Font
122           Shape               Italic
123         EndFont
124         Preamble
125                 \newcommand{\lingexpr}[1]{\emph{#1}}
126         EndPreamble
127 End
128
129
130 InsetLayout CharStyle:Concepts
131         LyxType               charstyle
132         LabelString           concept
133         LatexType             command
134         LatexName             lingconcept
135         Font
136           Shape               Smallcaps
137         EndFont
138         Preamble
139                 \newcommand{\lingconcept}[1]{\textsc{#1}}
140         EndPreamble
141 End
142
143
144 InsetLayout CharStyle:Meaning
145         LyxType               charstyle
146         LabelString           meaning
147         LatexType             command
148         LatexName             lingmeaning
149         Requires              csquotes
150         Preamble
151                 \newcommand{\lingmeaning}[1]{\enquote*{#1}}
152         EndPreamble
153 End
154
155
156 # Tableaux for Optimality Theory
157 Float
158         Type                  tableau
159         GuiName               Tableau
160         Placement             tbp
161         Extension             otl
162         NumberWithin          none
163         Style                 plain
164         ListName              "List of Tableaux"
165         LaTeXBuiltin          false
166 End
167
168 InsetLayout tableau
169         LabelString           Tableau
170         LabelFont
171           Color               collapsable
172           Size                Small
173         EndFont
174         MultiPar              true
175 End