Chapter 4: The New Letter Class scrlttr2
176
John Public
Valley 2
54321 Public-Village
John Public, Valley 2, 54321 Public-Village
Joana Public
Hillside 1
12345 Public-City
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
John Public
Valley 2
54321 Public-Village
John Public, Valley 2, 54321 Public-Village
Joana Public
Hillside 1
12345 Public-City
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
Figure 4.12.: result of a small letter with sender, separation rule, addressee, opening, text, closing,
signature, postscript, distribution list, enclosure and puncher hole mark (the date is a
default of DIN-letters): at left one the standard letterhead using
fromalign=false
, at
right one the extended letterhead using
fromalign=center
symbolicnames=simple switch
fromphone=simple switch
frommobilephone=simple switch
fromfax=simple switch
fromemail=simple switch
fromurl=simple switch
\setkomavar
{fromphone}[description ]{contents }
\setkomavar
{frommobilephone}[description ]{contents }
\setkomavar
{fromfax}[description ]{contents }
\setkomavar
{fromemail}[description ]{contents }
\setkomavar
{fromurl}[description ]{contents }
\setkomavar
{phoneseparator}[description ]{contents }
\setkomavar
{mobilephoneseparator}[description ]{contents }
\setkomavar
{faxseparator}[description ]{contents }
\setkomavar
{emailseparator}[description ]{contents }
\setkomavar
{urlseparator}[description ]{contents }
Whether or not a telephone number, a mobile
v3.12
telephone number, a fax number, an e-mail
address, or a sender’s URL should be set as part of the letterhead may be configured by
Chapter 4: The New Letter Class scrlttr2
177
Table 4.6.: Predefined descriptions of the variables of the letterhead (the description and contents of
the separator variables may be found at
table 4.7
fromemail
\usekomavar*
{emailseparator}
\usekomavar
{emailseparator}
fromfax
\usekomavar*
{faxseparator}
\usekomavar
{faxseparator}
frommobilephone
v3.12
\usekomavar*
{mobilephoneseparator}
\usekomavar
{mobilephoneseparator}
fromname
\headfromname
fromphone
\usekomavar*
{phoneseparator}
\usekomavar
{phoneseparator}
fromurl
\usekomavar*
{urlseparator}
\usekomavar
{urlseparator}
the options fromphone, fromfax, fromemail, and fromurl. Any standard value for simple
switches from
table 2.5
,
page 39
may be assigned to these options. Default is false for all of
them. The contents depends on the corresponding variable. The default of the description
or title of each variable may be found in
table 4.6
. The separators, that will be inserted
between description and content , may be found in
table 4.7
.
You may
v3.12
change the defaults for the description of the separator variables at once using
option symbolicnames. The option understands the values for simple switches from
table 2.5
,
page 39
. Switching on the option replaces the descriptions from the language depending terms
\emailname
,
\faxname
,
\mobilephonename
, and
\phonename
into symbols of the package
marvosym. Also the colon will be removed from the content of the separator variables. And
in this case the description and the content of the URL separator will be empty. Note, that
you have to load package marvosym on your own, if you switch on symbolicnames first time
after \begin{document}.
Example: Mr Public from the example letter has telephone and e-mail. He wants to show
this also in the letterhead. Furthermore the separation rule should be placed below
the letterhead. So he uses the corresponding options and defines the content of
the needed variables:
\documentclass[foldmarks=true,foldmarks=blmtP,
fromalign=false,fromrule=afteraddress,
fromphone,fromemail,
version=last]{scrlttr2}
Chapter 4: The New Letter Class scrlttr2
178
Table 4.7.: Predefined
de-
scrip-
tion
and
con-
tent
of the
sepa-
rators
at the
letter-
head
with-
out
option
symbolicnames
variable name
description
content
emailseparator
\emailname
:˜
faxseparator
\faxname
:˜
mobilephoneseparator
\mobilephonename
\usekomavaer{phoneseparator}
phoneseparator
\phonename
:˜
urlseparator
\wwwname
:˜
\usepackage[english]{babel}
\ 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}
\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
general meeting paragraphs.}
\cc{executive board\\all members}
\end{letter}
\end{document}
Chapter 4: The New Letter Class scrlttr2
179
John Public
Valley 2
54321 Public-Village
John Public, Valley 2, 54321 Public-Village
Joana Public
Hillside 1
12345 Public-City
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
John Public
Valley 2
54321 Public-Village
Phone: 0 12 34 56 78
Email: Peter@Public.invalid
John Public, Valley 2, 54321 Public-Village
Joana Public
Hillside 1
12345 Public-City
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
Figure 4.13.: result of a small letter with sender, separation rule, addressee, opening, text, closing,
signature, postscript, distribution list, enclosure and puncher hole mark (the date is a
default of DIN-letters): at left one the standard letterhead using
fromalign=false
, at
right one the extended letterhead using
fromalign=center
Nevertheless the result at the left side of
figure 4.13
is not disillusioning: the
options are ignored. That’s the case because the additional variables and options
will be used at the extended letterhead only. So option
fromalign
has to be used,
like done at the right letter of
figure 4.13
.
\documentclass[foldmarks=true,foldmarks=blmtP,
fromalign=center,fromrule=afteraddress,
fromphone,fromemail,
version=last]{scrlttr2}
\usepackage[english]{babel}
\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}
\begin{letter}{%
Joana Public\\
Chapter 4: The New Letter Class scrlttr2
180
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
general meeting paragraphs.}
\cc{executive board\\all members}
\end{letter}
\end{document}
An arrangement of alternatives with left aligned using
fromalign=left
and right
aligned sender using
fromalign=right
may be found in
figure 4.14
.
fromlogo=simple switch
\setkomavar
{fromlogo}[description ]{contents }
With option fromlogo you may configure whether or not to use a logo at the letterhead. The
option value may be any simple switch from
table 2.5
,
page 39
. Default is false, that means
no logo. The logo itself is defined by the content of variable fromlogo. The description
of the logo is empty by default and KOMA-Script does not use it anywhere at the predefined
note papers (see also
table 4.6
).
Example: Mr Public likes to use a letterhead with logo. He generated a graphics file with
the logo and would like to include this using \includegraphics. Therefor he uses
the additional package graphics (see [
Car05
]).
\ documentclass[foldmarks=true,foldmarks=blmtP,
fromrule=afteraddress,
fromphone,fromemail,fromlogo,
version=last]{scrlttr2}
\usepackage[english]{babel}
\usepackage{graphics}
\begin{document}
\setkomavar{fromname}{John Public}
\setkomavar{fromaddress}{Valley 2\\
54321 Public-Village}
Chapter 4: The New Letter Class scrlttr2
181
John Public
Valley 2
54321 Public-Village
Phone: 0 12 34 56 78
Email: Peter@Public.invalid
John Public, Valley 2, 54321 Public-Village
Joana Public
Hillside 1
12345 Public-City
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
John Public
Valley 2
54321 Public-Village
Phone: 0 12 34 56 78
Email: Peter@Public.invalid
John Public, Valley 2, 54321 Public-Village
Joana Public
Hillside 1
12345 Public-City
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
Figure 4.14.: result of a small letter with sender, separation rule, addressee, opening, text, closing,
signature, postscript, distribution list, enclosure and puncher hole mark (the date is a
default of DIN-letters): at left one left aligned letterhead using
fromalign=left
, at right
one right aligned letterhead using
fromalign=right
\setkomavar{fromphone}{0\,12\,34~56\,78}
\setkomavar{fromemail}{Peter@Public.invalid}
\setkomavar{fromlogo}{\includegraphics{musterlogo}}
\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}
Chapter 4: The New Letter Class scrlttr2
182
\encl{Compendium of the constitution with the
general meeting paragraphs.}
\cc{executive board\\all members}
\end{letter}
\end{document}
The result may be seen at the left top position of
figure 4.15
. The additional letter
prints at this figure shows the result with right aligned or centered sender.
\setkomavar
{firsthead}[description ]{contents }
For many cases, scrlttr2 with its options and variables offers enough possibilities to create a
letterhead. In very rare situations one may wish to have more freedom in terms of layout.
In those situations one will have to do without predefined letterheads, which could have been
chosen via options. Instead, one needs to create one’s own letterhead from scratch. To do
so, one has to define the preferred construction as content of variable firsthead. Within
\firsthead
, and with the help of the \parbox command (see [
Tea05b
]), one can set several
boxes side by side, or one underneath the other. An advanced user will thus be able to create
a letterhead on his own. Of course the construct may and should use other variables with the
help of
\usekomavar
. KOMA-Script does not use the description of variable firsthead.
The command \firsthead exists only for reason of compatibility to former scrlttr2 versions.
However it is deprecated and you should not use it anymore.
addrfield=mode
backaddress=value
priority=priority
\setkomavar
{toname}[description ]{contents }
\setkomavar
{toaddress}[description ]{contents }
\setkomavar
{backaddress}[description ]{contents }
\setkomavar
{backaddressseparator}[description ]{contents }
\setkomavar
{specialmail}[description ]{contents }
\setkomavar
{fromzipcode}[description ]{contents }
\setkomavar
{zipcodeseparator}[description ]{contents }
\setkomavar
{place}[description ]{contents }
\setkomavar
{PPcode}[description ]{contents }
\setkomavar
{PPdatamatrix}[description ]{contents }
\setkomavar
{addresseeimage}[description ]{contents }
Option addrfield defines whether or not to set an address field. Default is to use an address
field. This option can take the mode values from
table 4.8
v3.03
. Default is true. With values true,
topaligned
v3.17
, PP, and backgroundimage name and address of the addressee will be defined
by the mandatory argument of the
letter
environment (see
section 4.7
,
page 153
). These
Chapter 4: The New Letter Class scrlttr2
183
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
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
John Public
Valley 2
54321 Public-Village
Phone: 0 12 34 56 78
Email: Peter@Public.invalid
John Public, Valley 2, 54321 Public-Village
Joana Public
Hillside 1
12345 Public-City
M
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
Figure 4.15.: result of a small letter with extended sender,
logo, separation rule, addressee, opening, text, closing, sig-
nature, postscript, distribution list, enclosure and puncher
hole mark (the date is a default of DIN-letters): at top
left one left aligned sender using, at right beneath one with
centered sender, and at right one right aligned sender
M
John Public
Valley 2
54321 Public-Village
Phone: 0 12 34 56 78
Email: Peter@Public.invalid
John Public, Valley 2, 54321 Public-Village
Joana Public
Hillside 1
12345 Public-City
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
Chapter 4: The New Letter Class scrlttr2
184
Table 4.8.: available values for option addrfield to change the addressee mode of scrlttr2
backgroundimage
, PPbackgroundimage, PPBackgroundImage, PPBackGroundImage,
ppbackgroundimage
, ppBackgroundImage, ppBackGroundImage
Prints an address field with Port-Payé head, in variable addresseimage defined
background graphics, but without return address or mode of dispatch.
false
, off, no
Omits the address field.
image
, Image, PPimage, PPImage, ppimage, ppImage
Prints variable addresseeimage as addressee with Port-Payé, but ignores addressee
information and definitions for return address, mode of dispatch or priority.
PP
, pp, PPexplicite, PPExplicite, ppexplicite, ppExplicite
Prints an address field with Port-Payé head, defined by the variables fromzipcode,
place
, and PPcode and when indicated with priority and data array defined by
PPdatamatrix
but without return address and mode of dispatch.
topaligned
, alignedtop
v3.17
Prints an address field including a return address and a mode of dispatch or priority
without centring the address vertically in the available space.
true
, on, yes
Prints an address field including a return address and a mode of dispatch or priority.
elements will additionally be copied into the variables toname and toaddress. The predefined
font styles may be changed
v2.97c
by execution of command
\setkomafont
or
\addtokomafont
(siehe
section 4.9
,
page 164
). Thereby three elements exist. First of all element addressee, that
is responsible for the addressee overall. The additional elements toname and toaddress are
responsible only either for the name or the address of the addressee. They may be used to
define modifications from the addressee configuration.
With the default addrfield=true an additional return address will be printed. Option
backaddress
defines whether a return address for window envelopes will be set. This option
can take the standard values for simple switches, as listed in
table 2.5
,
page 39
. These values
do not change style of the return address. On the other hand, additionally
v2.96
to switching on
the return address, the style of the return address may be selected. Option value underlined
selects an underlined return address. In opposite to this value plain selects a style without
underline. Default is underlined and therefore printing an underlined return address.
The return address itself is defined by the content of variable backaddress. Default is a
combination of variable toname and toaddress with redefinition of the double backslash to
set the content of variable backaddressseparator. The predefined separator content is a
|