Directory systems/texrocks
README.md
TeXRocks
A minimal (La)TeX distribution powered by lux/luarocks and luaTeX.
Tutorial
- Create a project
$ lx new my-thesis Fetching remote repository metadata... ✔ Fetched remote repository metadata. > Package name: my-thesis > Description: My thesis > License: GPL-3.0 > Labels: thesis > Maintainer: A TeX user > What is the lowest Lua version you support? 5.1 All done! $ cd my-thesis $ cat lux.toml
package = "my-thesis" version = "0.1.0" lua = ">=5.1" [description] summary = "My thesis" maintainer = "A TeX user" labels = ["thesis"] license = "GPL-3.0" [dependencies] # Add your dependencies here # `busted = ">=2.0"` [run] args = ["src/main.lua"] [build] type = "builtin"
- Add some dependencies
# LaTeX support lx add -b lualatex # \usepackage{hyperref} lx add -b hyperref # \usepackage{graphicx} lx add -b graphics-cfg # \usepackage{tikz} lx add -b pgf # lx add -b more packages ...
lux.toml:
# ... [build_dependencies] lualatex = "X.Y.Z-1" hyperref = "X.Y.Z-1" graphics-cfg = "X.Y.Z-1" pgf = "X.Y.Z-1"
- Edit your document
$EDITOR main.tex
- Tell
lxhow to build, install and open your document
lux.toml:
# ... [build] type = "command" build_command = "lualatex --interaction=nonstopmode main.tex" [build.install.conf] '../doc/main.pdf' = 'main.pdf' [run] type = "command" command = "lx" args = ["--tree=.lux", "doc", "my-thesis"]
- Build and view your document
lx build lx run
This is your project structure:
$ tree -a . ├── .lux # like node_modules/ or .venv/ :) │ ├── .gitignore │ └── 5.3 # pdf's dependencies are build dependencies not runtime │ ├── bin │ ├── build_dependencies │ │ ├── .gitignore │ │ └── 5.3 │ │ ├── bin │ │ │ ├── kpsewhich # Lua program, a wrapper of luahbtex │ │ │ ├── luahbtex # real LaTeX compiler and Lua interpreter │ │ │ ├── lualatex # LaTeX compiler, a wrapper of luahbtex │ │ │ ├── texlua # Lua interpreter, a wrapper of luahbtex │ │ │ └── updmap # Lua program, a wrapper of luahbtex │ │ ├── 1a043a1a092206fb664a8dd394bdf99e526af762fe7282c6ccf49bc0ec23521e-latex-base@2024.11.01-2 │ │ │ ├── etc │ │ │ │ ├── conf │ │ │ │ ├── doc │ │ │ │ │ └── latex │ │ │ │ │ └── base │ │ │ │ │ ├── ... │ │ │ │ │ ├── usrguide.pdf # RTFM │ │ │ │ │ └── ... │ │ │ │ └── tex │ │ │ │ └── latex │ │ │ │ └── base │ │ │ │ ├── ... │ │ │ │ ├── article.cls # \documentclass{article} │ │ │ │ └── ... │ │ │ ├── lib │ │ │ ├── package.rockspec │ │ │ └── src │ │ │ └── ltluatex.lua │ │ ├── 6fcffa0eeadc4a75dc246d6869dcfe79594d6e0114ece5b260b9216a3d40cdfb-amsfonts@3.04-1 │ │ │ ├── etc │ │ │ │ ├── conf │ │ │ │ ├── doc │ │ │ │ │ └── fonts │ │ │ │ │ └── amsfonts │ │ │ │ │ ├── ... │ │ │ │ │ └── README │ │ │ │ ├── fonts │ │ │ │ │ ├── afm │ │ │ │ │ │ └── public │ │ │ │ │ │ └── amsfonts │ │ │ │ │ │ ├── cm # computer modern fonts │ │ │ │ │ │ │ └── ... │ │ │ │ │ │ ├── ... │ │ │ │ │ │ └── symbols # math symbol fonts │ │ │ │ │ │ └── ... │ │ │ │ │ └── ... # more font types │ │ │ │ └── tex │ │ │ │ ├── latex │ │ │ │ │ └── amsfonts │ │ │ │ │ ├── amsfonts.sty # \usepackage{amsfonts} │ │ │ │ │ └── ... │ │ │ │ └── plain │ │ │ │ └── amsfonts │ │ │ │ ├── amssym.def │ │ │ │ ├── amssym.tex # \input{amssym} │ │ │ │ └── cyracc.def │ │ │ ├── lib │ │ │ ├── package.rockspec │ │ │ └── src │ │ ├── ... # more TeX packages │ │ └── lux.lock │ ├── XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-my-thesis@0.1.0-1 │ │ ├── etc │ │ │ ├── conf │ │ │ └── doc │ │ │ └── main.pdf │ │ ├── lib │ │ └── src │ ├── lux.lock │ └── test_dependencies │ ├── .gitignore │ └── 5.3 │ └── bin ├── lux.lock # like package-lock.json or requirements.txt ├── lux.toml # like package.json or pyproject.toml └── main.tex
You can search package by:
$ kpsewhich url.sty
/home/wzy/Desktop/texrocks/packages/kpathsea/.lux/5.3/test_dependencies/5.3/9d30c278ce6738129492ba18692faf0bd87368b477c94e5db31e632f16acee21-latex-url@3.4-1/etc/tex/latex/url/url.sty
A REPL for debug on LuaLaTeX:
$ texlua > status.banner _[1] = "This is LuaHBTeX, Version 1.23.3 (TeX Live 2026/dev)" >
See documents to know more.
Download the contents of this package in one zip archive (273.1k).
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 == '2026.06.01-1', it will install exactly latex-base and no 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: TeXRocks
- use Lua to develop TeX packages: texmf
We also provide some related TeX tools, like kpsewhich and texdef written in Lua. See official website TeXRocks
| Package | TeXRocks |
| Home page | |
| Support | |
| Bug tracker | |
| Announcements | |
| Repository | |
| Developers | |
| Version | 0.3.20 |
| Licenses | GNU General Public License, version 3 |
| Maintainer | Zhenyu Wu |
| Topics | Distribution |