]> git.lyx.org Git - lyx.git/blob - lib/layouts/linguistics.module
f80e41937e1d39c8cef48140a2e413430eab211a
[lyx.git] / lib / layouts / linguistics.module
1 #\DeclareLyXModule[covington.sty]{Defines some special environments useful for linguistics (numbered examples, glosses, semantic markup).}{Linguistics}
2
3 # Author: Jürgen Spitzmüller <spitz@lyx.org>
4
5 Format 5
6
7 # single numbered example with covington.sty
8 Style Numbered_Example_(multiline)
9         LatexType             Environment
10         LatexName             example
11         NextNoIndent          1
12         LeftMargin            XExample:
13         LabelSep              xx
14         ParSkip               0.0
15         ItemSep               0.2
16         TopSep                0.7
17         BottomSep             0.7
18         ParSep                0.3
19         Align                 Block
20         AlignPossible         Block, Left
21         LabelType             Static
22         LabelString           "Example:"
23         LabelFont
24                 Shape         Italic
25                 Color         Blue
26         EndFont
27         Preamble
28                 \usepackage{covington}
29         EndPreamble
30 End
31
32
33 # multiple numbered examples with covington.sty
34 Style Numbered_Examples_(consecutive)
35         CopyStyle             Numbered_Example_(multiline)
36         Margin                Static
37         LeftMargin            XExamples:
38         LatexType             Item_Environment
39         LatexName             examples
40         LabelString           "Examples:"
41 End
42
43
44 # multiple numbered example with covington.sty
45 Style Subexample
46         CopyStyle             Numbered_Example_(multiline)
47         Margin                Static
48         LatexType             Item_Environment
49         LatexName             subexample
50         LeftMargin            XSubexample:
51         LabelString           "Subexample:"
52         Preamble
53                 \usepackage{covington}
54                 \usepackage{enumitem}
55                 \newenvironment{subexample}{%
56                         \begin{example}\begin{enumerate}[leftmargin=1.7em]
57                         \renewcommand\theenumi{\alph{enumi}}
58                         \renewcommand\labelenumi{(\theenumi)}
59                         \renewcommand\p@enumi{\theequation\,}}%
60                         {\end{enumerate}\end{example}}
61         EndPreamble
62 End
63
64
65 # glosse (2 lines) with covington.sty
66 # mandatory translation must be entered verbatim!
67 InsetLayout Custom:Glosse
68         LyXType               custom
69         LabelString           Glosse
70         LatexType             environment
71         LatexName             linggloss
72         Decoration            minimalistic
73         LabelFont
74           Size                Small
75         EndFont
76         MultiPar              true
77         PassThru              true
78         FreeSpacing           true
79         Preamble
80                 \usepackage{covington}
81                 \@ifundefined{linggloss}{%
82                 \newenvironment{linggloss}[1]{%
83                         \gll #1}
84                 {\glend}}{}
85         EndPreamble
86 End
87
88
89 # glosse (3 lines) with covington.sty
90 # mandatory translation must be entered verbatim!
91 InsetLayout Custom:Tri-Glosse
92         LyXType               custom
93         LabelString           Tri-Glosse
94         LatexType             environment
95         LatexName             lingglosss
96         Decoration            minimalistic
97         LabelFont
98           Size                Small
99         EndFont
100         MultiPar              true
101         PassThru              true
102         FreeSpacing           true
103         Preamble
104                 \usepackage{covington}
105                 \@ifundefined{lingglosss}{%
106                 \newenvironment{lingglosss}[1]{%
107                         \glll #1}
108                 {\glend}}{}
109         EndPreamble
110 End
111
112
113 InsetLayout CharStyle:Expression
114         LyxType               charstyle
115         LabelString           expr.
116         LatexType             command
117         LatexName             lingexpr
118         Font
119           Shape               Italic
120         EndFont
121         Preamble
122                 \newcommand{\lingexpr}[1]{\emph{#1}}
123         EndPreamble
124 End
125
126
127 InsetLayout CharStyle:Concepts
128         LyxType               charstyle
129         LabelString           concept
130         LatexType             command
131         LatexName             lingconcept
132         Font
133           Shape               Smallcaps
134         EndFont
135         Preamble
136                 \newcommand{\lingconcept}[1]{\textsc{#1}}
137         EndPreamble
138 End
139
140
141 InsetLayout CharStyle:Meaning
142         LyxType               charstyle
143         LabelString           meaning
144         LatexType             command
145         LatexName             lingmeaning
146         Preamble
147                 \usepackage{csquotes}
148                 \newcommand{\lingmeaning}[1]{\enquote*{#1}}
149         EndPreamble
150 End