Column width in output tables (for long strings of characters without any space)
Hi everyone,
I am dealing with a table where one of the column contains strings of characters. For a few of them the string is very long (~100-150 char) while for most of the others the string is quite short (~20 char). the end result is that the table cannot be fully displayed on the page and horizontal scrolling is necessary. Much of the screen real-estate is wasted since the short strings of characters are obviously followed by blank space.
There is apparently no way to dynamically resize columns. This would be cool but maybe this is another topic (feature request?).
I tried to play around with the "widths" parameter mentioned in the documentation but it seems that it has no effect whatsoever on the width of my columns. Probably I am doing something wrong but I cannot find out what. Is it possible to specify a given size for a column if this size wouldn't allow for some of the data to be fully displayed?
Thank you very much in advance for your help. Best, -a-
OK, here is what I did:
I made a output table displaying only the "too wide" column and another "narrow" column. This fits in the width of my screen (it is actually a bit smaller).
Now, if I specify the width of both columns to 50% the width of the narrow increases until the width of the screen is filled. However the ratio doesn't reach 50% since the width of the wide column will not decrease below the minimal width necessary to have all data displayed.
So I can conclude that the table will not decrease the width of any column below what is considered a minimal value (all data properly displayed = automatic width) and it will not adjust the vertical size of rows for instance in order to display data on multiple rows within a cell. Thus I can not "force" the width of a column to be smaller that the automatically fixed width.
-> The width parameter is thus only useful to increase the width of columns in such tables.
Best, -a-
I found out the width of columns can be reduced (and data displayed on several lines) if there is a space somewhere. However if the content of a cell consists in (or contains) a single string of many characters (without any space) then the corresponding data will not be split onto multiple lines and the width of the column can thus not be reduced...
Any way to change this behavior?
Best, -a-