Directory macros/luatex/latex/numodel-bundle
numodel-bundle
LuaLaTeX packages for writing and rendering numerical models — aimed at physics teaching material. The bundle currently contains two modules:
| Module | Purpose |
|---|---|
numodel |
Modelling engine: \mvar, \mrule, \textmodel, \graphicmodel, \computemodel, \diagrammodel. Forrester stock-and-flow diagrams; Euler integration in Lua. |
numodel-plot |
PGFPlots styling layer: \drawplot, \calcplotdims. Auto-sizes plots to a clean tick lattice; configurable axis-label formats (IEEE / ISO 80000-1). |
numodel depends on numodel-plot for its \diagrammodel command; both modules ship together.
The bundle is pre-1.0 (current release v0.2.0); breaking changes may still occur.
Build workflow
The bundle is managed with l3build. From this directory:
l3build unpack # extract .sty / .def files from .dtx l3build doc # typeset numodel.pdf + numodel-plot.pdf l3build check # run all regression tests (.lvt against .tlg) l3build install # copy generated files into TEXMFHOME l3build clean # remove generated files l3build ctan # build a CTAN-ready zip
Single-module variants are available by cd-ing into the module directory and running the same target.
Releasing a new version
Update release_date and release_tag in build.lua, then run
l3build tag
to propagate the new date+version into every source file that carries them (.dtx \ProvidesPackage, \ProvidesExplFile, numodel.lua header). Move the ## [Unreleased] heading in each module's CHANGELOG.md to the new version section by hand.
Per-module Lua-level tests
numodel/tests/ contains a separate Lua test suite that exercises numodel.lua directly (no LaTeX run). Run via
cd numodel/tests texlua run.lua
These tests are independent of the l3build regression tests in numodel/testfiles/.
Layout
numodel-bundle/
build.lua bundle-level configuration (CTAN metadata, update_tag)
support/ shared support files (currently empty)
numodel/
build.lua module configuration
numodel.dtx documented source
numodel.ins DocStrip installer
numodel.lua hand-written Lua iteration backend (ships as-is)
README.md
CHANGELOG.md
examples/ showcase documents
testfiles/ l3build regression tests (.lvt + .tlg)
tests/ Lua-level unit tests (texlua run.lua)
numodel-plot/
build.lua module configuration
numodel-plot.dtx
numodel-plot.ins
README.md
CHANGELOG.md
examples/
testfiles/
License
LaTeX Project Public License 1.3c.
Author
Paul Zuurbier — mail@paulzuurbier.nl
Download the contents of this package in one zip archive (508.6k).
numodel-bundle – Numerical physics models with Forrester diagrams and auto-sized plots
This bundle provides LuaLaTeX tools for writing and rendering numerical models, specifically Euler-integrated dynamical systems, directly within LaTeX documents. It is intended primarily for physics teaching materials.
The bundle consists of:
- numodel, a modelling engine that supports stock-and-flow diagrams; and
- numodelnumodel-plot, a PGFPlots styling layer that automatically sizes plots so that axis ticks fall on whole-number intervals.
| Package | numodel-bundle |
| Repository | https://github.com/paulzuurbier/numodel |
| Version | 0.2.0 2026-05-16 |
| Licenses | The LaTeX Project Public License 1.3c |
| Copyright | 2026 Paul Zuurbier |
| Maintainer | Paul Zuurbier |
| Topics | Diagrams Physics Graphics plot Flow Diagrams Teaching PGF TikZ |