• No results found

Index of /CTAN/macros/latex/contrib/isodoc


Academic year: 2022

Share "Index of /CTAN/macros/latex/contrib/isodoc"


Full text


The isodoc class

for letters, invoices, and more

Wybo Dekker



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


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

This document describes version v1.14, last revised 2021/06/25.

Email: [email protected]


1 Introduction

This class is intended to be used for the preparation of letters and invoices. Its starting point was Victor Eijkhout’s NTG




, which implements the

nen 1026




class does not provide facilities for invoices and it is not easily extensible.

The goal for the


class is to be extensible and easy to use by providing


configuration. Furthermore, texts that need to be placed on prescribed positions on the page (there are many such texts) are positioned by using the




This 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


definitions, 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.


The general setup of a document producing one or more letters is (see figures



13–14, for examples):






... more \letter calls ...


Similarly, the general setup of a document producing one or more invoices is (figure









... more \invoice calls ...


This document describes several examples. The distribution contains a directory


where each of these has a complete set of files, ready to experiment with.

2 Class options

The isodoc class is based on the


class 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:




, and


. 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 all options in the document itself!


be further explained in the




is normally used to set options that are common to all letters or invoices in the document, like your company data; the optional arguments of




set only those options that are different for each letter or invoice, such as the





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


) and some only in the document source (such as






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




packages. So, for example, you can write your document in English and use Dutch for the interface. Also, use of




is 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.



option 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.


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


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:


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


statement, because otherwise isodoc will overwrite your changes with the definition for the


(English) language.


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


option, or let it automatically be created from the contents of the options










, and


, as far as you have defined those.

Definition in parts can be useful if you need them elsewhere in your document.


Switches the logo on; this is the default, but still useful if you have used the


option in your style file.


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


for the paper version and


for a


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


keyword.) 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.

who = ...

Contact person’s name; probably your own name.


street = ...

Street in the sender’s address.

city = ...

City in the sender’s address.

zip = ...

Zip in the sender’s address.


Place zip


city, instead of before it (the default).

country = ...

Country in the sender’s address. Only used if


key was used.

countrycode = ...

Sender’s country code. For The Netherlands: NL

areacode = ...

Sender’s area code. For The Netherlands: 31


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


