]> git.lyx.org Git - lyx.git/blob - lib/layouts/scrlttr2.layout
DocBook: implement title for layouts that previously missed it.
[lyx.git] / lib / layouts / scrlttr2.layout
1 #% Do not delete the line below; configure depends on this
2 #  \DeclareLaTeXClass{KOMA-Script Letter (V. 2)}
3 #  \DeclareCategory{Letters}
4 # KOMA scrlettr2 textclass definition file.
5 # Juergen Spitzmueller <spitz@lyx.org>, 2003/2/17.
6 # Uwe Stöhr <uwestoehr@web.de>, 2008/2/03.
7
8 # TODO: DocBook doesn't support several letters in the same file.
9 # DocBook design note: there are several ways to implement sender data, this class does it in 
10 # another way that the other letters. Usually, there is a large <address> tag with author 
11 # information in <info>, but there is no possibility to include a URL in this case. 
12 # Therefore, here, we use a <author> in <info>, having an <address>. <author> allows a URL
13 # (<uri>) and an address. However, phone and fax numbers should be put in <address>, they 
14 # are not allowed directly in <author>... The generated DocBook will not be valid due to this!
15
16 Format 85
17 Provides subscript 1
18
19 Style Standard
20         Category              MainText
21         LatexName             dummy
22         ParSep                0.4
23         AlignPossible         Block, Left, Right, Center
24         ParIndent             MM
25         DocBookTag            para
26 End
27
28 Input stdlists.inc
29 Input stdlayouts.inc
30 Input stdcounters.inc
31 Input stdinsets.inc
32
33 Style Description
34         LabelFont
35           Family              Sans
36         EndFont
37 End
38
39
40 Style Labeling
41         CopyStyle             List
42         LatexName             labeling
43         # overwrite the preamble code definition
44         Preamble
45         EndPreamble
46 End
47
48
49 Style List
50         Obsoletedby           Labeling
51 End
52
53
54 Preamble
55         \newif\ifletterclosed
56 EndPreamble
57
58
59 Style Address
60         LatexType             Command
61         LatexName             begin
62         LatexParam            {letter}
63         Preamble
64                 \AtEndDocument{\ifletterclosed\else\end{letter}\fi}
65         EndPreamble
66         KeepEmpty             1
67         LeftMargin            xxxxxxxxxxxx::xx
68         LabelSep              xx
69         TopSep                1.5
70         BottomSep             1.5
71         ParSep                1.5
72         Align                 Left
73         LabelType             Static
74         LabelString           "Address:"
75         LabelFont
76           Series              Bold
77           Shape               Italic
78           Size                Small
79           Color               Blue
80         EndFont
81     DocBookTag         NONE
82     DocBookWrapperTag  address
83     DocBookWrapperMergeWithPrevious  true
84     DocBookInInfo      always
85 End
86
87
88 # Start new letter
89 # Not supported by DocBook.
90 Style NextAddress
91         LatexType             Command
92         LatexName             end{letter}\begin{letter}
93         KeepEmpty             1
94         LeftMargin            xxxxxxxxxxxx::xx
95         LabelSep              xx
96         TopSep                1.5
97         BottomSep             1.5
98         ParSep                1.5
99         Align                 Left
100         LabelType             Static
101         LabelString           "Next Address:"
102         LabelFont
103           Series              Bold
104           Shape               Italic
105           Size                Small
106           Color               Blue
107         EndFont
108 End
109
110
111 Style Opening
112         Category              Letter
113         LatexType             Command
114         LatexName             opening
115         KeepEmpty             0
116         LeftMargin            xxxxxxxxxxxx::xx
117         LabelSep              xx
118         TopSep                0.4
119         BottomSep             0.4
120         ParSep                0.4
121         Align                 Left
122         LabelType             Static
123         LabelString           "Opening:"
124         LabelFont
125           Series              Bold
126           Shape               Italic
127           Color               Magenta
128         EndFont
129         DocBookTag            para
130         DocBookAttr           role='opening'
131 End
132
133
134 Style Closing
135         CopyStyle             Opening
136         LatexType             Command
137         LatexName             closing
138         LabelString           "Closing:"
139         DocBookTag            para
140         DocBookAttr           role='closing'
141 End
142
143
144 Style PS
145         CopyStyle             Opening
146         LatexType             Command
147         LatexName             ps
148         LabelString           "Post Scriptum:"
149         DocBookTag            para
150         DocBookAttr           role='post-scriptum'
151 End
152
153
154 Style CC
155         CopyStyle             Opening
156         LatexType             Command
157         LatexName             cc
158         LabelString           "cc:"
159         DocBookTag            para
160         DocBookAttr           role='carbon-copy'
161 End
162
163
164 Style Encl
165         CopyStyle             Opening
166         LatexName             encl
167         LabelString           "encl:"
168         DocBookTag            para
169         DocBookAttr           role='enclosed'
170 End
171
172
173 Style Name
174         Category              Letter
175         LatexType             Command
176         LatexName             setkomavar
177         LatexParam            {fromname}
178         KeepEmpty             1
179         LeftMargin            xxxxxxxxxxxxxxxxx::xx
180         LabelSep              xx
181         TopSep                0.4
182         BottomSep             0.4
183         ParSep                0.4
184         Align                 Left
185         LabelType             Static
186         LabelString           "Sender Name:"
187
188         LabelFont
189           Series              Bold
190           Shape               Italic
191           Color               Blue
192         EndFont
193         DocBookTag            personname
194         DocBookTagType        paragraph
195         DocBookWrapperTag     author
196         DocBookWrapperTagType paragraph
197         DocBookWrapperMergeWithPrevious true
198         DocBookInInfo         always     
199 End
200
201
202 Style Signature
203         CopyStyle             Name
204         LatexName             setkomavar
205         LatexParam            {signature}
206         LabelString           "Signature:"
207         DocBookTag            para
208         DocBookWrapperTag     abstract
209         DocBookWrapperAttr    role='signature'
210 End
211
212
213 Style SenderAddress
214         CopyStyle             Name
215         LatexName             setkomavar
216         LatexParam            {fromaddress}
217         LabelString           "Sender Address:"
218         DocBookTag            address
219         DocBookTagType        paragraph
220         DocBookWrapperTag     author
221         DocBookWrapperTagType paragraph
222         DocBookWrapperMergeWithPrevious true
223         DocBookInInfo         always    
224 End
225
226
227 Style Telephone
228         CopyStyle             Name
229         LatexName             setkomavar
230         LatexParam            {fromphone}
231         LabelString           "Sender Phone:"
232         # TODO: to be valid DocBook, this should be in the address.
233         DocBookTag            phone
234         DocBookTagType        paragraph
235         DocBookWrapperTag     author
236         DocBookWrapperTagType paragraph
237         DocBookWrapperMergeWithPrevious true
238         DocBookInInfo         always    
239 End
240
241
242 Style Fax
243         CopyStyle             Name
244         LatexName             setkomavar
245         LatexParam            {fromfax}
246         LabelString           "Sender Fax:"
247         # TODO: to be valid DocBook, this should be in the address.
248         DocBookTag            fax
249         DocBookTagType        paragraph
250         DocBookWrapperTag     author
251         DocBookWrapperTagType paragraph
252         DocBookWrapperMergeWithPrevious true
253         DocBookInInfo         always    
254 End
255
256
257 Style E-Mail
258         CopyStyle             Name
259         LatexName             setkomavar
260         LatexParam            {fromemail}
261         LabelString           "Sender E-Mail:"
262         DocBookTag            email
263         DocBookTagType        paragraph
264         DocBookWrapperTag     author
265         DocBookWrapperTagType paragraph
266         DocBookWrapperMergeWithPrevious true
267         DocBookInInfo         always
268 End
269
270
271 Style URL
272         CopyStyle             Name
273         LatexName             setkomavar
274         LatexParam            {fromurl}
275         LabelString           "Sender URL:"
276         DocBookTag            uri
277         DocBookTagType        paragraph
278         DocBookWrapperTag     author
279         DocBookWrapperTagType paragraph
280         DocBookWrapperMergeWithPrevious true
281         DocBookInInfo         always
282 End
283
284
285 Style Bank
286         CopyStyle             Name
287         LatexName             setkomavar
288         LatexParam            {frombank}
289         LabelString           "Bank:"
290         DocBookTag            personblurb
291         DocBookAttr           role='bank'
292         DocBookTagType        paragraph
293         DocBookWrapperTag     author
294         DocBookWrapperTagType paragraph
295         DocBookWrapperMergeWithPrevious true
296         DocBookInInfo         always
297 End
298
299
300 Style Logo
301         CopyStyle             Name
302         LatexName             setkomavar
303         LatexParam            {fromlogo}
304         LabelString           "Logo:"
305 End
306
307
308 Style Place
309         CopyStyle             Name
310         LatexName             setkomavar
311         LatexParam            {place}
312         LabelString           "Place:"
313         DocBookTag            country
314         DocBookTagType        paragraph
315         DocBookWrapperTag     address
316         DocBookWrapperTagType paragraph
317         DocBookWrapperMergeWithPrevious true
318         DocBookInInfo         always
319 End
320
321
322 Style Date
323         CopyStyle             Name
324         LatexName             setkomavar
325         LatexParam            {date}
326         LabelString           "Date:"
327         DocBookTag            date
328         DocBookTagType        paragraph
329         DocBookWrapperTag     NONE
330         DocBookInInfo         always
331 End
332
333
334 Style Backaddress
335         CopyStyle             Name
336         LatexName             setkomavar
337         LatexParam            {backaddress}
338         LabelString           "Backaddress:"
339         DocBookTag            NONE
340         DocBookWrapperTag     address
341         DocBookWrapperTagType paragraph
342         DocBookWrapperMergeWithPrevious true
343         DocBookInInfo         always
344 End
345
346
347 Style Specialmail
348         CopyStyle             Name
349         LatexName             setkomavar
350         LatexParam            {specialmail}
351         LabelString           "Specialmail:"
352         # TODO: not implemented for DocBook, what is the meaning of this?
353 End
354
355
356 Style Location
357         CopyStyle             Name
358         LatexName             setkomavar
359         LatexParam            {location}
360         LabelString           "Location:"
361         # TODO: not implemented for DocBook, what is the meaning of this?
362 End
363
364
365 Style Title
366         CopyStyle             Name
367         LatexName             setkomavar
368         LatexParam            {title}
369         LabelString           "Title:"
370         HTMLTitle             true
371         DocBookTag            title
372         DocBookAttr           role='title' # As opposed to subject.
373         DocBookTagType        paragraph
374         DocBookWrapperTag     NONE
375         DocBookInInfo         maybe
376 End
377
378
379 Style Subject
380         CopyStyle             Name
381         LatexName             setkomavar
382         LatexParam            {subject}
383         LabelString           "Subject:"
384         DocBookTag            title
385         DocBookAttr           role='title'
386         DocBookTagType        paragraph
387         DocBookWrapperTag     NONE
388         DocBookInInfo         maybe
389 End
390
391
392 Style Yourref
393         CopyStyle             Name
394         LatexName             setkomavar
395         LatexParam            {yourref}
396         LabelString           "Your ref.:"
397
398         LabelFont
399           Family              Sans
400           Series              Medium
401           Shape               Up
402           Size                Small
403           Color               None
404         EndFont
405 End
406
407
408 Style Yourmail
409         CopyStyle             Yourref
410         LatexName             setkomavar
411         LatexParam            {yourmail}
412         LabelString           "Your letter of:"
413 End
414
415
416 Style Myref
417         CopyStyle             Yourref
418         LatexName             setkomavar
419         LatexParam            {myref}
420         LabelString           "Our ref.:"
421 End
422
423
424 Style Customer
425         CopyStyle             Yourref
426         LatexName             setkomavar
427         LatexParam            {customer}
428         LabelString           "Customer no.:"
429 End
430
431
432 Style Invoice
433         CopyStyle             Yourref
434         LatexName             setkomavar
435         LatexParam            {invoice}
436         LabelString           "Invoice no.:"
437 End
438
439
440 Style EndLetter
441         Margin                Dynamic
442         LatexType             Command
443         LatexName             end{letter}
444         Preamble
445                 \letterclosedtrue
446         EndPreamble
447         KeepEmpty             1
448         TopSep                1
449         ParSkip               0.4
450         Align                 Block
451         LabelSep              xx
452         LabelType             Static
453         LabelString           "End of letter"
454         LabelFont
455           Series              Bold
456           Color               Green
457         EndFont
458 End