TeXRocks, a minimal (La)TeX distribution

TeXRocks is a minimal (La)TeX distribution powered by Luarocks/Lux and LuaTeX.

It has the following features:

  • virtual environment: all TeX packages are installed to .lux/5.3/XXXXX-package_name@version/, like nodejs's node_modules/ and python's .venv/. After development of PDF, You can delete it safely, and it will not affect your next development of PDF.
  • minimal: we only install required packages
  • package version control: when you declare latex-base == "2025.06.01-1", it will install https://luarocks.org/modules/freed-wu/latex-base/2025.06.01-1 not other versions! pin the version like nodejs's package.json and python's requirements.txt
  • package installation in parallel: install many packages at the same time
  • a server to host compiled TeX packages: https://ustctug.github.io/texrocks/
  • use lua to develop TeX packages: https://luarocks.org/m/texmf

We also provide some related TeX tools, like kpsewhich and texdef written in lua. See official website https://texrocks.readthedocs.io/

Quick Start

First coming?

TeX Dialects

Which TeX do you want to use?

TODO:

  • ConTeXt

TeX Tools

Some useful tools for development!

Developed by others

  • l3build: a tool to test/build/pack TeX packages developed by LaTeX 3 team
  • texdoc: a tool to search document of any TeX package developed by TeX Live team. It needs an extra configuration.
  • luafindfont: a simple tool to search fonts

Developed by ours

TODO:

  • latexmk: read XXX.log to decide if rerun TeX compiler. So far you have to rerun lualatex by yourself.

Learn More

Know what is under the hood.

  • Structure: What does it consist of?
  • Principle: How does it work?
  • Roadmap: which features TeXRocks have supported and will support?

Others

  • manifest: list all current TeX packages
  • rocks: some packages cost many time to build. We provide compiled packages for them!
  • repository: git repository, also include this website.
  • CTAN: CTAN homepage

Modules

API reference for developers
texrocks library for luatex, lualatex, luatexinfo and texlua
texrocks.lfs wrap lfs
texrocks.os wrap os
epstopdf library for epstopdf
kpathsea library for kpsewhich
open library for lua-open
sdluatex library for sdluatex
texcat library for texcat
texcat.renderer a class to render
texcat.syntaxes.tmlanguage a class to wrap textmate language
texcat.syntaxes.treesitter a class to wrap treesitter parsers and queries
texcat.themes some generic utilities for themes
texcat.themes.tmtheme a class to wrap textmate theme
texdef library for texdef and latexdef
generated by LDoc 1.5.0 Last updated 2026-07-02 11:19:25