Hello, I’m trying to format a table a certain way. I’m unsure how to format a double line row. I know that row-gutter can be used. However, I’m trying to get gutter rows only on the top and bottom of the table, like the image:
Any tips?
Hello, I’m trying to format a table a certain way. I’m unsure how to format a double line row. I know that row-gutter can be used. However, I’m trying to get gutter rows only on the top and bottom of the table, like the image:
Any tips?
Hello. You would have to pass an array for that field, like in Table guide – Typst Documentation. (2pt,) + (auto,) * 5 + (2pt,)
To be honest, not super sure what you mean, but I’m fairly new to typst. I ended up brute forcing by manually placing the table title (before I was using a table inside a figure so I could easily call the table further down), and then using:
#line(length: 100%, stroke: 1pt)
#v(-4pt)
#line(length:100%, stroke: 1pt)
its not a clean solution but it works well enough for me. Appreciate the response though!
If you click on the link, you can see an example in the Typst documentation!
Here it is below for future readers
#table(
columns: 3,
stroke: (x: none),
row-gutter: (2.2pt, auto), // pass multiple values here
table.header[Date][Exercise Type][Calories Burned],
[2023-03-15], [Swimming], [400],
[2023-03-17], [Weightlifting], [250],
[2023-03-18], [Yoga], [200],
)
If I see this correctly, there is unfortunately no way to use a double line above a table.header
. You can use tables fine without a table header though, but it’s potentially a feature request for the future.
A tiling can draw a double line but it will spill out horizontally (be too long compared with table.hline()
) because the outer stroke thickness of the pattern has to accommodate the height of the two lines.