Skip to content

Request: table manipulation function to repeat headers on next page of a long table #270

@serkonda7

Description

@serkonda7

Current situation

.doctype {paged}
.theme {paperwhite} layout:{latex}

.loremipsum
.loremipsum
.loremipsum
.loremipsum

| ID | Name          | Age | Department      | Salary   | Join Date   |
|----|---------------|-----|----------------|----------|-------------|
| 1  | John Smith    | 32  | Engineering    | $85,000  | 2020-03-15  |
| 2  | Sarah Johnson | 28  | Marketing      | $65,000  | 2021-06-22  |
| 3  | Mike Chen     | 45  | Sales          | $92,000  | 2018-11-05  |
| 4  | Emily Davis   | 36  | HR             | $72,000  | 2019-08-14  |
| 5  | Alex Rodriguez| 29  | Engineering    | $78,000  | 2022-01-30  |
| 6  | Lisa Wong     | 41  | Finance        | $95,000  | 2017-05-19  |
| 7  | Tom Wilson    | 33  | Marketing      | $68,000  | 2020-09-11  |
| 8  | Anna Miller   | 27  | Engineering    | $75,000  | 2023-02-25  |
| 1  | John Smith    | 32  | Engineering    | $85,000  | 2020-03-15  |
| 2  | Sarah Johnson | 28  | Marketing      | $65,000  | 2021-06-22  |
| 3  | Mike Chen     | 45  | Sales          | $92,000  | 2018-11-05  |
| 4  | Emily Davis   | 36  | HR             | $72,000  | 2019-08-14  |
| 5  | Alex Rodriguez| 29  | Engineering    | $78,000  | 2022-01-30  |
| 6  | Lisa Wong     | 41  | Finance        | $95,000  | 2017-05-19  |
| 7  | Tom Wilson    | 33  | Marketing      | $68,000  | 2020-09-11  |
| 8  | Anna Miller   | 27  | Engineering    | $75,000  | 2023-02-25  |
Image

Problem

Table headers are all at the top. So for long tables one has to scroll a lot.

Idea

I would love to have the table headers added again at the top of the next page.
Syntax could look like this:

.doctype {paged}
.theme {paperwhite} layout:{latex}

.loremipsum
.loremipsum
.loremipsum
.loremipsum

.tableheaders {repeat}
  | ID | Name          | Age | Department      | Salary   | Join Date   |
  |----|---------------|-----|----------------|----------|-------------|
  | 1  | John Smith    | 32  | Engineering    | $85,000  | 2020-03-15  |
  | 2  | Sarah Johnson | 28  | Marketing      | $65,000  | 2021-06-22  |
  | 3  | Mike Chen     | 45  | Sales          | $92,000  | 2018-11-05  |
  | 4  | Emily Davis   | 36  | HR             | $72,000  | 2019-08-14  |
  | 5  | Alex Rodriguez| 29  | Engineering    | $78,000  | 2022-01-30  |
  | 6  | Lisa Wong     | 41  | Finance        | $95,000  | 2017-05-19  |
  | 7  | Tom Wilson    | 33  | Marketing      | $68,000  | 2020-09-11  |
  | 8  | Anna Miller   | 27  | Engineering    | $75,000  | 2023-02-25  |
  | 1  | John Smith    | 32  | Engineering    | $85,000  | 2020-03-15  |
  | 2  | Sarah Johnson | 28  | Marketing      | $65,000  | 2021-06-22  |
  | 3  | Mike Chen     | 45  | Sales          | $92,000  | 2018-11-05  |
  | 4  | Emily Davis   | 36  | HR             | $72,000  | 2019-08-14  |
  | 5  | Alex Rodriguez| 29  | Engineering    | $78,000  | 2022-01-30  |
  | 6  | Lisa Wong     | 41  | Finance        | $95,000  | 2017-05-19  |
  | 7  | Tom Wilson    | 33  | Marketing      | $68,000  | 2020-09-11  |
  | 8  | Anna Miller   | 27  | Engineering    | $75,000  | 2023-02-25  |

And output similar to this (I split the table into two for this screenshot, just imagine that the caption is not there)
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions