add modifications and clean to HTML and Latex writers