[texhax] Alignments and Knuth's uncertainty principle ...
uwe.lueck at web.de
Tue Jan 27 17:04:50 CET 2009
At 13:56 27.01.09, Philip TAYLOR wrote:
>In fact, my problem was needing a maximum width rather
>than a minimum one;
>Unless I am missing something very obvious, it does
>seem to me that \haligns could be considerably more
>powerful if one could place constraints on column
>widths (and, in particular, if one could specify the
>maximum width for a column). I'm now investigating
>dynamic preambles to see if I can apply the constraints
We had this earlier, then concerning LaTeX tabular environments.
With usual simple preambles, cells are considered \hboxes,
so a maximum width would mean something may stick out.
If you want to break lines within cells, you need preambles like
The LaTeX tabularx package offers some "dynamic" control of
the \hsizes (maybe I then forgot to mention this), but problems
remain: if there is little horizontal space,
horizontal spacing within cells may look awful.
Once I did "manual" line breaking, then measure the longest
line in each column ... but formerly I proposed (I hope)
to treat cells as one-column \haligns, using \cr for manual line breaking
For a real "maximum width" feature, doing line breaking within cells
automatically and using *less* than "maximum width" if possible,
I first would like to know an algorithm, i.e. a more specific specification
of the "maximum width" feature. Personally, I prefer doing the manual
way before I analyse which algorithm I am following when I choose
certain manual line breaks. However, I think my goal usually is
minimizing the height of the table, cf. TeXbook pp. 386ff. for balancing
just two columns. Enjoy! :-)
More information about the texhax