factor common HTML output formats into html_document_base