# Absolute positioning of wrapfig

In Microsoft Word, it is common to create a floating text box, separate from the normal body text, that can be placed anywhere on the page. The body text will then wrap around this text box so everything is readable.

In (La)TeX, the `wrapfigure` package allows figures to be created that the body text will wrap around, but they may only be placed at the beginning of paragraphs and on the edges of the page. The package doesn't seem to allow absolute placement independent of the body text and margins. Using the absolute-placement package `textpos` in conjunction with `wrapfig` will simply break the wrapping.

So how can I have the best of both worlds—text wrapping and absolute placement (at the very least, vertical placement)?

Something like the diagram in this question, or this image from Word.

(Edited for generality and clarity.)

-
I'm having trouble visualizing what it is you want. Is there any chance you could draw a picture or an ASCII art diagram or something? –  Antal S-Z Oct 18 '10 at 17:36
@Antal - added. –  Andrew Arnold Oct 18 '10 at 17:42
I see, and then the idea is that on each page, the figure occurs, say, 2.5" down from the top? –  Antal S-Z Oct 18 '10 at 17:43
@Antal - That is correct. –  Andrew Arnold Oct 18 '10 at 17:44
I think you may be forced to adjust each figure individually. –  dank Oct 19 '10 at 10:47
show 1 more comment

Placing a picture somewhere on the page is easy. The problem is the wrapping. It is easy to say "indent line 5-10 of the next paragraph". But due to the asynchronic page builder there is in tex no way (unless your document is very simple) to say "indent line 5-10 of the next page". Perhaps it is possible with luatex. But with pdflatex you will have to do it manually. See also on CTAN wrapfig/multiple-span.txt.

-
multiple-span.txt (putting this here for my own purposes) –  Andrew Arnold Nov 16 '10 at 17:26
So maybe this is another instance where TeX being Turing complete is of no help? Having to follow the instructions in multiple-span.txt is a real nuisance. –  Hendrik Vogt Nov 16 '10 at 18:40
@Hendrik — To do this in TeX would require you to hook into `\everypar` from the very beginning of the text, measure each paragraph before it's set, and keep track of where you are on the page at the end of every paragraph. (Perhaps using the output routine, but not necessarily; see vwcol for an example of all this.) Possible, and easier if you can assume paragraph text only, but this hasn't been implemented in any format or package that I'm aware of. Messy business indeed. –  Will Robertson Nov 17 '10 at 3:37
I would suggest for you to dive into `tikz` manual. If you can use `pdflatex` and produce pdf directly, you can do absolute page placements with tikz, and later just do the usual `includegraphics` ;-)