# [texhax] Alignments and Knuth's uncertainty principle ...

Philip TAYLOR P.Taylor at Rhul.Ac.Uk
Tue Jan 27 13:56:02 CET 2009

```Donald Arseneau wrote:

> This situation does lead to surprising behavior that looks
> buggy at first.  TeX gives the smallest feasible width to
> that unconstrained column, and that width is likely
> *negative*.

Many thanks for your observations, Donald.  I take it
that a column width can become negative (in the
scenario that we are discussing) only if the overall
width of the alignment is constrained (is this the
case ?).

> If you give a blank row somewhere with all
> independent columns so as to enforce a minimum zero width
> per column, then the resulting layout will look a lot more
> sensible.

In fact, my problem was needing a maximum width rather
than a minimum one; very briefly, I was attempting
to align three types of row : one containing a name,
with optional additional data; one containing a solidus;
and one containing an "=" sign, preceded by a date and
followed by a name.  My idea was to place the solidus
in a single column, cause the "=" to span three columns
(the middle one being the solidus column), and cause
the name in row one to span columns 1 and 2, 4 and 5
(this is, of course, a simplification, but you will
get the idea).  The problem was that the name spanning
columns 1 and 2 caused column 2 to grow in width, whereas
I had (very naively) thought that column 2 would take
the width of half an "=" minus the width of an "|",
leaving column 1 to grow as necessary in order to
accommodate the name.

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
that way.

> you could post or send an example to clarify.

Well, the code on which I was working I now understand,
and I have come to realise that the author's expression
of the family tree left quite a lot to be desired, so
I am trying to reformulate her tree layout first,  and
then will have another go at implementing it through TeX.

** Phil.
```