diff options
| author | PgBiel <9021226+PgBiel@users.noreply.github.com> | 2024-03-14 06:26:27 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-14 09:26:27 +0000 |
| commit | 23ec13718f0a56bad72db3ae48af552c9ae0a098 (patch) | |
| tree | 44c0d76c728f44c51342f8f5eddd7655924a47e9 /tests | |
| parent | 9e507cd9fd816f960a7f7ab4fe7472dc0f1aa143 (diff) | |
Small table footer and hline placement improvements (#3659)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/layout/grid-footers-5.png | bin | 17228 -> 18713 bytes | |||
| -rw-r--r-- | tests/ref/layout/grid-stroke.png | bin | 57339 -> 57859 bytes | |||
| -rw-r--r-- | tests/typ/layout/grid-footers-5.typ | 46 | ||||
| -rw-r--r-- | tests/typ/layout/grid-stroke.typ | 12 |
4 files changed, 58 insertions, 0 deletions
diff --git a/tests/ref/layout/grid-footers-5.png b/tests/ref/layout/grid-footers-5.png Binary files differindex 0cfd2d66..6cae5592 100644 --- a/tests/ref/layout/grid-footers-5.png +++ b/tests/ref/layout/grid-footers-5.png diff --git a/tests/ref/layout/grid-stroke.png b/tests/ref/layout/grid-stroke.png Binary files differindex e9f9b061..fbba379e 100644 --- a/tests/ref/layout/grid-stroke.png +++ b/tests/ref/layout/grid-stroke.png diff --git a/tests/typ/layout/grid-footers-5.typ b/tests/typ/layout/grid-footers-5.typ index 874fcd2e..16da940a 100644 --- a/tests/typ/layout/grid-footers-5.typ +++ b/tests/typ/layout/grid-footers-5.typ @@ -39,3 +39,49 @@ [c], [d] ) ) + +--- +// Footer should appear at the bottom. Red line should be above the footer. +// Green line should be on the left border. +#set page(margin: 2pt) +#set text(6pt) +#table( + columns: 2, + inset: 1.5pt, + table.cell(y: 0)[a], + table.cell(x: 1, y: 1)[a], + table.cell(y: 2)[a], + table.footer( + table.hline(stroke: red), + table.vline(stroke: green), + [b], + ), + table.cell(x: 1, y: 3)[c] +) + +--- +// Table should be just one row. [c] appears at the third column. +#set page(margin: 2pt) +#set text(6pt) +#table( + columns: 3, + inset: 1.5pt, + table.cell(y: 0)[a], + table.footer( + table.hline(stroke: red), + table.hline(y: 1, stroke: aqua), + table.cell(y: 0)[b], + [c] + ) +) + +--- +// Footer should go below the rowspans. +#set page(margin: 2pt) +#set text(6pt) +#table( + columns: 2, + inset: 1.5pt, + table.cell(rowspan: 2)[a], table.cell(rowspan: 2)[b], + table.footer() +) diff --git a/tests/typ/layout/grid-stroke.typ b/tests/typ/layout/grid-stroke.typ index 7a01b52d..35a65ae6 100644 --- a/tests/typ/layout/grid-stroke.typ +++ b/tests/typ/layout/grid-stroke.typ @@ -302,6 +302,18 @@ ) --- +// Red line should be above [c] (hline skips the shortest rowspan). +#set text(6pt) +#table( + rows: 1em, + columns: 2, + inset: 1.5pt, + table.cell(rowspan: 3)[a], table.cell(rowspan: 2)[b], + table.hline(stroke: red), + [c] +) + +--- // Error: 8:3-8:32 cannot place horizontal line at the 'bottom' position of the bottom border (y = 2) // Hint: 8:3-8:32 set the line's position to 'top' or place it at a smaller 'y' index #table( |
