CTAN Comprehensive TeX Archive Network

monoref – Single-pass cross-references, page totals, and a table of contents for Lua

This package resolves forward cross-references (\ref, \pageref), the total page count (\lastpage), and a multi-level table of contents in a single Lua run – no rerun, no latexmk, and no .aux round-trip. It holds every finished page in memory via the shipout hook and back-patches the still-unknown values at \end{document}. Forward values are reserved as fixed-width slots that collapse to their natural width when filled, so lines never reflow and short values leave no gap. When hyperref is loaded, references and contents entries become clickable, using the package’s own named destinations so linking stays single-pass. The package requires Lua.

Sources/macros/luatex/latex/monoref
Documentation
Bug tracker
Repository
Version1.3 2026-07-07
LicensesThe Project Public License 1.3c
Copyright2026 Srikanth Mohankumar
MaintainerSrikanth Mohankumar
Contained inTeX Live as monoref
MiKTeX as monoref
TopicsLabel and References
Lua
TOC etc.

Download the contents of this package in one zip archive (254.2k).

Community Comments

Loading...

Announcements

Here you can see a respective diagram in newer browsers.

more

Package Links

Guest Book Sitemap Contact Contact Author