On 2012-09-05 Hans Hagen
I am working on some float placement code for a project. To not reinvent the wheel I like to know what is currently possible in ConTeXt.
fyi: As I often need conditional placement in projects (mostly width related), it's likely that there will be a pluggable system some day
I already consider the entire float mechanism very flexible and feature rich.
It's somewhat complicated by the fact that one has to decide what to do with delayed placement.
I'm quite happy with the placement in general. The exact problem here is that if the \setupfloat[criterium=…] value is exceeded, it seems that ConTeXt adjusts the values “location” and “default” to place the float in the text. A solution would be to be able to state a fallback float class in case criterium is exceeded. Idea: \definefloat [marginfigure] [marginfigures] \definefloat [marginfigurefallback] [marginfiguresfallbacks] [marginfigure] \setupfloat [marginfigure] [criterium=\marginwidth, criteriumfallback=marginfigurefallback] This way full control is being maintained, since the float and caption style of the fallback class can be individually adjusted. Marco