mirror of
https://github.com/typst/typst
synced 2025-05-20 20:15:29 +08:00
update tests with non-top header
This commit is contained in:
parent
5e2241ab65
commit
8e50df544d
BIN
tests/ref/grid-header-not-at-first-row-two-columns.png
Normal file
BIN
tests/ref/grid-header-not-at-first-row-two-columns.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 176 B |
BIN
tests/ref/grid-header-not-at-first-row.png
Normal file
BIN
tests/ref/grid-header-not-at-first-row.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 176 B |
BIN
tests/ref/issue-5359-column-override-stays-inside-header.png
Normal file
BIN
tests/ref/issue-5359-column-override-stays-inside-header.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 674 B |
@ -118,16 +118,12 @@
|
|||||||
)
|
)
|
||||||
|
|
||||||
--- grid-header-not-at-first-row ---
|
--- grid-header-not-at-first-row ---
|
||||||
// Error: 3:3-3:19 header must start at the first row
|
|
||||||
// Hint: 3:3-3:19 remove any rows before the header
|
|
||||||
#grid(
|
#grid(
|
||||||
[a],
|
[a],
|
||||||
grid.header([b])
|
grid.header([b])
|
||||||
)
|
)
|
||||||
|
|
||||||
--- grid-header-not-at-first-row-two-columns ---
|
--- grid-header-not-at-first-row-two-columns ---
|
||||||
// Error: 4:3-4:19 header must start at the first row
|
|
||||||
// Hint: 4:3-4:19 remove any rows before the header
|
|
||||||
#grid(
|
#grid(
|
||||||
columns: 2,
|
columns: 2,
|
||||||
[a],
|
[a],
|
||||||
@ -463,8 +459,6 @@
|
|||||||
#table(
|
#table(
|
||||||
columns: 3,
|
columns: 3,
|
||||||
[Outside],
|
[Outside],
|
||||||
// Error: 1:3-4:4 header must start at the first row
|
|
||||||
// Hint: 1:3-4:4 remove any rows before the header
|
|
||||||
table.header(
|
table.header(
|
||||||
[A], table.cell(x: 1)[B], [C],
|
[A], table.cell(x: 1)[B], [C],
|
||||||
table.cell(x: 1)[D],
|
table.cell(x: 1)[D],
|
||||||
|
24
tests/suite/layout/grid/subheaders.typ
Normal file
24
tests/suite/layout/grid/subheaders.typ
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
--- grid-subheaders ---
|
||||||
|
#set page(width: auto, height: 12em)
|
||||||
|
#let rows(n) = {
|
||||||
|
range(n).map(i => ([John \##i], table.cell(stroke: green)[123], table.cell(stroke: blue)[456], [789], [?], table.hline(start: 4, end: 5, stroke: red))).flatten()
|
||||||
|
}
|
||||||
|
#table(
|
||||||
|
columns: 5,
|
||||||
|
align: center + horizon,
|
||||||
|
table.header(
|
||||||
|
table.cell(colspan: 5)[*Cool Zone*],
|
||||||
|
),
|
||||||
|
table.header(
|
||||||
|
level: 2,
|
||||||
|
table.cell(stroke: red)[*Name*], table.cell(stroke: aqua)[*Number*], [*Data 1*], [*Data 2*], [*Etc*],
|
||||||
|
table.hline(start: 2, end: 3, stroke: yellow)
|
||||||
|
),
|
||||||
|
..rows(6),
|
||||||
|
table.header(
|
||||||
|
level: 2,
|
||||||
|
table.cell(stroke: red)[*New Name*], table.cell(stroke: aqua, colspan: 4)[*Other Data*],
|
||||||
|
table.hline(start: 2, end: 3, stroke: yellow)
|
||||||
|
),
|
||||||
|
..rows(5)
|
||||||
|
)
|
Loading…
x
Reference in New Issue
Block a user