[texhax] positioning of floats

Tom Schneider toms at ncifcrf.gov
Sun Jan 4 14:22:48 CET 2009


> I was hoping that it might do things like:
> fig 3, 1, 5, 4, 13, ......

Seems to me that you could use your powerful visual brain to do this
by hand at the end to create a final version.  I would put the figure
calls one per line and then look at the results.  Then I would swap
lines to move figures to fit the pages.

A couple automation tricks could make this quick.  First, I work in
vim so switching two lines of text is merely the three letters 'ddp'. 
('dd' deletes a line, stores it in the buffer, p puts it in the
current location from the buffer.) By moving around first one could
quickly arrange things: 'dd2jp' to move a figure 3 down and 'dd4kp' to
move 3 up.

The other thing is to stay inside the editor and keep one's fingers on
the keyboard without using your mouse.  I invented the atchange
program for that (map ',' to do a ':w[return]' and
http://www.ccrnp.ncifcrf.gov/~toms/atchange.html to trigger the latex
run displayed with xdvi) but I'm sure there are environments that
would work took.

Finally, it may be possible to use something like a poster envirnoment
to watch all of the pages in a tiny format simultaneously.  Then you
would easily see which chunk to move around.

I suppose that if you know the sizes of the bits and the sizes of
pages, you could write some smart code to look for solutions, but I
suspect that since there are n! solutions the problem is exponential
in n (ie NP-complete if I understand the notation).


  Dr. Thomas D. Schneider
  National Institutes of Health
  National Cancer Institute
  Center for Cancer Research Nanobiology Program
  Molecular Information Theory Group
  Frederick, Maryland  21702-1201
  toms at ncifcrf.gov
  permanent email: toms at alum.mit.edu

More information about the texhax mailing list