Ignoring page numbers in backup slides - latex

I am using the beamer document class in latex to make a presentation. I will have a number of back up slides which are there for offline viewing, reference etc. Beamer has a feature that shows the progress through the presentation as {page#}/{total pages} on each slide. I would really like it if {total pages} was equivalent to my total number of pages w/out counting the back up slides (I don't want to discourage my audience on the first page!). Does anyone know how this can be done?

This can now be achieved with the following option on all "backup" slides:
\begin{frame}[noframenumbering]{My Title}
\end{frame}
Source
This will cause the final number (e.g. 25/25) to be displayed on such pages.
As always, a matter of taste.

This can be done with the appendixnumberbeamer package. Just add \usepackage{appendixnumberbeamer} to the preamble and use \appendix before the first backup slide.

I have defined two commands to do this:
\newcommand{\beginbackup}{
\newcounter{framenumbervorappendix}
\setcounter{framenumbervorappendix}{\value{framenumber}}
}
\newcommand{\backupend}{
\addtocounter{framenumbervorappendix}{-\value{framenumber}}
\addtocounter{framenumber}{\value{framenumbervorappendix}}
}
You can then use \beginbackup and \backupend before and after your backup slide to adjust the number of slides.
For my beamer template I also like to add
\setbeamertemplate{footline}{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
\usebeamerfont{author in head/foot}\insertshortauthor~~(\insertshortinstitute)
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshorttitle
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%
\usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}
\insertframenumber{} \hspace*{2ex} % hier hat's sich geändert
\end{beamercolorbox}}%
\vskip0pt%
}
in the definition of the \beginbackup command to hide to total page number in the backup slides, otherwise you'll get something like "24/18".
Using all this, your slides will be numbered like "x/Y" for all slides before the backup, where Y is the total number of slides before the first backup slide, and the backup slides will continue the numbering of the previous slides.

To manually fix the total frame count to a certain number, say 25, you could add the following command
\renewcommand{\inserttotalframenumber}{25}
right after the \begin{document} command.
You can also add the \appendix command right before the beginning of your backup slides, so that the corresponding sections/subsections do not appear in the table of contents/navigation structure.
It should be possible to tweak the renewcommand above so that it automatically uses the last frame number before the appendix, but I don't know how to do it.

Just insert
\renewcommand{\inserttotalframenumber}{\pageref{lastslide}}
after \begin{document}, and place the marker
\label{lastslide}
on your last slide.

You can put all of your backup slides in appendix and use the appendixnumberbeamer package.
\documentclass[12pt]{beamer}
\usepackage{appendixnumberbeamer}
\begin{document}
\begin{frame}{Frames that counts}
\end{frame}
\appendix
\begin{frame}{Backup slides}
\end{frame}
\end{document}

Fanfan, thanks for your answer, your answer steered me to this sty file that one can include in a beamer document class that will automatically count only the number of frames before the appendix, and then restart the a separate count for the appendix slides, pretty neat.
http://www.ensta.fr/~lelong/Latex/appendixnumberbeamer.sty
Thanks also to Jérôme LELONG for having this available online.

The great command \insertpresentationendpage will take care of your problem. Just place \appendix at the begin of your backup slides.
\documentclass[t]{beamer}
\usepackage[absolute,overlay]{textpos}
\setbeamertemplate{navigation symbols}{}
\def\insertpresentationendframe{\inserttotalframenumber}
\makeatletter
\g#addto#macro{\appendix}{\immediate\write\#auxout{\string\#writefile{nav}{\noexpand\headcommand{\noexpand\def\noexpand\insertpresentationendframe{\the\c#framenumber}}}}}
\makeatother
\setbeamertemplate{footline}{%
\begin{picture}(54,12.5)(0,0)
\put(0.9,0.52){%
\begin{minipage}[b][12.5mm][c]{112.5mm}
\raggedleft
\insertframenumber/\insertpresentationendframe
\end{minipage}
}
\end{picture}
}
\begin{document}
\begin{frame}
slide in the main part
\only<2>{blub}
\end{frame}
\appendix
\section*{Backup}
\begin{frame}
\frametitle{backup}
not counting in the total frame number
\end{frame}
\end{document}

