← Back to BLACKWIRE PRISM BUREAU TECH INNOVATION Screenshot of a LaTeX PDF page showing Delft‑blue procedural flowers in the margin

A page from the Florilegium package, where each margin is filled with algorithmically drawn flowers.

FLORILEGIUM REPO UNVEILS PROCEDURAL LA TEX FLOWERS

*A GitHub project now generates Delft‑blue floral margins directly in LuaLaTeX, eliminating external assets. The code draws each petal, leaf and stem as parametric curves, adapting to free space on the page.*

By PRISM Bureau - BLACKWIRE  |  October 31, 2026, 07:00 CET  |  LaTeX, procedural graphics, LuaLaTeX, Florilegium, digital typography

A new GitHub repository, kevinraymond/florilegium, delivers fully procedural floral margins for LuaLaTeX. The code draws Delft‑blue petals, leaves and stems on the fly, erasing the need for imported graphics or external assets. Each page receives a unique garden, seeded from one of six random configurations, and the margin fills whatever whitespace the body text leaves. The project stems from a Reddit query about reproducing similar margins, but the author chose a hand‑crafted, algorithmic route that mimics a 1998 ornament technique. The result is a self‑describing PDF where the margin is generated as the document is compiled, turning static typesetting into a living illustration.

How does Florilegium generate flowers?

Florilegium builds each margin from hand‑authored primitives whose parameters are randomized at compile time. Lua computes every petal, leaf and stem as a parametric curve, paints it like watercolor, and writes the result straight into the PDF. A greedy space‑filling loop, borrowed from a 1998 ornament algorithm, scans the margin for the largest free disc, then grows a stem toward it. The loop repeats, filling big holes first and small ones later, until the margin is saturated. Six random seeds drive the composition; the same code with a different seed yields a distinct garden on each page. The process runs during a single LaTeX pass, requiring no external images or imported paths.

What is the technical architecture?

The package ships as a .sty file and a collection of Lua scripts. All graphics are generated at 300 dpi crop resolution, matching the Delft‑blue aesthetic. The layout is tuned for A4 paper with a 68 mm margin, but the greedy algorithm adapts to any free space left by the body text. The repository contains 14 commits across files such as florilegium.lua, theme‑geometric.lua, and grow.lua. A build target "make grow-6" renders one seed into a 45‑second GIF or MP4, optionally showing the dashed circles that mark each disc discovery. No external assets are referenced; the PDF is self‑describing, with the body text itself explaining the margin drawing.

Every page gets its own garden.

Which features does Florilegium expose to authors?

Authors can embed initials with \florilegiuminitial[5]{E}, which reads the letter outline from an OpenType font (Latin Modern Bold by default) and paints it as a petal, threading vines and flowers through the strokes. The "sections" option adds a copper‑colored flower beside every numbered heading, echoing historic red‑ink headings. The "bloom" command places a flower next to any line, and \florilegiumbloom[lily] selects any garden motif. With the "aging" option, the garden ages from spring buds on page one to autumn seed heads on the last page; manual age control is possible via \florilegiumage{0.8}. Random visitors— butterflies, bees, a snail, and a bird on roughly one page in five—populate open spaces, each drawn from its own random stream.

Why does this matter for LaTeX publishing?

Florilegium demonstrates that high‑quality, data‑driven illustration can be baked into the typesetting pipeline without external files. This reduces document bloat and ensures reproducible margins across builds. The procedural approach also opens doors for dynamic, context‑aware design: margins react to text flow, headings, and page count, offering a new layer of visual storytelling in academic and technical documents. By leveraging Lua within LuaLaTeX, the project showcases the expanding role of embedded scripting in traditional publishing tools, hinting at future workflows where code and content co‑evolve.

Frequently asked questions

What is Florilegium?

Florilegium is a LaTeX package that procedurally generates Delft‑blue floral page margins, drawing every petal, leaf and stem as a parametric curve in Lua without external assets.

How does the margin adapt to the document?

It uses a greedy space‑filling loop that finds the largest free disc in the margin, grows stems and flowers into those gaps, and reacts to the amount of free space left by the body text.

What visual features does Florilegium provide?

It can render initials as petal‑shaped letters, add flowers to section headings, age the garden across pages, and sprinkle random visitors like butterflies, bees, snails and a bird on roughly one in five pages.

Florilegium proves that LaTeX can host sophisticated procedural art without sacrificing reproducibility. By embedding a greedy space‑filling algorithm and Lua‑driven drawing directly into the compilation process, the package blurs the line between code and ornament. As publishers seek tighter integration of design and content, tools like Florilegium signal a shift toward dynamic, data‑rich documents that adapt to their own layout constraints. The garden may be virtual, but its impact on the future of typesetting is concrete.

Sources: Hacker News, GitHub repository https://github.com/kevinraymond/florilegium