This time I started from Ian’s original template again and tried to diverge as little as possible from the original. It’s the same template with a couple of new section types, styles, and minor changes to the ruby script.
@lyndondrake, hopefully, this time it will work better.
Many thanks again @nontroppo for sharing his Scrivener, Scrivomatic, and Quarto tools.