Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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).

share|improve this question
    
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

1 Answer 1

up vote 8 down vote accepted

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}
share|improve this answer
    
thanks, it seems to be a solution. –  pluton Oct 5 '10 at 13:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.