\documentclass[a4paper,11pt]{article}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[margin=25mm]{geometry}
\usepackage{array}
\usepackage{booktabs}
\usepackage{hyperref}
\usepackage{longtable}
\usepackage{upquote}
\usepackage{xcolor}
\usepackage{fancyvrb}

\hypersetup{
  colorlinks=true,
  linkcolor=blue!50!black,
  urlcolor=blue!50!black
}

\title{onlinebrief24}
\author{Francesco Luciano}
\date{2026-03-20}

\begin{document}
\maketitle

\begin{abstract}
\texttt{onlinebrief24} is a LaTeX class for DIN 5008 type-B
business letters calibrated for use with \href{https://onlinebrief24.de}
{onlinebrief24.de}. It provides a plain letter layout, a modern variant with
header and footer, and a technical guides mode for layout inspection.
\href{https://onlinebrief24.de}{onlinebrief24.de} is a hybrid mail service for
business customers: documents are submitted digitally, and the service handles
printing, enveloping, franking, and postal delivery.
\end{abstract}

\section{Status}

The class is verified with pdfLaTeX, XeLaTeX, and LuaLaTeX. The supported and
hardened use case is one letter per document. The package is aimed at German
business letters and loads \texttt{babel} with \texttt{ngerman} by default
(configurable via the \texttt{lang=} class option).

\section{Installation}

Install via your TeX distribution's package manager:

\begin{Verbatim}[fontsize=\small]
tlmgr install onlinebrief24
\end{Verbatim}

Then load the class in your document:

\begin{Verbatim}[fontsize=\small]
\documentclass{onlinebrief24}
\end{Verbatim}

\section{Engine Support}

\begin{itemize}
\item pdfLaTeX: verified
\item XeLaTeX: verified
\item LuaLaTeX: verified
\end{itemize}

With pdfLaTeX the class uses \texttt{fontenc} and \texttt{tgheros} (TeX Gyre
Heros). With XeLaTeX and LuaLaTeX it uses \texttt{fontspec}; Arial is preferred
if installed, otherwise it falls back to TeX Gyre Heros.

\section{Minimal Example}

\begin{Verbatim}[fontsize=\small]
\documentclass[basic]{onlinebrief24}

\setreturnaddress{Erika Mustermann, Blumenweg 1, 54321 Blumenstadt}
\setrecipient{
  Mustermann GmbH \& Co. KG \\
  Herrn Hans Mustermann \\
  Musterstr. 1 \\
  12345 Musterstadt
}
\setsubject{Subject}
\setplace{Musterstadt}
\setdate{\today}

\begin{document}
\begin{letter}{}
\opening{Sehr geehrter Herr Mustermann,}

This is a sample letter.

\closing{Mit freundlichen Gruessen}
\end{letter}
\end{document}
\end{Verbatim}

\section{Options}

\begin{longtable}{@{}p{35mm}p{105mm}@{}}
\toprule
Option & Meaning \\
\midrule
\endhead
\texttt{basic} & Plain layout without header and footer. \\
\texttt{modern} & Modern layout with header, footer, and accent color. \\
\texttt{guides} & Technical overlay mode for checking the calibrated layout
zones, fold marks, and text start area. This mode is for inspection, not final
production output. \\
\texttt{footercenter} & Center the footer in modern mode. \\
\texttt{blue}, \texttt{orange}, \texttt{green}, \texttt{red},
\texttt{purple}, \texttt{grey}, \texttt{burgundy}, \texttt{black} &
Accent-color schemes for modern mode. \\
\texttt{lang=\textit{name}} & Document language passed to \texttt{babel}
(default: \texttt{ngerman}). Any valid babel language name is accepted. \\
\bottomrule
\end{longtable}

\section{Main Commands}

\begin{longtable}{@{}p{50mm}p{90mm}@{}}
\toprule
Command & Purpose \\
\midrule
\endhead
\texttt{\string\setreturnaddress\{...\}} & Mandatory one-line sender line for
the address window. \\
\texttt{\string\setrecipient\{...\}} & Recipient block for the address window.
Mandatory unless it is passed via \texttt{\string\begin\{letter\}\{...\}}. \\
\texttt{\string\setsubject\{...\}} & Subject line above the opening. \\
\texttt{\string\setdate\{...\}} & Date, defaulting to \texttt{\string\today}. \\
\texttt{\string\setplace\{...\}} & Place printed before the date. \\
\texttt{\string\setfromfirstname\{...\}} & Modern-mode first name for the
header. \\
\texttt{\string\setfromlastname\{...\}} & Modern-mode last name for the header.
\\
\texttt{\string\setfromaddress\{...\}} & Modern-mode address line in the header.
\\
\texttt{\string\setfromlandline\{...\}} & Optional modern-mode footer field. \\
\texttt{\string\setfromphone\{...\}} & Optional modern-mode footer field. \\
\texttt{\string\setfromemail\{...\}} & Optional modern-mode footer field. \\
\texttt{\string\setfromweb\{...\}} & Optional modern-mode footer field. \\
\texttt{\string\setfromlinkedin\{...\}} & Optional modern-mode footer field. \\
\texttt{\string\setfromname\{...\}} & Legacy fallback if first and last name are
not split. \\
\bottomrule
\end{longtable}

\section{Validation and Layout Guarantees}

The class validates the mandatory address-window fields when a letter starts.
Compilation stops with a clear error if the return address is missing, the
recipient is missing, or the return address is too long for the single-line
sender zone.

For multipage letters, the address-window overlay, fold marks, and optional
modern header and footer are restricted to page 1. Continuation pages start
near the normal top margin instead of inheriting the first-page window offset.

\section{Calibration}

The layout is calibrated against the practical preview behavior of
\href{https://onlinebrief24.de}{onlinebrief24.de}, not only against the
nominal measurement graphic. In practice, the class uses effective window zones
of 50--52\,mm, 52--72\,mm, and 72--92\,mm to match the real preview more
closely.

\section{Examples}

The package ships with example documents covering:

\begin{itemize}
\item the plain layout
\item the modern layout
\end{itemize}

\section{License and Project Status}

This package is distributed under the LaTeX Project Public License (LPPL) 1.3c.
It is a community project and has no official affiliation with letterei.de
Postdienste GmbH. The trademark holders have formally authorized the maintainer
to use the Onlinebrief24 mark in connection with this LaTeX class.

\end{document}
