]> git.lyx.org Git - lyx.git/blob - lib/layouts/scrlttr2.layout
Make BufferView::singeParUpdate more robust
[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 104
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               textlabel1
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               textlabel1
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               textlabel3
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               textlabel1
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     DocBookNoFontInside   true
332 End
333
334
335 Style Backaddress
336         CopyStyle             Name
337         LatexName             setkomavar
338         LatexParam            {backaddress}
339         LabelString           "Backaddress:"
340         DocBookTag            NONE
341         DocBookWrapperTag     address
342         DocBookWrapperTagType paragraph
343         DocBookWrapperMergeWithPrevious true
344         DocBookInInfo         always
345 End
346
347
348 Style Specialmail
349         CopyStyle             Name
350         LatexName             setkomavar
351         LatexParam            {specialmail}
352         LabelString           "Specialmail:"
353         # TODO: not implemented for DocBook, what is the meaning of this?
354 End
355
356
357 Style Location
358         CopyStyle             Name
359         LatexName             setkomavar
360         LatexParam            {location}
361         LabelString           "Location:"
362         # TODO: not implemented for DocBook, what is the meaning of this?
363 End
364
365
366 Style Title
367         CopyStyle             Name
368         LatexName             setkomavar
369         LatexParam            {title}
370         LabelString           "Title:"
371         HTMLTitle             true
372         DocBookTag            title
373         DocBookAttr           role='title' # As opposed to subject.
374         DocBookTagType        paragraph
375         DocBookWrapperTag     NONE
376         DocBookInInfo         maybe
377 End
378
379
380 Style Subject
381         CopyStyle             Name
382         LatexName             setkomavar
383         LatexParam            {subject}
384         LabelString           "Subject:"
385         DocBookTag            title
386         DocBookAttr           role='title'
387         DocBookTagType        paragraph
388         DocBookWrapperTag     NONE
389         DocBookInInfo         maybe
390 End
391
392
393 Style Yourref
394         CopyStyle             Name
395         LatexName             setkomavar
396         LatexParam            {yourref}
397         LabelString           "Your ref.:"
398
399         LabelFont
400           Family              Sans
401           Series              Medium
402           Shape               Up
403           Size                Small
404           Color               None
405         EndFont
406 End
407
408
409 Style Yourmail
410         CopyStyle             Yourref
411         LatexName             setkomavar
412         LatexParam            {yourmail}
413         LabelString           "Your letter of:"
414 End
415
416
417 Style Myref
418         CopyStyle             Yourref
419         LatexName             setkomavar
420         LatexParam            {myref}
421         LabelString           "Our ref.:"
422 End
423
424
425 Style Customer
426         CopyStyle             Yourref
427         LatexName             setkomavar
428         LatexParam            {customer}
429         LabelString           "Customer no.:"
430 End
431
432
433 Style Invoice
434         CopyStyle             Yourref
435         LatexName             setkomavar
436         LatexParam            {invoice}
437         LabelString           "Invoice no.:"
438 End
439
440
441 Style EndLetter
442         Margin                Dynamic
443         LatexType             Command
444         LatexName             end{letter}
445         Preamble
446                 \letterclosedtrue
447         EndPreamble
448         KeepEmpty             1
449         TopSep                1
450         ParSkip               0.4
451         Align                 Block
452         LabelSep              xx
453         LabelType             Static
454         LabelString           "End of letter"
455         LabelFont
456           Series              Bold
457           Color               textlabel2
458         EndFont
459 End