2

I use pause and only in my presentation. Currently, I got 3 identical number 29/38 for three pages where I use pause and only. (I don't know exact what command or setting I use).

I would like to have 29-1/38 29-2/38 and 29-3/38 to distinguish these three pages, or anything which can make the distinction. I DON'T want to use 29, 30 and 31, because this lose the information that these three pages are in fact the same (updated) "frame".

Here is the MWE whose setting is used in my actual

\documentclass{beamer}

\mode<presentation>
{
    \usetheme{Warsaw}
    \setbeamertemplate{headline}{}
    \setbeamertemplate{itemize item}[triangle]
    \setbeamertemplate{itemize subitem}[triangle]
    \setbeamertemplate{itemize subsubitem}[triangle]
    \setbeamercovered{transparent}
    \useoutertheme{infolines}
    \usefonttheme{professionalfonts}
}

\setbeamertemplate{section page}
{
    \begin{centering}
    \begin{beamercolorbox}[sep=12pt,center]{part title}
    \usebeamerfont{section title}\insertsection\par
    \end{beamercolorbox}
    \end{centering}
}



\begin{document}

\begin{frame}

\only<1,2,3>{a}
\pause
\only<2,3>{b}
\pause
\only<3>{c}


\end{frame}

\end{document}

Is there any hack way to customize the page/frame numbers for some specific pages. I won't mind a solution that will require me to modify manually the number for each page of the whole document.

1 Answer 1

2

The "number of overlays" can be calculated by the difference of the startpage of a frame and the current page number.

\documentclass{beamer}

\mode<presentation>
{
    \usetheme{Warsaw}
    \setbeamertemplate{headline}{}
    \setbeamertemplate{itemize item}[triangle]
    \setbeamertemplate{itemize subitem}[triangle]
    \setbeamertemplate{itemize subsubitem}[triangle]
    \setbeamercovered{transparent}
    \useoutertheme{infolines}
    \usefonttheme{professionalfonts}
}

\setbeamertemplate{section page}
{
    \begin{centering}
        \begin{beamercolorbox}[sep=12pt,center]{part title}
            \usebeamerfont{section title}\insertsection\par
        \end{beamercolorbox}
    \end{centering}
}

\newcounter{cont}

\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%
            \setcounter{cont}{\thepage}%
                \addtocounter{cont}{1}%
                \addtocounter{cont}{-\beamer@startpageofframe}%
            \ifnum\beamer@startpageofframe=\beamer@endpageofframe%
            \else%
                -\arabic{cont}%
              \fi%
             ~/ \inserttotalframenumber\hspace*{2ex}%
        \end{beamercolorbox}}%
        \vskip0pt%
    }
\makeatother

\begin{document}

enter image description here

6
  • I didn't study this code yet, but it works! Thank you.
    – user565739
    Dec 5, 2015 at 20:38
  • However, there is some minor issue: I get 2-4, 2-5 and 2-6. But I would like to have 2-1, 2-2 and 2-3. Also, the number after / is always 1, which is not right. It should be the total number of frames 2 in your example.
    – user565739
    Dec 5, 2015 at 21:01
  • @user565739 Strange! For example for the last page I get 2-3 / 2. Have you compiled more than once? Or tried to delete the auxiliary files? [I just noticed another problem: on frames without \pause commands, you probably do not want 2-1 but simply 2?] Dec 5, 2015 at 21:13
  • Fixed for frames without overlays Dec 5, 2015 at 21:25
  • Thank you. It works as what I want now. I won't look at the details of your code at this moment (I need to defense my thesis soon). Maybe later.
    – user565739
    Dec 5, 2015 at 21:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .