tabularray icon indicating copy to clipboard operation
tabularray copied to clipboard

New way to handle an X column with wd setting

Open lvjr opened this issue 3 years ago • 3 comments

At this time, the co and wd options of a column are mutually exclusive: the co option is ignored (and the X column is treated as a Q column) if wd is specified. Maybe we can do something interesting if both options are specified.

lvjr avatar Sep 09 '21 09:09 lvjr

Not sure if I follow.

width applies to the table as a whole, so would not normally collide with an X column's width specification?

co could only conflict with an X column, if co would occur in a column{} spec. Is that possible? The documentation could be read as if it were, but I haven't tried it.

c-alpha avatar Sep 11 '21 00:09 c-alpha

I have edited my first post. width should be wd there.

In fact, X[2] is the same as column{i} = {co=2}.

lvjr avatar Sep 11 '21 00:09 lvjr

I think it would be very confusing, if the column is not the wd that the user specified. Therefore, I don't think, that combining co and wd options would not be a good idea.

However, it might be an idea to give a warning, if the user tries to specify a wd for an X column.

marvlg avatar Feb 13 '22 07:02 marvlg