One thing with LibreOffice is that you can generate documents, they are just XML zipped up. So my tools produce ODF files with proper formatting (ready for CreateSpace), automatically. The only thing I can't automate is producing the table of contents; for that I have to open the document once and update the ToC, then export the PDF.
My tools are on github (https://github.com/booksbyus/mkbook) and there's an example book using them (https://github.com/booksbyus/scalable-c).
Also to note:
* gitbook works really well as a front-end to show Markdown books off a git repo and collect edits. See https://www.gitbook.com/book/hintjens/social-architecture/de....
* If you write your own filters (text to whatever) you can do really interesting things. It's worth learning Perl just for this kind of work.
* CreateSpace is excellent, once you have cracked how to produce perfect PDFs for the cover and interior. Highly recommended.
* Amazon's author tools are overall good. A bit clunky sometimes (e.g. lots of separate logins), yet they work and can produce decent income for a self-published author.
* LibreOffice produces excellent PDFs. Really top class, once you've figured out the details. The way I use it in the mkbook tool is by templating the format; i.e. design a book by hand, then slice out the various pieces of XML, and then generate the body of the book text using the template. This gives me 100% control over the results.
* When you automate this, it can work really quickly, as in a few hours to to make a publishable draft, and perhaps 30 minutes to release a new version of the text to CreateSpace.
* Get a professional cover designer. It isn't that expensive and makes a big difference.