| 1 |
\documentclass[a4paper,11pt]{article} |
| 2 |
|
| 3 |
\usepackage[T1]{fontenc} |
| 4 |
\usepackage[utf8]{inputenc} |
| 5 |
\usepackage[margin=25mm]{geometry} |
| 6 |
\usepackage{array} |
| 7 |
\usepackage{booktabs} |
| 8 |
\usepackage{hyperref} |
| 9 |
\usepackage{longtable} |
| 10 |
\usepackage{upquote} |
| 11 |
\usepackage{xcolor} |
| 12 |
\usepackage{fancyvrb} |
| 13 |
|
| 14 |
\hypersetup{ |
| 15 |
colorlinks=true, |
| 16 |
linkcolor=blue!50!black, |
| 17 |
urlcolor=blue!50!black |
| 18 |
} |
| 19 |
|
| 20 |
\title{onlinebrief24} |
| 21 |
\author{Francesco Luciano} |
| 22 |
\date{2026-04-17} |
| 23 |
|
| 24 |
\begin{document} |
| 25 |
\maketitle |
| 26 |
|
| 27 |
\begin{abstract} |
| 28 |
\texttt{onlinebrief24} is a LaTeX class for DIN 5008 type-B |
| 29 |
business letters calibrated for use with \href{https://onlinebrief24.de} |
| 30 |
{onlinebrief24.de}. It provides a plain letter layout, a modern variant with |
| 31 |
header and footer, an optional DIN-style information block, and a technical |
| 32 |
guides mode for layout inspection. |
| 33 |
\href{https://onlinebrief24.de}{onlinebrief24.de} is a hybrid mail service for |
| 34 |
business customers: documents are submitted digitally, and the service handles |
| 35 |
printing, enveloping, franking, and postal delivery. |
| 36 |
\end{abstract} |
| 37 |
|
| 38 |
\section{Status} |
| 39 |
|
| 40 |
The class is verified with pdfLaTeX, XeLaTeX, and LuaLaTeX. The supported and |
| 41 |
hardened use case is one letter per document. The package is aimed at German |
| 42 |
business letters and loads \texttt{babel} with \texttt{german} by default |
| 43 |
(configurable via the \texttt{lang=} class option). |
| 44 |
|
| 45 |
\section{Installation} |
| 46 |
|
| 47 |
Install via your TeX distribution's package manager: |
| 48 |
|
| 49 |
\begin{Verbatim}[fontsize=\small] |
| 50 |
tlmgr install onlinebrief24 |
| 51 |
\end{Verbatim} |
| 52 |
|
| 53 |
Then load the class in your document: |
| 54 |
|
| 55 |
\begin{Verbatim}[fontsize=\small] |
| 56 |
\documentclass{onlinebrief24} |
| 57 |
\end{Verbatim} |
| 58 |
|
| 59 |
\section{Engine Support} |
| 60 |
|
| 61 |
\begin{itemize} |
| 62 |
\item pdfLaTeX: verified |
| 63 |
\item XeLaTeX: verified |
| 64 |
\item LuaLaTeX: verified |
| 65 |
\end{itemize} |
| 66 |
|
| 67 |
With pdfLaTeX the class uses \texttt{fontenc} and \texttt{tgheros} (TeX Gyre |
| 68 |
Heros). With XeLaTeX and LuaLaTeX it uses \texttt{fontspec}; Arial is preferred |
| 69 |
if installed, otherwise it falls back to TeX Gyre Heros. |
| 70 |
|
| 71 |
The \texttt{modern} style additionally loads \texttt{sourcesanspro} and |
| 72 |
\texttt{fontawesome5} (for footer icons). Both packages are part of |
| 73 |
\texttt{texlive-fonts-extra}. |
| 74 |
|
| 75 |
\section{Minimal Example} |
| 76 |
|
| 77 |
\begin{Verbatim}[fontsize=\small] |
| 78 |
\documentclass[basic,lang=english]{onlinebrief24} |
| 79 |
|
| 80 |
\setreturnaddress{Jane Smith, 12 Oak Street, Bristol BS1 4DJ} |
| 81 |
\setrecipient{ |
| 82 |
Example Services Ltd. \\ |
| 83 |
Mr. John Smith \\ |
| 84 |
24 Market Road \\ |
| 85 |
London SW1A 1AA |
| 86 |
} |
| 87 |
\setsubject{Subject} |
| 88 |
\setplace{Bristol} |
| 89 |
\setdate{\today} |
| 90 |
|
| 91 |
\begin{document} |
| 92 |
\begin{letter}{} |
| 93 |
\opening{Dear Mr. Smith,} |
| 94 |
|
| 95 |
This is a sample letter. |
| 96 |
|
| 97 |
\closing{Kind regards} |
| 98 |
\end{letter} |
| 99 |
\end{document} |
| 100 |
\end{Verbatim} |
| 101 |
|
| 102 |
\section{Options} |
| 103 |
|
| 104 |
\begin{longtable}{@{}p{35mm}p{105mm}@{}} |
| 105 |
\toprule |
| 106 |
Option & Meaning \\ |
| 107 |
\midrule |
| 108 |
\endhead |
| 109 |
\texttt{basic} & Plain layout without header and footer. \\ |
| 110 |
\texttt{modern} & Modern layout with header, footer, and accent color. \\ |
| 111 |
\texttt{infoblock} & Show a DIN-style information block in the upper-right |
| 112 |
header area. Only fields that are set are rendered. \\ |
| 113 |
\texttt{guides} & Technical overlay mode for checking the calibrated layout |
| 114 |
zones, fold marks, and text start area. This mode is for inspection, not final |
| 115 |
production output. \\ |
| 116 |
\texttt{footercenter} & Center the footer in modern mode. \\ |
| 117 |
\texttt{blue}, \texttt{orange}, \texttt{green}, \texttt{red}, |
| 118 |
\texttt{purple}, \texttt{grey}, \texttt{burgundy}, \texttt{black} & |
| 119 |
Accent-color schemes for modern mode. \\ |
| 120 |
\texttt{lang=\textit{name}} & Document language passed to \texttt{babel} |
| 121 |
(default: \texttt{german}). Any valid babel language name is accepted. The |
| 122 |
\texttt{infoblock} labels are localized for \texttt{german}, \texttt{english}, \texttt{french}, \texttt{spanish}, |
| 123 |
\texttt{italian}, \texttt{dutch}, and \texttt{polish}. \\ |
| 124 |
\bottomrule |
| 125 |
\end{longtable} |
| 126 |
|
| 127 |
\section{Main Commands} |
| 128 |
|
| 129 |
\begin{longtable}{@{}p{60mm}p{80mm}@{}} |
| 130 |
\toprule |
| 131 |
Command & Purpose \\ |
| 132 |
\midrule |
| 133 |
\endhead |
| 134 |
\texttt{\string\setreturnaddress\{...\}} & Mandatory one-line sender line for |
| 135 |
the address window. \\ |
| 136 |
\texttt{\string\setrecipient\{...\}} & Recipient block for the address window. |
| 137 |
Mandatory unless it is passed via \texttt{\string\begin\{letter\}\{...\}}. \\ |
| 138 |
\texttt{\string\setsubject\{...\}} & Subject line above the opening. \\ |
| 139 |
\texttt{\string\setdate\{...\}} & Date, defaulting to \texttt{\string\today}. \\ |
| 140 |
\texttt{\string\setplace\{...\}} & Place printed before the date. \\ |
| 141 |
\texttt{\string\encl\{...\}} & Enclosures listed below the closing; standard |
| 142 |
KOMA-Script command. \\ |
| 143 |
\texttt{\string\setyourref\{...\}} & Information-block field for the recipient's |
| 144 |
reference. \\ |
| 145 |
\texttt{\string\setyourmessage\{...\}} & Information-block field for the |
| 146 |
recipient's dated message. \\ |
| 147 |
\texttt{\string\setourref\{...\}} & Information-block field for your own |
| 148 |
reference. \\ |
| 149 |
\texttt{\string\setourmessage\{...\}} & Information-block field for your own |
| 150 |
dated message. \\ |
| 151 |
\texttt{\string\setcontactname\{...\}} & Information-block contact name. \\ |
| 152 |
\texttt{\string\setcontactphone\{...\}} & Information-block contact phone |
| 153 |
number. \\ |
| 154 |
\texttt{\string\setcontactfax\{...\}} & Information-block contact fax number. |
| 155 |
\\ |
| 156 |
\texttt{\string\setcontactemail\{...\}} & Information-block contact email |
| 157 |
address. \\ |
| 158 |
\texttt{\string\setfromfirstname\{...\}} & Modern-mode first name for the |
| 159 |
header. \\ |
| 160 |
\texttt{\string\setfromlastname\{...\}} & Modern-mode last name for the header. |
| 161 |
\\ |
| 162 |
\texttt{\string\setfromaddress\{...\}} & Modern-mode address line in the header. |
| 163 |
\\ |
| 164 |
\texttt{\string\setfromlandline\{...\}} & Optional modern-mode footer field. \\ |
| 165 |
\texttt{\string\setfromphone\{...\}} & Optional modern-mode footer field. \\ |
| 166 |
\texttt{\string\setfromemail\{...\}} & Optional modern-mode footer field. \\ |
| 167 |
\texttt{\string\setfromweb\{...\}} & Optional modern-mode footer field. \\ |
| 168 |
\texttt{\string\setfromlinkedin\{...\}} & Optional modern-mode footer field. \\ |
| 169 |
\texttt{\string\setfromname\{...\}} & Deprecated legacy alias. Emits a class |
| 170 |
warning; use \texttt{\string\setfromfirstname} and |
| 171 |
\texttt{\string\setfromlastname} instead. \\ |
| 172 |
\midrule |
| 173 |
\multicolumn{2}{@{}l}{\textit{Extensibility}} \\ |
| 174 |
\midrule |
| 175 |
\texttt{\string\addfooteritem}\\ |
| 176 |
\texttt{\{\textit{icon}\}\{\textit{text}\}} & |
| 177 |
Append a custom item to the modern-mode footer. The icon is a |
| 178 |
\texttt{fontawesome5} command. Multiple calls append in order. \\ |
| 179 |
\texttt{\string\addinfoblockrow}\\ |
| 180 |
\texttt{\{\textit{label}\}\{\textit{value}\}} & |
| 181 |
Append a custom row to the DIN-style information block. Empty values are |
| 182 |
silently omitted. \\ |
| 183 |
\midrule |
| 184 |
\multicolumn{2}{@{}l}{\textit{Layout tuning}} \\ |
| 185 |
\midrule |
| 186 |
\texttt{\string\setinfoblocktopoffset\{\textit{dim}\}} & |
| 187 |
Vertical offset from the page top to the information block (default: 50mm). \\ |
| 188 |
\texttt{\string\setinfoblockrightedge\{\textit{dim}\}} & |
| 189 |
Horizontal distance from the left page edge to the block's right edge (default: 200mm). \\ |
| 190 |
\texttt{\string\setinfoblockcolwidths}\\ |
| 191 |
\texttt{\{\textit{label}\}\{\textit{sep}\}\{\textit{value}\}} & |
| 192 |
Column widths for the information-block tabular (defaults: 30mm, 2mm, 43mm). \\ |
| 193 |
\bottomrule |
| 194 |
\end{longtable} |
| 195 |
|
| 196 |
\section{Validation and Layout Guarantees} |
| 197 |
|
| 198 |
The class validates the mandatory address-window fields when a letter starts. |
| 199 |
Compilation stops with a clear error if the return address is missing, the |
| 200 |
recipient is missing, or the return address is too long for the single-line |
| 201 |
sender zone. |
| 202 |
|
| 203 |
If the \texttt{infoblock} option is enabled, the information block is rendered |
| 204 |
independently from the body text flow. This keeps the text start stable while |
| 205 |
showing only the fields that are actually set. |
| 206 |
|
| 207 |
For multipage letters, the address-window overlay, fold marks, and optional |
| 208 |
modern header and footer are restricted to page 1. Continuation pages start |
| 209 |
near the normal top margin instead of inheriting the first-page window offset. |
| 210 |
|
| 211 |
\section{Calibration} |
| 212 |
|
| 213 |
The layout is calibrated against the practical preview behavior of |
| 214 |
\href{https://onlinebrief24.de}{onlinebrief24.de}, not only against the |
| 215 |
nominal measurement graphic. In practice, the class uses effective window zones |
| 216 |
of 50--52\,mm, 52--72\,mm, and 72--92\,mm to match the real preview more |
| 217 |
closely. |
| 218 |
|
| 219 |
\section{Guides Mode} |
| 220 |
|
| 221 |
The \texttt{guides} option enables a technical overlay that visualises all DIN |
| 222 |
5008 layout zones, fold marks, and the text-start line directly in the PDF. |
| 223 |
It is intended for calibration and debugging, not for final output. |
| 224 |
|
| 225 |
\begin{Verbatim}[fontsize=\small] |
| 226 |
\documentclass[guides]{onlinebrief24} |
| 227 |
\end{Verbatim} |
| 228 |
|
| 229 |
The overlay draws: |
| 230 |
|
| 231 |
\begin{itemize} |
| 232 |
\item \textbf{Zone 1} (blue, 50--52\,mm from top): the 2\,mm sender line. |
| 233 |
\item \textbf{Zone 2} (red, 52--72\,mm from top): reserved area for postal |
| 234 |
codes and franking marks. |
| 235 |
\item \textbf{Zone 3} (green, 72--92\,mm from top): the recipient address block. |
| 236 |
\item Fold-mark annotations at 105\,mm and 205\,mm from the top, matching the |
| 237 |
two fold positions for a DIN C6/5 window envelope. |
| 238 |
\item A dashed text-start line at 110\,mm and a vertical text-alignment guide |
| 239 |
at the 25\,mm left margin. |
| 240 |
\end{itemize} |
| 241 |
|
| 242 |
The \texttt{guides} option can be combined with \texttt{basic} or |
| 243 |
\texttt{modern}; remove it before submitting to the print service. |
| 244 |
|
| 245 |
\section{Extensibility} |
| 246 |
|
| 247 |
\subsection{Custom footer items (\texttt{modern} style)} |
| 248 |
|
| 249 |
In modern mode the footer can be extended with additional contact fields using |
| 250 |
\texttt{\string\addfooteritem}: |
| 251 |
|
| 252 |
\begin{Verbatim}[fontsize=\small] |
| 253 |
\documentclass[modern]{onlinebrief24} |
| 254 |
\addfooteritem{\faGithub}{github.com/example} |
| 255 |
\addfooteritem{\faTwitter}{@example} |
| 256 |
\end{Verbatim} |
| 257 |
|
| 258 |
Each item requires a \texttt{fontawesome5} icon command and a text label. Items |
| 259 |
are appended after the standard footer fields (landline, mobile, email, web, |
| 260 |
LinkedIn) and separated by the standard vertical-bar separator. The macro must |
| 261 |
be called in the preamble. Using \texttt{\string\addfooteritem} without the |
| 262 |
\texttt{modern} option emits a class warning and has no effect. |
| 263 |
|
| 264 |
\subsection{Custom infoblock rows (\texttt{infoblock} option)} |
| 265 |
|
| 266 |
Additional rows can be appended to the DIN-style information block: |
| 267 |
|
| 268 |
\begin{Verbatim}[fontsize=\small] |
| 269 |
\documentclass[infoblock]{onlinebrief24} |
| 270 |
\addinfoblockrow{Department}{Engineering} |
| 271 |
\addinfoblockrow{Project}{OB24-2026} |
| 272 |
\end{Verbatim} |
| 273 |
|
| 274 |
Custom rows follow the same column widths and typography as the built-in rows. |
| 275 |
Empty values are silently omitted, consistent with the built-in row behaviour. |
| 276 |
|
| 277 |
\subsection{Information block layout tuning} |
| 278 |
|
| 279 |
The position and column widths of the information block can be adjusted without |
| 280 |
editing the class file: |
| 281 |
|
| 282 |
\begin{Verbatim}[fontsize=\small] |
| 283 |
\setinfoblocktopoffset{55mm} % vertical offset from page top |
| 284 |
\setinfoblockrightedge{195mm} % right edge from left page margin |
| 285 |
\setinfoblockcolwidths{28mm}{2mm}{45mm} % label / gap / value widths |
| 286 |
\end{Verbatim} |
| 287 |
|
| 288 |
These macros must be called in the preamble after \verb|\documentclass|. |
| 289 |
The defaults match the DIN 5008 Form B reference geometry. |
| 290 |
|
| 291 |
\section{Examples} |
| 292 |
|
| 293 |
The package ships with two focused example documents covering: |
| 294 |
|
| 295 |
\begin{itemize} |
| 296 |
\item the basic layout with the DIN-style information block |
| 297 |
\item the modern layout with the DIN-style information block |
| 298 |
\end{itemize} |
| 299 |
|
| 300 |
Both bundled example documents use English sample data so the generated PDFs |
| 301 |
double as immediately readable CTAN previews. |
| 302 |
|
| 303 |
\section{License and Project Status} |
| 304 |
|
| 305 |
This package is distributed under the LaTeX Project Public License (LPPL) 1.3c. |
| 306 |
It is a community project and has no official affiliation with letterei.de |
| 307 |
Postdienste GmbH. The trademark holders have formally authorized the maintainer |
| 308 |
to use the onlinebrief24.de mark in connection with this LaTeX class. |
| 309 |
|
| 310 |
\end{document} |