In the free and open source software world:

try DocBook, OpenOffice or LibreOffice

these free programs let save documents (or export them) as docbook and pdf documents -- readable by e-book readers.