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

set page rule not working properly with hidden heading #4064

Open
1 task done
SkytAsul opened this issue May 3, 2024 · 0 comments
Open
1 task done

set page rule not working properly with hidden heading #4064

SkytAsul opened this issue May 3, 2024 · 0 comments
Labels
bug Something isn't working styling About set and show rules or style properties

Comments

@SkytAsul
Copy link

SkytAsul commented May 3, 2024

Description

When using show heading: {} to hide headings, they cause weird bugs with set page rules on newly created pages.

For instance :

#set page(width: 5cm, height: 2cm)
#show heading: {}

Page 1 that should *not* have a header.
#pagebreak()

#heading("Random hidden heading")

#set page(header: "This is the header")
Page 2 that *should* have a header.

#pagebreak()
Page 3 that *should* also have the header.

The "Page 2" does not have the header, because the heading kind-of starts a new page without content. The set page rule should automatically break a new page but actually does not.
I don't really understand the internals going on here but I think it's a bug with the compiler.

Reproduction URL

No response

Operating system

Linux

Typst version

  • I am using the latest version of Typst
@SkytAsul SkytAsul added the bug Something isn't working label May 3, 2024
@laurmaedje laurmaedje added the styling About set and show rules or style properties label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working styling About set and show rules or style properties
Projects
None yet
Development

No branches or pull requests

2 participants