Another possibility - which was recently added to beamer - is to use the appendixframenumber template:
\documentclass[t]{beamer}
\setbeamertemplate{footline}{
\hfill%
\usebeamercolor[fg]{page number in head/foot}%
\usebeamerfont{page number in head/foot}%
\setbeamertemplate{page number in head/foot}[appendixframenumber]%
\usebeamertemplate*{page number in head/foot}\kern1em\vskip2pt%
}
\begin{document}
\begin{frame}
slide in the main part
\only<2>{blub}
\end{frame}
\appendix
\section*{Backup}
\begin{frame}
\frametitle{backup}
not counting in the total frame number
\end{frame}
\end{document}

Related

Reference on same slide in beamer and with \pause

I have been searching for some automated way of numbering the references on the same slide in beamer Madrid with biblatex. This works fine with \pause and \footcite{}. But when I have multiple bullets on the same slide (e.g. 5), and I want to cite for the last point, the problem is that the reference appears from the very first slide. I want that the reference appears only when the relevant slide appears (i.e. 5th one in this case)
\documentclass{beamer}
\mode<presentation>{\usetheme{Madrid}}
\usepackage[style=verbose]{biblatex}
\only<2->{...} etc. is one solution but I think it is a lot of manual work to update all numbers on the slide when, for instance, I need to remove (or add) one point with a reference.
Thanks.
You don't need to update any numbers if you use relative overlays instead of absolute numbers:
\documentclass{beamer}
\mode<presentation>{\usetheme{Madrid}}
\usepackage[style=verbose]{biblatex}
\addbibresource{biblatex-examples.bib}
\begin{document}
\begin{frame}
\begin{itemize}[<+->]
\item ABC \only<.->{\footcite{knuth:ct:a}}
\item XYZ \only<.->{\footcite{knuth:ct:b}}
\end{itemize}
\end{frame}
\end{document}

How to suppress subsections in the table of contents in latex-beamer?

Assume I have some sections within my latex-beamer presentation. Some of these sections contain subsections, others do not. So it looks very weird in the table of contents.
How can I suppress subsections in the table of contents?
To keep a specific subsection out of the index use:
\subsection*{...}
To remove all subsections from the TOC only, use: \tableofcontents[hideallsubsections] (added from another answer)
To hide subsections use the pretty self-explanatory:
\tableofcontents[hideallsubsections]
The same as in the other two answers can also be achieved using \setcounter{tocdepth}{1}, before (or after) \begin{document}: try to compile the following code, then delete or comment the line marked with %%% and compile again (once, or twice if necessary) to see the difference.
\documentclass{beamer}
\usetheme{Goettingen}
\setcounter{tocdepth}{1} %%%
\begin{document}
\frame{\tableofcontents}
\section{First}
\begin{frame}
A
\end{frame}
\section{Second}
\subsection{One only}
\begin{frame}
B
\end{frame}
\end{document}
At the same way as using \tableofcontents[hideallsubsections], the subsections disappear in the frame where the \tableofcontents is, but not in the sidebar (if present in the theme you use). The same, again, with local use of starred \subsection*{Subsection Title}.

Tikzpicture on every page

