1

I'm new to latex. I'm building a presentation slides, and I need to show some images only when clicking (or pressing right arrow)

I've tried both of the following ways mentioned in other questions, but none worked for me:

First: Inserting numbering in includegraphices inside of <>

\begin{frame}{SomeFrame}
\begin{figure}[h!]
\begin{center}
\includegraphics<0->[scale=.5]{SomeImage.png}
\end{center}
\caption{SomeCaption}
\label{fig:SomeImage}
\end{figure}
\end{frame}

Second: is using \onslide<1->{}

\begin{frame}{SomeFrame}
\onslide<1->{
\begin{figure}[h!]
\begin{center}
\includegraphics<0->[scale=.5]{SomeImage.png}
\end{center}
\caption{SomeCaption}
\label{fig:SomeImage}
\end{figure}
}
\end{frame}

In both ways, I've tried once with <0-> and <1->. However, pictures are there without me clicking. What should I do?

  • Are you using Beamer to make your slides? (I edited the tags under the assumption that the answer is yes. Feel free to clarify/edit if it is not correct.) – Willie Wong Jul 26 '16 at 19:18
  • 2
    Try \includegraphics<2->[scale=.5]{SomeImage}: first overlay without image and second overlay with your image. – Paul Gaborit Jul 26 '16 at 19:40
  • 1
    Some offtopic comments: Don't use begin{center} inside a figure, use \centering instead. And since beamer does not use floats, you do not need floating specifier like [h!]. – user36296 Jul 26 '16 at 19:45
  • @WillieWong, Yes I'm using beamer. – AhmedWas Jul 27 '16 at 8:45
  • @AhmedWas And does Paul Gaborits suggestion solve your problem? – user36296 Jul 27 '16 at 19:54
1

If you want the image to appear on the second slide of the frame, use

\includegraphics<2->[scale=.5]{SomeImage}

[turning Paul Gaborits comment into an CW answer; if you want to answer yourself, feel free to do so, I will delete this answer.]

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.