Skip to content

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

Closed

Description

@dreamlax
#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.

Activity

  1. rpitasky commented on Mar 24, 2023

    @rpitasky
    Contributor

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

  2. laurmaedje commented on Mar 24, 2023

    @laurmaedje
    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.

  3. added
    bug
    styling
    on Apr 2, 2023
  4. changed the title [-]Page number font size is incorrect[/-] [+]Header / Footer / Page number inherits style from page elements[/+] on May 7, 2023
  5. Remillard commented on Nov 9, 2023

    @Remillard

    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.

  6. changed the title [-]Header / Footer / Page number inherits style from page elements[/-] [+]Header / Footer / Page number / Footnotes inherit style from page elements[/+] on Jan 26, 2024
  7. hannes3r commented on Jul 30, 2024

    @hannes3r

    I've also found a workaround that helped in my case. I've placed an invisible rectangle below the heading, which corrected the formatting in the footer

    = Heading
    #rect(stroke: 0em)
    #pagebreak()
    = Heading 2
    ...
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugstyling

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions