A total-fit page-breaking algorithm with user-defined adjustment strategies