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}
181
Chapter 4.
\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}
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 ]{ content }
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 53
). 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:
\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 .
182
Chapter 4.
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
subject=selection
\setkomavar{subject}[description ]{content }
\setkomavar{subjectseparator}[description ]{content }
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.
Table 4.15.: predefined descrip-
tions of subject-related variables
variable name
description
subject
\usekomavar*{subjectseparator}%
\usekomavar{subjectseparator}
subjectseparator
\subjectname
183
Chapter 4.
Table 4.16.: available values of option
subject
for the position and format-
ting of the subject with scrlttr2
afteropening
subject after opening
beforeopening
subject before opening
centered
subject centered
left
subject left-justified
right
subject right-justified
titled
add title/description to subject
underlined
set subject underlined (see note in text please)
untitled
do not add title/description to subject
The subject line is set in a separate font. To change this use the commands \setkomafont
and \addtokomafont (siehe
section 4.9
,
page 53
). 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.
Example: Now, Mr Public sets a subject. He’s a more traditional person, so he likes to have
a kind of heading to the subject and therefor sets the corresponding option:
\documentclass[foldmarks=true,foldmarks=blmtP,
fromphone,fromemail,fromlogo,
subject=titled,
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}
184
Chapter 4.
\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}
\setkomavar{subject}{Missing general meeting}
\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}
The result is shown by
figure 4.18
.
firstfoot=simple switch
This
v2.97e
option determines whether the letterfoot is set or not. Switching off the letterfoot, e. g.,
using firstfoot=false, has an effect when the option enlargefirstpage (see
page 160
) is
used concurrently. In this case the text area of the page will be enlarged down to the bottom.
Then the normal distance between typing area and the letter foot will become the only distance
remaining between the end of the typing area and the end of the page.
The option understands the standard values for simple switches, as given in
table 2.5
,
page 38
. Default is the setting of the letter foot.
\setkomavar{firstfoot}[description ]{content }
The first page’s footer is preset to empty. However
v3.08
, a new construction may be made at
the content of variable firstfoot. KOMA-Script does not use the description of the
variable. For more information see the example following the next description. Only for
185
Chapter 4.
Figure 4.18.: result of a small letter with extended sender,
logo, addressee, additional sender information, place, date,
subject opening, text, closing, signature, postscript, distri-
bution 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
Subject: Missing general meeting
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
compatibility reason the deprecated command \firstfoot of scrlttr2 before release 3.08 still
exists. Nevertheless it should not be used any longer.
\setkomavar{frombank}[description ]{content }
This variable at the moment takes on a special meaning: it is not used internally at this point,
and the user can make use of it to set, for example, his bank account within the sender’s
additional information (see variable location,
page 176
) or the footer.
Example: In the first page’s footer, you may want to set the content of the variable frombank
(the bank account). The double backslash should be exchanged with a comma at
the same time:
\setkomavar{firstfoot}{%
\parbox[b]{\linewidth}{%
\centering\def\\{, }\usekomavar{frombank}%
}%
}
For the hyphen you might define a variable of your own if you like. This is left as
an exercise for the reader.
Nowadays it has become very common to create a proper footer in order to obtain
some balance with respect to the letterhead. This can be done as follows:
186
Chapter 4.
\setkomavar{firstfoot}{%
\parbox[t]{\textwidth}{\footnotesize
\begin{tabular}[t]{l@{}}%
\multicolumn{1}{@{}l@{}}{Partners:}\\
Jim Smith\\
Russ Mayer
\end{tabular}%
\hfill
\begin{tabular}[t]{l@{}}%
\multicolumn{1}{@{}l@{}}{Manager:}\\
Jane Fonda\\[1ex]
\multicolumn{1}{@{}l@{}}{Court Of Jurisdiction:}\\
Great Plains
\end{tabular}%
\ifkomavarempty{frombank}{}{%
\hfill
\begin{tabular}[t]{l@{}}%
\multicolumn{1}{@{}l@{}}{\usekomavar*{frombank}:}\\
\usekomavar{frombank}
\end{tabular}%
}%
}%
}
This example, by the way, came from Torsten Krüger. With
\ setkomavar{frombank}{Account No. 12\,345\,678\\
at Citibank\\
bank code no: 876\,543\,21}
the bank account can be set accordingly.
In the previous example a multi-line footer was set. With a compatibility setting to version
2.9u (see version in
section 4.4
,
page 29
) the space will in general not suffice. In that case,
you may need to reduce firstfootvpos (see
page 423
) appropriately.
4.11. Paragraph Markup
In the preliminaries of
section 3.10
,
page 69
it was argued why paragraph indent is preferred
over paragraph spacing. But the elements the argumentation depends on, i. e., figures, tables,
lists, equations, and even new pages, are rare. Often letters are not so long that an oversighted
paragraph will have serious consequences to the readability of the document. Because of this,
the arguments are less serious for standard letters. This may be one reason that in letters you
often encounter paragraphs marked not with indentation of the first line, but with a vertical
skip between them. But there may be still some advantages of the paragraph indent. One may
187
Chapter 4.
be that such a letter is highlighted in the mass of letters. Another may be that the corporate
identity
need not be broken for letters only.Apart from these suggestions, everything that has
been written at
section 3.10
for the other KOMA-Script classes is valid for letters too.
4.12. Detection of Odd and Even Pages
What is described in
section 3.11
applies, mutatis mutandis.
4.13. Head and Foot Using Predefined Page Style
One of the general properties of a document is the page style. In L
A
TEX this means mostly the
contents of headers and footers. Like already mentioned in
section 4.10
, the head and foot of
the note paper are treated as elements of the note paper. Therefore they do not depend on the
settings of the page style. So this section describes the page styles of the consecutive pages of
letter after the note paper. At single-side letters this is the page style of the secondary letter
sheet. At double-side letters this is also the page style of all backsides.
\letterpagestyle
The
v3.19
default page style used for letters is specified by the contents of command
\letterpagestyle
. With scrlttr2 an empty value has been predefined that does not change
the page style of the letter from the page style of the document. This has been done, because
scrlttr2 has been made for letter-only-documents. So it is much easier to define the page style
of all letters with the page style of the document using \pagestyle inside the preamble or
before starting the first letter.
The plain page style of letters differs from the plain page style of most classes. Therefore
package scrletter defines \letterpagestyle with the contents plain.letter. So all letters
will use the plain style of page style pair letter by default and independent from the page
style of the rest of the document. See
section 22.3
for more information about the character-
istics of the page style of package scrletter.
Example: You are using package scrletter and want to have the same page style inside letters
as for the rest of the document. So you are using
\renewcommand*{\letterpagestyle}{}
in your document preamble. Take care about the star of \renewcommand*!
Nevertheless, if you use \pagestyle or \thispagestyle inside a letter, this will over-
write the setting of \letterpagestyle that is only the default for the initialisation inside
\begin{document}
.
188
Chapter 4.
headsepline=simple switch
footsepline=simple switch
These two options select whether or not to insert a separator line below the header or above
the footer, respectively, on consecutive pages. This option can take the standard values for
simple switches, as listed in
table 2.5
,
page 38
. Activation of option headsepline switches on
a rule below the page head. Activation of option footsepline switches on a rule above the
page foot. Deactivation of the options switches of the corresponding rules.
Obviously option headsepline does not influence page style empty (see afterwards at this
section). This page style explicitly does not use any page head.
Typographically such a rule make a hard optical connection of head or foot and the text
area. This would not mean, that the distance between head and text or text and foot should
be increased. Instead of this the head or foot should be seen as parts of the typing area,
while calculation of margins and typing area. To achieve this KOMA-Script will pass option
headinclude
or footinclude, respectively, to the typearea package, if option headsepline
or footsepline, respectively, are used as a class option. In opposite to headsepline option
footsepline
does influence page style plain also, because plain uses a page number at the
foot. Package scrlayer-scrpage (see
chapter 5
) provides additional features for rules at head
and foot and may be combined with scrlttr2.
pagenumber=position
This option defines if and where a page number will be placed on consecutive pages. This
option affects the page styles headings, myheadings, and plain. It also affects the default
page styles of the scrlayer-scrpage package, if set before loading the package (see
chapter 5
).
It can take values only influencing horizontal, only vertical, or both positions. Available value
are shown in
table 4.17
. Default is botcenter.
\pagestyle{page style }
\thispagestyle{local page style }
In letters written with scrlttr2 there are four different page styles.
empty
is the page style, in which the header and footer of consecutive pages are completely
empty. This page style is also used for the first page, because header and footer of this
page are set by other means using the macro \opening (see
section 4.10
,
page 146
).
headings
is the page style for running (automatic) headings on consecutive pages. The in-
serted marks are the sender’s name from the variable fromname and the subject from
the variable subject (see
section 4.10
,
page 161
and
page 182
). At which position these
marks and the page numbers are placed, depends on the previously described option
pagenumber
and the content of the variables nexthead and nextfoot. The author can
also change these marks manually after the \opening command. To this end, the com-
mands \markboth and \markright are available as usual, and with the use of package
scrlayer-scrpage also \markleft (see
section 5.5
,
page 218
) is available.
189
Chapter 4.
Table 4.17.: available values of option pagenumber for the position of the page number in page styles
headings
, myheadings, and plain with scrlttr2
bot
, foot
page number in footer, horizontal position not changed
botcenter
, botcentered, botmittle, footcenter, footcentered, footmiddle
page number in footer, centered
botleft
, footleft
page number in footer, left justified
botright
, footright
page number in footer, right justified
center
, centered, middle
page number centered horizontally, vertical position not changed
false
, no, off
no page number
head
, top
page number in header, horizontal position not changed
headcenter
, headcentered, headmiddle, topcenter, topcentered, topmiddle
page number in header, centered
headleft
, topleft
page number in header, left justified
headright
, topright
page number in header, right justified
left
page number left, vertical position not changed
right
page number right, vertical position not changed
190
Chapter 4.
myheadings
is the page style for manual page headings on consecutive pages. This is very
similar to headings, but here the marks must be set by the author using the commands
\markboth
and \markright. With the use of package scrlayer-scrpage also \markleft
can be utilized.
plain
is the page style with only page numbers in the header or footer on consecutive pages.
The placement of these page numbers is influenced by the previously described option
pagenumber
.
Page styles are also influenced by the previously described options headsepline and
footsepline
. The page style beginning with the current page is switched using \pagestyle.
In contrast, \thispagestyle changes only the page style of the current page. The letter class
itself uses \thispagestyle{empty} within \opening for the first page of the letter.
For changing the font style of headers or footers you should use the user interface described
in
section 3.6
. For header and footer the same element is used, which you can name either
pageheadfoot
or pagehead. There
v3.00
is an additional element pagefoot for the page foot. This
will be used after pageheadfoot at page foots, that has been defined either with variable
nextfoot
or Package scrlayer-scrpage (see
chapter 5
,
page 212
). The element for the page
number within the header or footer is named pagenumber. Default settings are listed in
table 3.8
,
page 74
. Please have also a look at the example in
section 3.12
,
page 74
.
\markboth{left mark }{right mark }
\markright{right mark }
The possibilities that are offered with variables and options in scrlttr2 should be good enough
in most cases to create letterheads and footers for the consecutive pages that follow the first
letter page. Even more so since you can additionally change with \markboth and \markright
the sender’s statements that scrlttr2 uses to create the letterhead. The commands \markboth
and \markright can in particular be used together with pagestyle myheadings. If the package
scrlayer-scrpage is used then this, of course, is valid also for pagestyle scrheadings. There the
command \markleft is furthermore available.
\setkomavar{nexthead}[description ]{content }
\setkomavar{nextfoot}[description ]{content }
At times one wants to have more freedom with creating the letterhead or footer of subsequent
pages. Then one has to give up the previously described possibilities of predefined letterheads
or footers that could have been chosen via the option pagenumber. Instead one is free to create
the letterhead and footer of consecutive pages just the way one wants to have them set with
page style headings or myheadings. For that, one creates the desired letterhead or footer
construction using the content of variable
v3.08
nexthead
or nextfoot, respectively. Within the
content
of nexthead and nextfoot you can, for example, have several boxes side by side or
one beneath the other by use of the \parbox command (see [
Tea05b
]). A more advanced user
191
Chapter 4.
should have no problems creating letterheads of footers of his own. Within content you can
and should of course also make use of other variables by using \usekomavar. KOMA-Script
does not use the description of both variables.
Only for compatibility reason the deprecated commands \nexthead and \nextfoot of for-
mer scrlttr2 releases before 3.08 are also implemented. Nevertheless, you should not use those.
Dostları ilə paylaş: |