8000 Repeat-headers breaks inner tables' vlinexs on following pages · Issue #34 · PgBiel/typst-tablex · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Repeat-headers breaks inner tables' vlinexs on following pages #34

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

Closed
lf- opened this issue Jul 12, 2023 · 3 comments
Closed

Repeat-headers breaks inner tables' vlinexs on following pages #34

lf- opened this issue Jul 12, 2023 · 3 comments
Assignees
Labels
bug Something isn't working headers Issue related to table headers and their repetition renderer Related to the final rendering (drawing) step of the table.
Milestone

Comments

@lf-
Copy link
lf- commented Jul 12, 2023

This is kind of a strange bug I ran into while doing a homework, so please excuse the messy code that has been sanitized.

Built with tablex main 2f80d86, and typst 0.6.0.

Problem: the vlinex of the inner table in the first row of a new page gets vertically shifted:

image

#import "./tablex/tablex.typ": tablex, vlinex, hlinex

#lorem(500)

#let preflist(..args) = {
    let args = args.pos()
    let maxlength = 6
    let parts = args.map(a => a + range(maxlength - a.len()).map(_ => [])).flatten()
    tablex(
        columns: 6,
        auto-lines: false,
        (), vlinex(),
        ..parts
    )
}

#tablex(
    columns: (40pt, 18pt, 18pt, 120pt, 120pt),
    auto-vlines: false,
    header-rows: 1,
    repeat-header: true,
    (), vlinex(), vlinex(), vlinex(), vlinex(), (),
    hlinex(stroke: none),
    [Aaaaa], [$a$], [$a$], [aaaaaaaaaaaaaaaaaa], [aaaaaaaaaaaaaaaaaaaaaaaa],
    [1], [1], [1], [1 blah 1], preflist(
        (1, 1, 1, 1, 1, 1),
        (1, 1, 1, 1, 1),
        (1, 1, 1, 1, 1),
        (1, 1, 1, 1, 1),
        (1, 1, 1, 1, 1, 1),
        (1, 1, 1),
    ),

    [1], [1], [1], [1 blah 1], preflist(
        (1, 1, 1, 1, 1),
        (1, 1, 1, 1, 1),
        (1, 1, 1, 1, 1),
        (1, 1, 1),
        (1, 1, 1, 1, 1),
        (1, 1, 1),
    ),

    [1], [1], [1], [1 blah 1, blah 1], preflist(
        (1, 1, 1, 1, 1),
        (1, 1, 1, 1),
        (1, 1, 1, 1, 1),
        (1, 1),
        (1, 1, 1, 1, 1),
        (1, 1, 1),
    ),

    [1], [1], [1], [1 blah 1], preflist(
        (1, 1, 1, 1, 1),
        (1, 1, 1, 1),
        (1, 1, 1, 1),
        (1, 1),
        (1, 1, 1, 1),
        (1, 1, 1),
    ),

    [1], [1], [1], [1 blah 1], preflist(
        (1, 1, 1, 1),
        (1, 1, 1),
        (1, 1),
        (1, 1),
        (1, 1, 1, 1),
        (1, 1, 1),
    ),

    [1], [1], [1], [1 blah 1, blah 1], preflist(
        (1, 1, 1),
        (1, 1, 1),
        (1, 1),
        (1, 1),
        (1, 1, 1, 1),
        (1, 1),
    ),

    [1], [1], [1], [1 blah 1], preflist(
        (1, 1, 1),
        (1, 1, 1),
        (1, 1),
        (1, 1),
        (1, 1, 1, 1),
        (1, 1),
    ),

    [1], [1], [1], [1 blah 1, blah 1], preflist(
        (1, 1),
        (1, 1),
        (1, 1),
        (1, 1),
        (1, 1),
        (1, 1),
    ),

    [1], [1], [1], [1 blah 1], preflist(
        (1, 1),
        (1, 1),
        (1, 1),
        (1, 1),
        (1, 1),
        (1, 1),
    ),
    hlinex(stroke: none),
)
@PgBiel PgBiel self-assigned this Jul 12, 2023
@PgBiel PgBiel added the bug Something isn't working label Jul 12, 2023
@PgBiel
Copy link
Owner
PgBiel commented Jul 12, 2023

Tablex in tablex always tends to generate problems it seems haha. I guess this is kind of a use case I wasn't anticipating at first (although it makes sense).

I'll eventually perform some local tests, but how do normal tables behave here? And does changing the inset (padding) parameter help?

@lf-
Copy link
Author
lf- commented Jul 12, 2023

Not sure! I can't promise to remember to get back to test this: turning off repeat-headers will at least prevent it from happening so I did that.

@PgBiel PgBiel added headers Issue related to table headers and their repetition renderer Related to the final rendering (drawing) step of the table. labels Nov 17, 2023
@PgBiel
Copy link
Owner
PgBiel commented Dec 16, 2023

Hey! Turns out this was due to #80, therefore this is now fixed (can't reproduce after f6f7b52). Thanks for reporting!

@PgBiel PgBiel closed this as completed Dec 16, 2023
@PgBiel PgBiel added this to the v0.0.7 milestone Dec 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working headers Issue related to table headers and their repetition renderer Related to the final rendering (drawing) step of the table.
Projects
None yet
Development

No branches or pull requests

2 participants
0