Florilegium: Procedural Flowers for LaTeX Margins
Florilegium generates decorative page margins for LaTeX by computing parametric curves in Lua during document rendering. Every element—petals, leaves, stems, insects, and birds—is painted as watercolor effects directly into the PDF with no external assets or imported graphics. The system uses hand-authored primitives with randomized parameters and applies a space-filling algorithm inspired by 1998 ornament literature.
The package integrates with document structure through several features. Decorative initials can be rendered with vines flowing over and under their strokes, flowers appear beside numbered sections, and the garden ages through seasons from spring to autumn across the document’s pages. A single ink color generates the full tonal palette through OKLCH calculations, ensuring even pale washes retain hue rather than turning gray. Visitors like butterflies, bees, snails, and birds populate margins using independent random streams without affecting the underlying page layout.
Two thematic systems transform the margins while preserving spatial algorithms. The geometric theme renders the composition with flat polygonal shapes and mathematical precision. The mathematics theme replaces botanical elements with mathematical figures—equations, fractals, polyhedra, and knots—that fill available space identically to the botanical version. Both themes respond to density and intensity parameters, allowing users to scale visual complexity from a minimal vine to complete gardens.
Read the full article
Continue reading at Hacker News →This is an AI-generated summary. Read the original for the full story.