8

I want to add a graphic plot to my slide, but if I do it with wrapfigure, I get no error massages, but the plot simply does not appear?

Code of the TeX file, which uses beamerdefs.sty, I have also added the wrapfig package:

\begin{frame}{EWMA Plot}
\begin{wrapfigure}{r}{5cm}
  \begin{center}
    \includegraphics[scale=0.4]{ewma2.jpg}
  \end{center}
  \caption{EWMA}
\end{wrapfigure}
\end{frame}

As I said, no error message, it just does not appear, if I do it without wrapfigure the graphic appears? Can anyone help?

8

You can use the cutwin package instead of wrapfig; a little example showing also the settings to provide a caption consistent with regular captions:

\documentclass{beamer}
\usepackage{cutwin}
\usepackage{lipsum}

\begin{document}

\begin{frame}
\renewcommand\windowpagestuff{%
  \includegraphics[height=4cm, width=3cm]{ctanlion}
  \par{\usebeamercolor[fg]{caption name}%
  \usebeamerfont*{caption name}\figurename%
  \usebeamertemplate{caption label separator}}%
  \raggedright%
  \usebeamerfont*{caption}%
  A figure with wrapping text.%
}
\opencutleft
\vfill

\begin{cutout}{0}{0pt}{.65\linewidth}{13}
\lipsum[1]
\end{cutout}
\end{frame}

\end{document}

enter image description here

CTAN lion drawing by Duane Bibby.

  • seems nice! But text will not take into account the beamer themes upper bands, lower bands etc? Try adding \usetheme{Berkeley} to your example... any idea how to fix that? Thanks! – Matifou Dec 12 '18 at 0:30
0

I had the same problem. It seems that the includegraphics command in the wrapfigure environment comes out blank if it is the first includegraphics of the document.

You can work around it by creating a blank image (e.g. blank.pdf) and including it before the wrapfigure environment. This works for me:

\includegraphics[width=0pt]{blank.pdf}

\begin{wrapfigure}{r}{0.5\textwidth}
\centering
\includegraphics[width=0.48\textwidth]{Figure_Clinical_Correlation.pdf}
\label{clincorr}
\end{wrapfigure}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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