Open Enivex opened 1 year ago
It is possible to provide \SetId
and \SetClass
commands (similar to those in html/css). With \SetId{Hello}
at the beginning of one cell, its rownum
and colnum
are saved and you could write
row{Hello} = {...}
column{Hello} = {...}
or
row{2-Hello} = {...}
column{Hello-Z} = {...}
With \SetClass{World}
at the beginning of some cells, their rownum
s and colnum
s are saved and you could write
row{class{World}} = {...}
column{class{World}} = {...}
where class
is a new child selector (see also https://github.com/lvjr/tabularray/issues/382).
The names of ids and classes must start with capital letters and the names of selectors must start with lowercase letters, so that we can easily distinguish them.
That would be great! Although I have some questions:
Would you need to write cell{Hello}{Hello} to refer to the specific cell, or would it be possible to have the less verbose cell{Hello}?
This distinction becomes more important for the class, because if I add cells (1,2) and (2,1) to World then presumably cell{class{World}}{class{World}} would affect cells (1,2), (2,1), (1,1) and (2,2), while you'd really like cell{class{World}} to affect only (1,2) and (2,1).
Hopefully I explained myself clearly.
Yes, it seems we need to first make tabularray
accept syntax like this (I'm not sure which one is the best)
cell{{1}{2},{2}{1},{3}{4},{4}{3}}
or
cell{{1,2},{2,1},{3,4},{4,3}}
or
cell{{1,2}{2,1}{3,4}{4,3}}
or
cell{1:2,2:1,3:4,4:3}
so that we can write
cell{class{World}}
cell{{1,2},{2,1},{3,4},{4,3}}
Looks nicest to my eyes, and aligns the closest with usual notation for sets of tuples.
I like to use the new interface, where cell properties are handled outside the table itself. Currently (unless I'm missing something), it is only possible to do so using explicit numbers, the letters U-Z for the final rows, and odd/even. This is extremely tedious if you want to change specific cells or rows and make changes that shift the numbering around (you have to update everything).
What I'm looking for is something like \TblrLabel{clever_cell_name} that I can put inside the cell and then be able to write
column{clever_cell_name} = {preto=\textbullet\,} or row{clever_cell_name} = {font = \bfseries} or cell{clever_cell_name} = {r=2,c=1}{}