I was in attendance for a conference presentation a few years back that O'Rielly was moving to writing books in an asciidoc editor which would be converted to (x)html5 for easy conversion to PDF and ePUB.
I wonder if that thing ever took off. Previously, it was said, that they were working in docbook (XML)