docx conversion produces inconsistent font sizes

Bug #1831358 reported by David Friedman on 2019-06-02
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Undecided
Unassigned

Bug Description

I am converting a docx book to epub. The book has some mathematical formulas with subscripts. Subscripts that are the same size in docx end up as substantially different sizes in the epub.

Calibre 3.44
OSX 10.14.5

An example of the problem is on p. 572 of the docx:

S1 + S2 = (P'A - PA)Q'A + (PW - P'W)Q'W (Equation 3)

Equations 1 and 2 imply that:

 Q'W = Q'A(P'A-t)/P'W ) = Q'A (PA/PW)

P'A is actually P'subscript A, similarly for the rest of the formula.

In docx, all of the subscripts are Cambria Math 12 point italic

On the epub, the subscripts in the first equation are substantially larger than those in the second.

The report form doesn't seem to let me attach more than one file, so I am attaching the docx. I'll be happy to send you the epub as well if you wish.

<email address hidden>

While I am at it, here is a more minor bug that I might as well also report.

on p. 652 there is the following:
----
pays to lower it. So the optimal temperature from your standpoint is T*.

Identical Apartments, Different Tenants. To make the problem more interesting, I
----
Note the blank line between the line that starts with "pays" and the line that starts with "identical". On the epub, that blank line is missing.

A blank line is also missing near the following quotes:

As a special favor to our customers

Well, I says, "Mr. Moffett ditto before

i. There is some coalition C ditto

David Friedman (davidfriedman) wrote :

This is a repeat of a report I just sent you, because I realized that I had forgotten to add the attachment.

I am converting a docx book to epub. The book has some mathematical formulas with subscripts. Subscripts that are the same size in docx end up as substantially different sizes in the epub.

Calibre 3.44
OSX 10.14.5

An example of the problem is on p. 572 of the docx:

S1 + S2 = (P'A - PA)Q'A + (PW - P'W)Q'W (Equation 3)

Equations 1 and 2 imply that:

 Q'W = Q'A(P'A-t)/P'W ) = Q'A (PA/PW)

P'A is actually P'subscript A, similarly for the rest of the formula.

In docx, all of the subscripts are Cambria Math 12 point italic

On the epub, the subscripts in the first equation are substantially larger than those in the second.

The report form doesn't seem to let me attach more than one file, so I am attaching the docx. I'll be happy to send you the epub as well if you wish.

<email address hidden>

While I am at it, here is a more minor bug that I might as well also report.

on p. 652 there is the following:
----
pays to lower it. So the optimal temperature from your standpoint is T*.

Identical Apartments, Different Tenants. To make the problem more interesting, I
----
Note the blank line between the line that starts with "pays" and the line that starts with "identical". On the epub, that blank line is missing.

A blank line is also missing near the following quotes:

As a special favor to our customers

Well, I says, "Mr. Moffett ditto before

i. There is some coalition C ditto
.

Kovid Goyal (kovid) wrote :

Turn off font size rescaling in the Look & feel section of the
conversion dialog and you should be fine.

Changed in calibre:
status: New → Fix Released

I disable font size rescaling, convert to epub, and it is still the case
that some subscripts are considerably larger than others--indeed, as
large as the characters they are subscripts of. Here is an example. If
you look at Q'_W in the third line, the W is the same size as the Q, and
similarly for P_W in the final line. Compare that to the Q'_W at the end
of the first line.

For comparison, here is the same passage in Word. If I look at those two
subscripts in Word (see below), they are the same size, and when I check
Format:Font they have identical formatting.

Also, as you can see, even the smaller subscripts in the epub are
considerably larger than in Word.

On 6/1/19 11:24 PM, Kovid Goyal wrote:
> Turn off font size rescaling in the Look & feel section of the
> conversion dialog and you should be fine.
>
> ** Changed in: calibre
> Status: New => Fix Released
>
--
David Friedman
www.daviddfriedman.com
http://daviddfriedman.blogspot.com/

Kovid Goyal (kovid) wrote :

ok I will take a look when I have a moment.

Changed in calibre:
status: Fix Released → New
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers