New option for sub/sup styles in docx input

Bug #1528055 reported by m4mmon on 2015-12-20
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

This is a patch for a new option in docx input, it allows to use top/bottom values for CSS property vertical align.
Calibre 2.46 x64
Windows 7 x64

When working on docx documents, superscript/subscript do not change line-height.
When converting docx, for say, epub, the result is super/sub in CSS, leading to line-height changes when displaying document.
One of the solutions is to use top/bottom instead.

A usage scenario is this one :
- Docx input document with subscript/superscripts in the middle of paragraphs long enough to render with multiple lines once converted to epub.
- conversion to epub: as of today the generated document show line-height changes where superscripts/subscripts are used.

Existing possible workarounds consist in setting additional CSS, or editing epub after the conversion, but for people that do not know CSS, it is difficult or impossible to do, whereas a simple checkbox may prove useful.

The patch contains 2 parts. The first one contains everything related to the change, the second one a small fix to end note code generation. Reversing the order of sup/a tags was required to keep the superscript.

This patch, if accepted, requires translations since it changes the user interface.

m4mmon (m4mmon) wrote :
m4mmon (m4mmon) on 2015-12-21
description: updated

Fixed in branch master. The fix will be in the next release. calibre is usually released every Friday.

 status fixreleased

Changed in calibre:
status: New → Fix Released
m4mmon (m4mmon) wrote :

Thank you Kovid :D

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers