Liviu Andronic wrote:
Dear all
Sorry for the cross-posting, but this is at the same time posting a
solution and requesting a feature.

I've been using table floats with subfloats and normal tables, and
they work nicely. However, when the float becomes too long for the
page---because of the length of the subtables---, it will not break.
I've tried to use longtables in the subfloats, but compilation fails.
This seems to be normal behaviour for LaTeX [1].

A float supposed to never break - that is the point of having
floats in the first place. A float may float to the next page
precisely to avoid breaking. This because images/tables cannot
be broken in a useful way. (Especially images.) A float is supposed
to be a single unbreakable block, no
matter what you actually put into it.

Non-breaking is not the main effect of a float, an
image or table won't break if you put it directly in the
text without a float. But then you get bad page breaking
with large white gaps. A float "floats" so that these
white gaps is avoided.

The longtable is what you use when you want a table to
break across pages. You don't put it in a float, you just put the
longtable directly in the text. It will break when necessary, and optionally repeat header rows after the break so the continued
table will be easier to read.


So:

When you want a one-piece table, use a table inside a float.

When you want a table that can break across pages, use a longtable
without the float.

And if you want several tables so that the page can break
between them, put each table into a float of its own.

If you want two tables together without a page break between them,
put them in the same float.

With these rules, no ERT is necessary. (I.e. LyX is fine as-is.)
Are you trying to do something unusual?

I guess your ERT is there to get the captions you want? It seems
risky putting floats in between tables, because the floats
might float somewhere else and that would look wrong.



Helge Hafting

Reply via email to