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 have problems to put a picture right to the table of contents. This is how it should look like: enter image description here

I have two MWE's, becuase I already tried two different approaches. (All the empty frames are needed to create the TOC) The first one works with columns:

\documentclass{beamer}
\begin{document}
\begin{frame}
    \begin{columns}
        \column{7cm}
            \tableofcontents
        \column{3cm}
            \includegraphics{picture.png}
    \end{columns}
\end{frame}
\section{A section with a name}
\begin{frame}
\end{frame}
\section{A longer section name, ....................}
\begin{frame}
\end{frame}
\section{another section}
\begin{frame}
\end{frame}
\section{a medium long section name}
\begin{frame}
\end{frame}
\end{document}

In this approach the vspace between the items in the TOC disappears.

This is my second approach:

\documentclass{beamer}
\begin{document}
\begin{frame}
    \hspace{7cm}\includegraphics{picture.png}
    \tableofcontents
\end{frame}
\section{A section with a name}
\begin{frame}
\end{frame}
\section{A longer section name, ....................}
\begin{frame}
\end{frame}
\section{another section}
\begin{frame}
\end{frame}
\section{a medium long section name}
\begin{frame}
\end{frame}
\end{document}

People more experienced than me already know what happens before compiling. The TOC is shifted down.

I already thought about using this solution: Backround in TOC with beamer But that wouldn't be a nice solution, becauase I would have to create a whole background image, just to insert one little picture.

There must be a better solution. Is here anyone who knows it?

share|improve this question
add comment

3 Answers 3

up vote 4 down vote accepted

How about using minipages:

\documentclass{beamer}
\begin{document}
\begin{frame}
\begin{minipage}[t][0.6\textheight]{0.6\textwidth}
 \vspace{0pt} 
  \tableofcontents
\end{minipage}
\begin{minipage}[t]{0.35\textwidth} 
 \vspace{0pt}  
 \includegraphics[width=.9\textwidth]{picture.jpg}
\end{minipage}
\end{frame}
\section{A section with a name}
\begin{frame}
\end{frame}
\section{A longer section name, ....................}
\begin{frame}
\end{frame}
\section{another section}
\begin{frame}
\end{frame}
\section{a medium long section name}
\begin{frame}
\end{frame}
\end{document}

This is how it will look:

share|improve this answer
    
Sorry, but this way I run into the same problem as with columns. The space between the elements of the TOC are decreased. –  Dave Jan 24 '13 at 14:21
    
You can specify the height of the minipage too: \begin{minipage}[t][0.6\textheight]{0.6\textwidth}. Then the toc will populate the minipage with a regular spread of all entries. In that case then I would also recommend to put \vspace{0pt} as a first line in each minipage so that they both align on the same line. –  myrtille Jan 24 '13 at 14:37
    
I've edited the code in my reply to reflect the suggested changes. Maybe that's more what you're looking for. –  myrtille Jan 24 '13 at 14:41
    
Thank's, now it works like I wanted it :-) –  Dave Jan 24 '13 at 14:52
add comment

With the help of TikZ one could use the special node current page that, in combination with overlay allows you to achieve the target. It is necessary also to shift a bit the position because you can just access the node's anchors.

The code:

\documentclass{beamer}
\usepackage{lmodern}
\usetheme{CambridgeUS}
\usepackage{tikz}
\usepackage{mwe}% for dummy image

\begin{document}

\begin{frame}
\frametitle{Outline}
\tableofcontents
\tikz[remember picture,overlay]
 \node at ([xshift=-3.5cm,yshift=-3.5cm]current page.north east) 
  {\includegraphics[height=2cm,keepaspectratio]{example-image}};
\end{frame}

\section{Test Section One}
\begin{frame}
Contents of section one
\end{frame}

\section{Test Section Two}
\begin{frame}
Contents of section two
\end{frame}

\section{Test Section Three}
\begin{frame}
Contents of section three
\end{frame}

\end{document}

The result:

enter image description here

share|improve this answer
    
Thanks :-) Good to know how to achieve this in with TikZ. I already thought about extracting the toc as pdf, then load it with tikz and then add the real picture. But this is much smarter :-) –  Dave Jan 24 '13 at 14:54
add comment

I suggest you use the textpos package. Using the answer provided by Claudio Fiandrino

\documentclass{beamer}
\usepackage{lmodern}
\usetheme{CambridgeUS}
\usepackage{mwe}% for dummy image
\usepackage[absolute,overlay]{textpos}

\begin{document}

\begin{frame}
%
\begin{textblock*}{2cm}(10cm,2cm)
\includegraphics[width=2cm,keepaspectratio]{example-image}
\end{textblock*}
%
\frametitle{Outline}
\tableofcontents
\end{frame}

\section{Test Section One}
\begin{frame}
Contents of section one
\end{frame}
\section{Test Section Two}
\begin{frame}
Contents of section two
\end{frame}

\section{Test Section Three}
\begin{frame}
Contents of section three
\end{frame}

\end{document}

Using it, you can place anything on a slide, independently of its contets.

share|improve this answer
    
Now, that I have three working solutions, I'll try all of them by time. But the textpos package sounds very usefull. I'll remember it :-) –  Dave Jan 24 '13 at 15:02
    
i use all the time with beamer... also useful, when using textpos, is to create a grid on the slide, so you know where to place thing. You can add a grid by using \usepackage[texcoord,grid, gridunit=mm, gridcolor=red!10, subgridcolor=green!10]{eso-pic} –  joão gândara Jan 24 '13 at 15:04
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.