Forum How do I...?

Float figures to top then bottom of page

hubprince
I'd like to express a rule that would float figures in this way:

1. To the top of the page.
2. If there's already a figure at the top of the page, then float to the bottom of the page.
3. If there's already a figure at the bottom of the page, or there isn't enough room left, then float to the top of the next page.

In other words a maximum of two figures per page: the first at the top and the second at the bottom.

That's not possible, as far as I can tell, with any of
float: top
float: bottom
float: prince-snap
float: next
by themselves, but maybe a combination of
float: top bottom next
might be one way to express this?

Edited by hubprince

markbrown
Hi,

We're currently in the process of adding features like this for column floats, and are planning to do the same for page floats soon. I'll keep you posted :-)

Mark
markbrown
Hi,

The new Prince 14 release contains support for lots of new float features. In particular, you can express the above requirements by using
-prince-float: page;
-prince-clear: end;

In addition, the behaviour of "snap" now falls back to "page" if the snapped location is unavailable.

Mark

Edited by markbrown