In the same vein, a few years ago, somebody implemented procedural decorations for a recreation of Byrne's "Elements of Euclid" in LaTeX: https://github.com/jemmybutton/byrne-euclid
(bottom of the readme)