Installation
Getting started
Installation
The build needs LuaTEX, dvisvgm, Ghostscript and 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, dvisvgm), Ghostscript, and Node 22.18 or later (it runs the build’s TypeScript directly). Running make check verifies them, and installs the build’s Node packages into node_modules.
macOS (Homebrew):
brew install node
brew install --cask mactex-no-gui
On macOS, Ghostscript 10.01 and later dropped the PDF interpreter dvisvgm relies on for TikZ pictures; if pictures fail with a page-count error, install mutool as the fallback:
sudo apt install texlive-luatex texlive-latex-extra texlive-fonts-recommended \
texlive-extra-utils nodejs npm
On Debian and Ubuntu, texlive-extra-utils carries dvisvgm; 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.