Catppuccin for LaTeX
- Download the
.sty
theme file from this repository that you'd like to use in your LaTeX document - Add it to the root of your project, alongside your LaTeX document
- Import the package by adding
\usepackage[FLAVOR]{catppuccin}
, replacingFLAVOR
with the flavor of your choice. i.e.\usepackage[macchiato]{catppuccin}
. Valid options are: mocha (default), latte, frappe, and macchiato.
If you'd like, you could also just copy the color definitions from the your desired .sty
theme file. Ensure that you still require the xcolor
package (\usepackage{xcolor}
) and still bring in the \pagecolor
and \color
definitions.
All Catppuccin palette colors, across all flavors, follow the same naming convention. This theme set prefixes all Catppuccin colors with ctp
, i.e. ctpPeach
, or ctpBlue
.
If you wish to only utilize the themes for code snippets and not the document itself:
- If you are importing the package from its
.sty
file, reset the default colors by adding the following after the package import:
\pagecolor{white}
\color{black}
- If you copied and pasted
.sty
contents into your preamble, ensure that you omit the\pagecolor
and\color
definitions
Please refer to the examples for full demonstrations, with LaTeX sources and their outputs, on theme usage and code highlighting.
Inspired by Dracula's LaTeX theme.
Copyright © 2021-present Catppuccin Org