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