Consider the following MWE.
\documentclass[handout]{beamer}
\newcounter{slidenumber}
\defbeamertemplate*{footline}{infolines theme frame plus slide}{
\setcounter{slidenumber}{\insertpagenumber}%
\addtocounter{slidenumber}{-\insertframestartpage}%
\addtocounter{slidenumber}{1}%
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=\paperwidth,ht=2.25ex,dp=1ex,center]{date in head/foot}%
\insertframenumber(\alph{slidenumber}{})/ \inserttotalframenumber\hspace*{2ex}
\end{beamercolorbox}}%
\vskip0pt%
}
\setbeamertemplate{footline}[infolines theme frame plus slide]
\begin{document}
\begin{frame}
\only<handout:1>{Handout 1 of frame 1}
\only<handout:2>{Handout 2 of frame 1}
\end{frame}
\begin{frame}
Frame 2
\end{frame}
\end{document}
Frame 1 has two slides, I want to number them as 1(a)/2, 1(b)/2. Frame 2 has only one slide, and is currently numbered as 2(a)/2. However, I want to number it as 2/2.
In general, I want frames with multiple slides numbered as
<frame_num>(<slide_num_in_frame>)/<total_frame_num>
and frames with only one slide numbered as
<frame_num>/<total_frame_num>
How can I achieve this effect?
ifthenpackage has been obsolete. So I was researching on alternative ways of implementing the conditional. Turns out that one can simply use LaTeX's\ifnumcommand:\ifnum\insertframeendpage=\insertframestartpage <true action> \else <false action> \fi. I nevertheless owe you a big thank you for helping me formulate the\ifnumto work, something like{needs to go between<test>and<true action>. The following works for me:\ifnum\insertframeendpage=\insertframestartpage {\insertframenumber <...>} \else <false action> \fi. – Herr K. Oct 13 '13 at 23:29\ifnum\insertframeendpage=\insertframestartpage page \insertframenumber <...> \else <false action> \fi. So my guess is that if the character after\, TeX will mistakenly think that what follows is still a part of the\, e.g.{or a normal letter, has to be inserted at the end of