Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 03-22-2016, 03:11 PM   #1
ELITSIO
Junior Member
ELITSIO began at the beginning.
 
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
ELITSIO is offline   Reply With Quote
Old 03-22-2016, 10:47 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
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.
kovidgoyal is offline   Reply With Quote
Advert
Old 03-23-2016, 01:13 PM   #3
ELITSIO
Junior Member
ELITSIO began at the beginning.
 
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.
ELITSIO is offline   Reply With Quote
Old 03-23-2016, 01:41 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
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.
kovidgoyal is offline   Reply With Quote
Old 03-23-2016, 03:03 PM   #5
ELITSIO
Junior Member
ELITSIO began at the beginning.
 
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?
ELITSIO is offline   Reply With Quote
Advert
Old 03-23-2016, 03:15 PM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
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.
kovidgoyal is offline   Reply With Quote
Old 03-23-2016, 03:48 PM   #7
ELITSIO
Junior Member
ELITSIO began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Mar 2016
Device: iPad
OK, can I send by email?
ELITSIO is offline   Reply With Quote
Old 03-23-2016, 10:01 PM   #8
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
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
kovidgoyal is offline   Reply With Quote
Old 03-24-2016, 04:32 AM   #9
ELITSIO
Junior Member
ELITSIO began at the beginning.
 
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
ELITSIO is offline   Reply With Quote
Old 03-24-2016, 05:25 AM   #10
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
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.
kovidgoyal is offline   Reply With Quote
Old 03-24-2016, 05:33 AM   #11
ELITSIO
Junior Member
ELITSIO began at the beginning.
 
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
ELITSIO is offline   Reply With Quote
Old 03-24-2016, 05:49 AM   #12
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
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.
kovidgoyal is offline   Reply With Quote
Old 03-24-2016, 07:42 AM   #13
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,351
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://github.com/mathjax/MathJax/issues/1422
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 11:13 PM.


MobileRead.com is a privately owned, operated and funded community.