Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question

1 Answer 1

up vote 6 down vote accepted

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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