added conditionals for chapter and minitoc