The system is flexible and simple.
Used TeX for the same and had to lose sanity for it to even work semi well.