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

Edge case: Sometimes broken PDF output when spanning multiple pages #9

Open
qrnch-jan opened this issue Dec 7, 2023 · 0 comments
Open

Comments

@qrnch-jan
Copy link
Contributor

I think I've found a strange edge case. This appears to happen when a code listing spans over a page break, but the code listing on the second page is just a few lines. This is what the PDF output turns into:

1 Blah on line 1
2 Blah again on line 2
3 More blah, line 3
4
--PAGE BREAK--
5 Even more blah, line 4
   Final line 5

The line number remains on the first page, but the line's contents are pushed to the next page, shifting the final line onto a line with no line number. The problem appears to disappear if the second page contains more lines of code.

To be honest, this is not a problem in practice because I try to avoid page breaks in listings like the plague. And even in cases where I do have page breaks in a listing, for stylistic reasons I wouldn't allow just one or two trailing lines on the second page. With that said, it looks like a bug so I'm reporting it.

Using codelst 1.0.0. Reproducible on typst 0.9.0 and 0.10.0 on macOS.

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

No branches or pull requests

1 participant