How to make columns as wide as the widest entry?

Posted by Helper Method on Stack Overflow See other posts from Stack Overflow or by Helper Method
Published on 2010-05-17T15:42:30Z Indexed on 2010/05/18 8:41 UTC
Read the original article Hit count: 266

Filed under:
|

For a gcc cheatsheet I'm writing, I want to create a table which should describe how gcc interprets different file endings. The table I created so far is defined as follows:

|======================================================================
|.c    |C source code which must be preprocessed.
|.i    |C source code which should not be preprocessed.
|.h    |C header file to be turned into a precompiled header.
|.s    |Assembler code.
|other |
An object file to be fed straight into linking. Any file name with no
recognized suffix is treated this way.
|======================================================================

The problem I have is that the table spans the total page width, but what I want is that each column only is as wide as it's widest entry, and that the table will span only as much witdh as it needs.

© Stack Overflow or respective owner

Related posts about asciidoc

Related posts about markup