Chapter 4: The New Letter Class scrlttr2
185
Table 4.9.: Predefined font
style for the elements of the
address field.
element
font style
addressee
backaddress
\sffamily
PPdata
\sffamily
PPlogo
\sffamily\bfseries
priority
\fontsize{10pt}{10pt}\sffamily\bfseries
prioritykey
\fontsize{24.88pt}{24.88pt}\selectfont
specialmail
toaddress
toname
comma followed by a non-breakable white space. The description of variable backaddress
is not used by KOMA-Script. The font style of the return address is configurable via element
backaddress
. Default for this is \sffamily (see
table 4.9
). Before execution of the element’s
font style KOMA-Script switches to \scriptsize.
By default, addrfield=true, the address will be vertically centred in the available space
below the mode of dispatch or priority. In
v3.17
opposite to this, addrfield=topaligned will not
centre the address but follow it aligned top at the available space. This is the only difference
to addrfield=true.
At the default addrfield=true an optional dispatch type can be output within the address
field between the return address and the addressee address, This will be done only if variable
specialmail
is not empty and priority=manual
v3.03
has been selected, which is also the default.
Class scrlttr2 itself does not use the description of variable specialmail. The alignment is
defined by the pseudo-lengths PLengthspecialmailindent and specialmailrightindent (siehe
page 475
). The predefined font style of element
v2.97c
specialmail
, that has been listed in
ta-
ble 4.9
, may be changed using commands
\setkomafont
and
\addtokomafont
(see
section 4.9
,
page 164
).
On
v3.03
the other hand, using an international priority with priority=A or priority=B (see
table 4.10
) together with addrfield=true will print the priority as mode of dispatch. Using
it together with addrfield=PP will print the priority at the corresponding position in the
Port-Payé head. Thereby the element priority defines the basic font style and prioritykey
the modification of the basic font style for the priority key, “A” or “B”. The Port-Payé logo
“P. P.” uses the font style of element PPlogo. The default font styles are listed in
table 4.9
and may be changed using commands
\setkomafont
und
\addtokomafont
(siehe
section 4.9
,
page 164
).
With
v3.03
addrfield=PP
also the zip-code of variable fromzipcode and the place from content
of variable place will be set in the Port-Payé head. Thereby the content of variable
fromzipcode
will be preceded by the description of variable fromzipcode and the content
of variable zipcodeseparator. The predefined description depends on the used lco-file
Chapter 4: The New Letter Class scrlttr2
186
Table 4.10.: available values for option priority to select the international priority at the address field
ofscrlttr2
false
, off, no, manual
Priority will not be printed.
B
, b, economy, Economy, ECONOMY, B-ECONOMY, B-Economy, b-economy
Use international priority B-Economy. With addrfield=true this will be printed
instead of the mode of dispatch.
A
, a, priority, Priority, PRIORITY, A-PRIORITY, A-Priority, a-priority
Use international priority A-Priority. With addrfield=true this will be printed
instead of the mode of dispatch.
(see
section 4.21
from
page 214
onward). On the other hand the default of the content of
variable zipcodeseparator is a small distance followed by an endash followed by one more
small distance (\,--\,).
Beyond
v3.03
that, with addrfield=PP and sender’s identification code will be used at the Port-
Payé head. This is the content of variable PPcode. Right beside the address of the addressee
an additional data array may be printed. The content of variable PPdatamatrix will be used
for this.
Zip-code
v3.03
, place and code will be printed with default font size 8 pt. Thereby the font style
of element PPdata will be used. The default of the element is listed in
table 4.9
and may be
changed using commands
\setkomafont
and
\addtokomafont
(see
section 4.9
,
page 164
).
With options addrfield=backgroundimage
v3.03
or addrfield=image a picture will be print
inside the address field. The content of variable addresseeimage will be used for this.
KOMA-Script does not use the description of that variable. Nothing else but the picture
will be printed with option addrfield=image. But with option addrfield=backgroundimage
the addressee’s name and address from the mandatory argument of the
letter
environment
will be output.
The alignment of the Port-Payé head as long as the alignment of the Port-Payé ad-
dress is defined by pseudo-length toaddrindent (see
page 474
) as well as PPheadwidth and
PPheadheight
(siehe
page 475
). The alignment of the data array is defined by pseudo-length
PPdatamatrixvskip
(see
page 475
).
Please note that KOMA-Script itself cannot set any external graphics or pictures. So, if you
want to put external picture files into variables like addresseeimage or PPdatamatrix, you
have to use an additional graphics package like graphics or graphicx to use, i. e., the command
\includegraphics
at the content of the variables.
Chapter 4: The New Letter Class scrlttr2
187
Table 4.11.: Possible values of option locfield for set-
ting the width of the field with additional sender at-
tributes with scrlttr2
narrow
narrow sender supplement field
wide
wide sender supplement field
locfield=selection
scrlttr2 places a field with additional sender attributes next to the address field. This can
be used, for example, for bank account or similar additional information. Depending on the
fromalign
option, it will also be used for the sender logo. The width of this field may be
defined within an lco file (see
section 4.21
). If the width is set to 0 in that file, then the
locfield
option can toggle between two presets for the field width. See the explanation on
the locwidth pseudo length in
section 22.1.4
,
page 476
. Possible values for this option are
shown in
table 4.11
. Default is narrow.
\setkomavar
{location}[description ]{contents }
The contents of the sender’s extension field is determined by the variable location. To
set this variable’s content , it is permitted to use formatting commands like \raggedright.
KOMA-Script does not use the description of the variable.
Example: Mr Public likes to show some additional information about his membership. There-
for he uses the location variable:
\documentclass[foldmarks=true,foldmarks=blmtP,
fromphone,fromemail,fromlogo,
version=last]{scrlttr2}
\usepackage[english]{babel}
\usepackage{graphics}
\begin{document}
\setkomavar{fromname}{John Public}
\setkomavar{fromaddress}{Valley 2\\
54321 Public-Village}
\setkomavar{fromphone}{0\,12\,34~56\,78}
\setkomavar{fromemail}{Peter@Public.invalid}
\setkomavar{fromlogo}{\includegraphics{musterlogo}}
\setkomavar{location}{\raggedright
Club nember no.~4711\\
since 11.09.2001\\
chairman 2003--2005}
\begin{letter}{%
Joana Public\\
Hillside 1\\
12345 Public-City%
Chapter 4: The New Letter Class scrlttr2
188
Figure 4.16.: result of a small letter with extended sender,
logo, addressee, additional sender information, opening,
text, closing, signature, postscript, distribution list, enclo-
sure and puncher hole mark (the date is a default of DIN-
letters)
John Public
Valley 2
54321 Public-Village
Phone: 0 12 34 56 78
Email: Peter@Public.invalid
M
John Public, Valley 2, 54321 Public-Village
Joana Public
Hillside 1
12345 Public-City
Club nember no. 4711
since 11.09.2001
chairman 2003–2005
January 15, 2017
Dear chairman,
the last general meeting was about one year ago. I want to remind you, that the
constitution of our club advises you to make a general meeting every six month. Because
of this I expect the executive board to detain such a meeting immediately.
Expecting an invitation
John Public
PS: I hope you accept this as an friendly demand note.
Enclosure: Compendium of the constitution with the general meeting paragraphs.
cc: executive board
all members
}
\opening{Dear chairman,}
the last general meeting was about one year ago.
I want to remind you, that the constitution of our
club advises you to make a general meeting every
six month. Because of this I expect the executive
board to detain such a meeting immediately.
\closing{Expecting an invitation}
\ps PS: I hope you accept this as an friendly
demand note.
\setkomavar*{enclseparator}{Enclosure}
\encl{Compendium of the constitution with the
general meeting paragraphs.}
\cc{executive board\\all members}
\end{letter}
\end{document}
This will define the field beside the addressee’s address like shown in
figure 4.16
.
Chapter 4: The New Letter Class scrlttr2
189
numericaldate=simple switch
This option toggles between the standard, language-dependent date presentation, and a short,
numerical one. KOMA-Script does not provide the standard presentation. It should be defined
by packages such as ngerman, babel, or isodate. The short, numerical presentation, on the
other hand, is produced by scrlttr2 itself. This option can take the standard values for simple
switches, as listed in
table 2.5
,
page 39
. Default is false, which results in standard date
presentation.
\setkomavar
{date}[description ]{contents }
The date in the selected presentation will become the content of variable date. The selection
of option
numericaldate
does not influence the date any longer, if the content of this variable
will be changed by the user. Normally the date will be part of the reference line. If all other
elements of the reference line will be empty and therefore unused a date line instead of a
reference line will be printed. See the description of variable
place
on
page 190
for more
information about the date line. You should note, that you can change the automatic printing
of the date using option
refline
, that will be described next.
refline=selection
Especially in business letters a line with information like identification code, direct dial, cus-
tomer’s number, invoice’s number, or references to previous letters may be found usually. This
line will be named reference line in this manual.
With the scrlttr2 class, the header, footer, address, and sender attributes may extend beyond
the normal type area to the left and to the right. Option refline=wide defines that this should
also apply to the reference fields line. Normally, the reference fields line contains at least the
date, but it can hold additional data. Possible values for this option are shown in
table 4.12
.
Default is narrow and dateright
v3.09
.
\setkomavar
{yourref}[ description ]{ contents }
\setkomavar
{yourmail}[description ]{contents }
\setkomavar
{myref}[description ]{contents }
\setkomavar
{customer}[description ]{contents }
\setkomavar
{invoice}[description ]{contents }
These five variables represent typical fields of the reference line. Their meanings are given in
table 4.1
on
page 142
. Each variable has also a predefined description , shown in
table 4.13
.
Additional information about adding other variables to the reference line may be found in
section 22.2
from
page 480
onward.
Font style and color
v2.97c
of the description and content of the fields of the reference line may
be changed with elements refname and refvalue. Therefor the commands
\setkomafont
Chapter 4: The New Letter Class scrlttr2
190
Table 4.12.: Possible value of option refline for setting the width of the reference fields line with
scrlttr2
dateleft
v3.09
The date will be placed leftmost at the reference line.
dateright
v3.09
The date will be placed rightmost at the reference line.
narrow
The reference line will be restricted to type area.
nodate
v3.09
The date is not placed automatically into the reference line.
wide
The with of the reference line corresponds to address and sender’s additional
information.
and
\addtokomafont
(see
section 4.9
,
page 164
) should be used. The default configuration of
both elements is listed in
table 4.14
.
\setkomavar
{placeseparator}[ description ]{ contents }
If all variables of the reference line are empty, the line will be omitted. In this case, the
content
of
place
and placeseparator will be set, followed by the content of
date
. The
predefined content of the placeseparator is a comma followed by a non-breaking space. If
the variable
place
has no content value then the hyphen remains unset also. The predefined
content
of
date
is \today and depends on the setting of the option
numericaldate
(see
page 189
).
Since version 3.09
v3.09
place and date the alignment of place and date is given by option
refline
.
The available alignment values for this option are listed in
table 4.12
.
The
v3.12
font setting of place and date in the date line are given by font elementplaceanddate
Table 4.13.: predefined descriptions of
typical variables of the reference fields line
using macros depending on the current
language
variable name description
e. g., in english
yourref
\yourrefname
Your reference
yourmail
\yourmailname
Your letter from
myref
\myrefname
Our reference
customer
\customername
Customer No.:
invoice
\invoicename
Invoice No.:
date
\datename
date
Chapter 4: The New Letter Class scrlttr2
191
Table 4.14.: default font style configuration of the ele-
ments of the reference line
element
default configuration
refname
\sffamily\scriptsize
refvalue
instead of element
refvalue
, which would be used for general reference lines. You can change
the empty default of the font element using commands
\setkomafont
and
\addtokomafont
(see
section 4.9
,
page 164
).
Example: Now Mr Public also sets the place:
\documentclass[foldmarks=true,foldmarks=blmtP,
fromphone,fromemail,fromlogo,
version=last]{scrlttr2}
\usepackage[english]{babel}
\usepackage{graphics}
\begin{document}
\setkomavar{fromname}{John Public}
\setkomavar{fromaddress}{Valley 2\\
54321 Public-Village}
\setkomavar{fromphone}{0\,12\,34~56\,78}
\setkomavar{fromemail}{Peter@Public.invalid}
\setkomavar{fromlogo}{\includegraphics{musterlogo}}
\setkomavar{location}{\raggedright
Club nember no.~4711\\
since 11.09.2001\\
chairman 2003--2005}
\setkomavar{date}{29th February 2011}
\setkomavar{place}{Public-Village}
\begin{letter}{%
Joana Public\\
Hillside 1\\
12345 Public-City%
}
\opening{Dear chairman,}
the last general meeting was about one year ago.
I want to remind you, that the constitution of our
club advises you to make a general meeting every
six month. Because of this I expect the executive
board to detain such a meeting immediately.
\closing{Expecting an invitation}
\ps PS: I hope you accept this as an friendly
demand note.
\setkomavar*{enclseparator}{Enclosure}
\encl{Compendium of the constitution with the
Chapter 4: The New Letter Class scrlttr2
192
Figure 4.17.: result of a small letter with extended sender,
logo, addressee, additional sender information, place, date,
opening, text, closing, signature, postscript, distribution
list, enclosure and puncher hole mark
John Public
Valley 2
54321 Public-Village
Phone: 0 12 34 56 78
Email: Peter@Public.invalid
M
John Public, Valley 2, 54321 Public-Village
Joana Public
Hillside 1
12345 Public-City
Club nember no. 4711
since 11.09.2001
chairman 2003–2005
Public-Village, 29th February 2011
Dear chairman,
the last general meeting was about one year ago. I want to remind you, that the
constitution of our club advises you to make a general meeting every six month. Because
of this I expect the executive board to detain such a meeting immediately.
Expecting an invitation
John Public
PS: I hope you accept this as an friendly demand note.
Enclosure: Compendium of the constitution with the general meeting paragraphs.
cc: executive board
all members
general meeting paragraphs.}
\cc{executive board\\all members}
\end{letter}
\end{document}
In this case
figure 4.17
shows the place and the automatic separator in front of the
date. The date has been defined explicitly to make the printed date independent
from the date of the L
A
TEX run.
\setkomavar
{title}[description ]{contents }
With scrlttr2 a letter can carry an additional title. The title is centered and set with font size
\LARGE
directly after and beneath the reference fields line. The predefined font setup for the
element lettertitle can be changed with commands
\setkomafont
und
\addtokomafont
(see
section 4.9
,
page 164
). Font size declarations are allowed. Font size \LARGE is not part
of the predefined default \normalcolor\sffamily\bfseries but nevertheless will be used
before the font style of the element. With scrlttr2 you can also use title as an alias of
lettertitle
. This is not provided using scrletter with a KOMA-Script class, because these
classes already define an element title with different meaning for the document title.
Example: Assume that you are to write a reminder. Thus you put as title:
Chapter 4: The New Letter Class scrlttr2
193
Table 4.15.: predefined descrip-
tions of subject-related variables
variable name
description
subject
\usekomavar*
{subjectseparator}%
\usekomavar
{subjectseparator}
subjectseparator
\subjectname
\setkomavar{title}{Reminder}
This way the addressee will recognize a reminder as such.
Like shown in the example, the content of the variable defines the title. KOMA-Script will
not use the description .
subject=selection
\setkomavar
{subject}[description ]{contents }
\setkomavar
{subjectseparator}[description ]{contents }
In case a subject should be set, the content of the variable subject need to be defined.
First of all with option subject=true the usage of the description before the output of
the subject may be configured. See
table 4.15
for the predefined description . In case of
using the description the content of variable subjectseparator will be set between the
description
and content of the subject. The predefined content of subjectseparator
is a colon followed by a white space.
On the other hand, subject=afteropening may be used to place the subject below instead
of before the letter opening. Furthermore, the formatting of the subject may be changed using
either subject=underlined, subject=centered, or subject=right
v2.97c
. All available values are
listed in
table 4.16
. Please note, that with option subject=underlined the while subject
must fit at one line! Defaults are subject=left, subject=beforeopening, and subject=
untitled
.
The subject line is set in a separate font. To change this use the commands
\setkomafont
and
\addtokomafont
(siehe
section 4.9
,
page 164
). For element lettersubject the predeter-
mined font is \normalcolor\bfseries. With scrlttr2 you can also use subject as an alias of
lettersubject
. This is not provided using scrletter with a KOMA-Script class, because these
classes already define an element subject with different meaning for the document title.
Dostları ilə paylaş: |