Zotero-ODF-Scan / zotero-odf-scan

Some tools for Zotero
32 stars 7 forks source link

Fix footnote font irregularities #15

Closed fbennett closed 10 years ago

fbennett commented 10 years ago

Scrivener users have been reporting that the font families and font sizes in footnotes can go askew after conversion. The problem seems to be that:

This changeset creates a DOM from the document XML after performing the regexp changes, examines the text of footnote nodes for style declarations, and removes font family and font size attributes from these styles (only) in the document header, serializing the result as the final content.xml. This removes the Scrivener "hints" for these styles, with the result that LibreOffice imposes its own (consistent) defaults for font family and font size in the footnotes.

The stripping is limited to font family and font size, so it does not affect other parameters (such as italics), and font-family and font-size parameters can be controlled globally through the styles editor.

The modified plugin has been tested by two users (one via the Zotero forums), who report success.