Installation
Getting started
Installation
The build needs LuaTEXand Node. The simplest way to get them all is the project’s container, which needs only a container runtime.
In a container
With Docker (or OrbStack, Colima, Podman) available, from a checkout of the repository:
docker compose run --rm reflowtex make check
docker compose run --rm --service-ports reflowtex make serve # → http://localhost:8000
Open the address and resize the window: the demo text re-breaks to fit. A snippet’s preamble may \usepackage anything; a package the image lacks is installed with tlmgr the first time it is used.
Locally
You need a TEX installation (lualatex) and Node 22.18 or later (it runs the build’s TypeScript directly; pictures are drawn by MuPDF, one of its packages). EPS figures also need Ghostscript, which TEX Live’s repstopdf runs to convert them. Running make check verifies these, and installs the build’s Node packages into node_modules.
macOS (Homebrew):
brew install node
brew install --cask mactex-no-gui
sudo apt install texlive-luatex texlive-latex-extra texlive-fonts-recommended \
texlive-font-utils ghostscript nodejs npm
On Debian and Ubuntu, texlive-font-utils carries repstopdf; MacTeX has it and Ghostscript already. Adjust the names for other distributions. An older release’s nodejs may be below 22.18: make check says so, and nodejs.org has current builds. The build compiles LA TEX, which is a programming language: if the snippets come from anyone but you, read docs/security.md in the repository first.