On 2012-09-05 Hans Hagen <pra...@wxs.nl> wrote: Hi Hans,
> > 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 ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________