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 am using theme Madrid and would like to keep my title page and the rest of my presentation as it is and ONLY make the following changes: 1- Don't count title frame towards the total number of frames

2- Do not enter frame number and total number of frames in the title frame.

For number 1, I can manually change total number of frames available and I was wondering if there is a more automatic way to do it.

\documentclass {beamer}
\mode<beamer>{\usetheme{Madrid}}
\title[Test Title]{Test}

\begin{document}
\begin{frame}
\titlepage
\end{frame}
\begin{frame}
\frametitle{First test frame}

\begin{itemize}
\item Item 1
\item item 2
\end{itemize}
\end{frame}

\begin{frame}
\frametitle<beamer>{Second frame}
\begin{block}<beamer>{Example block}
Some text in the block
\end{block}
\end{frame}

\end{document}

This code has three frames; first one title and the next two are my actual presentation. Currently the page numbers in the slides are 1/3, 2/3, and 3/3. What I am ideally looking for is: keeping the presentation as it is and changing the page numbers to "nothing in the title fram" and 1/2 in the second frame and 2/2 in the third frame. I hope it is clear.

share|improve this question
2  
It would be great if you could include a minimal working example (MWE) that community members can work with without having to generate something from scratch. It will most likely speed up getting answers. –  Werner Nov 15 '12 at 4:18
add comment

2 Answers 2

up vote 4 down vote accepted

bloodworks gives the simplest solution. However, if you want to retain exactly the formatting for the title page, but just not have the page number information, then you can redefine the footline template just for that frame as follows:

\documentclass {beamer}

\mode<beamer>{\usetheme{Madrid}}
\title[Test Title]{Test}

\begin{document}
\bgroup
\makeatletter
\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\expandafter\beamer@ifempty\expandafter{\beamer@shortinstitute}{}{~~(\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{} / \inserttotalframenumber\hspace*{2ex} 
    \hspace*{6ex}
  \end{beamercolorbox}}%
  \vskip0pt%
}
\makeatother
\begin{frame}
\titlepage
\end{frame}
\egroup

\setcounter{framenumber}{0}

\begin{frame}
\frametitle{First test frame}

\begin{itemize}
\item Item 1
\item item 2
\end{itemize}
\end{frame}

\begin{frame} More \end{frame}

\end{document}

Sample output

The code makes a local group around the first frame via \bgroup / \endgroup and then contains a copy of the footline template from beamerouterthemeinfolines.sty with the insertion of "frame numuber / total framenumber" commented out and replaced by an appropriate amount of horisontal space.

Had not been for the " / " between these numbers you could just have set the commands \insertframenumber and \inserttotalframenumber to insert a single space each in this group.

After discussion with bloodworks, one may prefer to package the above up in to a macro \mytitleframe as below. Such a definition could then be moved to a private style file.

\documentclass{beamer}

\mode<beamer>{\usetheme{Madrid}}

\makeatletter
\def\mytitleframe{\bgroup
\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\expandafter\beamer@ifempty\expandafter{\beamer@shortinstitute}{}{~~(\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{} / \inserttotalframenumber\hspace*{2ex} 
    \hspace*{6ex}
  \end{beamercolorbox}}%
  \vskip0pt%
}
\maketitle
\egroup
\addtocounter{framenumber}{-1}
}
\makeatother

\title[Test Title]{Test}

\begin{document}

\mytitleframe

\begin{frame}
  \frametitle{First test frame}

  \begin{itemize}
  \item Item 1
  \item item 2
  \end{itemize}
\end{frame}

\begin{frame} More \end{frame}

\end{document}
share|improve this answer
    
In that case you'd better redefine maketitle and use that. That will be much more handy, esp. when ones plans to put that in some kind of own template. –  bloodworks Nov 15 '12 at 11:38
    
@bloodworks Unfortunately we have to set this template before the frame starts, whereas \maketitle = \titlepage is called inside the frame. One can package the above code it into a command, call that command just before the frame, however one still has to make sure this remains inside a group, so the original style is retained for the other frames. –  Andrew Swann Nov 15 '12 at 12:09
    
well beamer defines \maketitle as \frame{\titlepage}(see p. 93 beameruserguide) outside of frames. So one could put any local redefinitions into this macro. To be precise the definition is: \def\maketitle{\ifbeamer@inframe\titlepage\else\frame{\titlepage}\fi} –  bloodworks Nov 15 '12 at 12:13
    
@bloodworks The actual definition is \def\maketitle{\ifbeamer@inframe\titlepage\else\frame{\titlepage}\fi}, so standard use allows \maketitle to be called within a frame. It is probably best to package everything up in a new macro. I'll such a macro to my answer. –  Andrew Swann Nov 15 '12 at 12:31
    
This is fantastic; thank you! –  N Nik Nov 15 '12 at 16:06
add comment

1: the most simple way is imho to manipulate counter framenumber. 2: just use [plain] Option. (Repeating the title in the footline doesn't make sense for me.)

\documentclass {beamer}
\usetheme{Madrid}
\title[Test Title]{Test}

\let\otp\titlepage
\renewcommand{\titlepage}{\otp\addtocounter{framenumber}{-1}}

\begin{document}

\begin{frame}[plain]
 \titlepage
\end{frame}

\frame{
 \frametitle{First test frame}
\begin{itemize}
 \item Item 1
 \item item 2
 \end{itemize}
}

\frame{
 \frametitle{Second}
}

\end{document}
share|improve this answer
    
This was perfect for me. I just added noframenumbering in frame options, rather than doing the hack to decrement it. –  levesque Jul 24 '13 at 23:21
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.