I have a LaTeX document with an image in it. There is a section, four subsections, the latter 3 having just some text, and the first having a description environment with some stuff.
I want to have an image on the top right and have everything text wrap nicely around it.
The wrapfig package takes an entire column away (so text below the images gets wrapped to a fixed width even without the image there) and pushes the description environment past the left margin, and the floatflt package puts the image exactly where I want it, but no text gets wrapped.
I have the floatflt/wrapfig environment above the initial section (I get the best image placement this way) but moving it to various other places doesn't work either.
Are their any other ways to wrap the text around the image?
Some examples of fail can be seen here: http://drop.io/a3dbxte
you could use \parbox (or a minipage environment) for both the text and the picture. \parbox (minipage too) understands options for vertical alignment. Between the text box and the picture use \hfill to achieve right alignment.
We can wrap text in a LaTeX table by using the p specification in the tabular environment. Then, we'll be able to break lines as per the specified width of the columns.
Position a picture in the center of a document You can add a picture in the center of a document and have the text flow around it. Select a picture. Go to Picture Format or Format > Wrap Text > Square.
wrapfig is the best i've found, however, you need to put the wrapfig code above the paragraph you want it to wrap into:
\usepackage{wrapfig}
\begin{wrapfigure} \includegraphics... \end{wrapfigure}
This is the paragraph of text you want the figure to "wrap" into... etc etc.
If you put the wrapfig code under the paragraph you want to wrap into, it will obviously wrap into the next paragraph, producing an undesirable result.
you also mention a 'column' which makes me think you are using a multi-column layout, which probably isn't going to work that well with wrapfig.
When asking a specific question about latex, you should include a minimal working example, that is, enough of your preamble and body code/text so that people can recreate your problem.
EDIT: Ah. i see what you mean. wrapfig can take an optional line height argument:
\begin{wrapfigure}[line-height]{r}{width}
where line-height is a positive integer.
your solution would probably look like this:
\begin{wrapfigure}[10]{r}{2.5in}
\centering
\includegraphics[width=2in]{governator.jpg}
\end{wrapfigure}
EDIT #2: wrapfig/floatflt + enumerate, itemize = not working. the packages are incompatible with one another. For a "wrapfigure" effect with an environment, i.e., enumerate, itemize, etc etc., You should put the environment in a minipage and the graphic in in a minipage, then set the two minipages next to each other. something to the effect of (i put them in a tabular environment as well):
\begin{tabular}{l l}
\begin{minipage}{0.5\textwidth}
\begin{enumerate}
\item
\end{enumerate}
\end{minipage}
&
\begin{minipage}{0.5\textwidth}
\includegraphics...
\end{minipage}
\end{tabular}
I had the exact same problem. Wrapfig expects a paragraph below it, so give it an empty one!
\begin{wrapfigure}{I}{0.5\textwidth}
\includegraphics[...]{...}
\end{wrapfigure}
\paragraph{}
\vspace*{-\parskip}
This gives an empty paragraph to make wrapfig comfortable, and doesn't alter your content at all (I added a negative vspace* to account for the \parskip of the paragraph).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With