I have the following code that converts DOCX to HTML:
style_map = """
u => u
"""
f = open(file + ".docx", 'rb')
b = open(file + '.html', 'wb')
document = mammoth.convert_to_html(f, style_map=style_map)
html = document.value
b.write(html.encode('utf8'))
f.close()
b.close()
The output looks good, however in the HTML all font sizes are the same where in the DOCX there are some bigger and smaller fonts. How can I save to HTML keeping the relative sizes of the font?