Another interesting publishing system is Pollen http://docs.racket-lang.org/pollen/. It integrates with Racket to give you the full power of a programming language while writing markup. The guy behind it, Matthew Butterick, is a typographer and has put a lot of work into it.