So right now I'm writing my book in Markdown, and put it on leanpub for now (https://leanpub.com/deploy).
For print, I'll either figure out a way to get a PDF formatted as I want it from leanpub, or use pandoc to create the markdown to LaTeX, and then write a custom template with all the customization.
But this is something that I won't worry too much about until the manuscript is really finished.