cleanup typesetting