21.4. More or Less Obsolete Options and Commands
Sorry, currently additional information to this may be found at the same point of the German
KOMA-Script book [
Koh14a
] only.
Chapter 22: Additional Information about the Letter Class scrlttr2 and the Letter Package scrletter
464
Additional Information about the Letter Class scrlttr2 and the
Letter Package scrletter
This chapter gives additional information about the KOMA-Script class scrlttr2. Some parts
of the chapter are subject to the KOMA-Script book [
Koh14a
] only. This should not be a
problem, because the average user, who only want to use the package, does not need the
information. Other information is addressed to users, who want additional information about
details. For example the first section will describe pseudo-lengths in detail. These may be
used to modify the note paper. Another part of the information describes features of the class
that exist only because of compatibility to deprecated scrlettr class. Last but not least it will
be described in detail how to change a document from the old scrlettr class to be used with
the current scrlttr2 class.
Since KOMA-Script 3.15
v3.15
the additional package scrletter exists. It can be used with one of
the KOMA-Script classes scrartcl, scrreprt, or scrbook and provides all the features of scrlttr2
for those classes. There are, however, small differences described later in this section.
22.1. Pseudo-Lengths for Experienced Users
TEX works with a fixed number of registers. There are registers for tokens, for boxes, for
counters, for skips and for dimensions. Overall there are 256 registers for each of these cat-
egories. For L
A
TEX lengths, which are addressed with \newlength, skip registers are used.
Once all these registers are in use, you can not define any more additional lengths. The letter
class scrlttr2 would normally use up more than 20 of such registers for the first page alone.
L
A
TEX itself already uses 40 of these registers. The typearea package needs some of them too;
thus, approximately a quarter of the precious registers would already be in use. That is the
reason why lengths specific to letters in scrlttr2 are internally defined with macros instead of
lengths. The drawback of this approach is that computations with macros is somewhat more
complicated than with real lengths.
Please note: Even though these pseudo-lengths are internally implemented as macros, the
commands for pseudo-length management expect only the names of the pseudo-lengths not the
macros representing the pseudo-lengths. The names of pseudo-lengths are without backslash
at the very beginning similar to the names of L
A
TEX counters and in opposite to macros or
L
A
TEX lengths.
It can be pointed out that the now recommended L
A
TEX installation with ε-TEX no longer
suffers from the above-mentioned limitation. However, that improvement came too late for
scrlttr2.
The pseudo-lengths defined and uses by scrlttr2 are listed in
table 22.1
. Cross references to
the detailed descriptions of each pseudo-lengths in the following sub-sections are also given in
the table.
Chapter 22: Additional Information about the Letter Class scrlttr2 and the Letter Package scrletter
465
A schematic display of the most important distances of the note paper is shown in
figure 22.1
at
page 469
. Beside the pseudo-lengths for the modifiable distances, also some lengths, which
may not be modified, are shown in light gray. Some rarely needed pseudo-length of the note
paper have been omitted to get a more clear arrangement.
Table 22.1.: Pseudo-lengths provided by class scrlttr2
backaddrheight
height of the return address at the upper edge of the address field (
section 22.1.3
,
page 475
)
bfoldmarklength
length of the bottommost folding mark (
section 22.1.1
,
page 470
)
bfoldmarkvpos
vertical distance of bottommost folding mark from top paper edge (
section 22.1.1
,
page 470
)
firstfoothpos
horizontal distance of the letter footer from the left paper edge; values greater than
the width of the paper or smaller than the negative value of the width of the paper
will activate special handling (
section 22.1.8
,
page 479
)
firstfootvpos
vertical distance of letter footer from top paper edge (
section 22.1.8
,
page 479
)
firstfootwidth
width of letter footer (
section 22.1.8
,
page 479
)
firstheadhpos
horizontal distance of the letterhead from the left paper edge; values greater than
the width of the paper or smaller than the negative value of the width of the paper
will activate special handling (
section 22.1.2
,
page 472
)
firstheadvpos
vertical distance of letterhead from top paper edge (
section 22.1.2
,
page 472
)
firstheadwidth
width of the letterhead (
section 22.1.2
,
page 473
)
. . .
Chapter 22: Additional Information about the Letter Class scrlttr2 and the Letter Package scrletter
466
Table 22.1.: Pseudo-lengths provided by class scrlttr2 (continued)
foldmarkhpos
horizontal distance of the horizontal folding marks from left paper edge (
sec-
tion 22.1.1
,
page 471
)
foldmarkvpos
vertical distance of the vertical folding marks from the top paper edge (
section 22.1.1
,
page 472
)
fromrulethickness
thickness of an optional horizontal rule in the letterhead (
section 22.1.2
,
page 473
)
fromrulewidth
length of an optional horizontal rule in letterhead (
section 22.1.2
,
page 473
)
lfoldmarkhpos
horizontal distance of the vertical folding mark from the left paper edge (
sec-
tion 22.1.1
,
page 471
)
lfoldmarklength
length of the vertical folding mark (
section 22.1.1
,
page 471
)
locheight
height of the field with the extended sender’s information, of the value is not zero;
toaddrheight
will be used instead of zero value (
section 22.1.4
,
page 476
)
lochpos
horizontal distance of the field with the extended sender’s information from the right
paper edge, if the value is positive; negative horizontal distance from the left paper
edge, if the value is negative; negative value of toaddrhpos will be used instead of
zero value (
section 22.1.4
,
page 476
)
locvpos
vertical distance of the field with the extended sender’s information from the top
paper edge, if the value is not zero; toaddrvpos will be used instead of zero value
(
section 22.1.4
,
page 476
)
locwidth
width of the field with the extended sender’s information; for zero value width is
calculated automatically with respect to option
locfield
that is described in
sec-
tion 4.10
,
page 187
(
section 22.1.4
,
page 476
)
. . .
Chapter 22: Additional Information about the Letter Class scrlttr2 and the Letter Package scrletter
467
Table 22.1.: Pseudo-lengths provided by class scrlttr2 (continued)
mfoldmarklength
length of the middle horizontal folding mark (
section 22.1.1
,
page 471
)
mfoldmarkvpos
vertical distance of the middle horizontal folding mark from the top paper edge
(
section 22.1.1
,
page 470
)
pfoldmarklength
length of the puncher hole mark (
section 22.1.1
,
page 471
)
refaftervskip
vertical skip below reference fields or business line (
section 22.1.5
,
page 477
)
refhpos
horizontal distance of reference fields or business line from left paper edge; for zero
value reference fields line is centered horizontally on letter paper (
section 22.1.5
,
page 477
)
refvpos
vertical distance of reference fields or business line from top paper edge (
sec-
tion 22.1.5
,
page 476
)
refwidth
width of reference fields line (
section 22.1.5
,
page 477
)
sigbeforevskip
vertical skip between closing and signature (
section 22.1.7
,
page 478
)
sigindent
indentation of signature with respect to text body (
section 22.1.7
,
page 478
)
specialmailindent
left indentation of mode of dispatch within address field (
section 22.1.3
,
page 475
)
specialmailrightindent
right indentation of mode of dispatch within address field (
section 22.1.3
,
page 475
)
subjectaftervskip
vertical distance after the subject (
section 22.1.6
,
page 478
)
subjectbeforevskip
additional vertical distance before the subject (
section 22.1.6
,
page 478
)
. . .
Chapter 22: Additional Information about the Letter Class scrlttr2 and the Letter Package scrletter
468
Table 22.1.: Pseudo-lengths provided by class scrlttr2 (continued)
subjectvpos
vertical distance of the subject from the top paper edge; zero value will set the
subject depending on option
subject
(
section 22.1.6
,
page 478
)
tfoldmarklength
length of the topmost horizontal folding mark (
section 22.1.1
,
page 471
)
tfoldmarkvpos
vertical distance of the topmost horizontal folding mark from the top paper edge
(
section 22.1.1
,
page 470
)
toaddrheight
height of address field (
section 22.1.3
,
page 474
)
toaddrhpos
horizontal distance of the address field from left paper edge, for positive values;
negative horizontal distance of the address field from right paper edge, for negative
values (
section 22.1.3
,
page 473
)
toaddrindent
left and right indentation of address within address field (
section 22.1.3
,
page 474
)
toaddrvpos
vertical distance of the address field from the top paper edge (
section 22.1.3
,
page 473
)
toaddrwidth
width of address field (
section 22.1.3
,
page 474
)
\@newplength{name }
This command defines an new pseudo-length. This new pseudo-length is uniquely identified
by its name . If with this command a redefinition of an already existing pseudo-length is
attempted, the commands exits with an error message.
Since the user in general does not define own pseudo-lengths, this command is not intended
as a user command. Thus, it can not be used within a document, but it can, for example, be
used within an lco-file.
Chapter 22: Additional Information about the Letter Class scrlttr2 and the Letter Package scrletter
469
\baselineskip
\baselineskip
\baselineskip
\textwidth
≥
\footskip
firstheadhpos
firstheadwidth
fromrulewidth
toaddrwidth
locwidth
specialmailindent
specialmailrightindent
toaddrhpos
lochpos
toaddrindent
toaddrindent
refwidth
refhpos
foldmarkhpos
sigindent
firstfoothpos
firstfootwidth
toaddrheight
lo
cheight
+subjectbeforevskip
subjectaftervskip
backaddrheight
refaftervskip
sigbeforevskip
firstheadvpos
toaddrvpos
locvpos
refvpos
tfoldmarkvpos
bfoldmarkvpos
firstfootvpos
letterhead
letter footer
return address
mode of dispatch
addressee
supplemental
data
reference fields line
title
subject
opening
letter body
closing
signature
Figure 22.1.: Schematic of the pseudo-lengths for a letter
Chapter 22: Additional Information about the Letter Class scrlttr2 and the Letter Package scrletter
470
\@setplength[factor ]{pseudo-length }{value }
\@addtoplength[factor ]{pseudo-length }{value }
Using the command \@setplength you can assign the multiple of a value to
a pseudo-length .
The factor is given as an optional argument (see also
\setlengthtoplength
,
section 4.2
,
page 147
).
The command \@addtoplength adds the value to a pseudo-length . Again a factor may
be given as an optional argument.
To assign, or to add the multiple of, one pseudo-length to another pseudo-length, the
command \useplength (siehe
section 4.2
,
page 147
) is used within value . To subtract the
value of one pseudo-length from another pseudo-length a minus sign, or -1, is used as the
factor
.
Since the user in general does not define own pseudo-lengths, this command is not intended
as a user command. Thus, it can not be used within a document, but can, for example, be
used within an lco-file.
22.1.1. Folding Marks
Folding mark are short horizontal lines at the left edge, and short vertical lines at the upper
edge of the paper. KOMA-Script at present supports three configurable horizontal and one
configurable vertical foldmarks. In addition, there is support for a puncher hole mark or center
mark which cannot be shifted in the vertical direction.
\@setplength
{tfoldmarkvpos}{length }
\@setplength
{mfoldmarkvpos}{length }
\@setplength
{bfoldmarkvpos}{length }
The letter class scrlttr2 knows a total of three vertically placed configurable foldmarks. The
position of the topmost foldmark, taken from the upper edge of the paper, is governed by
the pseudo-length tfoldmarkvpos; the position of the middle foldmark by pseudo-length
mfoldmarkvpos
v2.97e
; the position of the bottommost foldmark by pseudo-length bfoldmarkvpos.
With the addition of the puncher hole or center mark, there is still a fourth horizontal mark.
This one is however always placed at the vertical center of the paper.
The topmost and bottommost foldmarks do not serve to divide the paper into exactly equal
thirds. Instead, with their help, the paper should be folded such that the address field appears
correctly in the space available in the chosen window envelope format, which is determined
by choice of lco-file. Several such files are available offering predefined formats. An anomaly
is present with DINmtext: for this format, an envelope format of C6/5 (also known as “C6
long”) is assumed. Letters written with this option are not suited to envelopes of formats C5
or C4.
The middle foldmark is not normally required for Western letters. In Japan, however, a
larger number of envelope formats exists, requiring one more foldmark (see the Japanese lco-
Chapter 22: Additional Information about the Letter Class scrlttr2 and the Letter Package scrletter
471
files). At this point attention is drawn to the fact that reference to “topmost”, “middle”, and
“bottommost” foldmarks is simply a convenience. In fact, it is not defined that tfoldmarkvpos
must be smaller than mfoldmarkvpos, which in turn must be smaller than bfoldmarkvpos.
If on the other hand one of the pseudo-lengths is set to null, then the corresponding foldmark
will not be set even if the option
foldmarks
(see
section 4.10
,
page 168
) is explicity activated.
\@setplength
{tfoldmarklength}{length }
\@setplength
{mfoldmarklength}{length }
\@setplength
{bfoldmarklength}{length }
\@setplength
{pfoldmarklength}{length }
These
v2.97e
four pseudo-lengths determine the lengths of the four horizontal foldmarks. One excep-
tional behaviour exists. If the length is given as null, then the three vertically-configurable
pseudo-lengths tfoldmarklength, mfoldmarklength and bfoldmarklength are set to 2 mm
in length. The length of the punchmark, pfoldmarklength, is instead set to 4 mm.
\@setplength
{foldmarkhpos}{length }
This pseudo-length gives the distance of all horizontal foldmarks from the left edge of the
paper. Normally, this is 3.5 mm. This value can be changed in the user’s own lco-file, in case
the user’s printer has a wider unprintable left margin. Whether the foldmarks are typeset at
all depends on the option
foldmarks
(see
section 4.10
,
page 168
).
\@setplength
{lfoldmarkhpos}{length }
Apart from
v2.97e
the horizontal foldmarks there is also a vertical foldmark, whose position from the
left margin is set via the pseudo-length lfoldmarkhpos. This foldmark is used, for example,
in Japanese Chou- or You-format envelopes, when one wishes to use A4 size sheets with them.
This can also be useful for envelopes in C6 format.
\@setplength
{lfoldmarklength}{length }
The
v2.97e
length of the vertical foldmark is set via the pseudo-length lfoldmarklength. Here too
there is an exceptional behaviour. When the length is set to null, a length of 4 mm is actually
used.
Chapter 22: Additional Information about the Letter Class scrlttr2 and the Letter Package scrletter
472
\@setplength
{foldmarkvpos}{length }
This
v2.97e
pseudo-length gives the distance of all vertical foldmarks from the upper edge of the
paper. Normally this is 3.5 mm, but the value can be changed in the user’s personal lco-file
in case the user’s printer has a wider unprintable top margin. Whether the foldmarks are
typeset at all depends on the option
foldmarks
(see
section 4.10
,
page 168
). At present there
is only one vertical foldmark, which is designated the left vertical foldmark.
\@setplength
{foldmarkthickness}{length }
This
v2.97c
pseudo-length determines the thickness of all foldmarks. Default value is 0.2 pt, in other
words a very thin hairline. In particular, if the color of the foldmarks is changed, this can be
too thin!
22.1.2. Letterhead
The term letterhead here refers to all of the data pertaining to the sender and which is set
above the addressee’s address. It is usually expected that this information is set via the page
style settings. In fact, this was the case in the earlier incarnation of the letter class, scrlettr.
But with scrlttr2, the letterhead is made independent of the page style setting, and is set by
the command
\opening
. The position of the letterhead is absolute and independent of the
type area. In fact, the first page of a letter, the page that holds the letterhead, is set using
the page style empty.
\@setplength
{firstheadvpos}{length }
The pseudo-length firstheadvpos gives the distance between the top edge of the paper and
start of the letterhead. This value is set differently in the various predefined lco-files. A
typical value is 8 mm.
\@setplength
{firstheadhpos}{length }
A positive value of pseudo-length firstheadhpos
v3.05
gives the distance between the left edge of
the paper and the start of the letterhead. If is actually greater than or equal to the paper
width, \paperwidth, then the letterhead will be centered to the note paper width. A negative
value gives the distance between the distance between the right paper edge and the end of the
letterhead. If the value is even less or equal to the negative value of the width of the paper,
then the letterhead will be left aligned to the left edge of the typing area.
Typical default is a value of \maxdimen, though the greatest allowed value of a length. This
will result in horizontal centering.
Chapter 22: Additional Information about the Letter Class scrlttr2 and the Letter Package scrletter
473
\@setplength
{firstheadwidth}{length }
The pseudo-length firstheadwidth gives the width of the letterhead. This value is set differ-
ently in the various predefined lco-files. While this value usually depends on the paper width
and the distance between the left edge of the paper and the adressee address field, it was the
type area width in KOMAold and has a definite value of 170 mm in NF.
\@setplength
{fromrulethickness}{length }
\@setplength
{fromrulewidth}{length }
Depending on the class option fromrule (see
section 4.10
,
page 172
), a horizontal rule can
be drawn the predefined letterheads under or within the sender address. If the pseudo-length
fromrulewidth
has a value of 0 pt, which is the default in the predefined lco files, the rule
length is calculated automatically taking into account, e. g., letterhead width or an optional
logo. Users can adjust rule length manually in their own lco-files by setting this pseudo-
length to positive values using \setplength (see
page 470
). The default thickness of the line
v2.97c
,
fromrulethickness
, is 0.4 pt.
Dostları ilə paylaş: |