I wrote my thesis using Bookdown, an RMarkdown package. It might be useful if you require e.g. Latex notation rendering.
My pipeline went via a custom latex template which unlocks all the formatting power of latex without having to deal with it for the content.