[Tex/LaTex] jump between frames

beamer

As we all know one can jump between frames using e.g. hyperlinks.

I don't want jump to the end, but include the frames fixed. They should not be additional. E.g. I have the topic cars and make an excursion about motors coming back to cars.

When I added the intermediate "motor" part, I had the problems, that my table of content showed the "car" section twice and the tree view too.

It was possible to fix the ToC with \section*{car} but not the 'tree view'.

Here an example (what I want to modify are the words in the top row):

\documentclass{beamer}

%using my default theme
\usepackage{beamerthemesplit}
\usetheme{Dresden}
\setbeamertemplate{footline}[frame number]
\usecolortheme{beaver}
\usefonttheme{professionalfonts}
\useoutertheme{shadow}
\begin{document}

\begin{frame}
    \frametitle{Overview}
    \tableofcontents
\end{frame}

\section{cars}
\begin{frame}
    \frametitle{there are so many different cars}
    \begin{itemize}
        \item Transmissions
        \item Motors
        \item Drive shafts
     \end{itemize}
\end{frame}

\section{motors}
\begin{frame}
    \frametitle{and motors are also interesting}
    \begin{itemize}
        \item big motor
        \item small motor
        \item tiny motor
     \end{itemize}
\end{frame}

\section*{cars}
\begin{frame}
    \frametitle{coming back to cars}
    \begin{itemize}
        \item Cars need fuel
        \item Cars are expensive
        \item Cars bring us from a to be
     \end{itemize}
\end{frame}
\end{document}

slide1
slide2
slide3
slide4

Is there another command that determines the next frame and forces beamer to "reorder" the document, or jump to the end?

Maybe it is possible to reset the table of content counter?

Thank you for your help,
Greets

Best Answer

As you suggested, you can succeed with some counter manipulation. I added a new section 'traffic jam', so that you can see that everything is working as expected.

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

Here is your modified code, leading to the results shown above:

\documentclass{beamer}

%using my default theme
\usepackage{beamerthemesplit}
\usetheme{Dresden}
\setbeamertemplate{footline}[frame number]
\usecolortheme{beaver}
\usefonttheme{professionalfonts}
\useoutertheme{shadow}

\begin{document}

\begin{frame}
    \frametitle{Overview}
    \tableofcontents
\end{frame}

\section{cars}
% Save the section counter in the cars section
\newcounter{carscounter}\setcounter{carscounter}{\thesection}
\begin{frame}
    \frametitle{there are so many different cars}
    \begin{itemize}
        \item Transmissions
        \item Motors
        \item Drive shafts
     \end{itemize}
\end{frame}

\section{motors}
% Save the section counter in the motors section
\newcounter{motorscounter}\setcounter{motorscounter}{\thesection}
\begin{frame}
    \frametitle{and motors are also interesting}
    \begin{itemize}
        \item big motor
        \item small motor
        \item tiny motor
     \end{itemize}
\end{frame}

\begin{frame}
% Set section counter to the proviously stored value
\setcounter{section}{\value{carscounter}}
    \frametitle{coming back to cars}
    \begin{itemize}
        \item Cars need fuel
        \item Cars are expensive
        \item Cars bring us from a to be
     \end{itemize}
\end{frame}
\begin{frame}
    \frametitle{further things}
    \begin{itemize}
        \item Some more car things
     \end{itemize}
\end{frame}

% Before adding the next section, we have to set the counter accordingly, so that everything is in correct order again (otherwise the top view panel will go crazy)
\setcounter{section}{\value{motorscounter}}
\section{traffic jams}
\begin{frame}
    \frametitle{one major problem of cars are traffic jams}
    \begin{itemize}
        \item long traffic jams
        \item short traffic jams
        \item and, of course, boring ones
     \end{itemize}
\end{frame}


\end{document}
Related Question