Reputation: 12360
Asciidoc tables use equally sized column width by default. How can I tell asciidoc to use minumum column widths instead?
I am able to set relative column widths using
[cols="2,1,6,1,2"]
However, I want Asciidoc to automatically determine the min column width, so that columns with long text do not need extra line breaks.
I would expect something like
[width="min"]
but that does not work.
Upvotes: 5
Views: 1709
Reputation: 210310
One way to do this is to set the non-minimum columns to extremely large numbers. You can change your cols
setting to this, for example:
[cols="200,1,600,1,200"]
This keeps your larger columns proportioned relatively, while shrinking the small columns as small as they can reasonably go.
(It will break those small columns on spaces, though, in its efforts to make them as small as possible.)
Upvotes: 3