Skip to content

Fixing cell column within table.header and table.footer causes weird behaviour. #5359

@Alex-Muirhead

Description

@Alex-Muirhead

Description

By specifying the location of cells within the table.header and table.footer, it appears possible to inject cells into the header and footer respectively. Cells that are before these header and footer functions are injected without raising errors, and also cause layout errors (although the layout might not be properly defined in these cases)

Source code:

#table(
  columns: 3,
  // This cell should throw an error, or not be in the header
  [Incorrect], 
  table.header(
    [A], table.cell(x: 1)[Forced position], [B]
  ),
  // These cells are the body
  [1],[2],[3],
  [4],[5],[6],
  [4],[5],[6], 
  [Incorrect],
  // The cell above is still in the body,
  // and should not be in the footer
  table.footer(
    [X],[Y],[Z],
    table.cell(x: 1)[Forced position]
  ),
)

Note, the page height is set small here to demonstrate the repeated headers etc.

joist-1
joist-2
joist-3

Reproduction URL

No response

Operating system

Web app

Typst version

  • I am using the latest version of Typst

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglayoutRelated to the layout category, which is about composing, positioning, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions