# Wrap around a logo at bottom right of page

I have a square logo placed on the bottom right of every page (placed using absolute positioning and tikz) and it's fairly big. I want it so that text flows / wraps around the logo - is it possible to this?

For example, I want to have something like the following where (a is text and l is logo)

+--------------+
| aaaaaaaaaaaa |
| aaaaaaaaaaaa |
| aaaaaaaaaaaa |
| aaaaa +------+
| aaaaa | llll |
| aaaaa | llll |
+------ +------+


Edit, here is an example of what I have with overlapping text and logo:

\documentclass{article}
\usepackage[letterpaper,margin=1in]{geometry}
\usepackage{tikz}
\usepackage{lipsum}

\begin{document}

\begin{tikzpicture}[remember picture,overlay]
\node [shift={(-2 in, 2 in)}] at (current page.south east) {
\rule{2in}{2in}
};
\end{tikzpicture}

\lipsum[1-8]

\end{document}


This generates the following document

You will notice that the block on the bottom right overwrites some of the text and I would like to avoid that by having it wrap around it. The logo is large, so I do not want it taking up the footer space.

-
It's not clear which class and packeges you're using. Can you provide a minimal example? –  Marc van Dongen Jan 24 '12 at 23:41
@MarcvanDongen Included an example of what I'm currently doing and the problem I'm encountering. –  mifrai Jan 25 '12 at 0:17
There was a fairly recent question on doing exactly this (ad it even had a bounty), but I am not sure it was solved (but can't seem to locate it either). –  Peter Grill Jan 25 '12 at 0:30
@PeterGrill Ah, thanks for the tip. I think I found the question you're talking about - but I have yet to understand it. But I'm looking into it now. –  mifrai Jan 25 '12 at 0:44
@mifrai: Yep that is exactly the one. I still think that one should be able to build something similar to [the shapepar package](http://www.ctan.org/pkg/shapepar), with which you can specify the shape of a paragraph, and be able to specify the shape of the text area of each page. –  Peter Grill Jan 25 '12 at 1:03

You can use \parshape to specify an irregular paragraph shape to which the subsequent paragraph should adhere to. This only holds for the subsequent paragraph, and should be redefined for the following one. This is viable since the image is small enough that so that at most two paragraphs would probably be "affected" by the addition of the logo.

Since \parshape applies to a specific paragraph, and paragraphs depend on the document contents, it would be very difficult to automate this procedure. Remember that you are producing the logo as a tikz overlay, so TeX would have no idea that there's "something" at the time of typesetting. However, on a manual basis, there is no problem in wrapping around the logo.

Here is an MWE:

\documentclass{article}
\usepackage[letterpaper,margin=1in]{geometry}% http://ctan.org/pkg/geometry
\usepackage{tikz}% http://ctan.org/pkg/pgf
\usepackage{lipsum}% http://ctan.org/pkg/lipsum

\begin{document}

\begin{tikzpicture}[remember picture,overlay]
\node [shift={(-2 in, 2 in)}] at (current page.south east) {
\rule{2in}{2in}
};
\end{tikzpicture}

\lipsum[1-6]

% Special paragraph formatting
\parshape=2 % 2 lines will be affected
0pt \linewidth % One regular line
0pt \dimexpr\linewidth-2in-1ex\relax % one (and remaining paragraph) reduced line
\lipsum[7]

% Special paragraph formatting
\parshape=5 % 5 lines will be affected
0pt \dimexpr\linewidth-2in-1ex\relax % Four reduced lines
0pt \dimexpr\linewidth-2in-1ex\relax
0pt \dimexpr\linewidth-2in-1ex\relax
0pt \dimexpr\linewidth-2in-1ex\relax
0pt \linewidth % one (and remaining paragraph) at regular width
\lipsum[8]

\end{document}


\parshape=<n> <i1> <l1> <i2> <l2> ... sets the line indents and line widths for the following <n> lines in a paragraph. If the paragraph continues past <n> lines, it uses the last set <i> <l> pair.

• For the first paragraph with adjusted formatting, two lines are formatted (\parshape=2): First line has indent 0pt and line width \linewidth while the second and subsequent lines have indent 0pt and line width \linewidth-2in-1ex, which leaves a 1ex gap between the logo boundary and the text.

• For the second paragraph that requires adjusted formatting, five lines are formatted (\parshape=5): Four lines have indent 0pt and line width \linewidth-2in-1ex, and the last and subsequent lines have indent 0pt and line width \linewidth, restoring the traditional paragraph shape.

-
Great Answer. Is there a way to achieve that at the bottom of every page? –  schmendrich Jan 25 '12 at 6:55
@schmendrich: Yes. However, as mentioned, the document and paragraph layout could differ from page to page, requiring a different set of \parshape definitions for each, which I don't know how to automate. Best would be to leave the wrapping for during final production, and manually insert the modification. –  Werner Jan 25 '12 at 6:59

It is possible that the wrapfig package may be a solution for what you need.

-