How can I include a tikzpicture on every page?
I would like to create a complicated document template (page should be framed, and have a table to hold document information both in the header and footer).
I was thinking of using something like:
\begin{tikzpicture}[remember picture,overlay]
% complicated layout should be here, simple example is given below:
% \node [xshift=1cm,yshift=1cm] at (current page.south west)
% {This is an absolutely positioned text in the page};
\end{tikzpicture}
Do you have any other suggestions on how to create such a template?
Add information to header/footer either using fancyhdr Or KOMA Script
For adding a something on every page I used this:
\usepackage{eso-pic}
\makeatletter
\AddToShipoutPicture{%
\setlength{\#tempdimb}{.1\paperwidth}%
\setlength{\#tempdimc}{.04\paperheight}%
\setlength{\unitlength}{1pt}%
\put(\strip#pt\#tempdimb,\strip#pt\#tempdimc){%
\makebox(0,0){ \textcolor{gray}{Rev: \svnrev{} (\svnfilerev)} }%
}%
}
\makeatother
Here, I add the SVN revision number on the bottom right of every page. I don't remember why I did not use a tikzpicture[overlay,remember picture] in \AddToShipoutPicture, maybe because it can't remember the picture position in the state of shipping out the page.
Hope that helps.

Increase page numbers in LaTeX Beamer

in LaTeX Beamer, the total number of slides includes those that only contain the table of contents before each section/subsection, which increases the total number of slides unnecessarily. Is there any way to prevent this?
In other words: I don't want slides containing the TOC to have page numbers.
Kind regards,
mefiX
Add the line
\addtocounter{framenumber}{-1}
on each frame you wish to exclude from total count.
See also this other Question here on Stackoverflow, which might assist you further.
The frame option noframenumbering will exclude certain frames from increasing the framenumber. I would recommend to use it in combination with the plain option, otherwise it might look that the frames with the toc will show the same frame number as the frame before.
\documentclass{beamer}
\setbeamertemplate{footline}[frame number]
\AtBeginSection[]{%
\begin{frame}[noframenumbering,plain]
\tableofcontents[currentsection]
\end{frame}
}
\begin{document}
\section{title}
\begin{frame}
\end{frame}
\end{document}
Add [plain] to not display the header and the footer. Finally, add \addtocounter{framenumber}{-1} to not increment page number.
\AtBeginSection[]{%
\begin{frame}[plain]
\addtocounter{framenumber}{-1}
\tableofcontents[currentsection]
\end{frame}
}

latex template or example for personal statement

I am writing a personal statement in latex. I don't want the big margin at the top of the page not big title taking a lot of space. I just like to make the layout compact but still clearly spaced with title, name and other necessary information, since there may be restriction on the number of pages. One example would be http://www.hsc.unt.edu/education/CIM/Documents/PS-Sample2_000.pdf. I wonder where to find some good latex templates or examples?
Thanks and regards!
I would use the geometry package to establish the desired margins. To get the margins in your sample document, try:
\usepackage[left=1in,right=1in,top=1in,bottom=1in]{geometry}
Your next requirement was to fix the title block. LaTeX uses the internal command \#maketitle to format the title block. You can redefine this as you like. To achieve the same title block style as in the sample document, use:
\usepackage[svgnames]{xcolor}% provides colors for text
\makeatletter% since there's an at-sign (#) in the command name
\renewcommand{\#maketitle}{%
\begin{center}
\parskip\baselineskip% skip a line between paragraphs in the title block
\parindent=0pt% don't indent paragraphs in the title block
\textcolor{red}{\bf\#title}\par
\textbf{\#author}\par
%\#date% remove the percent sign at the beginning of this line if you want the date printed
\end{center}
}
\makeatother% resets the meaning of the at-sign (#)
The \#title, \#author, and \#date commands will print the title, author, and date. You can use whatever formatting commands you like to set the text in bold, different colors, etc.
Put all of the above commands in the preamble of the document. The preamble is the space between \documentclass and \begin{document}.
\documentclass{article}
% this is the preamble
% put all of the above code in here
\title{Personal Statement}
\author{Tim}
\begin{document}
\maketitle% prints the title block
Emergency medicine has always been a passion of mine\ldots
\end{document}
Attempt #1: I've used the following style file, which I call cramp2e, for similar purposes. It is probably not right for you, but have a look:
\oddsidemargin -1cm
\evensidemargin -2cm
\topmargin 1cm
\textheight 24cm
\textwidth 19cm
\headheight 0cm
\headsep .7cm
\footskip .7cm
\parskip .2cm
\paperheight 25cm
\setlength\voffset{-.33in}
\setlength\hoffset{-.25in}
Any good?
Postscript This is for A4 size paper.
A slightly less LaTeX-ey solution would be to not use the \maketitle command. A couple of times I've simply used this as my title(marginsize helps too).
Set up smaller margins:
\documentclass{article}
\usepackage{anysize}
\marginsize{1cm}{1cm}{1cm}{1cm}
(EDIT: 1cm might be even better..)
Minimal title:
\begin{document}
\begin{center}
\section*{My Document Title}
\today
\end{center}
% content goes here
\end{document}
The result looks something like:

Resources