(or whatever your


option 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



Horizontally there are two options: left or right.


Places the window over columns 2 and 3; this is the default.


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.


addresswidth = ...

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.



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








, and


keywords; 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


keyword 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


keyword 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, andDate, each with their respective contents under them. If



keyword is used, an extra line starting with


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 withHerrnon the first line and the addressee’s name (Hansen) on line 2, and still haveHerrn Hansenin the page header of page 2. You can do that by replacing the first

"\\"with"\newline \ ".


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






option disables all header fields, the


option re-enables them (


is 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




; 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


is not the default as this would make the date untraceable from the document source only. However, you can force the use of


by providing the string




!) for the argument.

forcedate = ...

The restrictions of the


option can be overridden by using the


option 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 (


) 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,


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 = ...


closingcomma = ...

by default, the closing phrase is followed by a comma, but you can change that here.

signature = ...


autograph = ...

This keyword can have one of the 10 values 0–9:

0: no autograph; the


appears right under the


. This is the default if the


option is not used (using it without a value is equivalent to



1: generates extra whitespace between




for a hand-written autograph. The amount of whitespace is



2–9: inserts one of eight autograph images which, with the


command, 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


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.


6The whitespace in between can be influenced (preferably in a style file) with the dimen\enclosureskip, default\baselineskip. Alternatively, set\encldowntrueto move the enclosures to the bottom of the page.


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.


Footer 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


option is used, up to five footer fields are shown in the order defined in the


option; available fields, defined with options of the same name, are currently












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


. Empty fields can be inserted with extra semicolons.


prefix for phone numbers. The default is


; it will be changed into




is the area code) if the


option is used.

phone = ...

if defined


, 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


option was used, the area code (set with the


option.) Telephone numbers should thus be entered without a prefix.

cellphone = ...

same for cellphone...

fax = ...


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.


Disable folding marks.


The folding mark is printed in the left margin.


The folding mark is printed in the right margin. This is the default.


Folding mark at about halfway, set for tight fitting into a 220x162 mm envelope, with a tolerance of 2 mm at both sides.


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 asphone=, orphone={}, the entry will be displayed as «undefined» on a pink background. This may be useful in style files used by more than one user, each with their own values for these footer entries. If such a user forgets to use the corresponding key, he will be warned by the pink background.


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


command, 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


option. 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


code in lower case; will be typeset in small caps.

routingno = ...

Your bank’s routing number.

iban = ...

Your account’s


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


call, it’s empty, it will be replaced with the value of


(used in the header fields, may also be empty.) Suppress it by making it empty in the


call itself:

\invoice [payref=]{...}


vatno = ...



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




currency = ...

Currency; default is euro. Appears in the invoice table, not in the payment data table.

creditorid = ...

The SEPA-related creditor id.

9 mandateid = ...

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 = ...




Use the


keyword to justify text both left and right; the default is


: 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,y

option, where x and y (both 0 by default) shift the output to the right and down, respectively, in millimeters.

9Currently the texts for thecreditoridandmandateidoptions, which are defined in\creditoridtext and\mandateidtext, are the same in all languages («Creditor ID» and «Mandate ID») except for the Dutch language. Please inform the author about the correct translation in your language!



Invoice tables are printed with a vertical line between descrip- tion and amount. The


option suppresses this, the


option restores it.

4 Commands



command can be useful for debugging. It prints a table showing the option


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


setting options in a call to the class-defined


command. 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


(see there.) Values need their surrounding {}’s only if they contain any comma’s. The


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 email 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:


as soon as possible.»



command produces one letter and can be called multiple times. It has


two arguments. The first argument is optional and must be a list of


pairs. 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


pairs in


or in the


command 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.



command is essentially the same as the


command, except


that the opening is always «invoice», and the content (argument 2) is largely composed using the






, and


commands 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


option was used, this accept form will be filled with the available data, in the


font where needed.

The following commands pertain to invoices: The


command uses




create 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


should 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:



command (


stands for Invoice Item) is equivalent



to writing

item & amount\\




command (


stands for Invoice total) is equivalent


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


command show above can also be written:

\iitem{item 1}{amount 1}

\iitem{item 2}{amount 2}



\iitem{item n}{amount n}




command prints a little table with accounting information needed


by the creditor for paying the invoice. It is constructed using the values of the options




















, in that order, and as far as they are non-empty.



command, which will normally appear in a style file, serves to define


up to eight autographs based on




images. In the following it is important to know that the closing always remains at the same position: two


under 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


option with a value from 2 through 9. The position of the signature (Betty) will depend on the argument 4 of




has 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






2: 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



transparencycolor to alpha) and save it as apng

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


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




command is internally used to define the default logo; you can redefine


it with


. An example of logo redefinition can be found on page


Several symbols are frequently used in letters and invoices. These are usually taken

from marvosym.sty; however, marvosym collides frequently with command names used in

isodoc. So they have gotten their own names here:


command ASCII result

























5 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





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




This letter was composed using the \LaTeX{} isodoc class.




This source essentially shows three items:

1. the inclusion of a package


; we’ll come to that shortly.

2. the command


called with many


arguments, each defin- ing one of the texts that go into the letter.

3. the command


, enclosing the body of the letter; just to give the letter some real body, a small text has been included using



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


package plays its part. Here is an example of such a style file:



[2010/08/21 v1.1 Letter Company style file for isodoc]





\setupdocument{return,footer,fold3, areacode = 31,

autograph = 0,

city = Deil,

closing = Best regards,


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


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 CyDeilsedijk 60Deil

TeX Users Group

1466 NW Naito Parkway, Suite 3141 Portland, OR 97208-2311 U.S.A

Vostra lettera del Vostro riferimento Nostro riferimento 1029


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


Undefined cellphone e-mail [email protected] L.S.,

Figure 1: Minimal letter example


company = The Letter Company, country = The Netherlands, countrycode = NL,

email = [email protected], 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,



So in the style file, too,


is used to register information that will be common to almost all of my letters. The


command 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




, and


in 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



• Under it is the address. It has a return address in script sized sans serif boldface over it, because the


key 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







• 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




keys) 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



