beamer

您所在的位置:网站首页 查看股票龙虎榜的软件 beamer

beamer

2023-08-04 05:07| 来源: 网络整理| 查看: 265

As mentioned in an answer to a related question, the number of the current slide within a frame is stored in \beamer@slideinframe. Following Martin Scharrer's comment, we can create a LaTeX counter named slideinframe with

\makeatletter \def\c@slideinframe{\beamer@slideinframe} \makeatother

Then to change the pagination of a given frame, you can define a new different footline template, say frame renumbering, and apply that locally to the frame in question. Since I don't have the ift theme you used in your MWE, I'll illustrate with the Madrid theme in the following example.

Outstanding Issue

An outstanding problem that I can't seem to figure out: the frame numbering is correct in the body, but wrong in the footline...

\documentclass[handout]{beamer} \usetheme{Madrid} % Define counter "slideinframe" \makeatletter \def\c@slideinframe{\beamer@slideinframe} \makeatother % Define new template style "frame renumbering" \defbeamertemplate*{footline}{frame renumbering} { \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(\alph{slideinframe}) / \inserttotalframenumber\hspace*{2ex} \end{beamercolorbox}}% \vskip0pt% } % This is the usual footline template used in Madrid theme \setbeamertemplate{footline}[infolines theme] \begin{document} { % Enclose the frame to which you want to apply the template "frame renumbering" with {...} \setbeamertemplate{footline}[frame renumbering] \begin{frame}{Frame 1} This is frame \insertframenumber, slide (\alph{slideinframe}) \begin{itemize} \item Handout 1 \item Handout 2 \item Handout 1-3 \end{itemize} \end{frame} } \begin{frame}{Frame 2} This is frame \insertframenumber, slide (\alph{slideinframe}), with usual pagination. \end{frame} \end{document}

enter image description here

Update

A work-around is to use Matthew Leingang's answer in the above mentioned question. It defines a new counter, and calculates the current slide in frame by using the current page minus the page where the current frame starts and plus one.

The problem with this approach is that the counter defined in this way does not show the correct value in the body text.

\documentclass[handout]{beamer} \usetheme{Madrid} % Define counter "slideinframe" \newcounter{slideinframe} % Define new template style "frame renumbering" \defbeamertemplate*{footline}{frame renumbering} { % Set counter to correct value \setcounter{slideinframe}{\insertpagenumber}% \addtocounter{slideinframe}{-\insertframestartpage}% \addtocounter{slideinframe}{1}% % Redefine footline format \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(\alph{slideinframe}) / \inserttotalframenumber\hspace*{2ex} \end{beamercolorbox}}% \vskip0pt% } % This is the usual footline template used in Madrid theme \setbeamertemplate{footline}[infolines theme] \begin{document} % same as above \end{document}

enter image description here



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3