I have the following code to show a picture around by some textes.
\documentclass{article}
\usepackage{wrapfig}
\usepackage{lipsum}
\begin{document}
\begin{wrapfigure}{r}{4cm}
\begin{center}
\includegraphics[width=0.2\textwidth]{mickey}
\end{center}
\end{wrapfigure}
\lipsum[1-4]
\end{document}
The problem is that I want to put the photo on (exact) top right of the page. So I want to remove the blank marge above the photo and on the right of the photo. Also I feel that the blank marge below the photo is too much.
Does anyone know how to amend the code?
Best Answer
Don't use the
center
environment. Use\centering
instead.To adjust the horizontal spacing, you need to adjust the length
\columnsep
(see section 2 Sizing and optional overhang of thewrapfig
documentation).If the vertical spacing at the bottom doesn't suit your needs, then you could use the
adjustbox
package to visually trim the content, or reduce the image's height from TeX's point of view:Alternatively, specify the number of rows to re-align