]> git.lyx.org Git - lyx.git/blob - lib/layouts/linguistics.module
* lib/layouts/chess.layout:
[lyx.git] / lib / layouts / linguistics.module
1 #\DeclareLyXModule{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 6
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         Requires              covington
28 End
29
30
31 # multiple numbered examples with covington.sty
32 Style Numbered_Examples_(consecutive)
33         CopyStyle             Numbered_Example_(multiline)
34         Margin                Static
35         LeftMargin            XExamples:
36         LatexType             Item_Environment
37         LatexName             examples
38         LabelString           "Examples:"
39 End
40
41
42 # multiple numbered example with covington.sty
43 Style Subexample
44         CopyStyle             Numbered_Example_(multiline)
45         Margin                Static
46         LatexType             Item_Environment
47         LatexName             subexample
48         LeftMargin            XSubexample:
49         LabelString           "Subexample:"
50         Requires              covington,enumitem
51         Preamble
52                 \newenvironment{subexample}{%
53                         \begin{example}\begin{enumerate}[leftmargin=1.7em]
54                         \renewcommand\theenumi{\alph{enumi}}
55                         \renewcommand\labelenumi{(\theenumi)}
56                         \renewcommand\p@enumi{\theequation\,}}%
57                         {\end{enumerate}\end{example}}
58         EndPreamble
59 End
60
61
62 # glosse (2 lines) with covington.sty
63 # mandatory translation must be entered verbatim!
64 InsetLayout Custom:Glosse
65         LyXType               custom
66         LabelString           Glosse
67         LatexType             environment
68         LatexName             linggloss
69         Decoration            minimalistic
70         LabelFont
71           Size                Small
72         EndFont
73         MultiPar              true
74         PassThru              true
75         FreeSpacing           true
76         Requires              covington
77         Preamble
78                 \@ifundefined{linggloss}{%
79                 \newenvironment{linggloss}[1]{%
80                         \gll #1}
81                 {\glend}}{}
82         EndPreamble
83 End
84
85
86 # glosse (3 lines) with covington.sty
87 # mandatory translation must be entered verbatim!
88 InsetLayout Custom:Tri-Glosse
89         LyXType               custom
90         LabelString           Tri-Glosse
91         LatexType             environment
92         LatexName             lingglosss
93         Decoration            minimalistic
94         LabelFont
95           Size                Small
96         EndFont
97         MultiPar              true
98         PassThru              true
99         FreeSpacing           true
100         Requires              covington
101         Preamble
102                 \@ifundefined{lingglosss}{%
103                 \newenvironment{lingglosss}[1]{%
104                         \glll #1}
105                 {\glend}}{}
106         EndPreamble
107 End
108
109
110 InsetLayout CharStyle:Expression
111         LyxType               charstyle
112         LabelString           expr.
113         LatexType             command
114         LatexName             lingexpr
115         Font
116           Shape               Italic
117         EndFont
118         Preamble
119                 \newcommand{\lingexpr}[1]{\emph{#1}}
120         EndPreamble
121 End
122
123
124 InsetLayout CharStyle:Concepts
125         LyxType               charstyle
126         LabelString           concept
127         LatexType             command
128         LatexName             lingconcept
129         Font
130           Shape               Smallcaps
131         EndFont
132         Preamble
133                 \newcommand{\lingconcept}[1]{\textsc{#1}}
134         EndPreamble
135 End
136
137
138 InsetLayout CharStyle:Meaning
139         LyxType               charstyle
140         LabelString           meaning
141         LatexType             command
142         LatexName             lingmeaning
143         Requires              csquotes
144         Preamble
145                 \newcommand{\lingmeaning}[1]{\enquote*{#1}}
146         EndPreamble
147 End