Hahaha, look closely at the PDF and online version (just look at the math). There are a ton of corner cases which EPUB and especially the EPUB readers do not support. It's definitely not convert into EPUB once and then make books out of it with shell scripts. This is a very wishful thinking of the EPUB standard (which is not a bad standard but it's not that overall solution you are stating here).