GeneralHow to repeat the first slide? (Beamer)

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
User avatar
cbustaam
Posts: 57
Joined: Mon Sep 01, 2008 10:17 pm

How to repeat the first slide? (Beamer)

Post by cbustaam »

Hello all,
I'm doing a presentation using beamer and I want to repeat the first slide of it. In this one is the title, authors, date and institution. The idea is to put it at the end (last slide). How can I do that?
Thanks
"Show me your .emacs and I'll tell you who you are." -- modified proverb

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

How to repeat the first slide? (Beamer)

Post by kaiserkarl13 »

How about this:

Code: Select all

\newcommand{\firstslide}{%
%%% CONTENTS OF FIRST/LAST SLIDE %%%
}

\begin{document}
\firstslide
...
\lastslide
\end{document}
User avatar
cbustaam
Posts: 57
Joined: Mon Sep 01, 2008 10:17 pm

Re: How to repeat the first slide? (Beamer)

Post by cbustaam »

Thanks kaiserkarl13. I tried your suggestion but it doesn't work.
"Show me your .emacs and I'll tell you who you are." -- modified proverb
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

How to repeat the first slide? (Beamer)

Post by frabjous »

The following works for me:

Where the first frame goes, put:

Code: Select all

\begin{frame}[label=firstframe]
  \titlepage % (Or whatever else goes here.)
\end{frame}
Then the other frames, and then, at the end:

Code: Select all

\againframe{firstframe}
For details see sec. 11.2 of the Beamer User's Guide.
User avatar
cbustaam
Posts: 57
Joined: Mon Sep 01, 2008 10:17 pm

How to repeat the first slide? (Beamer)

Post by cbustaam »

Hi frabjous,
I've seen the againframe trick, but I didn't know how to label the first slide. In the fisrt part I have:

Code: Select all

\begin{document}
\title[Shorst title]{The title}
\author[Authors]{Author 1 \and Author 2}
\date{\today}
\makebeamertitle
\end{frame}
\begin{frame}
\frametitle{Second slide}
.....
So, I don't know where label the first frame. Do you?
Thanks for your help
Bests
"Show me your .emacs and I'll tell you who you are." -- modified proverb
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

How to repeat the first slide? (Beamer)

Post by frabjous »

It looks to me that your sample code is flawed, since you have an \end{frame} without a \begin{frame} before it. Even your first frame should have a \begin{frame} command.

Also, \makebeamertitle demands an argument. Use \titlepage instead.

Provided you DO have a \begin{frame} command. I already showed you how to label it. Put [label=...] immediately after \begin{frame}, with "..." filled in with whatever you want the label to be. See my example above.

Use something like this:

Code: Select all

\documentclass{beamer}

\title[Short title]{The title}
\author[Authors]{Author 1 \and Author 2}
\date{\today}
\begin{document}
\begin{frame}[label=firstframe]
\titlepage
\end{frame}

...

\againframe{firstframe}
\end{document}
    
Or actually, I strongly suggest using one of the Beamer templates discussed in the Beamer manual.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

How to repeat the first slide? (Beamer)

Post by localghost »

According to the idea of frabjous, Section 11.2 (Repeating a Frame at a Later Point, p. 100ff) of the beamer manual introduces the simplest method to do that.


Best regards
Thorsten
User avatar
cbustaam
Posts: 57
Joined: Mon Sep 01, 2008 10:17 pm

Re: How to repeat the first slide? (Beamer)

Post by cbustaam »

Thanks frabjous and localghost... your advice works great!
Bests
"Show me your .emacs and I'll tell you who you are." -- modified proverb
CharlieMAC
Posts: 19
Joined: Wed May 04, 2011 5:50 pm

Re: How to repeat the first slide? (Beamer)

Post by CharlieMAC »

Is there any way to make a loop with the slides? I mean, let suppose I have 5 slides and I just want to show the first 3 slides by normal clicking and after the third one, it returns to the first slide automatically (I can do that using \againframe). Then, if I click again on the first slide, it goes to the second one and then to the third slide, then it goes to the first slide again and so on. The other 2 slides are shown only by clicking specifically on a hyperlink button.


Is there any way to do this?

Thanks in advance
Charlie
Post Reply