# Fine tuning of a wrapfigure?

When no other solution seems available, fine tuning by hand may be helpful. Lately, I was trying to raise the content of a wrapfigure because it was eating the bottom margin. I had something like:

\begin{wrapfigure}{r}{6cm}\centering
\raisebox{20pt}{
\begin{minipage}[t]{5.8cm}
figure content
\caption
\end{minipage}}
\end{wrapfigure}


but it does not work. Would you have a solution? We have to make sure that the wrapfigure environment does not know that something is moved inside. (It makes me think of the \mathclap command from the mathtools package).

-
I am using XeLatex with Chinese fonts, but I believe the problem is the same in other system: \usepackage[BoldFont...]{xeCJK} ... ... \section{xxxxx} \begin{wrapfigure}{O}{0.2\textwidth} \begin{center} \includegraphics[scale=1, angle=0]{s} \end{center} \end{wrapfigure} ......(all characters become BoldFont instead of the normal font) ..... However as I move the warpfigure to the second paragraph, i.e. \section is separated from warpfigure, the problem disappeared. Could anyone tell me how to correct this issue? Thanks –  user2127 Jan 9 '11 at 10:55
@JLT: If you have a question, then you should ask a new question. So it would be best to make a new post and link to this one. –  Hendrik Vogt Jan 9 '11 at 10:55
Just a note to confirm Hendrik's comment, this ought to be reposted as a fresh question for you to get the best chance of it being answered. –  Loop Space Jan 9 '11 at 10:55

Instead of a \raisebox you can shift the content up by adding some negative vertical space before the figure content, and then compensate for that afterwards. For example compare

\documentclass{article}
\usepackage{lipsum}
\usepackage{wrapfig}
\begin{document}

\begin{wrapfigure}{r}{6cm}\centering
\vspace{-12pt}
\fbox{figure content}
\vspace{12pt}
\caption{Lolcats}
\end{wrapfigure}
\lipsum[3]

\begin{wrapfigure}{r}{6cm}\centering
\fbox{figure content}
\caption{Lolcats}
\end{wrapfigure}
\lipsum[3]

\end{document}

-
thanks, it seems to be a solution. –  pluton Oct 5 '10 at 13:28