我有一些幻灯片,我将打印成不同的页面作为讲义。我正在使用命令\onslide<1 | handout:1> {}
等。是否可以在讲义上显示为 5(a)、5(b) 和 5(c),其中 a、b、c 代表该特定幻灯片的讲义页面。
我将从上一个问题中放入相同的最少代码:如何在打印 Latex Beamer Notes 时仅处理覆盖层
%\documentclass[mathserif]{beamer}
\documentclass[arial,handout]{beamer}
\usepackage{pgf,pgfpages}
\usepackage{graphicx}
%\usepackage{units}
%\usepackage[utf8]{inputenc}
\usepackage{mathtools}
%\usepackage{amsmath}
\usepackage{animate}
\usepackage{booktabs}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes}
\tikzset{
invisible/.style={opacity=0},
visible on/.style={alt=#1{}{invisible}},
alt/.code args={<#1>#2#3}{%
\alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}} % \pgfkeysalso doesn't change the path
},
}
\mode<presentation>
{
\usetheme{ift}
\setbeamertemplate{items}[square]
}
\usefonttheme[onlymath]{serif}
\setbeamerfont{frametitle}{size=\LARGE,series=\bfseries}
\definecolor{uibred}{RGB}{170, 0, 0}
\definecolor{uibblue}{RGB}{0, 84, 115}
\definecolor{uibgreen}{RGB}{119, 175, 0}
%\definecolor{uibgreen}{RGB}{50, 105, 0}
\definecolor{uiborange}{RGB}{217, 89, 0}
%% Create a new command called redub for underbraces
\newcommand\redub[2]{%
\colorlet{currentcolor}{.}%
\color{red}%
\underbrace{\color{currentcolor}#1}_{\color{red}#2}%
\color{currentcolor}%
}
%Beamer block template
\setbeamertemplate{blocks}[rounded][shadow=true]
\setbeamercolor{block title}{bg=uibblue,fg=white}
\setbeamercolor{item projected}{fg=white,bg=green}
\beamertemplatenavigationsymbolsempty
%\include{macros}
%\includeonlyframes{current}
\defbeamertemplate{enumerate item}{mycircle}
{
%\usebeamerfont*{item projected}%
%\usebeamercolor[bg]{item projected}%
\begin{pgfpicture}{0ex}{0ex}{1.5ex}{0ex}
%\pgfcircle[fill]{\pgfpoint{0pt}{.75ex}}{1.25ex}
\pgfbox[center,base]{\color{uibblue}\insertenumlabel.}
\end{pgfpicture}%
}
[action]
{\setbeamerfont{item projected}{size=\scriptsize}}
\setbeamertemplate{enumerate item}[mycircle]
\begin{document}
%\setbeamertemplate{background}
% {\includegraphics[width=\paperwidth,height=\paperheight]{slide_bg1}}
%\setbeamertemplate{footline}[ifttheme]
\mode<presentation>
\begin{frame}
\frametitle{Eulerian Salt Flux Decomposition}
\only<1-2 | handout:1>{\begin{itemize}
\item Subtidal Volume discharge rate $Q_f$: through a cross=section A \\
$Q_f = \langle\int u.dA \rangle$
\item Salt transport rate $F_s$ through a cross-section A \\
$F_s = \langle \int uS.dA \rangle$
\end{itemize}}
\onslide<2->Sub-tidal salt flux decomposed into three parts
\onslide<2->\begin{align*}
F & = \langle \int(u_0+u_E+U_T)(s_0+s_E+s_T)dA \rangle \\
& \approx \langle \int(u_0s_0+u_Es_E+u_Ts_T)dA \rangle \\
& = \redub{Q_fs_0}{\mathclap{\text{ River flow }}} +
\redub{F_E}{\substack{\text{Exchange}\\\text{shear dispersion}}} +
\redub{F_T}{\substack{\text{tidal osciallatory}\\\text{salt transport}}}
\end{align*}
\onslide<3- | handout:2>\begin{itemize}
\item $u_0$ and $s_0$ tidally and cross-sectionally averaged
\item $u_E$ and $s_E$ tidally averaged and cross-sectionally varying
\item $u_T$ and $s_T$ tidally and cross-sectionally varying
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Age of Water under dye from all Rivers}
\only<1-3>{\begin{tikzpicture}
\centering
\node [](0,0)(start){ hello2};
% \draw [step=0.5cm,thin,dotted] (-5,-4) grid(5,4);
% \node [circle]at (-4.5,0){0};
% \node [circle,radius=0.9cm,fill=red!30,] at (-4.5,0)(a){};
\draw [red,fill=red!30](-4.3,-0.2)circle(0.1cm);
\draw [red,fill=red!30](-3.3,0)circle(0.1cm);
\draw [red,fill=red!30](-2.5,-0.7)circle(0.1cm);
\draw [red,fill=red!30](-4.,-0.8)circle(0.1cm);
\draw [red,fill=red!30](-4.,-1.2)circle(0.1cm);
\draw [red,fill=red!30](4.3,1.6)circle(0.1cm);
\draw [red,fill=red!30](3.3,2.7)circle(0.1cm);
\draw [red,fill=red!30](1.6,3.5)circle(0.1cm);
\draw [red,fill=red!30](1.3,3.5)circle(0.1cm);
\node [rectangle,text width=4cm,red] at (5.5,3) (return) {$Q_2 = 169 A^{0.616}$ \linebreak Mason et. al. 1998};
\node [rectangle,text width=4cm,red,visible on =<2->] at (5,0) (return) {Smaller near the source \linebreak Increases away from the source};
\draw [red,visible on =<3->](-3.3,-1.5) circle(0.7cm);%wolf bay small age
\end{tikzpicture}}
\only<4-5>{\begin{tikzpicture}
\node [](0,0)(start){hello1};
% \draw [step=0.5,dotted](-5,-4) grid (5,4);
\node [rectangle,text width=4cm,red] at (5,0) (return) {Scale different from \linebreak 2 year inflows};
\node [rectangle, text width =4cm, red,visible on =<5->] at (5,-2) {Maximum age of 120 days};
\draw [red] (1.5,-1) ellipse(1cm and 0.6cm);
\node [rectangle, text width=4cm, red] at (5,3) {Minimum 7 day flow over 10 yr. interval};
\end{tikzpicture}}
%
\only<6-7>{\begin{tikzpicture}
\node [](0,0)(start){hello};
\node [rectangle, text width=4cm, red, visible on =<7->] at (5,3) {Mean inflows over 10 yr. interval};
\end{tikzpicture}}
\end{frame}
\end{document}
添加输出
IFT 主题已添加
您可以在以下位置找到 beamer ift 主题: https://www.dropbox.com/sh/ewkklsys1zp9xhs/J4msUp2Wbe
答案1
正如所提到的相关问题的答案,当前幻灯片的编号在框架内存储在 中\beamer@slideinframe
。根据 Martin Scharrer 的评论,我们可以创建一个名为的 LaTeXslideinframe
计数器
\makeatletter
\def\c@slideinframe{\beamer@slideinframe}
\makeatother
然后,要更改给定框架的分页,您可以定义一个新的不同的页脚模板,例如frame renumbering
,并将其本地应用于相关框架。由于我没有您在 MWE 中使用的主题,因此我将在以下示例中ift
使用该主题进行说明。Madrid
未决问题
一个我似乎无法弄清楚的突出问题:主体中的帧编号是正确的,但脚线中的帧编号是错误的......
\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<1| handout:1> Handout 1
\item<2| handout:2> Handout 2
\item<3| handout:1-3> 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}
更新
一个解决方法是使用 Matthew Leingang 在上述问题中的回答。它定义了一个新的计数器,并使用当前页面减去当前帧开始的页面再加一来计算当前滑入帧。
这种方法的问题在于,以这种方式定义的计数器不会在正文中显示正确的值。
\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}