Requirements

Before installing

LeanTeX v2.5 expects Python 3.9+, Lean 4 and Lake, a TeX distribution with XeLaTeX or LuaLaTeX, the LaTeX package minted, and Pygments.

Clone
git clone https://github.com/rgrossharv/LeanTeX.git
cd LeanTeX
Python
python3 -m pip install Pygments
TeX
PYTHONPATH=. python3 -m leantex install-tex

This installs the LeanTeX style files and the latexmk hook used by normal PDF builds.

Build
PYTHONPATH=. python3 -m leantex build path/to/file.tex

Use --no-latexmk when you only want to refresh Lean output files.