From: Hans Hagen <[EMAIL PROTECTED]>, Mon, 17 Apr 2006 10:48:29 +0200
>> [question about placing figures differently according to their widths]
> best use closed floats and set their characteristics (see details.pdf)

I haven't found closed floats in details.pdf, though it's teaching me
much useful stuff about floats meanwhile.  Are closed floats the ones
attached to text (e.g. \placefigure[inmargin]), rather than ones that
can move up and down?  Though that's the opposite of floating.

Mixing mixing inmargin and margin locations produces lots of collisions,
I've found (an example is below).  If TeX had a decent programming
language, it might be possible to implement lots more float-position
optimizations.  The user could write:

  \placefigure[inmargin][someref]{}{\externalfigure[somefig.pdf]}

  In the diagram \attachto[someref] the long arrows mean blah and the
  short arrows mean blahblah...

Then the optimizer would favor placing each margin figure with its top
aligned to the top of the attachment point, but if it couldn't do that,
it would move them up and down to minimize (say) the sum of the squared
vertical offsets (using a larger penalty if the figure had to be
postponed to the next page, and insert "(p. 27)" where
\attachto[someref] is).  The first pass can do greedy optimization on
the fly, and subsequent runs could analyze the figure locations and
their attachment points to find the best solution for a whole chapter.
But it would be miserable to do all of that in a macro language (which
are ghastly).

Here is the collision example.  As the doctor says when you say "It
hurts when I do X": "So don't do that!"

\starttext
\dorecurse{6}{
We thrive in information-thick worlds because of our
marvelous and everyday capacity to select, edit,
single out, structure, highlight, group, pair, merge,
harmonize, synthesize, focus, organize, condense,
reduce, boil down, choose, categorize, catalog, classify,

\placefigure[inmargin]{A caption goes here}
{\framed[height=1in,width=1.5in]{!}}

list, abstract, scan, look into, idealize, isolate,
discriminate, distinguish, screen, pigeonhole, pick over,
sort, integrate, blend, inspect, filter, lump, skip,
smooth, chunk, average, approximate, cluster, aggregate,

\placefigure[margin]{float}
{\framed[height=1in,width=1.5in]{!}}

outline, summarize, itemize, review, dip into,
flip through, browse, glance into, leaf through, skim,
refine, enumerate, glean, synopsize, winnow the wheat
from the chaff and separate the sheep from the goats.
}
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to