Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong pagination with MathJax svg images #1293

Open
depth42 opened this issue Feb 28, 2024 · 3 comments
Open

Wrong pagination with MathJax svg images #1293

depth42 opened this issue Feb 28, 2024 · 3 comments
Labels

Comments

@depth42
Copy link

depth42 commented Feb 28, 2024

Describe the bug
When I use MathJax 3 to synchronously turn math markup into svg images, Vivliostyle does not paginate correctly.

To Reproduce
Paginate the attached file scriptbug.html with Vivliostyle

Expected behavior
The text content should not leak into the bottom page margin. (See red mark in attached screenshot)

Desktop (please complete the following information):

  • OS: macOS 14.3
  • Browser Safari 17.3
screenshot

scriptbug.html.zip

I am not sure how to trigger the Mathjax image replacement so that Vivliostyle pageinates correctly.

@depth42 depth42 added the bug label Feb 28, 2024
@depth42
Copy link
Author

depth42 commented Feb 29, 2024

I now managed to work around this problem by wrapping the math expressions in a element and by adding a separate <script> element into that span which explicitly instructs MathJax to render this element.

@MurakamiShinyu
Copy link
Member

Wrong pagination with MathJax 3 is a known issue, as I commented in the former issue #813:

Please note that Vivliostyle.js still has built-in MathJax 2 support (see FAQ: How to embed math formulas (MathML, TeX or AsciiMath)), and now can enable MathJax 3 specified in the document but that is far from perfect, as you see wrong page breaking/overflow problem in the test result.

@depth42
Copy link
Author

depth42 commented Feb 29, 2024

Thank you. OK, then this is a duplicate. For now, I am fine with the workaround I've found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants