ENH: allow to_html and to_latex to take a path for their first argument