-
-
Notifications
You must be signed in to change notification settings - Fork 14
Closed
Description
Here is the working example:
source
#import "@preview/tablex:0.0.6": tablex, rowspanx, colspanx, cellx
#set page(width: auto, height: auto)
#set text(size: 10pt)
#tablex(
align: center + horizon,
rows: 5mm,
columns: (7mm, 10mm, 23mm, 15mm, 10mm, 70mm, 5mm, 5mm, 5mm, 5mm, 12mm, 18mm),
..range(5), cellx(rowspan: 3, colspan: 7)[],
..range(5),
..range(5),
..range(5), rowspanx(5)[], colspanx(3)[], colspanx(2)[], [],
..range(5), rowspanx(3)[], rowspanx(3)[], rowspanx(3)[], cellx(rowspan: 3, colspan: 2)[], rowspanx(3)[],
colspanx(2)[], ..range(3),
colspanx(2)[], ..range(3),
colspanx(2)[], ..range(3), colspanx(4)[], colspanx(2)[],
colspanx(2)[], ..range(3), rowspanx(3)[], cellx(rowspan: 3, colspan: 6)[],
colspanx(2)[], ..range(3),
colspanx(2)[], ..range(3),
)
But adding x: 5,
causes not only text on 1st, 5th, 9th, 11th rows to shift a bit, but also extends the last row's height:
source
#import "@preview/tablex:0.0.6": tablex, rowspanx, colspanx, cellx
#set page(width: auto, height: auto)
#set text(size: 10pt)
#tablex(
align: center + horizon,
rows: 5mm,
columns: (7mm, 10mm, 23mm, 15mm, 10mm, 70mm, 5mm, 5mm, 5mm, 5mm, 12mm, 18mm),
..range(5), cellx(x: 5, rowspan: 3, colspan: 7)[],
..range(5),
..range(5),
..range(5), rowspanx(5)[], colspanx(3)[], colspanx(2)[], [],
..range(5), rowspanx(3)[], rowspanx(3)[], rowspanx(3)[], cellx(rowspan: 3, colspan: 2)[], rowspanx(3)[],
colspanx(2)[], ..range(3),
colspanx(2)[], ..range(3),
colspanx(2)[], ..range(3), colspanx(4)[], colspanx(2)[],
colspanx(2)[], ..range(3), rowspanx(3)[], cellx(rowspan: 3, colspan: 6)[],
colspanx(2)[], ..range(3),
colspanx(2)[], ..range(3),
)
If I remove the unnecessary ..range(5),
then most rows' text will move and the second to last row now also will extend its height.
source
#import "@preview/tablex:0.0.6": tablex, rowspanx, colspanx, cellx
#set page(width: auto, height: auto)
#set text(size: 10pt)
#tablex(
align: center + horizon,
rows: 5mm,
columns: (7mm, 10mm, 23mm, 15mm, 10mm, 70mm, 5mm, 5mm, 5mm, 5mm, 12mm, 18mm),
cellx(x: 5, rowspan: 3, colspan: 7)[],
..range(5),
..range(5),
..range(5), rowspanx(5)[], colspanx(3)[], colspanx(2)[], [],
..range(5), rowspanx(3)[], rowspanx(3)[], rowspanx(3)[], cellx(rowspan: 3, colspan: 2)[], rowspanx(3)[],
colspanx(2)[], ..range(3),
colspanx(2)[], ..range(3),
colspanx(2)[], ..range(3), colspanx(4)[], colspanx(2)[],
colspanx(2)[], ..range(3), rowspanx(3)[], cellx(rowspan: 3, colspan: 6)[],
colspanx(2)[], ..range(3),
colspanx(2)[], ..range(3),
)
P.S. I'm using MuPDF in the screenshots.