discover · compare · collections · requirements · contribute · feed · watching · stats · help with your tokens
kevinraymond/florilegium · history
Current repository · Latest captured source
Source changes
latest_release: → v1.3
readme: 6b3ff9950b5baa9767c236a357c8c55f13823babd8b2b9737e1ede86c43274c6 → 57f41b52d43ae41f70bfc122bab8081e215c5a98a67c20a8ba9d0a07fea83d56
Card versions
Version 1 · 2026-11-04T09:23:39Z · agreed
new
florilegium is a LuaLaTeX package that generates procedural Delft-blue floral page margins.
Procedurally generated Delft-blue floral page margins for LaTeX
Open the exact source snapshot
Generates procedural floral page margins for LaTeX documents.
Procedurally generated Delft-blue floral page margins for LaTeX
Includes a browser playground that outputs SVG, LaTeX preamble, or Typst setup.
The playground sets a page as a printer's proof, grows its margin with the same Lua, and hands it back as an SVG, a LaTeX preamble or a Typst page setup
The margin adapts to document content, including initials, headings, and seasons.
The grown margin can respond to the document around it
Supports seasonal aging of the garden from spring to autumn across pages.
With the option aging, the garden ages from spring on the first page (mostly in bud, small pale leaves) to autumn on the last
Offers a geometric theme that renders the plant using flat shapes and polygons.
theme=geometric is the same plant cut from flat shapes
Includes a math theme that fills margins with mathematical figures and equations.
theme=math is no plant at all
Allows adjusting density and intensity to control the amount of ornamentation.
density=0.4 grows less: the loop stops at larger holes, keeps more paper around each motif
Automatically places the garden in the wider margin for two-sided documents.
The garden grows in whichever side margin is wider, so there is nothing to set
Provides a standalone Lua script to generate SVG margins without TeX.
florilegium-svg.lua runs the package's own code with a small stand-in for the few parts of TeX it touches
Includes a pure PostScript version that runs without TeX or external files.
postscript/florilegium.ps: the grown margin in pure PostScript, one self-contained file
Generates procedural floral margins using Lua code without external image assets or imported paths.
No images, no imported paths, no external assets: every petal, leaf and stem is a parametric curve computed in Lua
Margins adapt to document content, placing flowers beside headings and responding to text flow.
The grown margin can respond to the document around it
Randomly adds visitors like butterflies, bees, snails, and birds to fill open spaces in the margins.
Most pages have visitors: a butterfly or two and bees in the open spaces
Allows custom themes by replacing drawing primitives, including geometric shapes and mathematical figures.
The growth loop never knew what it was drawing. It reads a table of motifs
Exports generated margins as SVG or PostScript files for use outside of LaTeX environments.
The same Lua can draw a page without TeX
Provides density and intensity controls to reduce the amount of generated content in the margins.
A full garden is a lot to have beside an equation. Two options turn it down
Includes a browser-based playground using WebAssembly to preview and share generated margins interactively.
The playground runs the same files in the browser with wasmoon
Derives all colors from a single base hue using OKLCH color space calculations.
The whole palette comes from one color, ink
Supports two-sided documents where margins mirror each other and can switch themes per page.
The last page also switches to the geometric theme
Constraint: The PostScript version produces different results for the same seed due to single-precision floating point.
PostScript reals are single precision, so seed 7 here is a different garden from seed 7 in LaTeX
Constraint: The PostScript version lacks features like initials, themes, and mirrored pages available in the LaTeX version.
It has no initials, animation, themes, mirrored pages, density or intensity, ornaments in the text, or authored composition
Constraint: PostScript output lacks native transparency support and requires Ghostscript flags for translucent fills.
PostScript has none. Ghostscript provides it with -dALLOWPSTRANSPARENCY
Constraint: Random number generation differs between Lua and PostScript implementations, causing different results for the same seed.
The generator is Park-Miller in 32-bit integer arithmetic, and PostScript reals are single precision
Constraint: Seasonal aging features require two compilation passes to determine the total page count.
It needs two runs, for the page count
Constraint: Printer output may appear flatter than screen output due to lack of transparency support.
Without that flag, or on a printer, each translucent fill is mixed with the color it is likely to land on
Constraint: Browser playground requires Lua 5.4 compiled to WebAssembly and may not support all features available in LuaLaTeX.
The playground runs the same files in the browser with wasmoon, Lua 5.4 compiled to WebAssembly