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
  • #517
Closed
Open
Issue created Jul 18, 2013 by Peter Krautzberger@pkraContributor

MathJax_Font_Test reset for min/max width

From the user group at https://groups.google.com/d/msg/mathjax-users/01qMxJXjo8I/cDIlBUsytNUJ -- seems like we should do something about that.

I'm working on an ebook product which has a very basic HTML structure - essentially all content elements (mostly

) are immediate children of

. I've centered this content with the following CSS:
body > * {
    min-width: 300px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

Since the font test <div> is added as an immediate child of <body>, this CSS prevents the font detection from working. It was a bit fiddly to track down, as the only 'errors' I could detect were that STIX fonts would always be skipped, and there was a delay in loading the web-fonts. It would stick on "Loading web-font TeX/Main/Regular" for maybe 8 seconds, then show "Can't load web-font TeX/Main/Regular", however it would then seem to render using "MathJax_Main" anyway.

Once I figured it out, normal behaviour for font detection/loading was restored by adding:

#MathJax_Font_Test {
    min-width: 0;
    max-width: none;
}

My thought is that it might be worth adding min/max width resets to MathJax itself since the font detection depends on the width of #MathJax_Font_Test, yet it was so easy for me to unwittingly break it.

Assignee
Assign to
Time tracking