1

I am preparing a beamer presentation and I used the ragged2e package to justify the text in my slides (I justified the itemize environment). However, this does not allow me anymore to center a figure. Any way to fix this?

\documentclass[10.5pt]{beamer}
\usepackage{beamerthemesplit}
\usetheme{Copenhagen}
\setbeamercovered{transparent}
\usepackage{ragged2e}
\let\olditem=\item%
\renewcommand{\item}{\olditem \justifying}
\begin{document}
\begin{frame} 
\begin{itemize}
\item blablabla
\begin{center}
\begin{figure}
\includegraphics{.jpg} 
\end{figure}   
\end{center}         
\end{itemize}
\end{frame}
\end{document}
3

Use \centering inside the figure environment.

\documentclass[10.5pt]{beamer}
\usepackage{beamerthemesplit}
\usetheme{Copenhagen}
\setbeamercovered{transparent}
\usepackage{ragged2e}
\let\olditem=\item%
\renewcommand{\item}{\olditem \justifying}
\begin{document}
\begin{frame}
\begin{itemize}
\item blablabla
\begin{figure}
\centering
\includegraphics[width=2cm]{example-image}
\end{figure}
\end{itemize}
\end{frame}
\end{document}

enter image description here

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.