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

Math lines at the end of a page: breaks Page.checkUnderflowAfterResize #662

Open
jhannwong opened this issue Jun 10, 2022 · 3 comments
Open

Comments

@jhannwong
Copy link

jhannwong commented Jun 10, 2022

An uncaught exception happened within the HTML page: Error: TypeError: Cannot read properties of undefined (reading 'ref')
    at validNode (file:///.../test.html:3388:39)
    at Layout.findEndToken (file:///.../test.html:4205:17)
    at Page.checkUnderflowAfterResize (file:///.../test.html:4587:37)
    at file:///.../test.html:4559:13

The AsciiDoc just needs to happen to have a math line at the end of a page. Try this:

= Some Document
:stem: latexmath

== Just 1 chapter

stem:[\displaystyle \frac{1}{2}]

stem:[\displaystyle \frac{1}{2}]

stem:[\displaystyle \frac{1}{2}]

stem:[\displaystyle \frac{1}{2}]

stem:[\displaystyle \frac{1}{2}]

stem:[\displaystyle \frac{1}{2}]

stem:[\displaystyle \frac{1}{2}]

stem:[\displaystyle \frac{1}{2}]

stem:[\displaystyle \frac{1}{2}]

stem:[\displaystyle \frac{1}{2}]

stem:[\displaystyle \frac{1}{2}]

stem:[\displaystyle \frac{1}{2}]

stem:[\displaystyle \frac{1}{2}]

stem:[\displaystyle \frac{1}{2}]

stem:[\displaystyle \frac{1}{2}]

stem:[\displaystyle \frac{1}{2}]

stem:[\displaystyle \frac{1}{2}]

// A line of text here will help the next math line go to the next page.

stem:[\displaystyle \frac{1}{2}]

== Next chapter

Some text.
@ggrossetie
Copy link
Owner

I cannot reproduce this issue on the main branch. Here's the PDF produced: test.pdf

@jhannwong
Copy link
Author

Your test.pdf has enough math lines to just about fill up the 1st page. Try adding more so that they overflow to the 2nd page?

@ggrossetie
Copy link
Owner

It also works test.pdf
Do you use a custom style? Could you please try with the latest version?

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

No branches or pull requests

2 participants