7

I want to use wrapfig to insert a figure which sticks out into the margin. This does not work, it causes the figure to appear at the end of the text:

{\addtolength\textwidth{1in}
\begin{wrapfigure}{r}{0.5\textwidth}
  \begin{center}
    \includegraphics[width=0.48\textwidth]{funcimmet1.pdf}
  \end{center}
  \caption{Graph of $2{{\sin }^{2}}x-1$}
\end{wrapfigure}
}

This makes the picture bigger but it doesn't stick out, it eats up more space to the left:

\addtolength\textwidth{1in}
\begin{wrapfigure}{r}{0.5\textwidth}
  \begin{center}
    \includegraphics[width=0.48\textwidth]{funcimmet1.pdf}
  \end{center}
  \caption{Graph of $2{{\sin }^{2}}x-1$}
\end{wrapfigure}
\addtolength\textwidth{-1in}

How can I do this?

1
  • 2
    You probably don't want to use \begin{center} ... \end{center}. That adds extra vertical spacing. Inside figures and tables, you want \centering.
    – TH.
    Sep 18, 2010 at 1:06

2 Answers 2

5

The wrapfigure has an optional parameter for this. Use the full definition

[number of narrow lines] {placement} [overhang] {width of figure}

Placement is one of   r, l, i, o, R, L, I, O,  for right, left,

The figure sticks into the margin by `overhang', if given.
1

You could use \makebox to put the picture into a smaller box like in this blog post, such as

\makebox[smaller width]{\includegraphics[bigger width]{funcimmet1}}
2
  • 1
    That's going to center the graphic in the smaller box which would have the effect of extending it into the text. \hbox to smaller width{\includegraphics[bigger width]{funcimmet1}\hss} or \makebox[smaller width][l]{\includegraphics[bigger width]{funcimmet1}} would cause the box to extend to the right.
    – TH.
    Sep 18, 2010 at 1:04
  • Correct, I just did not mention the optional alignment argument.
    – Stefan Kottwitz
    Sep 18, 2010 at 21:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .