Greg’s blog
  • Blog
  • Experiments

Table of Contents

  • Design Goals
  • Class Implementation
    • Class File
    • Example Document
  • Rendered Example

Building a No-Fluff Report Template in LaTeX

LaTeX
Author

Gregor Cerar

Published

2025-05-07

Abstract
This post presents ministate, a compact LaTeX class for short reports. It reduces page margins and title spacing, keeps document metadata in running headers, and lets the same class support documents with or without a displayed title block.

Design Goals

  • Compact: Smaller margins, tighter title spacing, and compact headings leave more room for the report itself.
  • Optional title block: A formal report can call \maketitle; a brief update can omit it while retaining metadata in the running header.
  • Adaptable length: The same class should work for a one-page update or a longer appendix, with the main layout choices centralized in one file.

The standard article class is a good base, but its default page and title spacing is roomier than I wanted for internal reports. More specialized publication classes add conventions that these documents do not need. I therefore adapted the ministate class instead.

Class Implementation

The class builds on article and changes four parts of the presentation: page geometry, paragraph spacing, running headers, and the title block. The \title, \author, and \date commands store the same metadata for both the title and header, while \headertitle and \headerauthor provide shorter header-specific overrides.

Calling \maketitle remains a document-level choice. The class patches its first-page style so a displayed title uses the same header as later pages, then replaces \@maketitle with a more compact layout. Omitting \maketitle suppresses only the centered title block.

Class File

ministate.cls
\ProvidesClass{ministate}[2023/03/29 v3.0 Minimalist statement class]
\LoadClass[11pt,a4paper]{article}

\usepackage[utf8]{inputenc} % Retained for compatibility with pre-2018 LaTeX releases
\usepackage[T1]{fontenc}
\usepackage{lmodern}

\usepackage{microtype}

\usepackage[margin=0.8in]{geometry}
\usepackage{parskip}
\usepackage{fancyhdr}

\setlength{\headheight}{15.2pt}
\pagestyle{fancy}
\fancyhf{} % Clear all header and footer fields

%--------------------------------------------------%
%    Title, HeaderTitle, Author, HeaderAuthor,     %
%                 Custom Date                      %
%--------------------------------------------------%

\let\oldtitle\title
\let\oldauthor\author
\let\olddate\date

\def\@headertitle{}
\def\@headerauthor{}
\def\@headerdate{}

% Redefine the \title and \author commands
\renewcommand{\title}[1]{%
    \oldtitle{#1}%
    \ifx\@headertitle\@empty%
        \relax\def\@headertitle{#1}%
    \fi%
}
\renewcommand{\author}[1]{%
    \oldauthor{#1}%
    \ifx\@headerauthor\@empty%
        \relax\def\@headerauthor{#1}%
    \fi%
}

\renewcommand{\date}[1]{%
    \olddate{#1}%
    \ifx\@headerdate\@empty%
        \relax\def\@headerdate{#1}%
    \fi%
}

% Commands for explicitly setting the header title and header author
\newcommand{\headertitle}[1]{\def\@headertitle{#1}}
\newcommand{\headerauthor}[1]{\def\@headerauthor{#1}}

\fancypagestyle{ministate}{%
  \fancyhf{}% clear everything
  \fancyhead[L]{\textbf{\@headertitle}\ifx\@headerdate\@empty\else\ (\@headerdate)\fi}%
  \fancyhead[R]{\textbf{\@headerauthor}}%
  \fancyfoot[C]{\thepage}%
}

\pagestyle{ministate}

%--------------------------------------------------%
%                   Document Body                  %
%--------------------------------------------------%

% Optional header overrides:
% \title{Your Title Here}
% \author{Author Name}
% \headertitle{Short Header Title}
% \headerauthor{Short Header Author}
% \date{Custom Date or Empty String}

% Keep the ministate header on a page that calls \maketitle.
\usepackage{etoolbox}
\makeatletter
\patchcmd{\maketitle}%
  {\thispagestyle{plain}}%
  {\thispagestyle{ministate}}%
  {}{}
\makeatother

\makeatletter
\def\@maketitle{%
  \newpage
  \begin{center}%
    \let\footnote\thanks
    {\LARGE \@title\par}%
    \vskip 0.2em%
    {\large\begin{tabular}[t]{c}\@author\end{tabular}\par}%
    \vskip 0.2em%
    {\large \@date}\vskip 0.2em%
  \end{center}%
  \par
}%
\makeatother

The example below keeps the title, author, and date in the header and calls \maketitle to display the compact title block. Removing that one command produces a header-only version of the same document.

Save the class and example in the same directory, then compile example.tex with a current LaTeX distribution.

Example Document

The example uses Atkinson Hyperlegible for the body font and kantlipsum only to supply placeholder text:

example.tex
\documentclass{ministate}

\usepackage[sfdefault]{atkinson}
\usepackage{hyperref}
\usepackage[english]{babel}
\usepackage[none]{hyphenat}
\interdisplaylinepenalty=10000
\usepackage{kantlipsum}
% ministate settings
\title{The Summary of Lorem Ipsum}
\headertitle{The Shorter Title}  % (optional) will use \title if not used

\author{Johnny English, PhD}
\headerauthor{Johnny E., PhD} % (optional) will use \author if not used

\date{May 7, 2025}

\begin{document}

\maketitle

\kant

\end{document}

Rendered Example

The embedded PDF shows the title spacing, running header, margins, and body typography produced by the example:

Reuse

CC BY-NC-SA 4.0
 

© Copyright 2021, Gregor Cerar