docx conversion produces inconsistent font sizes
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'At)/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 :  #1 
Kovid Goyal (kovid) wrote :  #2 
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 (davidfriedman) wrote : Re: [Bug 1831358] Re: docx conversion produces inconsistent font sizes  #3 
I disable font size rescaling, convert to epub, and it is still the case
that some subscripts are considerably larger than othersindeed, 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.daviddfried
http://
Kovid Goyal (kovid) wrote :  #4 
ok I will take a look when I have a moment.
Changed in calibre:  
status:  Fix Released → New 
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'At)/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
.