Will say this though. Once you have a book in an xml avatar like tei
or docbook, its just a matter of styling. Some good xsl stylesheets
combined with the saxon processor ought to handle anything thrown at
it. Its only that the TEI standard is huge and books can literally
take any shape and form. Hence covering every possible combination
right at the outset doesn't seem to be worth the effort.