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

Use table.header() in table with only one column #4021

Open
lettuceDestroyer opened this issue Apr 26, 2024 Discussed in #4017 · 0 comments
Open

Use table.header() in table with only one column #4021

lettuceDestroyer opened this issue Apr 26, 2024 Discussed in #4017 · 0 comments
Labels
feature request New feature or request layout Related to layout, positioning, etc.

Comments

@lettuceDestroyer
Copy link

lettuceDestroyer commented Apr 26, 2024

Discussed in #4017

Originally posted by lettuceDestroyer April 26, 2024
I'm trying to create a table with repeating headers for a table that only has one column.

What I tried is this:

#let date = datetime.today().display()

#show table.header : it => strong(it)

#figure(
  align(center,
)[#table(
      columns: 1,
      align: left,
      inset: 6pt,
      table.header([Date],[Text 1], [Text 2]),
      [#date],
      [#lorem(15)],
      [#lorem(30)],
    )],
    caption: [Journal from #date]
)

Which resulted in this:
image

What I excepted was this:
image

One of the advantages of having this build in as a feature would be that, if implemented correctly, the table headers could be repeated in case there is a page break.

@laurmaedje laurmaedje added feature request New feature or request layout Related to layout, positioning, etc. labels Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request layout Related to layout, positioning, etc.
Projects
None yet
Development

No branches or pull requests

2 participants