v2.1.02026-11-19
Procedurally generated Delft-blue page margins for LaTeX. 2.1.0 adds two genomes beside the plants and their visitors. Windows of Gothic tracery go over the sections as headpieces, and shells lie on the ground at the foot of the plants. Both are TikZ pics too, drawn in pure TikZ under pdfLaTeX. You can now turn the margin off for a page or a run of pages, and in a tagged PDF the package marks what it draws as decoration. Read "What looks different" before you copy this over 2.0.1, since some pages of a grown margin now have shells.
The four documents are attached as before (florilegium.pdf, florilegium-grow.pdf, showcase.pdf, spread.pdf), with the manual florilegium-doc.pdf and the package as one folder, florilegium.zip. Each file carries a signed build provenance attestation.
New in 2.1
- Gothic tracery. A window is sampled from a genome of 30 traits, the way a plant is, from its period and arch down to the figures in the stone. The option headpieces sets a headpiece over every \section. It's a screen of cusped lights under a flat arch, and the margin sends a branch to it and a vine up its jamb. \florilegiumheadpiece sets one anywhere. \florilegiuminitialframe{arch} opens the decorated initials as a cusped arch, and \florilegiumornament draws a trefoil, quatrefoil, cinquefoil, sexfoil or rose. Gothic tracery describes them. Baldomo fixed the headpieces whose ogee arch turned inside out (#46).
- Shells. A shell is sampled from a genome of 32 traits: an ammonite or a nautilus, a scallop, cockle, mussel, clam or oyster, a whelk, turret shell or topshell, or a cowrie. Each document has a cabinet of four. On about one species page in three, a few of them lie on the ground beside the root or along the footer's vine, and the option noshells leaves them out. theme=shells gives them the whole margin, among strands of wrack, and \florilegiumornament draws a scallop, ammonite, nautilus, whelk or cowrie. Shells describes them.
- Windows and shells in TikZ. \pic {florilegium tracery={seed=3, role=window, size=4cm}} and \pic {florilegium shell={seed=3, role=any, size=3cm}} draw them. \florilegiumtracery and \florilegiumshell sample them with traits fixed, as \florilegiumspecies does a plant. Under pdfLaTeX they're drawn in pure TikZ, which takes about 20 seconds for a window, a minute for a headpiece and one to six seconds for a shell. Under LuaLaTeX the Lua draws the same window or shell in a fraction of the time.
- The margin off and on. \florilegiumoff stops the margin from the page it stands on, and \florilegiumon starts it again. \florilegiumhide leaves out just the page it stands on, and \florilegiumhide[1,3,5-8] leaves out those pages, counted as a PDF viewer counts them. Every other page keeps the garden it would have had.
- A tagged PDF. With \DocumentMetadata{tagging=on}, ornaments, initials' tiles and headpieces are now decoration (an artifact), as the margin already was. An ornament given alt={...} becomes a figure with that description, and one given actualtext={...} reads as that text. cfr42 asked for this in #48, after the LaTeX tagging project listed florilegium as only partly compatible. cfr42 also reviewed the code once it was merged (#51). The package now checks that tagging is on before it tags anything, and marks a headpiece as decoration itself instead of leaving it to LuaTeX. A new test checks the tags in CI.
- Hooks for other TeX formats. gb-solis added hooks that let the drawing code run outside LaTeX (#49): ink.backend, florilegium.synctransform, florilegium.pagemarks and florilegium.captions. A ConTeXt module builds on them, so they now stay put between releases, like florilegium-svg.lua's command line. Nothing changes under LaTeX.
- % !TEX program = lualatex is now at the top of every document, so an editor that reads it picks LuaLaTeX on its own.
What looks different
- Shells on some pages. A grown margin without a theme now has shells on the ground on about one page in three, so some pages of a 2.0.1 document will look different. With noshells, every margin is byte for byte the same as 2.0.1's.
- Ornaments in a tagged PDF. They're artifacts now, unless they're given alt or actualtext. Documents without tagging don't change.
Checked
- Without shells, the 65 margins the checks compare are byte-identical to 2.0.1's. They cover the species garden in every season, the geometric theme and the authored page.
- In the newest TeX Live, every page of specimen-tikz.pdf builds in pure TikZ under pdfLaTeX. 291 pics of every family (plants, ferns, visitors, windows and shells), drawn in both of the TikZ library's engines, match as renders. The check explains the four known differences. In one plant pgfmath's rounding lets TeX grow one more branch, and in three windows a hairline falls a pixel apart.
- The regression tests pass, and a tagged document's tags match the saved list. CTAN's pkgcheck finds nothing in the zip.
- Each PDF and the zip carry a signed build provenance attestation, attached as florilegium-pdfs.sigstore.json. gh attestation verify florilegium.zip --repo kevinraymond/florilegium checks a file.
Upgrading
Copy every file, or unpack florilegium.zip. There are three new Lua files: florilegium-tracery.lua, florilegium-shell.lua and florilegium-theme-shells.lua. No file was renamed or removed. The package checks at load that all its files come from the same release, so an older copy left in ~/texmf stops with an error that names it.
v2.0.12026-11-05
Procedurally generated Delft-blue floral page margins for LaTeX. 2.0.1 comes out of a review for CTAN, a line-by-line reading of the package against the LaTeX, LuaTeX, pgf and PDF manuals and a red-team pass that fed every option, key and flag inputs a careless or hostile document might hand it. A margin that drew in 2.0.0 draws the same here, except for the three changes under "What looks different". Inputs that used to end in a Lua traceback, or that a document had no reason to suspect, are now clear errors or warnings.
The four documents are attached as before (florilegium.pdf, florilegium-grow.pdf, showcase.pdf, spread.pdf), with the manual florilegium-doc.pdf and the package as one folder, florilegium.zip. Each file carries a signed build provenance attestation.
Fixed
- The garden with \hoffset or \voffset. With either set (geometry's hoffset, voffset or offset), the garden was drawn over the text and the head rule through it. It now stays at the paper's edge, where it belongs.
- sections under KOMA-Script. scrartcl, scrbook and scrreprt stopped with a Lua error at every heading. Their headings now get their flowers, as the standard classes' do.
- Small pages. On a page under about 9 cm tall (a card, A7 landscape), some seeds lost the garden with a traceback. Every such page from 4 cm up now grows one.
- A drawing that fails is one error. \florilegiumornament{ghost} used to break the garden on every later page, and a failed drawing could leave later gardens pale. Now a failure is one TeX error, and the next page draws as always. An unknown theme is reported once, and the garden grows without it.
- Numbers and seeds. A word, an infinity or a seed too large for the generator (\florilegiumseed{1e20}) warns in the log and takes the default, for density, intensity, an ornament's angle and seed, \florilegiumseed and \florilegiumage. An ornament's ink= or accent= that is not six hex digits is a clear error.
- Initials. \florilegiuminitial{} and a font without OpenType or TrueType outlines give a clear error, and a letter written with a command (\textbf{T}) works.
- \florilegiumbloom[...] with a name that is no motif, role or plan on the page (a typo, lilly) says so in the log instead of drawing nothing silently.
- The TikZ library's keys. A pic's seed, draw, season and scale reach the Lua engine only as numbers, so an odd value (an empty season, a quoted draw) is TeX's own error instead of a traceback. A seed outside 1 to 2147483646, an unknown role (rose\relax included), an engine other than auto, lua or tikz and a plants item without a seed or a role are each one error, then a drawing. Both engines now read a fixed trait's value by one rule, as a name or as a plain number such as 7, 7.0 or {7}, where the Lua engine had refused braced values. The fern pic refuses a flowering plant's plan, and a value that has no drawing of its own is drawn plainly in both engines.
- florilegium-svg.lua refuses a page, density or intensity that is not a number, a seed or page past 2^63, a bare -o and an id with markup in it, and reports a file it cannot write. No input writes nan or inf into a PDF or an SVG.
- The playground. A hand-edited link with an unknown paper (#paper=constructor) broke the page, and one with a density of three decimals grew a garden its own snippets didn't make. Both now fall back to what the controls offer.
What looks different
- Aging follows the sheet. With aging, a page's season follows its sheet among all the sheets, so roman front matter no longer restarts spring. A document numbered 1 to N from its first page ages as before.
- Caterpillars hold the leaf's edge. A straight or looping caterpillar is mirrored, so its legs hold the edge of its leaf and its back faces away. A curled one lies on the leaf as before.
- Gray inks are gray. A gray or black ink or accent gets a gray ramp, the same in both engines, where each had tinted it a different hue.
Checked
- Every change was tested under LuaLaTeX in both of the TikZ library's engines and under pdfLaTeX in pure TikZ. Of the 65 margin streams the checks compare with 2.0.0's, only the six pages that carry a mirrored caterpillar differ, and both engines sample and draw the same species and visitors (242 pics compared as renders).
- The red-team pass fuzzed every pic key, package option and SVG flag in both engines, drew 87 SVG pages under three Lua interpreters, and loaded 54 hostile links into the playground. Nothing ran script, wrote a non-number into a drawing or fetched from another origin. The attached PDFs pass qpdf --check and hold no JavaScript, launch action or embedded file.
- Each PDF and the zip carry a signed build provenance attestation, attached as florilegium-pdfs.sigstore.json. gh attestation verify florilegium.zip --repo kevinraymond/florilegium checks a file. CTAN's pkgcheck finds nothing in the zip.
Upgrading from 2.0.0 needs nothing beyond copying the files or unpacking florilegium.zip. No file was added, renamed or removed.
v2.0.02026-11-04
Procedurally generated Delft-blue floral page margins for LaTeX. In 2.0 the grown margin's plants and animals are no longer a fixed set of hand-designed shapes: each is a species sampled from a genome, so every document grows plants of its own. The same species can be drawn in pure TikZ, under pdfLaTeX, with no Lua at all. Read "Upgrading" before you copy 2.0 over an older release, since a grown margin now looks different.
The four documents are attached as before. florilegium.pdf is the authored composition, florilegium-grow.pdf the grown one, showcase.pdf is "A year in the margin" and spread.pdf is "Two sides, two gardens". New with this release are florilegium-doc.pdf, the manual, and florilegium.zip, the package as one folder with the TikZ library, the manual and the documents' sources. Each file carries a signed build provenance attestation.
New in 2.0
- Plants from genomes. Each main stem of a grown margin is one plant of a species: 62 traits drawn in a fixed order from one of fifteen body plans (lily, iris, rose, mustard, pea, mint, daisy, umbellifer, heath, borage, catkin, columbine, a generic eudicot and monocot, and a fern), from the visitor its flowers are for to the flower's form, its cluster, the leaf and the fruit. A body plan keeps botany's rules, so a lily has its parts in threes and a pea flower is two-sided with a pod. A document gets eight species from its seed, and each page grows four of them. The species garden describes them.
- Visitors from genomes. Fifteen kinds, from butterflies and hawkmoths to bumblebees, hoverflies, dragonflies, ladybirds, caterpillars, snails and birds, each with markings and a pose of its own. A plant brings the visitor its flowers are for. A snail's shell is Raup's coiled tube, flat, globular or tall, banded, ribbed or corded; now and then one is open-coiled, and some snails are withdrawn into their shells.
- Ferns grow at the root of some pages, unrolling from fiddleheads in spring.
- The TikZ library. \usetikzlibrary{florilegium} draws the species in a TikZ picture, as a flower, a leaf, a cluster, a plant, plants on one root, a fern or a visitor. Under pdfLaTeX every plant and visitor is sampled from its genome, grown and painted by pgfmath and TikZ alone. It is slow (a strip of three plants 21 cm tall takes about a minute and a half) and pdfTeX needs more memory than its default (extramemtop=10000000). Under LuaLaTeX the same pics are drawn by florilegium's Lua in under a second, within a fraction of a point of pure TikZ's drawing. The TikZ library lists the pics and keys.
- Your own genome, in TikZ. A pic's traits key, \florilegiumspecies[...] and \florilegiumvisitor[...] fix traits by name and sample the rest, so a seed can grow a palmate leaf of seven toothed leaflets (compound=palmate, leaflets=7, leafmargin=serrate), a maple-like plant, a white rose or a ladybird of fourteen spots. The traits lists every trait and what it may be; a misspelled one is an error that says.
- New documentation. The README is now a front page, and the reference lives in docs/: using the package, the species garden, the TikZ library, themes, how it works, SVG and the browser, building and checking. The same pages are typeset as the manual, florilegium-doc.pdf.
- The package as one zip. florilegium.zip holds everything a document needs, the TikZ library, the manual and the documents' sources, in one florilegium/ folder. make zip builds the same bytes from the same commit.
- --bleed for the SVG. florilegium-svg.lua --bleed 6mm lets the garden run on past the paper's edge and makes the SVG that much larger on every side, for e-books and screens, on the grown page and the authored one. Without it the SVG is the page LuaLaTeX draws, as before. It comes from jfoboss's e-book port, and jfoboss proposed it in #27, whose test page and part-title example are in this release.
- Ports and adaptations. The README lists the Typst packages, the XeLaTeX fork, the e-book and web adaptations people have made, each kept by its author, and says what to build on: florilegium-svg.lua's command line and its page options, which stay put between releases.
What is procedural, and what draws it
Nothing in either release is an image; every shape is computed from a seed. Hand-designed kinds are a fixed set of shapes written by hand (a flower, a lily, a leaf, a butterfly ...) whose sizes and details are random. Species are sampled from genomes.
| what | release | where things go | the plants and animals | drawn by |
|---|---|---|---|---|
| grown margin | 1.3 | procedural, grown into the free space | hand-designed kinds | Lua (LuaLaTeX) |
| grown margin | 2.0 | procedural, grown into the free space | procedural species from genomes | Lua (LuaLaTeX) |
| authored page | both | placed by hand | hand-designed kinds | Lua (LuaLaTeX) |
| geometric theme | both | procedural, grown | hand-designed kinds, cut flat | Lua (LuaLaTeX) |
| math theme | both | procedural, packed into the free space | figures computed from their mathematics, and TeX's equations | Lua and TeX (LuaLaTeX) |
| ornaments and initials | both | set in the text; an initial's vine grown round its letter | hand-designed kinds | Lua (LuaLaTeX) |
| TikZ pics (\usetikzlibrary{florilegium}) | 2.0 | procedural, each pic grows its own plants | procedural species from genomes | pure TikZ (pdfLaTeX or LuaLaTeX), or Lua (LuaLaTeX's default) |
| SVG without TeX, and the playground | both | as that release's margin | as that release's margin | any Lua 5.3 or 5.4, a browser |
| PostScript (postscript/florilegium.ps) | both | procedural, grown | hand-designed kinds (1.3's garden) | PostScript |
Time and size
| | 1.3 | 2.0 |
|---|---|---|
| ten pages of text, no margin (LuaLaTeX) | 0.4 s, 33 KB | 0.4 s, 33 KB |
| the same ten pages with the grown margin (LuaLaTeX) | 7.1 s, 6.3 MB | 12.3 s, 10.5 MB |
| what the margin adds to a page | 0.68 s, 0.63 MB | 1.19 s, 1.0 MB |
| one TikZ strip of three plants, pdfLaTeX, pure TikZ | not in 1.3 | 91 s, 1.3 MB (6.3 million words of TeX's memory) |
| the same strip, LuaLaTeX, pure TikZ (engine=tikz) | not in 1.3 | 96 s, 1.3 MB |
| the same strip, LuaLaTeX, Lua engine (the default) | not in 1.3 | 0.8 s, 0.5 MB |
tools/bench.tex (seed 7, the last page short) and tools/bench-tikz.tex, timed on an Intel Core i9-13900K with LuaHBTeX 1.17.0 (TeX Live 2023), each the median of three runs (pure TikZ: one run). make bench measures every row again.
Upgrading
- A grown margin looks different. \usepackage[grown]{florilegium} grows the species garden, and there is no option for 1.3's. A document that should keep 1.3's garden can stay on 1.3, which remains released.
- What stays as it was. The authored page, the geometric theme (1.3's garden cut from flat shapes), the math theme, ornaments, initials and the PostScript port draw as in 1.3. \florilegiumdraw still draws 1.3's primitives.
- More files, none renamed. Copy florilegium.sty and every florilegium*.lua (there are three new ones: florilegium-species.lua, florilegium-native.lua, florilegium-pgfmath.lua), or unpack florilegium.zip. For the TikZ library, add tikzlibraryflorilegium.code.tex and tikzlibraryflorilegium.tables.code.tex; with pdfLaTeX those two are all it needs. No file of 1.3 was renamed or removed.
- One file is now under the LPPL. florilegium-pgfmath.lua, which reimplements part of pgf (its arithmetic and its random generator), is under the LaTeX Project Public License 1.3c, as pgf is; every other file stays MIT. Using or passing on the file unchanged is as before; modifying and distributing it follows th
v1.32026-11-01
Procedurally generated Delft-blue floral page margins for LuaLaTeX, now also drawn without TeX, as SVG and in the browser. The package's Lua files have names of their own in this release, so read "Upgrading" before you copy it over an older one.
The four documents are attached as before, each with a signed build provenance attestation. florilegium.pdf is the authored composition, florilegium-grow.pdf the grown one, showcase.pdf is "A year in the margin" and spread.pdf is "Two sides, two gardens".
New in 1.3
- A page without TeX. florilegium-svg.lua draws a page as SVG with the package's own Lua, under texlua or any Lua 5.3 or 5.4, and the drawing is the one LuaLaTeX makes, byte for byte. texlua florilegium-svg.lua --help lists what it takes: paper, margins, two-sided pages, where the text ends, themes, seasons and inks.
- The playground. Try it in your browser. It 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 PostScript port takes its seed from the calendar when it is given none, and has its own README and tests (make pscheck).
Upgrading
- The Lua files have new names. Apart from florilegium.lua, each now begins with florilegium- (florilegium-ink.lua, florilegium-grow.lua and so on), because TeX finds a file by its name alone and a generic name could lose to a file of yours. Copy florilegium.sty and all ten .lua files. Old copies of ink.lua and the rest do no harm if they stay, since nothing loads them.
- Files from two releases no longer mix silently. If florilegium.sty and the Lua files come from different releases, for instance an older set in ~/texmf and newer files beside the document, LuaLaTeX stops in the preamble and names the file that doesn't match.
- A theme of your own named theme-<name>.lua still loads, with a warning that asks you to rename it florilegium-theme-<name>.lua.
Signed and smaller
- Each PDF carries a signed build provenance attestation, and the bundle is attached as florilegium-pdfs.sigstore.json. gh attestation verify florilegium.pdf --repo kevinraymond/florilegium checks a PDF, and SECURITY.md explains more.
- The PDFs are no longer committed to the repository. README links to the copies in the latest release.
- The "Source code" download leaves out the write-up's originals and the gallery images, and is 0.5 MB instead of 33 MB.
- The repository has a security policy, a contributor guide, a code of conduct and citation metadata.
Nothing drawn has changed. The same seed grows the same garden as in 1.2, with or without a theme, and the documents' text changes only in the paragraph that lists the files.
Build from source with make (LuaLaTeX; showcase.tex takes two passes), or make RUN=tools/in-docker without a local TeX install.
v1.22026-10-31
Procedurally generated Delft-blue floral page margins for LuaLaTeX, now with themes, a way to turn the margin down, ornaments in the text, and a garden on both sides of a two-sided document.
- spread.pdf: new. "Two sides, two gardens", a two-sided document with a wide outer margin. The garden grows on the outer side of every page, mirrored on right-hand pages, and the last page switches to the geometric theme. Its text describes both.
- showcase.pdf: "A year in the margin", three pages from spring to autumn: a decorated initial, copper flowers beside the headings, visitors, and the garden aging over the document.
- florilegium.pdf: the authored composition (hand-placed stems, leaves and flowers).
- florilegium-grow.pdf: the grown composition, which adapts to the page and fills the space below the text on the last page.
New in 1.2:
- Themes: theme=geometric grows the same plant, cut from flat, straight-edged shapes. theme=math is no plant: figures, families of figures, TeX symbols and equations cascade down the margin and along the bottom. \florilegiumtheme{name} switches theme from the page it stands on.
- Less in the margin: density=<0..1> grows less, down to a single vine at 0.05, and intensity=<0..1> paints the margin paler. Both work with every theme.
- One ornament in the text: \florilegiumornament[size, ink, accent, angle, seed]{leaf} sets one primitive in the line, the size of a letter (#4).
- Both sides of the page: the garden grows in whichever side margin is wider, mirrored when that is the right one. There is nothing to set.
- Licensing: every file you copy now carries the copyright line and the MIT notice, and the README has a Credits section.
Without a theme, and at the default density and intensity, a garden in the left margin is drawn exactly as in 1.1.
Build from source with make (LuaLaTeX; showcase.tex takes two passes), or make RUN=tools/in-docker without a local TeX install.
v1.12026-10-30
Procedurally generated Delft-blue floral page margins for LuaLaTeX, now with a garden that grows on screen, has visitors, and reads the text around it.
- showcase.pdf: new. "A year in the margin", three pages from spring to autumn: a decorated initial, copper flowers beside the headings, a flower where the text asks for one, visitors, and the garden aging over the document. Each section describes the feature it shows.
- florilegium.pdf: the authored composition (hand-placed stems, leaves and flowers), now with visitors and drawn the same way on every build.
- florilegium-grow.pdf: the grown composition, which adapts to the page and fills the space below the text on the last page.
New in 1.1:
- Watch it grow: make grow-6 records a page's growth and writes a GIF and an MP4; EXPLAIN=1 marks the free space each branch grows into. The last frame is exactly the page.
- Visitors: butterflies, bees, a snail and, on about one page in five, a bird. Option novisitors.
- The margin reads the text: \florilegiumbloom[motif], option sections (flowers beside headings), option aging (spring to autumn; two runs) and \florilegiumage.
- Initials: \florilegiuminitial[lines]{L}, the letter painted and wound with a vine; the text stays searchable.
- Fix: the authored page no longer changes from build to build.
Build from source with make (LuaLaTeX; showcase.tex takes two passes), or make RUN=tools/in-docker without a local TeX install.
v1.02026-10-30
Procedurally generated Delft-blue floral page margins for LuaLaTeX.
- florilegium.pdf: the authored composition (hand-placed stems, leaves and flowers).
- florilegium-grow.pdf: the grown composition, which adapts to the page and fills the space below the text on the last page.
Both documents describe how their margins are drawn. Build from source with make (LuaLaTeX, one pass), or make RUN=tools/in-docker without a local TeX install.