• In between closing (Best regards,) and signature (W.H. Dekker) an autograph has been placed. This was done by setting the option


, which has a default value of 2. Alternative values are


(nothing between closing and signature),


for white space where an autograph can be placed with a pen after printing, or one of the values


, 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


(argument 2),




(4), and


(5) positions defined in the


command (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


key, or by not using the


key, 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



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 (





[2010/08/21 v1.1 logoletter style file for isodoc]






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














\noindent\color{shivablue}{\Huge The Shiva Shakti Foundation}\\[2ex]

Main Building\quad

567\textsuperscript{th} floor\quad Room 123\quad



\end{textblock}\fi }




The letter source does not use the


key, so the default value of


is used; we write it in Dutch and use a larger text, just to see what happens if more than one page is generated:





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,

language = en-GB


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,

Figure 2: Long letter example with a non-standard logo, page 1


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…

Figure 3: Long letter example with a non-standard logo, page 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 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.







\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}


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


command is called twice, with the same body, but different




keys. Figures




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


isn’t «Dear Somebody» anymore, but something like «Invoice». And the


doesn’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:




ourref = 8234, date = 20060401,

subject = Declaratie verzending aanmaningen, to = NTG\\Maasstraat 2\\5836 BB Sambeek }








\\[3ex]\paymentdata }


Wybo Dekker

Wybo Dekker Deilsedijk 60 4158 CH Deil

Wybo DekkerDeilsedijk 604158 CH Deil

NTG Maasstraat 2 5836 BB Sambeek

Uw brief van Uw kenmerk Ons kenmerk


Datum 1 april 2006 Onderwerp: Declaratie verzending aanmaningen

webstek www.xs4all.nl

telefoon 087 8748496

mobiel 06 3033 3955

e-mail [email protected] rekening

Omschrijving Bedrag (¤)

enveloppen 6,60

postzegels 9,00

Subtotaal 15,60


betalingstermijn: 14 dagen

iban: nl94rabo0304046221 ten name van: W.H. Dekker

kenmerk: 123

Figure 4: Invoice example



The invoice style file used here looks like:



[2010/08/21 v1.1 example style for isodoc]



accountname = W.H.\,Dekker, addresscenter = 67,

areacode = 31,

cellphone = 6\,3033\,3955,

city = Deil,

company = Wybo Dekker, country = The Netherlands, countrycode = NL,

email = [email protected], fold3,


iban = \scshape nl94rabo0304046221, language = nl-NL,

opening = L.S.,

phone = 87\,8748496, % phone numbers without leading 0:


street = Deilsedijk 60,

term = 14,

website = www.xs4all.nl,

who = Wybo Dekker,

zip = 4158 CH,


The result is shown in figure


6.2 Invoice with redefined logo

When the


option is used, the invoice will be created with an invoice form on the lower third part of the page. Here is an example:



\setupdocument{accept, acceptdesc=NTG\\2006,

acceptdescription=Contributie 2006, acceptreference=4000 0000 2006 0308, date=20060503,

subject=Contributie 2006, nofooter




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 }


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




packages have already been made available by the


class. Figure



the output of this example.



Wybo Dekker Deilsedijk 60 4158 CH Deil

NTGDeilsedijk 60Deil 4158 CH

W.H. Dekker Deilsedijk 60 4158 CH Deil

Uw brief van Uw kenmerk Ons kenmerk


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


Omschrijving Bedrag (¤)

Contributie NTG voor 2006 40,00


betalingstermijn: 30 dagen iban: nl53ingb0001306238 ten name van: NTG

kenmerk: 308

Figure 5: Invoice example with accept form


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


by running

luatex isodoc.ins


After that, they can all be compiled, together with the isodoc documentation, by running


. If you want to experiment with the examples by changing them, then compile them

individually with

make <example>.pdf

, because with just


the isodoc documentation

will be recompiled, as the examples are part of it.


8 Implementation

The basis is the


class with all options:



3 \ifnum\pdfoutput=1\else%

