I have written books both in latex and in troff. It's a nightmare, no matter in what, to get things like indexes and tocs right.
Doing it in troff required me to write a few scripts to generate some of the tables. Doing it in latex required me to write a few scripts to fix up things not handled well by latex (I'm sorry, but don't remember which ones were the actual problems, it was long ago).