html escape the chapter mark titles
write the chapter marks in correct order