Skip to content

About

LaTeX template (3 columns) for cheatsheets.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

Repository files navigation

cheatsheet-template

A LaTeX template for compact three-column cheat sheets on landscape A4

LaTeX KOMA-Script Overleaf Build PDF License

Preview · Quick start · Usage · PDF

Features

  • 📐 Three columns on landscape A4 with 0.5 cm margins; the number of columns is an option
  • 🎨 Color-coded heading boxes for sections, subsections and subsubsections
  • 🧮 Math macros for boxed formulas, matrices, norms, absolute values, floor and ceiling
  • 📋 A symbols table that fills the column width, for symbol–meaning lists
  • ⚙️ Compiles with pdfLaTeX (recommended) and LuaLaTeX, locally or on Overleaf
  • 🤖 GitHub Actions builds the PDF on every push and attaches it to releases

Note

Created in 2020 on Overleaf and updated in 2026 (v2): the layout moved into cheatsheet.sty, the heading boxes fit the column width, lists and tables are compact, and the deprecated commath package is replaced by mathtools. The example content is a German summary of common math notation.

Contents

Preview

Preview of the example cheat sheet

Repository structure

Path Content
cheatsheet.sty Layout, colors, heading boxes and math macros
cheatsheet.tex Example cheat sheet (math notation, in German)
.latexmkrc latexmk settings (pdfLaTeX, cheatsheet.tex as default file)
.github/workflows/build.yml Builds the PDF and attaches it to releases
docs/preview.png Rendered example, shown above

Quick start

Overleaf

  1. Download cheatsheet.sty and cheatsheet.tex (or the repository as ZIP).
  2. In Overleaf, choose New Project → Upload Project and upload both files (or the ZIP).
  3. Keep the compiler at pdfLaTeX and edit cheatsheet.tex.

Local

You need a TeX distribution with latexmk, e.g. TeX Live or MacTeX. A full installation contains every package the template uses.

  1. Clone the repository:

    git clone git@github.com:HuberNicolas/cheatsheet-template.git
  2. Build the PDF (.latexmkrc selects pdfLaTeX and cheatsheet.tex):

    latexmk
  3. Rebuild on every save while you edit:

    latexmk -pvc
  4. Remove the build files:

    latexmk -c

Docker

Without a local TeX installation, build with the official TeX Live image (several GB):

docker run --rm -v "$PWD":/w -w /w texlive/texlive:latest latexmk

Usage

A minimal cheat sheet:

\documentclass[fontsize=10pt]{scrartcl}
\usepackage[columns=3]{cheatsheet}
\usepackage[english]{babel}

\title{Linear Algebra}
\author{Your Name}
\date{\today}

\begin{document}
\begin{cheatsheet}
\maketitle

\section{Matrices}
\subsection{Determinant}
\eqbox{\det\matp{a & b \\ c & d} = ad - bc}

\subsubsection{Symbols}
\begin{symbols}
    A^T    & transpose \\
    A^{-1} & inverse \\
\end{symbols}

\end{cheatsheet}
\end{document}
Command / environment Result
\begin{cheatsheet} … \end{cheatsheet} Multi-column body; columns are filled one after another
\maketitle Compact title banner at the top of the first column
\section, \subsection, \subsubsection Heading boxes in three shades of blue, unnumbered
\begin{symbols} … \end{symbols} Two-column table: symbol (math mode) and meaning (text)
\eqbox{…} Formula in a colored box (display style)
\matp{…}, \matb{…}, \mat{…} Matrix with round, square or no brackets
\abs{x}, \norm{x}, \floor{x}, \ceil{x} Paired delimiters; the starred form (\abs*{…}) scales
\vect{v} Bold vector
\dif Upright d for integrals: \int f(x) \dif x
\defn, \bem Markers for definitions and remarks (Def.:, Bem.:)

Customisation

What Where
Number of columns Package option: \usepackage[columns=4]{cheatsheet}
Font size Class option: \documentclass[fontsize=9pt]{scrartcl}
Colors \definecolor{cs-…} lines in cheatsheet.sty, or redefine them after loading the package
Margins, paper geometry line in cheatsheet.sty
Heading spacing \RedeclareSectionCommand lines in cheatsheet.sty
Language babel option in your .tex file (ngerman, english, …)

Build in CI

build.yml compiles cheatsheet.tex with xu-cheng/latex-action on every push and pull request and uploads the PDF as a workflow artifact. Pushing a tag v* also attaches the PDF to a GitHub release.

License

MIT © 2020 Nicolas Huber.

Author

Nicolas Huber · GitHub

About

LaTeX template (3 columns) for cheatsheets.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages