asciidoc is quite nice. It can output DocBook which I think is pretty well supported.
I'm currently writing a book in asciidoc which produces output in all your mentioned formats and includes footnotes, endnotes, call-outs, code listings, index etc. However, whilst I write almost exclusively in asciidoc, a lot of the styling etc is done by the publisher's docbook workflow.
I'm currently writing a book in asciidoc which produces output in all your mentioned formats and includes footnotes, endnotes, call-outs, code listings, index etc. However, whilst I write almost exclusively in asciidoc, a lot of the styling etc is done by the publisher's docbook workflow.