The isodoc class
∗
for letters, invoices, and more
Wybo Dekker
†2021/06/25
Abstract
Theisodocclass can be used for the preparation of letters, invoices, and, in the future, similar documents. Documents are set up with options, thus making the class easily adaptable to user’s wishes and extensible for other document types.
Keywords: letter, invoice, key/value, nen1026
Contents
1
Introduction
2
2 Class options
2
3 Options for
\setupdocument
2
4 Commands
7
5 Usage: letters
9
5.1
A simple letter
. . . .
9
5.2
Multiple letters, redefined logo
. . . .
11
6 Usage: invoices
15
6.1
A simple invoice
. . . .
15
6.2
Invoice with redefined logo
. . . .
17
7 Example files
19
8 Implementation
20
8.1
The options and their defaults
. . . 20
8.1.1
General options
. . . 20
8.1.2
Logo
. . . .
21
8.1.3
Address window
. . . 22
8.1.4
Header
. . . 22
8.1.5
Footer
. . . 23
8.1.6
Folding mark
. . . 23
8.1.7
Header fields
. . . 24
8.1.8
Closing, autograph, signature
. . . 24
8.1.9
Invoice specific data
. . . 25
8.2
User Macros
. . . 26
8.2.1
Logo
. . . 27
8.3
Internal Macros
. . . 33
8.4 Translations
. . . 34
1 Introduction
This class is intended to be used for the preparation of letters and invoices. Its starting
point was Victor Eijkhout’s NTG
briefclass
1, which implements the nen 1026 standard.
The
briefclass does not provide facilities for invoices and it is not easily extensible.
The goal for the
isodocclass is to be extensible and easy to use by providing
key=valueconfiguration. Furthermore, texts that need to be placed on prescribed positions on the
page (there are many such texts) are positioned by using the
textpospackage.
2This
provides a very robust construction of the page.
The class itself contains many general definitions, but variable data, such as opening,
closing, address and many more, have to be defined using
key=valuedefinitions, either in
the document or in a style file. The latter is indicated for definitions that don’t vary on a
per document basis, such as your company name, address, email address and so on. Thus
if you run a company and also are the secretary of a club, you would have style files for
each of them, plus one for your private letters or invoices.
3The general setup of a document producing one or more letters is (see figures
1
–
3
,
page
13
–
14
, for examples):
\documentclass{isodoc} \usepackage{<somestyle>}
\setupdocument{<generaloptions>} \begin{document}
\letter[<addressee_specific_options>]{<letter_content>} ... more \letter calls ...
\end{document}
Similarly, the general setup of a document producing one or more invoices is (figure
4
,
page
16
):
\documentclass{isodoc} \usepackage{<somestyle>} \setupdocument{<generaloptions>} \begin{document} \invoice[<addressee_specific_options>]{<invoice_content>} ... more \invoice calls ...\end{document}
This document describes several examples. The distribution contains a directory
examples
where each of these has a complete set of files, ready to experiment with.
2 Class options
The isodoc class is based on the
memoirclass and you can use its class options. Note,
however, that if you change the font size from its default (10pt) to an other value (11pt, 12pt)
this applies to all text, including headings, address label, et cetera. This is normally not
what you want. If you really want to change the font size of, for example, the text body,
do so with the usual font commands. Doing so will result in poorly balanced document,
however.
3 Options for
\setupdocument
Options are given as key=value pairs, separated by comma’s. Extra comma’s, including one
behind the last pair, don’t hurt. An option argument should be enclosed in braces if it
contains comma’s or equals signs.
As shown in the two examples in the previous section, there are three commands
that can set options:
\setupdocument,
\letter, and
\invoice. These commands will
1CTAN: ntgclass/briefdoc.pdf 2CTAN: textpos/textpos.pdf
3If you archive your documents in their source form only, it may be wise to work without a style file and set
be further explained in the Commands section.
\setupdocumentis normally used to set
options that are common to all letters or invoices in the document, like your company
data; the optional arguments of
\letterand
\invoiceset only those options that are
different for each letter or invoice, such as the
toand
openingoptions.
This section lists and explains all available options. All options can be used in both the
style files and in the document source, although several will normally only be used in style
files (such as
company) and some only in the document source (such as
toor
opening).
Language
The options described here relate to the language used for the isodoc interface (headings,
footings, date, payment data and so on.) This language is independent of the language
you set with the
babelor
polyglossiapackages. So, for example, you can write your
document in English and use Dutch for the interface. Also, use of
babelor
polyglossiais not required.
Currently only a few interface languages are defined. As I am not particularly strong
in the translation of administrative terminology, please feel free to send me corrections.
And if you don’t find your own language here, please send me your translations and your
language will be added.
The
languageoption sets the language, en-GB is used by default.
language = ...
sets the interface language to any language defined by the class.
Currently these are: en-GB, en-US, fr-FR, de-DE, nl-NL, nl-BE, it-IT,
es-ES, ca-ES, nb-NO, sr-RS; the hyphens in these names are optional,
so you can, for example, also write enGB.
ordinalss
sets ordinal suffixes in dates (like st, nd, rd, th) superscripted. The
default is to keep them on the line. Note that you must use this
option before any language option.
The definitions for the languages are in macros named
\isodoc@xxYY, where xx stands
for the language, and YY for regional variants. These macros contain definitions like:
\gdef\phonetext{telephone}
If you are not satisfied with isodoc’s choices for your language, you can change those,
but only after loading the language in the preamble, that is: you need to choose your language
in a style file or in the
\setupdocumentstatement, because otherwise isodoc will overwrite
your changes with the definition for the
en-GB(English) language.
Logo
Information about the sender is defined here. The logo, by default, consists of a large
company name on top a rule with, hanging under the rule, a contact person’s data. You
can define the latter either explicitly with the
logoaddressoption, or let it automatically
be created from the contents of the options
who,
street,
zip,
city,
country, and
foreign,
as far as you have defined those.
Definition in parts can be useful if you need them elsewhere in your document.
logo
Switches the logo on; this is the default, but still useful if you have
used the
nologooption in your style file.
nologo
Switches the logo off. This is useful if you have defined your own
logo and have letter paper preprinted with that logo. You can
then use
nologofor the paper version and
logofor a pdf to be
sent by email.
company = ...
Your company name as it should appear in the logo (if you use the
default logo) and in the return address (where it may get
overrid-den by the
returnaddresskeyword.) For private documents, use
your name or nickname here.
logoaddress = ...
Contact person’s data; use \\ commands for line breaks. If you
don’t define this option, the data will be constructed from the
following options.
street = ...
Street in the sender’s address.
city = ...
City in the sender’s address.
zip = ...
Zip in the sender’s address.
cityzip
Place zip after city, instead of before it (the default).
country = ...
Country in the sender’s address. Only used if
foreignkey was
used.
countrycode = ...
Sender’s country code. For The Netherlands: NL
areacode = ...
Sender’s area code. For The Netherlands: 31
foreign
Use this key if you send your letter to a foreign country. With it,
your country will be added to return and logo addresses, your zip
code will be prefixed with your country code, telephone numbers
will be prefixed with
+31\,(or whatever your
areacodeoption
has been set to) instead of just a 0.
Address window
The addressee’s address is printed in a window. The width of the window is two columns
(70 mm), and its contents are vertically centered in it. There are no limits to the vertical
size of the window, other than the physical size of the window in the envelopes you
use. The vertical position of the window’s center is set with the
addresscenterkeyword.
Horizontally there are two options: left or right.
leftaddress
Places the window over columns 2 and 3; this is the default.
rightaddress
Places the window over columns 4 and 5.
addresscenter = ...
Distance in mm of the center of the window from the top of the
paper; the default value is 63.5 mm, fitting for a DL envelope for
triple folded A4 (110x220mm) with a window at 50 mm from the
top, 30mm high.
4addresswidth = ...
The address window’s width. The default is 70 mm (2 columns).
to = ...
The addressee’s address. New lines can be introduced with the
\\
command; lines longer than 70 mm will cause extra newlines.
The first part of this address, up to the first
\\, is considered to
be the name of the addressee, and is reported in the headings of
page 2 and subsequent pages.
5[no]return
Do or don’t print a return address on top of the addressee’s address.
This is useful if blank window envelopes are used. The return
address is composed from the contents of the
company,
street,
zip,
city, and
countrykeywords; it is printed in a bold script size sans
serif font and is is separated from the addressee’s address with a
rule. The country will only be printed if the
foreignkeyword has
been used.
returnaddress = ...
The return address, if it is composed as just described, may become
too long to fit in the address window. Or you may want to define
a completely different return address. With the
returnaddresskeyword you can redefine the return address. Use \\ to insert
bullets.
Header fields
Under the address window, a header is printed. The page is vertically divided in six columns,
one each for the left and right margins, and four which, in the header, say: Your letter of,
Your reference, Our reference, and Date, each with their respective contents under them. If
the
subjectkeyword is used, an extra line starting with Subject: will appear, followed by
4The middle of the window is at 50+30/2=65 mm from the top of the envelope; the paper is folded (see the
folding options below) to give the folded paper a tolerance of 1.5mm on both sides in the envelope, so the address should be placed 1.5 mm higher at 65-1.5=63.5 mm.
5German users may want to create an address starting with Herrn on the first line and the addressee’s name
the contents on the same line and over a width of 2.5 columns. If needed, extra lines will
be used.
bodyshift = ...
The header starts 98mm from the top of the paper, but it can be
shifted with the
bodyshiftoption.
[no]header
The
noheaderoption disables all header fields, the
headeroption
re-enables them (
headeris the default.)
yourletter = ...
first field in the header: the date of the letter this document is
reaction on; empty by default.
yourref = ...
second field in the header: addressee’s reference of the letter this
document is reaction on; empty by default.
ourref = ...
third field in the header: your own reference for this document.
date = ...
fourth field of the header. The argument must have the form
yyyymmdd
or
yyyy-mm-dd; it will be translated into a date like «May
3, 2006» if the document language is English, or into its translation
in the actual language. The default value is «Undefined date»,
that is: the date of \
todayis not the default as this would make
the date untraceable from the document source only. However,
you can force the use of \
todayby providing the string
today(not
\today!) for the argument.
forcedate = ...
The restrictions of the
dateoption can be overridden by using
the
forcedateoption instead; you can thus enter anything you
like for the date.
subject = ...
subject of this document; is placed under the other fields, and
over the full text width, in a two-column table with ”Subject:”
(or the current language’s equivalent) in the first column and the
text, raggedright, in the second column. Use newlines if you want
to restrict the width of the text. In some languages (
de-DE) the
”Subject:” is omitted and the subject text is typeset in bold face.
Opening and Closing
A letter is started with an opening – something like «Dear John», and ended with a closing
– something like «Regards,
<newline>Betty», perhaps with an autograph (or white space)
in between.
opening = ...
Dear John
openingcomma = ...
by default, the opening phrase is followed by a comma, but you
can change that here.
closing = ...
Regards
closingcomma = ...
by default, the closing phrase is followed by a comma, but you
can change that here.
signature = ...
Betty
autograph = ...
This keyword can have one of the 10 values 0–9:
0: no autograph; the
signatureappears right under the
closing. This is the default if the
autographoption is not
used (using it without a value is equivalent to
autograph=2).
1: generates extra whitespace between
signatureand
closingfor a hand-written autograph. The amount of whitespace is
\signatureskip
.
2–9: inserts one of eight autograph images which, with the
\
autographcommand, may have been defined in the style
file.
enclosures = ...
This keyword can be used to add a note, at the end of the document,
which starts with Enclosure: followed by the value of the keyword.
Multiple enclosures can be separated with \\ commands. If those
are found, the starting text will be Enclosures:. It appears under
the closing, with a white line in between.
66The whitespace in between can be influenced (preferably in a style file) with the dimen \enclosureskip,
copyto = ...
This keyword can be used to add a note, at the end of the document,
which starts with Copy to: followed by the value of the keyword.
Multiple entries can be separated with \\ commands. It appears
under the enclosures or, if those are absent, the closing, with a
white line in between.
7Footer fields
Footer fields are meant to be used for contact information. Any other information, like a
VAT number, should go to a relevant place. The VAT number, for example, could go to the
payment information in an invoice. Or it can be incorporated into a user- defined logo.
If the
footeroption is used, up to five footer fields are shown in the order defined in
the
footorderoption; available fields, defined with options of the same name, are currently
website,
phone,
cellphone,
faxand
email.
[no]footer
enables or disables printing a page footer; there is room for up
to four fields, if you set five fields, the last one will appear in the
right margin.
footorder = ...
changes the order of footer fields. The argument should be a
semicolon (;) separated list of field names. By default this string is
defined as
website;phone;cellphone;email. Empty fields can be
inserted with extra semicolons.
phoneprefix
prefix for phone numbers. The default is
0; it will be changed into
+nn\,
(where
nnis the area code) if the
foreignoption is used.
phone = ...
if defined
8, and phone occurs in the footorder string, prints
«phone» in the page footer, with the contents under it, prefixed
with a 0 or, if the
foreignoption was used, the area code (set
with the
areacodeoption.) Telephone numbers should thus be
entered without a prefix.
cellphone = ...
same for cellphone...
fax = ...
fax...
email = ...
email...
website = ...
and website.
Folding marks
Folding marks can be useful, particularly if your address window is used to its limits.
Correctly folding your letter then prevents parts of the address to become invisible because
of the letter loosely filling the envelope.
nofold
Disable folding marks.
foldleft
The folding mark is printed in the left margin.
foldright
The folding mark is printed in the right margin. This is the default.
fold2
Folding mark at about halfway, set for tight fitting into a 220x162
mm envelope, with a tolerance of 2 mm at both sides.
fold3
Folding mark at about one third from the top, set for tight fitting
into a 220x110 mm envelope, with a tolerance of 1.5 mm at both
sides.
fold = ...
For non-standard envelopes and paper formats the position of the
folding mark can be set at any position (in mm) from the top of
the paper.
7The whitespace in between can be influenced with the dimen \copytoskip, default \baselineskip 8If you leave the footer entries undefined, or you define them as an empty string such as phone=, or phone={},
Payment data
In invoices you probably want to make clear where you want your debtor to transfer his
money to. You can do so by calling the \
paymentdatacommand, which generates a little
table containing these data. The contents of this table can be defined with the keywords
below; they are listed in the order presented here, but the order, as well as the selection of
data can be modified with the
paymentorderoption. Only non-empty data will be listed.
term = ...
Payment term in days; default is 30.
bankname = ...
The name of your bank, like Barclays.
bic = ...
Your bank’s bic code in lower case; will be typeset in small caps.
routingno = ...
Your bank’s routing number.
iban = ...
Your account’s iban code in lower case; will be typeset in small
caps.
accountno = ...
Your bank account number.
accountname = ...
Your bank account’s ascription, probably your initials, followed by
your last name.
payref = ...
Reference to the invoice. If, before the
\invoicecall, it’s empty,
it will be replaced with the value of
\ourref(used in the header
fields, may also be empty.) Suppress it by making it empty in the
\invoice
call itself:
\invoice [payref=]{...}.
vatno = ...
Your vat reference number.
chamber = ...
Your Chamber of Commerce subscription number.
paymentorder = ...
Sets the selection and order of the above data. The argument
must be semicolon-separated string containg the names of the
data to be listed (if non-empty.) The default for the string is
term;bankname;bic;routingno;iban;accountno;accountname; payref;vatno;chamber
.
currency = ...
Currency; default is euro. Appears in the invoice table, not in the
payment data table.
creditorid = ...
The SEPA-related creditor id.
9mandateid = ...
The SEPA-related mandate id.
Accept data
These keys pertain to data needed for accept forms:
acceptaccount = ...
Payer’s bank account number
acceptaddress = ...
Payer’s address lines, separated with \\
accepteuros = ...
Euro part of the amount to be paid
acceptcents = ...
Cents part of the amount to be paid
acceptdescription = ...
Description to be quoted on the accept form
acceptdesc = ...
Short version of the description for the detachable strip of the
form to be kept by the payer
acceptreference = ...
Reference
Miscellaneous
[no]fill
Use the
fillkeyword to justify text both left and right; the default
is
nofill: left justification only.
shift = ...
The many text positions in isodoc are defined in millimeters, but
sometimes printers show an aberration in their horizontal or
verti-cal printing position. You can correct for this with the
shift = x,yoption, where x and y (both 0 by default) shift the output to the
right and down, respectively, in millimeters.
9Currently the texts for the creditorid and mandateid options, which are defined in \creditoridtext
[no]vertical
Invoice tables are printed with a vertical line between
descrip-tion and amount. The
noverticaloption suppresses this, the
vertical
option restores it.
4 Commands
The \
showkeyscommand can be useful for debugging. It prints a table showing the option
\showkeys
keys described in the previous section, and their current values.
Most of the setup, both in the style files and in the documents themselves, is done
\setupdocument
setting options in a call to the class-defined
\setupdocumentcommand. The options
can be either a key/value pair, or just a key. Options with values and those without may
occur in any order, with the exception of
addresscenter(see there.) Values need their
surrounding {}’s only if they contain any comma’s. The Options section explains the available
options.
Most of the options have a corresponding command with the same name. Although
not very often, it may sometimes be useful to have those commands available. These are
the options with a corresponding command:
acceptaccount
areacode
country
mandateid
street
acceptaddress
bankname
countrycode
opening
subject
acceptcents
bic
creditorid
ourref
term
acceptdesc
cellphone
currency
payref
vatno
acceptdescription
chamber
phone
website
accepteuros
city
enclosures
phoneprefix
who
acceptreference
closing
fax
returnaddress
yourletter
accountname
company
iban
routingno
yourref
accountno
copyto
logoaddress
signature
zip
So you could write in your letter: «Please send the money to my bank account:
\accountno\
as soon as possible.»
The
\lettercommand produces one letter and can be called multiple times. It has
\lettertwo arguments. The first argument is optional and must be a list of
key=valuepairs. The
options set here are usually those that vary among different letters. The second argument
contains the letter’s content. This content will, depending on the options set, automatically
be surrounded by an opening, a closing, an autograph, a signature and a remark about
any enclosures. The first page of each letter will be decorated with a logo, the addressee’s
address, a return address, various reference fields, a footer, a folding mark — all as defined
by
key=valuepairs in
\setupdocumentor in the
\lettercommand itself.
The second an following pages will have a heading, quoting the name of the addressee
and a page number. Examples of letters can be found in the section Usage: letters.
The
\invoicecommand is essentially the same as the
\lettercommand, except
\invoice
that the opening is always «invoice», and the content (argument 2) is largely composed
using the
\itable,
\iitem,
\itotal, and
\paymentdatacommands described hereafter.
Closing, autograph, and signature are disabled.
In the Netherlands, invoices can be provided with an accept form on the lower third
part of the page. If the
acceptoption was used, this accept form will be filled with the
available data, in the
ocrbfont where needed.
The following commands pertain to invoices: The
\itablecommand uses
tabularxto
\itablecreate a two-column table. The first column of the table will have the header «Description»
(or its equivalent in the language selected), the header of the second column says «Amount
(EUR)». The argument of
\itableshould contain the contents of the table and could be
of the form:
item 1 & amount 1\\ item 2 & amount 2\\ ...
item n & amount n\\\cline{2-2} Total & amount\\
However, the next two commands may be used to enter these data more cleanly, and they
provide better line spacings:
to writing
item & amount\\.
The
\itotal[...]{amount}command (
itotalstands for Invoice total) is equivalent
\itotal
to writing:
\cline{2-2} Total & amount\\, with the additional advantage that the
word «Total» will be replaced with its equivalent in the current language, or, if the
optional argument is given, with that optional argument. Thus, the argument to the
\itable
command show above can also be written:
\iitem{item 1}{amount 1} \iitem{item 2}{amount 2} \itotal[Subtotal]{amount} ... \iitem{item n}{amount n} \itotal{amount}The
\paymentdatacommand prints a little table with accounting information needed
\paymentdataby the creditor for paying the invoice. It is constructed using the values of the options
term
,
bankname,
bic,
routingno,
iban,
accountno,
accountname,
payref,
vatnoand
chamber, in that order, and as far as they are non-empty.
The \
autographcommand, which will normally appear in a style file, serves to define
\autographup to eight autographs based on pdf, jpeg or png images. In the following it is important to
know that the closing always remains at the same position: two
\baselineskipsunder
the end of the text body; autographs and the signature will be positioned relative to this
fixed closing.
The selected autograph (argument 1) will be drawn near the closing (Best regards) if
you use the
autographoption with a value from 2 through 9. The position of the signature
(Betty) will depend on the argument 4 of
\autograph. \
autographhas 6 arguments,
defined in the table below. The arguments 3, 4 and 5 are integer percentages of the height
of the image (argument 2). This means that you can change the height of the image
and still keep the positions of closing, signature and the left margin at the same relative
positions in the image. These percentages may be negative, or larger than 100%.
arg 1:
2,3,...9: autograph number; will be translated internally to define
\autographA,
\autographB...
\autographH2:
the height of the image (a dimen)
3:
the vertical position (%) of the baseline of the closing (Regards,) from the top
4:
the vertical position (%) of the baseline of the signature (John Letterwriter) from
the closing
5:
the distance (%) the autograph outdents in the margin
6:
the image (jpg, png, pdf...)
How to design an autograph in 4 steps:
1. Make a scan of your signature on a white background. Remove the white background
using an image manipulation program such as the
gimp(layer ⇒ transparency ⇒ color
to alpha) and save it as a png image. Removing the background is only necessary if
you plan to move the image over the text body, which would then be covered by the
white background — closing and signature will be printed over the image.
2. Guess where you want the closing’s baseline to appear in the image, expressed as an
integer percentage of the image height from the top of the image. Use this number
for argument 3.
3. Same for the signature, to use as argument 4.
4. Same for the text body margin: distance of it from the left side of the image, expressed
as an integer percentage of the image height.
The
\logocommand is internally used to define the default logo; you can redefine
\logoit with
\renewcommand{\logo}{...}. An example of logo redefinition can be found on
page
12
.
command
ASCII
result
\LetterSymbol66
B
\EuroSymbol164
¤
\EUR99
c
\EmailSymbol107
k
\PhoneSymbol84
T
\MobileSymbol72
H
\LetterSymbol \EuroSymbol \EUR \EmailSymbol \PhoneSymbol \MobileSymbol5 Usage: letters
Usage of the class is best explained by example.
5.1 A simple letter
Here is the latex source for a small letter; its result appears in figure
1
:
\documentclass{isodoc}
\usepackage{letter,kantlipsum} \setupdocument{
to = {TeX Users Group\\
1466 NW Naito Parkway, Suite 3141\\ Portland, OR 97208-2311\\
U.S.A }, ourref = 1029,
enclosures = isodoc documentation\\LPPL documentation, copyto = {Dutch TeX User group, NTG},
subject = An example letter using the isodoc class
--with an extra long subject extending over two lines., autograph,foreign
}
\begin{document}
\letter[language=itIT]{
This letter was composed using the \LaTeX{} isodoc class. \par\kant[1]
}
\end{document}
This source essentially shows three items:
1. the inclusion of a package
letter; we’ll come to that shortly.
2. the command
\setupdocumentcalled with many
key=valuearguments, each
defin-ing one of the texts that go into the letter.
3. the command
\letter, enclosing the body of the letter; just to give the letter some
real body, a small text has been included using
\input.
Of course this is not all of the information needed to create a letter. For example, there
should be a logo, telling the addressee who I am and there should be contact information
such as my address, telephone number and so on. This is where the included
letterpackage plays its part. Here is an example of such a style file:
\NeedsTeXFormat{LaTeX2e} \ProvidesPackage{letter}
[2010/08/21 v1.1 Letter Company style file for isodoc] \RequirePackage{pxfonts} \definecolor{headcolor}{gray}{.3} \definecolor{headingcolor}{gray}{.3} \encldowntrue \setupdocument{return,footer,fold3, areacode = 31, autograph = 0, city = Deil,
This letter was composed using the LATEX isodoc class.
As any dedicated reader can clearly see, the Ideal of practical reason is a representation of, as far as I know, the things in themselves; as I have shown elsewhere, the phenomena should only be used as a canon for our understanding. The paralogisms of practical reason are what first give rise to the architectonic of practical reason. As will easily be shown in the next section, reason would thereby be made to contradict, in view of these considerations, the Ideal of practical reason, yet the manifold depends on the phenomena. Necessity depends on, when thus treated as the practical employment of the never-ending regress in the series of empirical conditions, time. Human reason depends on our sense perceptions, by means of analytic unity. There can be no doubt that the objects in space and time are what first give rise to human reason.
Best regards, W.H. Dekker Allegati: isodoc documentation LPPL documentation Per conoscenza a: Dutch TeX User group, NTG
The Letter Company
Wybo Dekker Deilsedijk 60 NL-4158 CH Deil The Netherlands
Letter Cy• Deilsedijk 60 • Deil
TeX Users Group
1466 NW Naito Parkway, Suite 3141 Portland, OR 97208-2311 U.S.A
Vostra lettera del Vostro riferimento Nostro riferimento
1029
Data
Undefined date
Oggetto: An example letter using the isodoc class – with an extra long subject extending over two lines.
sito web www.xs4all.nl telefono +31 87 8748496 cellulare Undefined cellphone e-mail wybo@xs4all.nl L.S.,
company = The Letter Company,
country = The Netherlands,
countrycode = NL,
email = wybo@xs4all.nl,
opening = L.S.,
phone = 87\,8748496,
returnaddress = Letter Cy\\Deilsedijk 60\\Deil,
signature = W.H.~Dekker,
street = Deilsedijk 60,
website = www.xs4all.nl,
who = Wybo Dekker,
zip = 4158 CH,
}
\autograph{2}{35mm}{34}{83}{28}{signmarked}
So in the style file, too,
\setupdocumentis used to register information that will be
common to almost all of my letters. The
\autographcommand sets up an autograph,
based on an image file. Apart from the code shown here, a style file can contain definitions
for more autographs, and a definition for a logo. Without the latter, a default logo is
produced. Note also that I have included defaults for
opening,
closing, and
signaturein the style file, and that I did not override those in the letter’s source.
The letter source example shown above, in combination with this style example,
com-piles to the letter shown in figure
1
. This example illustrates some aspects of isodoc:
• At the top, you see the default letterhead (logo). You can create your own logo by
redefining the
\logocommand.
• Under it is the address. It has a return address in script sized sans serif boldface over
it, because the
returnkey has been used. A return address is useful if you send your
letters in a standard window envelope. The positioning of the address is done in the
style file, using the
addresscenterand
leftaddressor
rightaddresskeywords.
• The paper is vertically divided in six equally wide columns. The outer two columns
are the left and right margins, the second to fifth columns contain header and footer
fields.
• The «Your reference» and «Our reference» fields have not been set (with the
yourrefand
ourrefkeys) and therefore stay empty by default, the date field has also not
been set, but it should be. Therefore, the default value is «Undefined date», and a
warning is issued by a pink background.
• A folding mark has been printed in the extreme right margin, such that on folding the
paper along it, it will correctly fit in a 220 x 110 mm envelope; this has been achieved
by using the
fold3key.
• In between closing (Best regards,) and signature (W.H. Dekker) an autograph has been
placed. This was done by setting the option
autograph, which has a default value
of 2. Alternative values are
0(nothing between closing and signature),
1for white
space where an autograph can be placed with a pen after printing, or one of the
values
2-9, which may have been associated with other autograph images. In this
case, I have used an autograph image in which I have drawn the boundary box and
the height (argument 2), closing (3), signature (4), and outdent (5) positions defined in
the
\autographcommand (see the section Commands) with red lines.
• The bottom of the letter has (up to) four fields with contact information. This is
useful if your logo does not show that information. If it does, you can omit these
fields by using the
nofooterkey, or by not using the
footerkey, depending on the
default set in the style file.
• Note that the footer fields include a cellphone field, but the cellphone number has
not been defined, which results in an error message.
5.2 Multiple letters, redefined logo
Let’s try another illustrative example, see figures
2
and
3
: we use a modified style file,
with a redefined logo, so we don’t need a page footer; we use preprinted right-windowed
envelopes, so a return address is not needed. Here is the style file (
logoletter.sty):
\NeedsTeXFormat{LaTeX2e} \ProvidesPackage{logoletter}
\usepackage{fontspec,polyglossia} \hypersetup{hidelinks}
\setupdocument{
nofooter,fold2,autograph=1,
company = The Shiva Shakti Foundation,
who = Wybo Dekker,
street = Deilsedijk 60,
city = Deil,
zip = 4158 CH,
country = The Netherlands,
countrycode = IN, areacode = 31, phone = {87\,8748496}, cellphone = {6\,15492070}, fax = {}, website = wybo.xs4all.nl, email = wybo@xs4all, accountno = {304046221}, iban = nl61pstb0006238747, bic = pstbnl21, addresscenter = 70, rightaddress } \autograph{2}{19mm}{17}{93}{21}{signblue} \definecolor{headcolor}{rgb}{.14,.33,.43} \definecolor{shivablue}{rgb}{.14,.33,.43} \definecolor{shivaback}{rgb}{.97,.87,.71} \renewcommand{\logo}{\if@isodoclogo \pagecolor{shivaback} \begin{textblock}{70}(15,13) \includegraphics[scale=.3]{shiva-shakti.png} \end{textblock} \begin{textblock}{105}(88,15) \begin{center} \fontspec{ChopinScript}
\noindent\color{shivablue}{\Huge The Shiva Shakti Foundation}\\[2ex] Main Building\quad 567\textsuperscript{th} floor\quad Room 123\quad Bangkok \end{center} \end{textblock}\fi } \setmainfont[Ligatures=TeX]{Fontin} \setdefaultlanguage{english} \setotherlanguage{dutch}
The letter source does not use the
autographkey, so the default value of
2is used; we
write it in Dutch and use a larger text, just to see what happens if more than one page is
generated:
%!lualatex \documentclass[11pt,twoside]{isodoc} \usepackage{logoletter} \setupdocument{ ourref = 1029, yourletter = May 12, yourref = MAPS \#34, date = today,closing = Kind regards, signature = Wybo Dekker,
enclosures = Isodoc documentatie,
subject = Sample letter with the isodoc class, autograph = 2,
This is an example of a letter made with the isodoc class. It has been compiled with luaLaTeX. Note that the date was set to |today|, so the date above the letter depends upon the day of compilation.
The picture in the logo was designed by Pieter Weltevrede. The text in the logo is Chopin Script, the body text is Fontin. The text1has no meaning, its only
goal is to get a long letter. It’s in dutch, so we select that language; note that language setting has nothing to do with the language setting in \setupdocument.
Typografie wordt meestal toegepast om het doel en de inhoud van een tekst te ondersteunen. Een tekst moet bijvoorbeeld prettig leesbaar zijn. Daarom worden teksten in boeken en kranten vaak uit een lettertype met schreef gezet, maar op het beeldscherm juist vaak met een schreefloos lettertype zoals Verdana of Tahoma opgemaakt.
Voor een reclame- of waarschuwingsbord is het van belang dat woorden opvallen door ze met felle kleuren te accentueren. In een lange tekst wordt het juist als storend wordt ervaren wanneer er vetgedrukte woorden uitspringen en wordt bij voorkeur cursivering gebruikt om de lezer te attenderen.
Ook met andere zaken die de leesbaarheid van een tekst beïnvloeden houdt typografie zich bezig. Bijvoorbeeld het gebruik (doelgroep) en de indeling van een pagina. De typograaf let op:
• De zetbreedte (regellengte): de breedte van een tekstblok of kolom. De ty-pograaf let daarbij op het maximum aantal tekens of woorden per regel. Bij een tekst met te lange regels moet het oog van de lezer namelijk een te gro-te afstandssprong maken van het eind van de regel naar het begin van de volgende. In het algemeen worden maxima gehanteerd van gemiddeld circa 85 tekens (inclusief spaties en leestekens) of van gemiddeld twaalf woorden. • De diverse lettergroottes (corpsen) en -soorten. Door een combinatie daarvan (naast o.a. kleurgebruik) kan de typograaf de diverse tekstelementen visueel 1gathered from the TEX-distribution
The Shiva Shakti Foundation
Main Building 567thfloor Room 123 Bangkok
Wybo Dekker Deilsedijk 60 4158 CH Deil Your letter of May 12 Your reference MAPS #34 Our reference 1029 Date 25th June 2021
Subject: Sample letter with the isodoc class
Beste Wybo,
Page 2 of 2 To: Wybo Dekker (25th June 2021) onderscheidend maken en daarmee de inhoudelijke hiërarchie goed visua-liseren en ordenen. Letterfamilies bestaan uit diverse lettersoorten, meestal minimaal romein (normaal), vet, cursief en vet-cursief. Er zijn ook uitgebreide letterfamilies, die dan bijvoorbeeld als extra lettersoort vet-cursief, halfvet, extra vet, versmald en verbreed hebben.
• De interlinie: het wit tussen twee regels.
• De regelafstand: de grootte van de letter (het korps) opgeteld bij de grootte van de interlinie. (Voorbeeld: corps 10 punt + 4 punt interlinie geeft een regelafstand van 14 punt.)
• De woordspaties: het wit (de ruimte) tussen twee woorden. • De letterspatiëring: het wit tussen de letters onderling • De leestekens
• De gebruikte letterfamilie(s) (lettertypen).
• Het vaste (verticale) tussenwit (bij meerdere kolommen) • Het bijeenblijven van inhoudelijke eenheden
• Het bijeenblijven van inhoudelijke eenheden
Om een bekend voorbeeld te geven: de staartregel van een alinea die niet alleen boven aan een pagina mag staan (het zogenaamde ’hoerenjong’). Zo bestaat er onder andere ook de ’wees’ of de ’weduwe’ (uit het engels: the ’widow’). Deze termen staan beiden voor de eerste regel van een alinea die alleen staat onderaan een pagina.
Voor woordenboeken of kranten,2waar ruimte schaars is, worden er
opzettelijk smalle lettertypen uitgezocht, waardoor het papier efficiënter benut kan worden. De marges worden dan uiteraard ook klein gehouden. Een voorbeeld is de Lexicon (Bram de Does, 1992), die wordt gebruikt in de krant NRC Handelsblad en het woordenboek de Dikke Van Dale.
Sommige aspecten en gewoontes van de typografie zijn universeel: te lange regels, te weinig interlinie en te kleine woordspaties lezen niet prettig. Andere gewoontes zoals het gebruik van aanhalingstekens en gedachtestreepjes verschillen van tijd tot tijd en van land tot land en daarbinnen nog weer van publicatie tot publicatie.
Kind regards, Wybo Dekker Enclosure:
Isodoc documentatie
2en wat u nog maar zelf kunt bedenken…
}
\newcommand{\letterbody}{%
This is an example of a letter made with the isodoc class. It has been compiled with luaLaTeX.
Note that the date was set to |today|, so the date above the letter depends upon the day of compilation.
The picture in the logo was designed by Pieter Weltevrede. The text in the logo is Chopin Script, the body text is Fontin.
The text\footnote{gathered from the \TeX-distribution} has no meaning, its only goal is to get a long letter.
It's in dutch, so we select that language; note that language setting has nothing to do with the language setting in \textbackslash setupdocument. \\[2ex] \begin{dutch} \par\input{body} \end{dutch} } \begin{document}
\letter[to = Wybo Dekker\\ Deilsedijk 60\\ 4158 CH Deil,
opening = Beste Wybo ]{\letterbody}
\letter[to = MAPS redactie\\ Spuiboulevard 269\\ 3311 GP Dordrecht, opening = Beste Taco ]{\letterbody}
\end{document}
In this case, the same letter had to be sent to two different people, with different openings
and addresses of course. So the letter’s body is separately defined and the
\lettercommand is called twice, with the same body, but different
toand
openingkeys. Figures
2
and
3
show the first two pages (the first letter) of this document, which actually has four
pages.
6 Usage: invoices
6.1 A simple invoice
Invoices (can) have the same structure as letters, except that the
\openingisn’t «Dear
Somebody» anymore, but something like «Invoice». And the
\closingdoesn’t say «Best
regards», but may provide payment information. And the body is not a simple text, but a
table with descriptions of things to be paid, and the corresponding amounts of money.
An example, as usual, is most instructive:
\documentclass{isodoc} \usepackage{invoice} \setupdocument{
ourref = 8234, date = 20060401,
Wybo Dekker
Wybo Dekker Deilsedijk 60 4158 CH Deil
Wybo Dekker• Deilsedijk 60 • 4158 CH Deil
NTG Maasstraat 2 5836 BB Sambeek
Uw brief van Uw kenmerk Ons kenmerk 8234
Datum 1 april 2006 Onderwerp: Declaratie verzending aanmaningen
webstek www.xs4all.nl telefoon 087 8748496 mobiel 06 3033 3955 e-mail wybo@xs4all.nl rekening Omschrijving Bedrag (¤) enveloppen 6,60 postzegels 9,00 Subtotaal 15,60 Betaalgegevens: betalingstermijn: 14 dagen iban: nl94rabo0304046221 ten name van: W.H. Dekker
kenmerk: 123
\end{document}
The invoice style file used here looks like:
\NeedsTeXFormat{LaTeX2e} \ProvidesPackage{invoice}
[2010/08/21 v1.1 example style for isodoc] \RequirePackage[english,dutch]{babel} \setupdocument{ accountname = W.H.\,Dekker, addresscenter = 67, areacode = 31, cellphone = 6\,3033\,3955, city = Deil,
company = Wybo Dekker,
country = The Netherlands,
countrycode = NL,
email = wybo@xs4all.nl,
fold3, footer,
iban = \scshape nl94rabo0304046221,
language = nl-NL,
opening = L.S.,
phone = 87\,8748496, % phone numbers without leading 0:
return,
street = Deilsedijk 60,
term = 14,
website = www.xs4all.nl,
who = Wybo Dekker,
zip = 4158 CH,
}
The result is shown in figure
4
.
6.2 Invoice with redefined logo
When the
acceptoption is used, the invoice will be created with an invoice form on the
lower third part of the page. Here is an example:
\documentclass{isodoc} \usepackage{accept} \setupdocument{accept, acceptdesc=NTG\\2006, acceptdescription=Contributie 2006, acceptreference=4000 0000 2006 0308, date=20060503, subject=Contributie 2006, nofooter } \begin{document} \invoice[
to=W.H. Dekker\\Deilsedijk 60\\4158 CH Deil, acceptaccount=304046221,
accepteuros=40, acceptcents=00, ourref=308,
]{\itable{\iitem{Contributie NTG voor 2006}{40,00}}\\[3ex] \paymentdata
}
\end{document}
Normally such invoices are printed on preprinted paper with an easily detachable,
per-forated form. In this example, the form itself has been printed, too. The
graphicxand
textpospackages have already been made available by the
isodocclass. Figure
5
shows
NE D E R L A N D S T A L I G E TEX GE B R U I K E R S G R O E P Wybo Dekker Deilsedijk 60 4158 CH Deil NTG• Deilsedijk 60 • Deil 4158 CH W.H. Dekker Deilsedijk 60 4158 CH Deil
Uw brief van Uw kenmerk Ons kenmerk 308 Datum 3 mei 2006 Onderwerp: Contributie 2006 Contributie 2006 NTG 2006 W.H. Dekker Deilsedijk 60 4158 CH Deil 4000 0000 2006 0308 4000 0000 2006 0308 40 304046221 00 40 00 rekening Omschrijving Bedrag (¤) Contributie NTG voor 2006 40,00 Betaalgegevens: betalingstermijn: 30 dagen iban: nl53ingb0001306238 ten name van: NTG
kenmerk: 308
7 Example files
isodoc comes with several examples. Each example has a source file, a style file, and some
image files. The files can be generated from
isodoc.dtxby running
luatex isodoc.ins.
After that, they can all be compiled, together with the isodoc documentation, by running
make
. If you want to experiment with the examples by changing them, then compile them
individually with
make <example>.pdf, because with just
makethe isodoc documentation
8 Implementation
The basis is the
memoirclass with all options:
1h∗classi
2\ifx\pdfoutput\undefined\else%
3 \ifnum\pdfoutput=1\else%
4 \ClassError{isodoc}{Compile me with pdflatex, lualatex or xelatex!}{}
5 \fi
6\fi
7\DeclareOption*{\PassOptionsToClass{\CurrentOption}{memoir}}
8\ProcessOptions
9\LoadClass[article]{memoir}
We use
\ctablefloats here, and we need
ctable’s commands for decent spacing in tables
and more.
ctablealso brings us
array,
tabularx,
color, and
xkeyval.
eurosymis used
for the euro symbol.
10\RequirePackage{xcolor,tabularx,graphicx,xstring,calc}
11\RequirePackage{forarray,longtable}
Since the name of the package contains ’iso’, make the page A4. For textpos, divide the
page in 210 columns of 1mm each and 297 rows, 1mm each. The page is vertically divided
in 6 columns of 35mm each: a left margin, 4 fields, and a right margin.
12\setstocksize{297mm}{210mm} 13\settrimmedsize{\stockheight}{\stockwidth}{*} 14\settypeblocksize{237mm}{140mm}{*} 15\setlrmargins{*}{*}{1} 16\setulmargins{35mm}{*}{*} 17\setheadfoot{\baselineskip}{\baselineskip} 18\checkandfixthelayout 19\RequirePackage[absolute,overlay]{textpos} 20\TPGrid{210}{297}
Several colors can be changed, by using the
\definecolorcommand; the defaults (all
black) are set here:
headcolor:
color for the header and footer field texts
headcolorheadingcolor:
color for the fancy headings
headingcolormarkercolor:
color for the folding marks
markercolor21\definecolor{headcolor}{gray}{0}
22\definecolor{headingcolor}{gray}{0}
23\definecolor{markercolor}{gray}{0}
Use fancy headings, except for the first page. The heading, on a rule, looks like:
To: John Doe (April 1st, 2006)
Page 2 of 3
24\RequirePackage{fancyhdr} 25\pagestyle{fancy}
26\AtBeginDocument{\addtolength{\headheight}{\baselineskip}}
Background color for signaling items that should have been defined, but weren’t:
27\definecolor{isodocpink}{rgb}{1,.7,.7}
28\def\Undefined#1{\fboxsep1pt\colorbox{isodocpink}{\strut Undefined #1}}
A small sans serif font is used for header and footer field names and the sender’s address
headfont
information. The idea is that this is used for all pre-printed text on the letter paper.
29\def\headfont{\footnotesize\sffamily\color{headcolor}}
8.1 The options and their defaults
8.1.1 General options
The default shift is 0mm,0mm. The
shiftoption moves the output to the right and down:
shift30\def\@xyshift#1,#2@@@{\def\@xshift{#1}\def\@yshift{#2}}
32 \@xyshift#1@@@
33 \AtBeginDocument{\textblockorigin{\@xshift mm}{\@yshift mm}}
34}
The
verticaloption prints a vertical bar in invoices between description and amount –
(this is the default), the
noverticaloption suppresses it.
verticalnovertical 35\define@key{isodoc}{vertical}[\verticaltrue]{\verticaltrue}
36\define@key{isodoc}{novertical}[\verticaltrue]{\verticalfalse}
37 \newif\ifvertical\verticaltrue
Several items in the letter/invoice will be different in documents that are to be sent abroad;
this is set with the
foreignoption, false by default:
foreign
38\define@key{isodoc}{foreign}[\foreigntrue]{\foreigntrue}
39 \newif\ifforeign\foreignfalse
By default, the zip code is typeset before the city. The
cityzipoption reverses this:
cityzip40\define@key{isodoc}{cityzip}[\cityziptrue]{\cityziptrue}
41 \newif\ifcityzip\cityzipfalse
Set the language; en-GB, set at the
\EndOfClassis the default.
language
42\define@key{isodoc}{language}{
43 \StrSubstitute{#1}{-}{}[\@iso]
44 \ifcsname isodoc@\@iso\endcsname\csname isodoc@\@iso\endcsname\else
45 \ClassError{isodoc}{Unknown language #1}{}
46 \fi
47}
Ordinal suffixes (like st, nd, rd, th) in dates are put on the line by default, but they can be
ordinalss
set superscript with the
ordinalssoption:
48\define@key{isodoc}{ordinalss}[\@isodocordinalsstrue]{%
49 \ifx\yourlettertext\undefined%
50 \@isodocordinalsstrue
51 \else
52 \ClassError{isodoc}{
53 You must use the ordinalss option before any language option}{}
54 \fi
55}
56 \newif\if@isodocordinalss\@isodocordinalssfalse
The default is to have left, but not right justification, allowing for hyphenation in extreme
fill nofill
cases:
57\define@key{isodoc}{fill} []{\rightskip=1\rightskip} 58\define@key{isodoc}{nofill}[]{\rightskip=0mm plus 35mm} 59 \rightskip=0mm plus 35mm8.1.2 Logo
The logo, by default, consists of a large company or personal name on top a rule, with a
company logoaddress who street city zip country countrycode
contact person’s name (probably your own name) and address hanging under the rule. Its
contents are defined by the following options:
77\define@key{isodoc}{zip} {\def\zip{#1}}
78 \def\zip{\Undefined{zip}}
79\def\prezip{\ifforeign\countrycode-\else\fi}
8.1.3 Address window
The address can be positioned vertically with the
addresscenteroption; the default is
leftaddressrightaddress addresscenter addresswidth
63.5mm. This is the vertical position of the center of the address. Horizontally, the address
is positioned either left or right, depending on the
leftaddressor
rightaddressoptions
being used. In the first case, the address start at x=35mm, which is the left margin (the
default), and thus in line with the first header field, in the second case at 105mm, in line
with the one-but-last header field.
80\define@key{isodoc}{leftaddress} []{\def\xaddress{35}} 81 \def\xaddress{35} 82\define@key{isodoc}{rightaddress}[]{\def\xaddress{105}} 83\define@key{isodoc}{addresscenter} {\def\@addresscenter{#1}} 84 \def\@addresscenter{63.5} 85\define@key{isodoc}{addresswidth} {\def\@addresswidth{#1}} 86 \def\@addresswidth{70}
The
tooption takes the addressee’s address lines. Use
\\to separate lines. The info will
tobe split by
\processtoon the first
\\separator into the addressee’s name (
\toname) and
his address (
\toaddress) The
\tonamewill be reported in the pdf’s document properties.
However, this works only if the
tokey is set, with
\setupdocument, in the preamble. If
several letters are composed,
tois normally set in the
\letteror
\invoicecommands
and thus is not seen by the
\hypersetup, which is called
\AtBeginDocument; so set the
defaults to
Various peoplefor the
\tonameand make the address undefined:
87\define@key{isodoc}{to}{\processto{#1}}\def\toname{Various people}
88 \def\toaddress{\Undefined{to}}
89\long\def\processto#1{\xproc #1\\@@@\ifx\toaddress\empty
90 \else \yproc #1@@@\fi}
91\long\def\xproc #1\\#2@@@{\gdef\toname{#1}\gdef\toaddress{#2}}
92\long\def\yproc #1\\#2@@@{\gdef\toaddress{#2}}
The default is to have no return address; but this can be changed by using the
return returnnoreturn returnaddress
(either in the style file or in the source) or, if the default was changed in the style file,
remove it with
noreturnin the source. Company and country names are often too long to
fit in the address window. Or you may want to define an entirely different return address.
The
returnaddressoption is provided to redefine the return address:
93\define@key{isodoc}{return} []{\returntrue}
94 \newif\ifreturn\returnfalse
95\define@key{isodoc}{noreturn} []{\returnfalse}
96\define@key{isodoc}{returnaddress}{\def\returnaddress{#1}}
8.1.4 Header
A header is switched on or off with the
headerand
noheaderoptions. The default is to
headernoheader
have a header.
97\define@key{isodoc}{header} []{\headertrue}
98 \newif\ifheader\headertrue
99\define@key{isodoc}{noheader}[]{\headerfalse}
The header is the start of the body. It is initially positioned at 98mm from the top of the
bodyshift
paper, but it can be shifted with the
bodyshiftoption.
100\define@key{isodoc}{bodyshift} {\advance\headerpos#1} 101\newcount\headerpos\headerpos=98 102\newcount\footerpos\footerpos=275 103\newcount\subjectpos 104\newcount\openingpos 105\newcount\textskip
The
\paymentdatacommand prints a tabular with payment data, as far as they are not
empty. The selection and order of those data are defined with the footorder option; the
default is to print all non-empty values.
107\def\isodoc@paymentorder{term;bankname;bic;routingno;iban;accountno;%
108accountname;payref;vatno;chamber}
8.1.5 Footer
A footer is switched on or off with the
footerand
nofooteroptions. The default is the
footer
nofooter
have no footer.
109\define@key{isodoc}{footorder} {\def\isodoc@footorder{#1}}
110 \def\isodoc@footorder{website;phone;cellphone;email}
111\define@key{isodoc}{footer} []{\footertrue}
112 \newif\iffooter\footerfalse
113\define@key{isodoc}{nofooter}[]{\footerfalse}
If there is a page footer, only those fields will be displayed which are not empty. Currently
areacode phone phoneprefix cellphone fax website email creditorid
the
phone,
cellphone,
fax,
email,
websiteand
creditoridare recognized as possible
footer fields. Phone and fax number will be prefixed with a 0, unless the
foreignoption
was used: then the prefix will be
+nn\,, where
nnis the area code. The latter is set with
the
areacodeoption, which is «Undefined area code» by default.
114\define@key{isodoc}{areacode} {\def\areacode{#1}} 115 \def\areacode{\Undefined{areacode}} 116\define@key{isodoc}{phoneprefix}{\def\phoneprefix{#1}} 117 \def\phoneprefix{0} 118\define@key{isodoc}{phone} {\def\phone{#1}} 119 \def\phone{} 120 \def\@phone{\Undefined{phone}} 121\define@key{isodoc}{cellphone} {\def\cellphone{#1}} 122 \def\cellphone{} 123 \def\@cellphone{\Undefined{cellphone}} 124\define@key{isodoc}{fax} {\def\fax{#1}} 125 \def\fax{} 126 \def\@fax{\Undefined{fax}} 127\define@key{isodoc}{website} {\def\website{#1}} 128 \def\website{} 129 \def\@website{\Undefined{website}} 130\define@key{isodoc}{email} {\def\email{#1}} 131 \def\email{} 132 \def\@email{\Undefined{email}} 133\define@key{isodoc}{creditorid} {\def\creditorid{#1}} 134 \def\creditorid{} 135 \def\@creditorid{\Undefined{creditorid}}
8.1.6 Folding mark
The default is to have no folding mark. So start with the folding mark position outside the
nofold
paper boundaries:
136\define@key{isodoc}{nofold}[]{\yfold=-1mm}
137 \newdimen\yfold\yfold=-1mm
The folding mark is in the right margin, but it can be moved to the left margin with the
foldleft
foldright foldleft
option, or, if made that the default in your style file, back to the right margin
with the
foldrightoption:
138\define@key{isodoc}{foldleft}[]{\xfold=9mm}
139 \newdimen\xfold\xfold=201mm
140\define@key{isodoc}{foldright}[]{\xfold=201mm}
The envelope for double folded A4 is C5: 162x220mm, window 40x110mm, upper left corner
fold2
at 20x50mm. Fold the A4 to have a tolerance of 2mm at top and bottom, by putting the
fold mark at 162-4=158 mm.
141\define@key{isodoc}{fold2}[]{\yfold=158mm}
The envelope for triple folded A4 is DL: 110x220mm, Fold the A4 to have a tolerance of
fold3
1.5mm at top and bottom, by putting the fold mark at 110-3=107mm.
142\define@key{isodoc}{fold3}[]{\yfold=107mm}
For non-standard envelopes and paper formats the position of the folding mark can be set
fold
at any position (in mm) from the top of the paper:
8.1.7 Header fields
There are four header fields, each one quarter of the
\textwidthwide. Under those, if
the subject has been defined, a subject line. The header position is 98mm by default, but it
can be shifted with the
bodyshiftoption.
ourref yourref yourletter 144\define@key{isodoc}{ourref} {\def\ourref{#1}} 145 \def\ourref{} 146\define@key{isodoc}{yourref} {\def\yourref{#1}} 147 \def\yourref{} 148\define@key{isodoc}{yourletter}{\def\yourletter{#1}} 149 \def\yourletter{}
The date must be entered in either of three formats: yyyy-mm-dd, yyyymmdd or the string
date
today
(not
\today!). Here we check that a correct format is offered and that the values
for
mmand
ddare in the range 1–12 and 1–31 respectively. The string
todaysets the date to
today’s date.
150\define@key{isodoc}{date}{\@isomakedate{#1}}
If you know what you do you can substitute anything you like for the date by using the
forcedate
forcedate
option instead of
date:
151\define@key{isodoc}{forcedate}{\def\@forcedate{#1}}\def\@forcedate{}
The subject is empty by default and will be typeset only if you give it a value.
subject
152\define@key{isodoc}{subject}{\def\subject{#1}}
153 \def\subject{}
The opening, something like «Dear Reader», is set by the
openingoption; the default is
opening
openingcomma
«Undefined opening». It is followed by a comma, unless the
openingcommahas been used
to set it to a different character, like a semicolon or an exclamation mark.
154\define@key{isodoc}{opening} {\def\opening{#1}}
155 \def\opening{\Undefined{opening}}
156\define@key{isodoc}{openingcomma}{\def\@openingcomma{#1}}
157 \def\@openingcomma{,}
8.1.8 Closing, autograph, signature
The closing, something like «Best regards», is set by the
closingoption; the default is
closing«Undefined closing». It will be separated from the text with whitespace, which can be
changed, preferably in a style file, with the
closingskiplength, which is
2\baselineskipby default.
158\define@key{isodoc}{closing} {\def\closing{#1}} 159 \def\closing{\Undefined{closing}} 160\define@key{isodoc}{closingcomma}{\def\@closingcomma{#1}} 161 \def\@closingcomma{,} 162\define@key{isodoc}{closingskip}{\ClassError{isodoc}{163 The closingskip option has been removed
164 in version 1.04; instead set the signatureskip length,
165 preferably in a style file}}
Some skips/booleans defined here to make it easier to redefine them in a style file. They
precede the closing, copyto and enclosers and have no corresponding options (yet).
166 \newdimen\closingskip\closingskip=\baselineskip
167 \newdimen\signatureskip\signatureskip=2\baselineskip
168 \newdimen\copytoskip\copytoskip=\baselineskip
169 \newdimen\enclosureskip\enclosureskip=\baselineskip
170 \newif\ifencldown\encldownfalse
The autograph is either just a newline, or a vertical spacing where you can put your
autograph
autograph manually, or a graphic. In the latter case, is must have been defined with
the macro
\autograph, which defines an autograph from an image, see the section User
Macros. Not using the
autographoption is equivalent to
autograph=0(just a newline).
Using it without a value is equivalent to
autograph=2(image inserted):
171\define@key{isodoc}{autograph}[2]{\def\autographversion{#1}}
The signature, something like «John Letterwriter», is set by the
signatureoption; the
signature
default is «Undefined signature».
173\define@key{isodoc}{signature}{\def\signature{#1}}
174 \def\signature{\Undefined{signature}}
Enclosures are set by the
enclosuresoption. There are none by default.
enclosures175\define@key{isodoc}{enclosures} {\def\enclosures{#1}}
176 \def\enclosures{}
Cc-ed names are set by the
copytooption. There are none by default.
copyto177\define@key{isodoc}{copyto} {\def\copyto{#1}}
178 \def\copyto{}
8.1.9 Invoice specific data
Invoices need to state some specific data, like account data and term of payment:
term bankname bic routingno iban accountno accountname vatno chamber currency 179\define@key{isodoc}{term}[30]{\def\term{#1 \daystext}} 180 \def\term{} 181\define@key{isodoc}{accountno} {\def\accountno{#1}} 182 \def\accountno{} 183\define@key{isodoc}{mandateid} {\def\mandateid{#1}} 184 \def\mandateid{} 185\define@key{isodoc}{routingno} {\def\routingno{#1}} 186 \def\routingno{} 187\define@key{isodoc}{bankname} {\def\bankname{#1}} 188 \def\bankname{} 189\define@key{isodoc}{accountname}{\def\accountname{#1}} 190 \def\accountname{} 191\define@key{isodoc}{iban} {\def\iban{#1}} 192 \def\iban{} 193\define@key{isodoc}{bic} {\def\bic{#1}} 194 \def\bic{} 195\define@key{isodoc}{payref} {\def\payref{#1}} 196 \def\payref{} 197\define@key{isodoc}{vatno} {\def\vatno{#1}} 198 \def\vatno{} 199\define@key{isodoc}{chamber} {\def\chamber{#1}} 200 \def\chamber{} 201\define@key{isodoc}{currency} {\def\currency{#1}} 202 \def\currency{\EuroSymbol}
If an accept form is to be printed, here are the options to fill in all the fields:
accept acceptaccount acceptaddress acceptcents acceptdescription acceptdesc accepteuros acceptreference 203\define@key{isodoc}{accept}[E05]{\def\accepttype{#1} 204 \newfont\ocrb{ocrb10} 205 } 206\define@key{isodoc}{acceptaccount} {\def\acceptaccount{#1}} 207 \def\acceptaccount{} 208\define@key{isodoc}{acceptaddress} {\def\acceptaddress{#1}} 209 \def\acceptaddress{} 210\define@key{isodoc}{acceptcents} {\def\acceptcents{#1}} 211 \def\acceptcents{\Undefined{}} 212\define@key{isodoc}{acceptdescription}{\def\acceptdescription{#1}} 213 \def\acceptdescription{} 214\define@key{isodoc}{acceptdesc} {\def\acceptdesc{#1}} 215 \def\acceptdesc{} 216\define@key{isodoc}{accepteuros} {\def\accepteuros{#1}} 217 \def\accepteuros{\Undefined{}} 218\define@key{isodoc}{acceptreference} {\def\acceptreference{#1}} 219 \def\acceptreference{\Undefined{ref}}
For now, we define field positions for the E05 accept form only; when data for other forms
become available, the content of
\accepttypewill have to be checked. Here is a rough
layout of the E05 accept form – the last character tells if the items are typeset in left-aligned
(L) or centered (C) boxes:
description L