Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • M MathJax
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 304
    • Issues 304
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 15
    • Merge requests 15
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • MathJax
  • MathJax
  • Issues
  • #1422
Closed
Open
Issue created Mar 24, 2016 by Administrator@rootContributor

x-height calculation incorrect in calibre viewer on windows with 2.6.0

Created by: kovidgoyal

I recently updated the version of mathjax included with calibre to 2.6.0. However, on windows it calculates the font x-height incorrectly. linux and OS X are fine.

I tried updating to 2.6.1 -- no change.

Note that calibre uses Qt WebKit to render HTML and if you want to play with the mathjax bundled with calibre you can find it in resources/viewer/mathjax in the calibre installation directory. It is unbundled, so it should be easy to modify and edit. A sample epub file which shows this problem is https://manual.calibre-ebook.com/_static/mathjax.epub

Simply open it in the calibre viewer and you will see that math is getting typeset at approx 50% of correct height. You can right click in the viewer and choose Inspect to get access to a javascript console.

I did a bit of debugging and I one difference I found is that the height of the ExSpan ins ~550px on linux and 300px on windows. However, changing .MathJax_SVG_ExBox to have height 120ex instead of 60ex does not affect rendering, so I'm not sure how to proceed. If you can tell me what I need to change to affect the x height calculation, I can probably special case it for calibre on windows.

Assignee
Assign to
Time tracking