]> git.lyx.org Git - lyx.git/blob - lib/layouts/linguistics.module
bbca7aa380d6646e6dfe34908eea03e3eac25951
[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).
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 InsetLayout CharStyle:Expression
115         LyxType               charstyle
116         LabelString           expr.
117         LatexType             command
118         LatexName             lingexpr
119         Font
120           Shape               Italic
121         EndFont
122         Preamble
123                 \newcommand{\lingexpr}[1]{\emph{#1}}
124         EndPreamble
125 End
126
127
128 InsetLayout CharStyle:Concepts
129         LyxType               charstyle
130         LabelString           concept
131         LatexType             command
132         LatexName             lingconcept
133         Font
134           Shape               Smallcaps
135         EndFont
136         Preamble
137                 \newcommand{\lingconcept}[1]{\textsc{#1}}
138         EndPreamble
139 End
140
141
142 InsetLayout CharStyle:Meaning
143         LyxType               charstyle
144         LabelString           meaning
145         LatexType             command
146         LatexName             lingmeaning
147         Requires              csquotes
148         Preamble
149                 \newcommand{\lingmeaning}[1]{\enquote*{#1}}
150         EndPreamble
151 End