New option table/inner/spread to control X column expansion#591
New option table/inner/spread to control X column expansion#591mgrzegor wants to merge 1 commit intoTeXackers:mainfrom
Conversation
|
@mgrzegor Sorry for the late reply. In fact there are two relevant issues to this pull request. The first issue is about how to distribute extra space for X columns which is discussed in #365 . The
I haven't decided yet the final interfaces for the first issue (#365). And since you actually only need the feature in the second issue (#97), I think you could focus only on this issue. In issue #97, I suggest to use key name |
Hi @lvjr,
one of the features I have found missing in
tabularrayis columns that expand automatically to fit their contents without exceeding the declared maximum table width, the waytabularycolumns work. (I am maintaining a technical specification document with a lot of tables formatted that way; right now the document is using a hack that combinestabularywithlongtable, but I would gladly move totabularrayand get rid of all the hacks I have to use e.g. to get lists working in tables, as well as avoid rendering problems with cell backgrounds and adjacent lines.) So, I went ahead and, after several hours looking at thetabularraycode, figured out a way to implement an option that makes X columns with negative coefficients behave the way I need.Please note that this is my first attempt at writing LaTeX3 code, so it is quite likely some of it could have been written in a more efficient way ;-) Feel free to make it better.
As you can see, I have also added a subsection to the manual demonstrating the usage of the new option.
By the way, I am aware there has been a feature request (#97) open for some time to implement something that, if implemented, would also provide a way to fulfil my needs, however the idea presented there (taken from
tabu) takes a different approach and is really more complicated than what I need. That said, I did take the liberty of borrowing the option key namespreadfrom there, even though the interface is very different from the one used bytabu. If you would like a different name, that is no problem.Also by the way, I implemented
spread=coeffbecause it was quite easy to do and I figured some people might appreciate the control it gives over the distribution of the surplus horizontal space, not because I actually need it — my needs are fulfilled byspread=none.