22.4. Differences in the Handling of lco-Files in scrletter
As
v3.15
shown in
section 4.21
, scrlttr2 can load lco-files via the optional argument of
\documentclass
. Package scrletter does not support this.
\LoadLetterOption{name }
\LoadLetterOptions{list of names }
For scrlttr2 it is only recommended to load lco-files using \LoadLetterOption or
\LoadLetterOptions
. With scrletter you must use these commands to load lco-files. Of
course, you can use these commands at the earliest after loading scrletter.
22.5. lco-Files for Experienced Users
Even though each paper size, that may be set up using package typearea, may be also used
with scrlttr2, the result of the first page may be unwanted with some of those page sizes. The
conception of the class is not the reason for this, but the fact, that there are mainly parameter
sets for ISO A4 paper. Unfortunately their are not any universal rules, to calculate, e. g., the
position of the address field or similar for every available paper sizes. But it is possible to
make parameter sets for any paper size that is needed.
22.5.1. Survey of Paper Size
At present there exist only parameter sets and lco-files for A4-sized or letter-sized paper.
Nevertheless, class scrlttr2 supports many more paper sizes. Because of this it’s necessary to
survey setting up the correct paper size.
427
Chapter 22.
\LetterOptionNeedsPapersize{option name }{paper size }
In order that you will at least be warned when using another paper size , you will find a
\LetterOptionNeedsPapersize
command in every lco-file distributed with KOMA-Script.
The first argument is the name of the lco-file without the “.lco” suffix. The second argument
is the paper size for which the lco-file is designed.
If several lco files are loaded in succession, a \LetterOptionNeedsPapersize command
can be contained in each of them, but the \opening command will only check the last given
paper size
. As shown in the following example, an experienced user can thus easily write
lco
-files with parameter sets for other paper sizes.
Example: Suppose you use A5-sized paper in normal, i. e., upright or portrait, orientation
for your letters. We further assume that you want to put them into standard C6
window envelopes. In that case, the position of the address field would be the same
as for a DIN standard letter on A4-sized paper. The main difference is that A5
paper needs only one fold. So you want to disable the topmost and bottommost
folding marks. If their would not be options for this, the easiest way to achieve
this would be to place the marks outside of the paper area.
\ProvidesFile{a5.lco}
[2002/05/02 letter class option]
\LetterOptionNeedsPapersize{a5}{a5}
\@setplength{tfoldmarkvpos}{\paperheight}
\@setplength{bfoldmarkvpos}{\paperheight}
Besides this, the placement of the foot, that is, the pseudo-length firstfootvpos,
must be adjusted. It is left to the reader to find an appropriate value. When using
such an lco file, you must only take care that other lco file options, like SN, are
declared before loading “a5.lco”.
22.5.2. Visualization of Positions
If someone develops a new lco-file, e. g., to adapt the positions of the several fields of the note
paper because of own wishes or because it’s simply necessary, then it often will be useful to
make at least some elements directly visual. This is the sense of lco-file visualize.lco
v3.04
. This
file may be loaded like each other lco-file. But in difference to other lco-files it has to be
done in the document preamble and it’s not possible to switch off the effects of that lco-file.
This lco-file uses packages eso-pic and graphicx, that are not part of KOMA-Script.
\showfields{field list }
This command activates the visualization of note paper fields. Argument field list is a
comma separated list of fields that should be visualized. Following are the supported fields:
428
Chapter 22.
test
– is a test field of size 10 cm by 15 cmd with position 1 cm down and right from the
topmost and leftmost edges of the paper. This field exists for debugging purpose.
It may be used as an measure comparison in the case, that the measures will be
adulterated while printing.
head
– is the header area of the note paper. This area has an open bottom.
foot
– is the footer area of the note paper. This area has an open top.
address
– is the address window area used by window envelopes.
location
– is the field of the sender’s extension.
refline
– is the business line. This are has an open bottom.
The color of the visualization may be changed using commands\setkomafont und
\addtokomafont
(see
section 4.9
,
page 53
) with the element field. Default is \normalcolor.
\setshowstyle{visualization style }
\edgesize
The default for the visualization of single areas are frames around the areas. Areas with
open top or bottom are not framed completely but have an open edge with arrows at the
end of the ending lines. Alternatively the visualization style rule may be used. In
this case a background color will be used to visualize the areas. This does not differ open
and closed areas. Instead a minimal height will be used for open areas. The third available
visualization style
is edges. This will mark the corners of the areas. The corner marks
at the open edge of open areas will be omitted. The size of two edges of the corner marks are
given by the macro \edgesize with default 1 ex.
\showenvelope
(width ,height )(h-offset ,v-offset )[instructions ]
\showISOenvelope{format }[instructions ]
\showUScommercial{format }[instructions ]
\showUScheck[instructions ]
\unitfactor
These commands may be used to output a graphics of an envelope. The envelope of the graphic
will be rotated by 90° and printed in measure 1:1 to one document page. The addressee window
will be generated automatically using the current data of the address position of the note
paper: toaddrvpos, toaddrheight, toaddrwidth, and toaddrhpos. For this the differences
h-offset
and v-offset of size of the folded letter sheet to the size of the envelope, width
and height , will be needed. If both values, h-offset and v-offset , will be omitted using
\showenvelope
, then these will be calculated from the folding marks and the paper size.
Commands \showISOenvelope, \showUScommercia, and \showUScheck base on
\showenvelope
. With \showISOenvelope ISO-envelopes with format C4, C5, C5/6, DL
429
Chapter 22.
(also known as C5/6) or C6 may be generated. With \showUScommercial an US-commercial
envelope of format 9 or 10 may be generated. \showUScheck may be used for envelopes in
format US-check.
The instructions may be used to print additional elements inside the envelope.
The position of the letter sheet will be signed with dash lines inside the envelope. The color
of this dash lines may be changed using commands \setkomafont und \addtokomafont (see
section 4.9
,
page 53
) with element letter. Default is \normalcolor.
The envelope will be dimensioned automatically. The color of the dimensioning may be
changed using commands \setkomafont und \addtokomafont (see
section 4.9
,
page 53
) with
element measure. Default is \normalcolor The dimensioning will be done in multiply of
\unitlength
with accuracy of 1/\unitfactor. Nevertheless accuracy of the TEX arithmetic
also limits the accuracy of dimensioning. Default is 1. The \unitfactor may be changed
using \renewcommand.
Example: An example letter in format ISO-A4 will be produced. The supported fields should
be visualized with yellow frame lines. Additionally the position of the window of
an envelope with size DL should be checked with a graphics. The measure lines of
the dimensioning should be red and the measure numbers should use a small font.
The accuracy of the dimensioning should be 1 mm. The dashed note paper sheet
in the envelope should be colored green.
\documentclass[visualize]{scrlttr2}
\usepackage{xcolor}
\setkomafont{field}{\color{yellow}}
\setkomafont{measure}{\color{red}\small}
\setkomafont{letter}{\color{green}}
\showfields{head,address,location,refline,foot}
\usepackage[ngerman]{babel}
\usepackage{lipsum}
\begin{document}
\setkomavar{fromname}{Peter Musterfrau}
\setkomavar{fromaddress}{Hinter dem Tal 2\\
54321 Musterheim}
\begin{letter}{%
Joana Public\\
Hillside 1\\
12345 Public City%
}
\opening{Hello,}
\ lipsum[1]
\closing{Good bye}
\end{letter}
\setlength{\unitlength}{1cm}
\renewcommand*{\unitfactor}{10}
430
Chapter 22.
\showISOenvelope{DL}
\end{document}
This will show the note paper on the first and the envelope graphic on the second
document page.
Please note, that inauspicious combinations of \unitlength and \unitfactor may provoke
TEX errors like arithmetic overflow very soon. Also shown measure numbers may differ a
little bit from the real value. Both are not mistakes of visualize but simple implementation
limitations of TEX.
22.6. Language Support
The document class scrlttr2 supports many languages. These include German (german for old
German orthography, ngerman for the new orthography, austrian for Austrian with old Ger-
man orthography, and naustrian
v3.09
for Austrian with new orthography), English (english with-
out specification as to whether American or British should be used, american and USenglish
for American, and british and UKenglish for British), French, Italian, Spanish, Dutch,
Croatian, Finnish, Norsk
v3.02
, and Swedish
v3.08
.
If the package babel (see [
BB13
]) is used, one can switch between languages with the com-
mand \selectlanguage{ language }. Other packages like german (see [
Rai98a
]) and ngerman
(see [
Rai98b
]) also define this command. As a rule though, the language selection takes place
already as a direct consequence of loading such a package.
There is one thing more to mention about language packages. The package french (see
[
Gau07
]) redefines not only the terms of
table 22.3
, but also other, for instance some versions
of that package even redefine the command \opening, since the package assumes that the
definition of the standard letter is used. With scrlttr2 this is not the case, therefore the package
french destroys the definition in scrlttr2 and does not work correctly with KOMA-Script. The
author views this is a fault in the french package.
If one utilizes the babel package in order to switch to language french while the package
french is simultaneously installed, then the same problems may likely occur, since babel employs
definitions from the french package.
From babel version 3.7j this problem only occurs when it is indicated explicitly by means
of an option that babel should use the french package. If it cannot be ascertained that a new
version of babel is being used, it is recommended to use
\usepackage[...,frenchb,...]{babel}
in order to select french.
Other languages can possibly cause similar problems. Currently there are no known prob-
lems with the babel package for the german language and the various english language selec-
tions.
431
Chapter 22.
\captionsenglish
\captionsUSenglish
\captionsamerican
\captionsbritish
\captionsUKenglish
\captionsgerman
\captionsngerman
\captionsaustrian
\captionsnaustrian
\captionsfrench
\captionsitalian
\captionsspanish
\captionsdutch
\captionscroatian
\captionsfinnish
\captionsnorsk
\captionsswedish
If one switches the language of a letter then using these commands the language-dependent
terms from
table 22.3
,
page 433
are redefined. If the used language selection scheme does not
support this then the commands above can be used directly.
\dateenglish
\dateUSenglish
\dateamerican
\datebritish
\dateUKenglish
\dategerman
\datengerman
\dateaustrian
\datenaustrian
\datefrench
\dateitalian
\datespanish
\datedutch
\datecroatian
\datefinnish
\datenorsk
\dateswedish
The numerical representation of the date (see option numericaldate in
section 4.10
,
page 177
)
will be written depending on the selected language. Some examples can be found in
table 22.2
.
432
Chapter 22.
Table 22.2.: Language-dependent forms of the date
Command
Date example
\dateenglish
24/12/1993
\dateUSenglish
12/24/1993
\dateamerican
12/24/1993
\datebritish
24/12/1993
\dateUKenglish
24/12/1993
\dategerman
24. 12. 1993
\datengerman
24. 12. 1993
\dateaustrian
24. 12. 1993
\datefrench
24. 12. 1993
\dateitalian
24. 12. 1993
\datespanish
24. 12. 1993
\datedutch
24. 12. 1993
\datecroatian
24. 12. 1993.
\datefinnish
24.12.1993.
\datenorsk
24.12.1993
\dateswedish
24/12 1993
\yourrefname
\yourmailname
\myrefname
\customername
\invoicename
\subjectname
\ccname
\enclname
\headtoname
\headfromname
\datename
\pagename
\phonename
\faxname
\emailname
\wwwname
\bankname
The commands contain the language-dependent terms. These definitions can be modified in
order to support a new language or for private customization. How this can be done is described
in
section 12.4
. The definitions become active only at \begin{document}. Therefore they are
not available in the L
A
TEX preamble and cannot be redefined there. In
table 22.3
the default
settings for english and ngerman can be found.
433
Chapter 22.
Table 22.3.: Default
settings
for
language-dependent
terms
using
languages english and ngerman, as
long as language selection packages
have not been used
Command
english
ngerman
\bankname
Bank account Bankverbindung
\ccname
1
cc
Kopien an
\customername
Customer no. Kundennummer
\datename
Date
Datum
\emailname
Email
E-Mail
\enclname
1
encl
Anlagen
\faxname
Fax
Fax
\headfromname
From
Von
\headtoname
1
To
An
\invoicename
Invoice no.
Rechnungsnummer
\myrefname
Our ref.
Unser Zeichen
\pagename
1
Page
Seite
\phonename
Phone
Telefon
\subjectname
Subject
Betrifft
\wwwname
Url
URL
\yourmailname
Your letter of Ihr Schreiben vom
\yourrefname
Your ref.
Ihr Zeichen
1 Normally these terms are defined by language packages like babel. In this case they are not redefined by
scrlttr2
and may differ from the table above.
22.7. From Obsolete scrlettr to Current scrlttr2
With the June 2002 release of scrlttr2 (see
chapter 4
) the old letter class scrlettr became
obsolete. It is recommended not to use that class for new applications. There is no more active
development of the old letter class, and support is very restricted. However, if you really need
the documentation of the old letter class, you can still find it in the file scrlettr.dtx, but
only in German. You should run it through L
A
TEX several times, like this:
latex scrlettr.dtx
mkindex scrlettr
latex scrlettr.dtx
mkindex scrlettr
latex scrlettr.dtx
Then you obtain the file scrlettr.dvi containing the old German manual. If you want
scrlettr.pdf
instead of scrlettr.dvi you should use pdflatex instead of latex.
To facilitate the transition to the new class, there is the compatibility option KOMAold. In
general, the complete older functionality still remains in the new class. Without KOMAold, the
user interface and the defaults will be different. More details on this option are provided in
434
Chapter 22.
section 4.21
,
table 4.18
.
Sorry, currently additional information to this may be found at the same point of the German
KOMA-Script book [
Koh14a
] only.
435
Appendix A.
Japanese Letter Support for scrlttr2
1
Since version 2.97e scrlttr2 provides support not only for European ISO envelope sizes and
window envelopes, but also for Japanese envelopes, in the form of lco files which set the
layout of the paper. This chapter documents the support, and provides a few examples of
using the provided lco files for printing letters intended for Japanese envelopes.
A.1. Japanese standard paper and envelope sizes
The Japan Industrial Standard (JIS) defines paper sizes and envelope sizes for national use,
which both overlap with the ISO and US sizes and include some metricated traditional
Japanese sizes. Envelope window size and position have not been defined internationally
as yet; hence, there exists a plethora of envelopes with differing window sizes and positions.
The below subsections give some background on Japanese paper sizes and envelopes.
A.1.1. Japanese paper sizes
The JIS defines two main series of paper sizes:
1. the JIS A-series, which is identical to the ISO A-series, but with slightly different toler-
ances; and
2. the JIS B-series, which is not identical to the ISO/DIN B-series. Instead, the JIS B-
series paper has an area 1.5 times that of the corresponding A-series paper, so that the
length ratio is approximately 1.22 times the length of the corresponding A-series paper.
The aspect ratio of the paper is the same as for A-series paper.
Both JIS A-series and B-series paper is widely available in Japan and most photocopiers and
printers are loaded with at least A4 and B4 paper. The ISO/JIS A-series, and the different
ISO and JIS B-series sizes are listed in
table A.1
.
There are also a number of traditional paper sizes, which are now used mostly only by
printers. The most common of these old series are the Shiroku-ban and the Kiku paper sizes.
The difference of these types compared to the JIS B-series are shown in
table A.2
. Finally,
there are some common stationary sizes, listed in
table A.3
. You may come across these when
buying stationary.
The ISO C-series is not a paper size as such, but is a standard developed for envelopes,
intended for the corresponding A-series paper, and is discussed in the next subsection.
1
This chapter has been written originally by Gernot Hassenpflug.
436
Appendix A.
Table A.1.: ISO and JIS standard paper sizes
ISO/JIS A W×H in mm ISO B W×H in mm JIS B W×H in mm
A0
841×1189
B0
1000×1414
B0
1030×1456
A1
594×841
B1
707×1000
B1
728×1030
A2
420×594
B2
500×707
B2
515×728
A3
297×420
B3
353×500
B3
364×515
A4
210×297
B4
250×353
B4
257×364
A5
148×210
B5
176×250
B5
182×257
A6
105×148
1
B6
125×176
B6
128×182
A7
74×105
B7
88×125
B7
91×128
A8
52×74
B8
62×88
B8
64×91
A9
37×52
B9
44×62
B9
45×64
A10
26×37
B10
31×44
B10
32×45
A11
18×26
B11
22×32
A12
13×18
B12
16×22
1
Although Japan’s official postcard size appears to be A6, it is actually 100×148 mm, 5 millimeters narrower
than A6.
A.1.2. Japanese envelope sizes
ISO (International Organization for Standardization) envelope sizes are the official interna-
tional metric envelope sizes; however, Japan uses also JIS and metricated traditional envelope
sizes. Sizes identified as nonstandard do not conform to Universal Postal Union requirements
for correspondence envelopes.
Table A.2.: Japanese B-series variants
Format JIS B-series
Shiroku-ban
Kiku
Size
W×H in mm W×H in mm W×H in mm
4
257×364
264×379
227×306
5
182×257
189×262
151×227
6
128×182
189×262
7
91×128
127×188
437
Appendix A.
Table A.3.: Main Japanese contemporary stationary
Name
W×H in mm Usage and Comments
Kokusai-ban
216×280
“international size”
i. e., US letter size
Semi B5 or
177×250
“standard size”
Hyoujun-gata
(formerly called “Hyoujun-gata”),
semi B5 is almost identical to ISO B5
Oo-gata
177×230
“large size”
Chuu-gata
162×210
“medium size”
Ko-gata
148×210
“small size”
Ippitsu sen
82×185
“note paper”
Dostları ilə paylaş: |