4 \ClassError{isodoc}{Compile me with pdflatex, lualatex or xelatex!}{}

5 \fi





We use


floats here, and we need


’s commands for decent spacing in tables and more.


also brings us






, and




is used for the euro symbol.



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.










Several colors can be changed, by using the


command; the defaults (all black) are set here:


color for the header and footer field texts



color for the fancy headings



color for the folding marks





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




Background color for signaling items that should have been defined, but weren’t:


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


information. The idea is that this is used for all pre-printed text on the letter paper.


8.1 The options and their defaults

8.1.1 General options

The default shift is 0mm,0mm. The


option moves the output to the right and down:





32 \@xyshift#1@@@

33 \AtBeginDocument{\textblockorigin{\@xshift mm}{\@yshift mm}}




option prints a vertical bar in invoices between description and amount – (this is the default), the


option suppresses it.


novertical 35\define@key{isodoc}{vertical}[\verticaltrue]{\verticaltrue}


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


option, false by default:



39 \newif\ifforeign\foreignfalse

By default, the zip code is typeset before the city. The


option reverses this:



41 \newif\ifcityzip\cityzipfalse

Set the language; en-GB, set at the


is the default.



43 \StrSubstitute{#1}{-}{}[\@iso]

44 \ifcsname isodoc@\@iso\endcsname\csname isodoc@\@iso\endcsname\else 45 \ClassError{isodoc}{Unknown language #1}{}

46 \fi


Ordinal suffixes (like st, nd, rd, th) in dates are put on the line by default, but they can be


set superscript with the




49 \ifx\yourlettertext\undefined%

50 \@isodocordinalsstrue 51 \else

52 \ClassError{isodoc}{

53 You must use the ordinalss option before any language option}{}

54 \fi


56 \newif\if@isodocordinalss\@isodocordinalssfalse

The default is to have left, but not right justification, allowing for hyphenation in extreme




57\define@key{isodoc}{fill} []{\rightskip=1\rightskip}

58\define@key{isodoc}{nofill}[]{\rightskip=0mm plus 35mm}

59 \rightskip=0mm plus 35mm

8.1.2 Logo

The logo, by default, consists of a large company or personal name on top a rule, with a


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:



62 \newif\if@isodoclogo\@isodoclogotrue

63\define@key{isodoc}{company} {\def\company{#1}}

64 \def\company{\Undefined{company}}


66 \def\logoaddress{}

67\define@key{isodoc}{who} {\def\who{#1}}

68 \def\who{\Undefined{who}}

69\define@key{isodoc}{street} {\def\street{#1}}

70 \def\street{\Undefined{street}}

71\define@key{isodoc}{city} {\def\city{#1}}

72 \def\city{\Undefined{city}}

73\define@key{isodoc}{country} {\def\country{#1}}

74 \def\country{\Undefined{country}}


76 \def\countrycode{\Undefined{countrycode}}


77\define@key{isodoc}{zip} {\def\zip{#1}}

78 \def\zip{\Undefined{zip}}


8.1.3 Address window

The address can be positioned vertically with the


option; the default is


rightaddress 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




options 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}


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}



option takes the addressee’s address lines. Use


to separate lines. The info will


be split by


on the first


separator into the addressee’s name (


) and his address (


) The


will be reported in the pdf’s document properties.

However, this works only if the


key is set, with


, in the preamble. If several letters are composed,


is normally set in the




commands and thus is not seen by the


, which is called


; so set the defaults to

Various people

for the


and 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 return

noreturn returnaddress

(either in the style file or in the source) or, if the default was changed in the style file, remove it with


in 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.



option is provided to redefine the return address:

93\define@key{isodoc}{return} []{\returntrue}

94 \newif\ifreturn\returnfalse

95\define@key{isodoc}{noreturn} []{\returnfalse}


8.1.4 Header

A header is switched on or off with the




options. The default is to



have a header.

97\define@key{isodoc}{header} []{\headertrue}

98 \newif\ifheader\headertrue


The header is the start of the body. It is initially positioned at 98mm from the top of the


paper, but it can be shifted with the



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



command 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.

106\define@key{isodoc}{paymentorder} {\def\isodoc@paymentorder{#1}}




8.1.5 Footer

A footer is switched on or off with the




options. The default is the



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


a page footer, only those fields will be displayed which are not empty. Currently


phone phoneprefix cellphone fax website email creditorid













are recognized as possible footer fields. Phone and fax number will be prefixed with a 0, unless the


option was used: then the prefix will be


, where


is the area code. The latter is set with the


option, which is «Undefined area code» by default.

114\define@key{isodoc}{areacode} {\def\areacode{#1}}

115 \def\areacode{\Undefined{areacode}}


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


paper boundaries:


137 \newdimen\yfold\yfold=-1mm

The folding mark is in the right margin, but it can be moved to the left margin with the


foldright foldleft

option, or, if made that the default in your style file, back to the right margin with the




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


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.


The envelope for triple folded A4 is DL: 110x220mm, Fold the A4 to have a tolerance of


1.5mm at top and bottom, by putting the fold mark at 110-3=107mm.


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:




Related documents

If you use more than one cusp within your hbrace speci, you can separate scripts using &amp; which will place them above/below subsequent brace cusps, similar to separating

Specifically, it enables the user to choose constants they want to encode, decide where in the source code to put function definitions and class definitions, insert annotation

• MathWorld: “An algorithm is a specific set of instructions for carrying out a procedure or solving a problem, usually with the requirement that the procedure terminate at

(Note that this process can be parallelised.) Another reason is that the instances in the propositionalised data have many more attributes when using random forests than when using

The Department of Health provided the Water Corporation approval on 4 August 2017 to recharge up to 14 gigalitres per year into the Leederville and Yarragadee aquifers from the

a) Located near the south eastern boundary of the premises, up slope of the PMF and south of the Wheal Ellen Creek. b) No operation of equipment during high wind conditions. c)

If you want some text typeset with the duerer fonts for a short text you can use one of the commands. \

Finally, the \printindex command is used in your L A TEX document to indicate where the file foo.idx should be inserted, i.e., where the index should appear in your document.. The

This handler works like /.store as code: the content is stored in the cs-name given as value for the handler, but not inside the key itself (useful for key=value interfaces to

&#34;Contaminated Solid Waste&#34; has the meaning defined in Landfill Waste Classification and Waste Definitions 1996 (As amended December 2009) published by the CEO and as amended

'Inert Waste Type 2' has the meaning defined in Landfill Waste Classification and Waste Definitions 1996 (As amended December 2009), published by the CEO and as amended from time

'Inert Waste Type 1' has the meaning defined in Landfill Waste Classification and Waste Definitions 1996 (As amended December 2009), published by the CEO and as amended from time

Degree spectra of finite rank torsion-free abelian groups have been completely described [CDS00, Mel09, CHS07].. But there are many more restrictions on the class on top of having

Le lieu et le titre sont mis en premier dans la seconde colonne, chacun dans la bonne fonte, et en les faisant suivre d’un point. Ensuite, on ajoute, si elle existe,

The latex8 option instructs IEEEconf to violate the IEEE Computer Society Press guidelines in the same manner that the latex8 package provided by the IEEE Computer Society

M AGNETICS formats present a difficulty in that compsoc and transmag journal (but not compsoc conference) papers place the abstract and index terms sections in single column format

The package consists of a preprocessor that converts an indented list tree format into L A TEX input (plain TEX doesn’t seem to work), and some macro files which lay out the trees

\nodeconnect takes the same arguments as in tree-dvips, with a final optional [ ] argument taking PSTricks graphics parameters:.. (4) \nodeconnect[from loc]{from node}[to

Certain derived units have been given special names and symbols, and these special names and symbols may themselves be used in combination with those for base and other derived units

In this section we first state some important definitions, many of which should be familiar to you from real analy- sis, then state and prove the contraction mapping theorem

One would really like to have many such functions — but the question whether, in general, there exist any at all was raised by Elworthy in 1972 and, so far as I

Since such unbalanced data represents a usual scenario for network intrusion detection (where we have either many normal instances and only sparse anomalies as in the

According to the literature, despite many different definitions of leadership, the nature of leadership appears to focus on influencing followers and determining the