I'm geuninely curious, is this how these books are typeset?
I was at a conference a few years back and one of my favorite presentations was a guy from O'Riely. Up to that point most of their works were converted from docbook with XSLT to pdf,epub, or html. He had been working on HTMLBook[1] to write books in asciidoc, convert to (x)HTML5 and the conversions were written in CSS and used an antenna house processor.
It was an XML conference, so all things latex was a bit taboo. But in general, we handle a lot of XML in publishing.