2

I would like to squeeze the table of Contents in beamer from the top. Also, I would like to increase the horizontal distance for subtitles as the following picture

here

This is my code. Please suggest simple codes because I'm an absolute beginner in beamer

\documentclass{beamer}

\usepackage{beamerthemesplit}

\setbeamertemplate{section in toc}[sections numbered]
\setbeamertemplate{subsection in toc}[subsections numbered]


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

\frame{\titlepage}

\begin{frame}
    \frametitle{Contents:}
    \begin{minipage}[t][0.5cm]{\textwidth}
    \tableofcontents
    \end{minipage}
\end{frame}

%--------------------------------------------------------
%------------------/ Section 1 /-------------------------
\section{Abstract}
\begin{frame}
    \frametitle{\textbf{1. Abstract:}}
    The primary work of my research is 
\end{frame}

%______________________________________________________
\subsection{ssssss}
\begin{frame}
    \frametitle{\textbf{1.2. ssssssss}}
    ssssssssssssssssssssssss
\end{frame}

%______________________________________________________
\subsection{fffffff}
\begin{frame}
    \frametitle{\textbf{1.3. ffffff}}
    ffffffffffffffffffffffffffffff
\end{frame}

%--------------------------------------------------------
%------------------/ Section 2 /-------------------------
\section{Introduction}
\begin{frame}
    \frametitle{\textbf{2. Introduction:}}
\end{frame}


\end{document}
4

To increase the indent for subsection entries, you can use

\addtobeamertemplate{subsection in toc}{\parshape 1 2em \dimexpr\linewidth-2em\relax}{}

(change both occurrences of 2em to the desired length). To get the ToC at the top, use the t option for the frame:

\begin{frame}[t]
    \frametitle{Contents:}
    \begin{minipage}[t][0.5cm]{\textwidth}
    \tableofcontents
    \end{minipage}
\end{frame}

The code:

\documentclass{beamer}

\usepackage{beamerthemesplit}

\setbeamertemplate{section in toc}[sections numbered]
\setbeamertemplate{subsection in toc}[subsections numbered]

\addtobeamertemplate{subsection in toc}{\parshape 1 2em \dimexpr\linewidth-2em\relax}{}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

\frame{\titlepage}

\begin{frame}[t]
    \frametitle{Contents:}
    \begin{minipage}[t][0.5cm]{\textwidth}
    \tableofcontents
    \end{minipage}
\end{frame}

%--------------------------------------------------------
%------------------/ Section 1 /-------------------------
\section{Abstract}
\begin{frame}
    \frametitle{\textbf{1. Abstract:}}
    The primary work of my research is 
\end{frame}

%______________________________________________________
\subsection{ssssss}
\begin{frame}
    \frametitle{\textbf{1.2. ssssssss}}
    ssssssssssssssssssssssss
\end{frame}

%______________________________________________________
\subsection{fffffff}
\begin{frame}
    \frametitle{\textbf{1.3. ffffff}}
    ffffffffffffffffffffffffffffff
\end{frame}

%--------------------------------------------------------
%------------------/ Section 2 /-------------------------
\section{Introduction}
\begin{frame}
    \frametitle{\textbf{2. Introduction:}}
\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.