7

The MWE is

\documentclass[14pt]{beamer}% http://ctan.org/pkg/beamer
\let\Tiny\tiny% http://tex.stackexchange.com/q/58087/5764
\usetheme{Berkeley}
\makeatletter
\beamer@headheight=1.5\baselineskip
\makeatother
\setbeamercolor{normal text}{bg=black!10}
\begin{document}
\title[Title]{My title}
\subtitle{Subtitle}
\author{Author}
\institute[Institute]{My institute}
\date[Date]{My date}
\logo{\color{blue!50}\scalebox{2}{\TeX}} % you can % it
\begin{frame}
  \titlepage
\end{frame}

\section{A section}
\subsection{A subsection}
\begin{frame}
  \frametitle{Frame title}
  \framesubtitle{frame subtitle}

     \begin{center}
       \begin{enumerate}
        \item A1
        \item A1
        \begin{itemize}
        \item A1
        \item A1
        \item A1
        \end{itemize}
       \end{enumerate}
     \end{center}


\end{frame}

\end{document} 

I want to put the text into the center as shown on the screenshot below. I tried using a center environment, but that didn't produce the expected output. Then I tried using vspace, but I need to adjust again and again. Is there any package I can use for this?

enter image description here

jub0bs
  • 58,916
  • So you still want the list to stack vertically (one element below the other)... you just want the entire list to be centered horizontally, right? – Werner Oct 31 '13 at 02:49
  • Yes, @Werner, I want the entire list to be centered horizontally – ytyyutianyun Oct 31 '13 at 03:39

1 Answers1

5

There's no easy way to automatically centre a list, since the degree of centring required will depend on the length of the longest line in the list. However, it's not to difficult to set one value per frame that you need to do this on, as in the following example:

\documentclass{beamer}
\usetheme{Berkeley}

\begin{document}
\begin{frame}
\setlength{\leftmargini}{12em}
  \frametitle{Frame title}
  \framesubtitle{frame subtitle}
       \begin{enumerate}
        \item A1
        \item A1
        \begin{itemize}
        \item A1
        \item A1
        \item A1
        \end{itemize}
       \end{enumerate}
\end{frame}

\end{document} 

output of code

Alan Munn
  • 218,180
  • Thank you, but if there are some figures. Does the figure also shift? – ytyyutianyun Nov 24 '13 at 04:44
  • @ytyyutianyun I'm not sure what you mean. My example shows how you can shift the left margin of the top level list inwards. Whatever content is in the items will also shift. – Alan Munn Nov 24 '13 at 04:46
  • Thank you for your reply, and what I mean is: In one frame, there is a figure and an item. I only want to shift the item, can I do this? thank you. – ytyyutianyun Nov 24 '13 at 07:37
  • As long as the image isn't inside the list environment, it will be aligned on the left margin. – Alan Munn Nov 24 '13 at 07:52