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

Header / Footer / Page number / Footnotes inherit style from page elements #241

Open
dreamlax opened this issue Mar 24, 2023 · 4 comments
Open
Labels
bug Something isn't working styling About set and show rules or style properties

Comments

@dreamlax
Copy link
Contributor

dreamlax commented Mar 24, 2023

#set page(paper: "a4", numbering: "1")

#align(center, text(100pt)[
  Big size
])

// something

#pagebreak

Normal size

This produces the following two pages:

page1
page2

The expected result is that the page number's style is the same for both pages (normal size).

N.b. if the // something line is uncommented, then the word something appears in normal size and the page number also returns to the normal size.

@ghost
Copy link

ghost commented Mar 24, 2023

confirmed:

#set page(numbering: "1")
#text(99pt)[big size]
#pagebreak()
normal size

@rpitasky
Copy link
Contributor

looks like an easy fix, I'd like to knock this one off tomorrow, if nobody minds?

@laurmaedje
Copy link
Member

I fear it's not an easy fix. I've been aware of this for a while and it is a deeper issue in the styling system, which I want to fix as soon as possible.

@laurmaedje laurmaedje added bug Something isn't working styling About set and show rules or style properties labels Apr 2, 2023
@laurmaedje laurmaedje changed the title Page number font size is incorrect Header / Footer / Page number inherits style from page elements May 7, 2023
@Remillard
Copy link

I have a workaround that seems to work. If I add a zero width space, it seems to correct the header and footer issue.

//-----------------------------------------------------------------------------
// Formal Title Page
//-----------------------------------------------------------------------------
#sym.zws // Hack to workaround known issue: https://github.com/typst/typst/issues/241
#set text(size: 26pt)
#align(center)[*#doc_full_title \ Revision: #doc_version*]
#set text(size: 11pt)
#pagebreak()

If the workaround line is removed, the header and footer pick up the format of the text there, font size, strong emphasis, and so forth.

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

4 participants