TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any solution in LaTeX tables that implements similar functionality to MSWord's AutoFit?

enter image description here

share|improve this question
Could you be more specific about what AutoFit does? Adjusts the column widths---with what goal? – Matthew Leingang Apr 28 '11 at 13:02
MSWord is not clear about that. I would say the overall goal is to minimizes height of the table while maintaining its total width. – Frank Seifert Apr 28 '11 at 14:02
Ah, I see. This sounds almost like a linear programming problem! – Matthew Leingang Apr 28 '11 at 18:02
up vote 8 down vote accepted

Have a look at the tabulary package. Its description reads:

The package defines a tabular*-like tabulary environment, taking a ‘total width’ argument as well as the column specifications. It then defines column types L, C, R and J for variable width columns (\raggedright', \centering, \raggedleft, and normally justified). In contrast to tabularx's X columns, the width of each column is weighted according to the natural width of the widest cell in the column.

In my example, I also use the ragged2e package to allow for hyphenation within the table cells.






Definition and Validation of Dynamic Video Reframing based on & Definition and Validation of & Definition and Validation of Dynamic \\
Definition and Validation of Dynamic & Definition and Validation of & Definition and Validation of \\


enter image description here

(Fixed a bug in an earlier version of this post that had a missing '\'.)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.