![]() |
#1 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Mar 2016
Device: iPad
|
Equations surrounding font size
Hi,
I have a book with thousands of symbols and equations written in mathml. I work on mac where calibre shows excellent using mathjax, with the symbols showing the same size with the surrounding text. On windows calibre, readers complain that the equations show smaller than the surrounding text, really not so good... My code everywhere is like that: <p class="body">Equation is... <span> <math xmlns="http://www.w3.org/1998/Math/MathML" alttext="equation" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"><mi>d</mi><mover accent="true"><mrow><mi>S</mi></mrow><mo>→</mo></mover></math> </span> </p> Is there a way to adjust this calibre or code? Why is this difference between two platforms? Thank you. Elias |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,351
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Check the font used for rendering. If you use a text font that is not embedded in the book and it is not available on the system, then the renderer will fallback on different fonts.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Mar 2016
Device: iPad
|
Thx, I guess you mean the font of the paragraph style for the <math>? Because I have not set the font inside the <math> declaration.
I thought calibre uses the SVG rendering option of mathjax, so that no fonts should be included in the epub. thx Last edited by ELITSIO; 03-23-2016 at 01:17 PM. |
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,351
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
No the fonts for the body text. That is the font and font size defined for <body> -- and if none are specified then the fonts specified in the viewer preferences.
|
![]() |
![]() |
![]() |
#5 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Mar 2016
Device: iPad
|
kovid,
I have tried several things but it seems like there is something I don't understand, the math are shown small. I have my CSS in the epub file with the paragraph style I am using surrounding the <math>. This style uses the Cambria Math font. In the body section of my html I don't set any font style. Sorry, I am not a skilled html developer. Can you give me a hint of what I should include in my code? |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,351
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I have no idea -- I'd need a sample book to be able to help.
|
![]() |
![]() |
![]() |
#7 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Mar 2016
Device: iPad
|
OK, can I send by email?
|
![]() |
![]() |
![]() |
#8 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,351
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Attach it here or follow the instructions in https://www.mobileread.com/forums/sho...d.php?t=186697
|
![]() |
![]() |
![]() |
#9 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Mar 2016
Device: iPad
|
Thank you for looking at the sample.
So, Mathjax config commands are processed by calibre, or is there a conflict as calibre preloads Mathjax? If so I guess I have to write a conditional config in calibre for Windows case? Isn't there some kind of configuration you could include in calibre so that math shows right in Windows version? I mean, this should be a very common issue with math books. I currently work for a multi university program of digital books and I would like to suggest calibre as the one-for-all reader solution as I am very impressed by the rendering and behavior of text and math in macs. Also, I would like to suggest an option for loading Mathjax in editor view (it works very nice when I load Mathjax in code) thank you Kovid, Elias |
![]() |
![]() |
![]() |
#10 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,351
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You can have arbitrary mathjax config, as shown here: http://manual.calibre-ebook.com/typesetting_math.html
As for your issue, this the first time I've come across, it. Open the demo on that page and you will see no problems with font size on windows. It is something specific to your book. As I said, you will need to contact the MathJax developers for help, or workaround it by scaling as I posted earlier. |
![]() |
![]() |
![]() |
#11 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Mar 2016
Device: iPad
|
Sorry, I didn't understand by your message it is a book specific issue. I will check it out.
Thx |
![]() |
![]() |
![]() |
#12 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,351
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Actually I was wrong, it appears to happen with the demo book as well on windows. I'd guess something changed in MathJax 2.6.0 which calibre updated to recently (2 months ago). I'll try updating to 2.6.1 and see if it helps.
|
![]() |
![]() |
![]() |
#13 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,351
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Moon+ Reader your favorite font and font size? | loodio | Android Devices | 6 | 01-30-2016 06:50 PM |
Problem changing font size using font size key | Waylander | Conversion | 0 | 10-02-2013 03:30 PM |
Determine font and font size on incoming epub? | peaceridge | Calibre | 4 | 01-30-2012 03:35 PM |
PRS-300 Med font size too big, but small font size too small | eli2k | Sony Reader | 4 | 05-28-2010 09:47 AM |