“Fancy Euclid’s Elements in TeX, Sergey Slyusarev2019-03-19 (, , , ; backlinks; similar)⁠:

[typesetting Byrne’s Euclid] The most obvious option—to draw all the illustrations in Illustrator and compose the whole thing in InDesign—was promptly rejected. Geometrical constructions are not exactly the easiest thing to do in Illustrator, and no obvious way to automatically connect the main image to miniatures came to my mind. As for InDesign, although it’s very good at dealing with such visually rich layouts, it promised to scare the hell out of me by the overcrowded “Links” panel.

So, without thinking twice, I decided to use other tools that I was familiar with—MetaPost, which made it relatively easy to deal with geometry, and LaTeX, which I knew could do the job. Due to some problems with MetaPost libs for LaTeX, I replaced the latter with ConTeXt that enjoys an out-of-the-box merry relationship with MetaPost.

Converting a Byrne Euclid diagram to ConTeXt vector graphics

… There are also initials and vignettes in the original edition. On one hand, they were reasonably easy to recreate (at least, it wouldn’t take a lot of thought to do this), but I decided to go with a more interesting (albeit hopeless) option—automatically generating the initials and vignettes with a random ornament. Not only is it fun, but also, the Russian translation would require adapting the style of the original initials to the Cyrillic script, which was not something I’d prefer to do.

So, long story short, when you compile the book, a list of initial letters is written to the disk, and a separate MetaPost script can process it (very slowly) to produce the initials and vignettes. No two of them have the exact same ornament.