Paul A. Rubin wrote:

I'm no TeXpert, but I think the logic here is that there is a baseline for text in each row of the table. Vertical alignment is with reference to the baseline. So setting "middle" in the fixed-width column says that you want the middle of each cell in that column to align with the baseline of the row. The baseline is defined (I think) independent of the alignment of the columns, so even if you make every column fixed-width (can't recall if that's legal in LaTeX or not), there's still a baseline and the logic still works.

Of course, the first time I tried to do what you were doing, it took me half an hour to sort this out. :-)
Thanks a lot for explaining this. I made a test document and now
I think I understand this.  There is a baseline, and the alignments
and cell contents eventually decide where it will be.  Quite
powerful, actually. The normal-width cells just follow whatever
baseline the combination of fixed width cells sets up.

For the wishlist - it'd sure be nice if LyX did the same thing. Now
tables are being worked over - one can hope. :-)

So I tried forcing my way with insert->vertical space before
and after the symbol. Latex puked on this.

Try setting "protected" on the vertical space. It doesn't seem to cause LaTeX to object (although it also doesn't seem to accomplish much).
Correct.  Latex accepts the protected space, but don't act
on it.  So it is useless and should probably be disabled.

Ok, but what happens if the user inserts a minipage in a table cell. Inside the minipage, \vfill actually works and should be enabled. So now LyX needs to track whether you're inside a minipage inside a table. I don't know enough LaTeX to know if it ends there or not. That's one for the developers.
When allowing/disallowing a \vfill insert, an outward search
is needed then.  Start with the inset the cursor is in, and proceed
outwards.  If we hit a table cell, then the answer is "no".  If we
hit a minipage or the main window, the answer is "yes".  Insets that
don't matter (such as the branch inset) just propagate the search
to its outer inset.

One way I can imagine doing this is to let every inset have a "vspaceOK()"
method.  The default, inherited from some base class, would be to just
ask the outer inset. While some, like table and minipage, will provide
definite answers that stops the search.

The approach might be useful for other things that can't
be inserted everywhere, such as footnotes.

But someone who knows the code and designe should decide
things like this.

Helge Hafting

Reply via email to