2

There is the same question here for the text, it works fine, but it doesn't work for \includgraphics, how to use the same for the figure?

\documentclass{beamer}
\usepackage{lipsum}
\begin{document}
\begin{frame}
\tiny   \lipsum[1-1]

\centering{\includegraphics[width=.3\textwidth]{example-image}}

\lipsum[1-1] \end{frame}

\begin{frame} \tiny \lipsum[1-1]

\begingroup\centering\includegraphics[width=.3\textwidth]{example-image}\endgroup

\lipsum[1-1]

\end{frame} \end{document}

  • 1
    there is nothing special about \includegraphics you would center an image in exactly the same way as you would center an X – David Carlisle Mar 24 '24 at 12:33

1 Answers1

4

You want to end the paragraph before switching back to non-centred text:

\documentclass{beamer}
\usepackage{lipsum}
\begin{document}
\begin{frame}
\tiny   \lipsum[1-1]

\centering\includegraphics[width=.3\textwidth]{example-image}

\lipsum[1-1] \end{frame}

\begin{frame} \tiny \lipsum[1-1]

\begingroup\centering\includegraphics[width=.3\textwidth]{example-image}\par\endgroup

\lipsum[1-1]

\end{frame} \end{document}

enter image description here