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 would like to have the table of contents slide displayed at every \section{} however, along with the particular section highlighted (as usual in beamer using \AtBeginSection[]{...}), I would like to display an image to its right too.

Can anyone tell me how this could be done. Here is a tex file which will achieve the same but I have done it manually and not with the \AtBeginSection[]{...}` command. Hence I cannot get the other sections to dim out in the usual beamer style. I hope the problem is clear.

\documentclass[blue,aspectratio=1610]{beamer}

\begin{document}
\section{New section}
\begin{frame}{Table of contents}
\begin{enumerate}
\item New Section
\item \textcolor{gray}{New New Section}
\item \textcolor{gray}{New New New Section}
\end{enumerate}

\vspace{0.3cm}

\hfill \includegraphics[scale=0.1]{pic1.png}
\end{frame}
\begin{frame}{some details about this section}
\end{frame}
\begin{frame}{some more details about this section}
\end{frame}
\section{New New section}
\begin{frame}{Table of contents}
\begin{enumerate}
\item \textcolor{gray}{New Section}
\item New New Section
\item \textcolor{gray}{New New New Section}
\end{enumerate}

\vspace{0.3cm}

\hfill \includegraphics[scale=0.1]{pic2.png}
\end{frame}
\begin{frame}{some details about this section}
\end{frame}
\begin{frame}{some more details about this section}
\end{frame}
\section{New New New section}
\begin{frame}{Table of contents}
\begin{enumerate}
\item \textcolor{gray}{New Section}
\item \textcolor{gray}{New New Section}
\item New New New Section
\end{enumerate}

\vspace{0.3cm}

\hfill \includegraphics[scale=0.3]{pic3.png}
\end{frame}
\begin{frame}{some details about this section}
\end{frame}
\begin{frame}{some more details about this section}
\end{frame}
\end{document}

Here is how the pages of the Pdf file look Sorry for the small font, but hope you get the idea.

share|improve this question
add comment

2 Answers

Here, \insertsectionbumber or \thesection are useful:

\documentclass{beamer}

\AtBeginSection[]{
  \begin{frame}<beamer>
    \begin{columns}
      \column{.5\linewidth}

      \tableofcontents[currentsection]

      \column{.5\linewidth}

      \includegraphics{pic\insertsectionnumber}
    \end{columns}
  \end{frame}
}

\begin{document}

\section{A}
\begin{frame}
  \frametitle{A}
\end{frame}

\section{B}
\begin{frame}
  \frametitle{B}
\end{frame}

\section{C}
\begin{frame}
  \frametitle{C}
\end{frame}

\end{document}
share|improve this answer
add comment

You can use an if statement to control the display of images at given sections.

Code

\documentclass[blue,aspectratio=1610]{beamer}
\usepackage{mwe} % provides images used in this example

\begin{document}
\AtBeginSection[] % Do nothing for \section*
{
  \begin{frame}{Table of contents}
  \tableofcontents[currentsection]

  \hfill
  \ifnum \thesection=1
  \includegraphics[scale=0.3]{image-a}
  \else
  \ifnum \thesection=2
  \includegraphics[scale=0.3]{image-b}
  \else
  \ifnum \thesection=3
  \includegraphics[scale=0.3]{image-c}
  \fi\fi\fi

  \end{frame}
}

\section{New section}

\begin{frame}{some details about this section}
\end{frame}
\begin{frame}{some more details about this section}
\end{frame}

\section{New New section}

\begin{frame}{some details about this section}
\end{frame}
\begin{frame}{some more details about this section}
\end{frame}

\section{New New New section}

\begin{frame}{some details about this section}
\end{frame}
\begin{frame}{some more details about this section}
\end{frame}
\end{document}

Output

enter image description here

share|improve this answer
add comment

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.