LaTeX letter with address field in the right place for a "C5 envelope with window"
My choice would be the document class scrlttr2
. It can be customized in many ways.
A very quick way to get the address field to the right is using the document class option SN:
\documentclass[a4paper,SN]{scrlttr2}
This option decides that the file SN.lco
has to be used which sets the address to the right side. If you look into this file, which is located in the same folder like the scrlttr2 class, you would see the used lenghts. They are set by the command \@setplength
. Those lengths are called pseudolengths, they are described in the KOMA-Script manual. Have a look at Figure 6.1.: Schematic of the pseudo-lengths for a letter. It's a drawing visualing the lenghts. Here are useful for instance toaddrhpos
, toaddrvpos
, toaddrwidth
and toaddrheight
, toaddrindent
and toaddrindent
. You could adjust those lengths in your preamble according to your needs.
It may be done linke this, in your preamble:
\makeatletter
\@setplength{toaddrvpos}{40mm}
\@setplength{toaddrhpos}{110mm}
\makeatother
You could vary these values until they fit well, or calculate it from the paper size and the other dimensions.
A package similar to scrlttr2
is the isodoc class. This class specifically aims at NEN 1029 compliance. According to the documentation, in that case, setting up the right window goes like this:
\documentclass{isodoc}
\setupdocument {
rightaddress, % leftaddress is the default
addresscenter=60mm, % vertical center of the envelope window
addresswidth=110mm, % width of the address window
}
For anybody looking after a quick example using scrlttr2
. To get the window of the envelope right, make sure you select the correct paper size and one of: DIN
, DINmtext
, SNleft
, SN
or NF
.
\documentclass[a4paper,DIN]{scrlttr2}
\usepackage[english]{babel}
\KOMAoptions{fromphone=on,fromemail=true,backaddress=false}
\setkomavar{fromname}{Sender Name}
\setkomavar{signature}{Sender Name}
\setkomavar{fromaddress}{Sender Address\\ Some City, Some Country}
\setkomavar{fromemail}{[email protected]}
\setkomavar{fromphone}{55550000}
\setkomavar{subject}{Subject of the letter}
\begin{document}
\begin{letter}{%
Recipient Name \\
Their Address \\
Some City, Some Country
}
\opening{Dear Recipient,}
This is an example letter
\closing{Sincerely,}
\end{letter}
\end{document}