在 beamer 中使用 4up 模式开始新页面

在 beamer 中使用 4up 模式开始新页面

我用pgfpages它来制作 4up 讲义。讲义很长(一整个学期),我想在新学期开始时开始新的一页。我正在寻找的代码就像书中的代码一样,在新章节开始时插入一个空白页,并且新章节将从错误的页面开始。

在 MWE 中,2 之后的三张幻灯片应为空白页,并且会话 2 应从新页面的左上角开始。

编辑: 类似这样的方法\cleardoublepage应该可以解决问题。但必须查看页面计数器,并检查要插入多少空白页才能得到下一页可被四整除的页面。我不知道如何在 LaTeX 中进行计算。任何帮助都将不胜感激。

\def\cleardoublepage{%
    \clearpage%
    \if@twoside%
        \ifodd\c@page%
            % do nothing
        \else%
            \emptypage@emptypage%
        \fi%
    \fi%
}%

妇女权利委员会:

\documentclass{beamer}

\author{Stefan Müller}
\title{The great test}

\usepackage{pgfpages}
\pgfpagesuselayout{4 on 1}[a4paper, border shrink=5mm, landscape]

\pgfpageslogicalpageoptions{1}{border code=\pgfusepath{stroke},
% resized height=.65\pgfphysicalheight,
% resized width=.65\pgfphysicalwidth, 
  center = \pgfpoint{.275\pgfphysicalwidth}{.74\pgfphysicalheight}
}
\pgfpageslogicalpageoptions{2}{border code=\pgfusepath{stroke},
% resized height=.65\pgfphysicalheight,
% resized width=.65\pgfphysicalwidth,
  center = \pgfpoint{.725\pgfphysicalwidth}{.74\pgfphysicalheight}
}
\pgfpageslogicalpageoptions{3}{border code=\pgfusepath{stroke},
% resized height=.65\pgfphysicalheight,
% resized width=.65\pgfphysicalwidth,
  center = \pgfpoint{.275\pgfphysicalwidth}{.26\pgfphysicalheight}
}
\pgfpageslogicalpageoptions{4}{border code=\pgfusepath{stroke},
% resized height=.65\pgfphysicalheight,
% resized width=.65\pgfphysicalwidth,
 center = \pgfpoint{.725\pgfphysicalwidth}{.26\pgfphysicalheight}
}


\begin{document}

\frame{
\maketitle
}

\frame{
0

}

\section{1}
\subtitle{Session 1}
\frame{
\maketitle
}
\frame{1}
\section{2}
\frame{2}
\subtitle{Session 2}
\frame{
\maketitle
}


\section{3}
\frame{3}
\section{4}
\frame{4}
\section{5}
\frame{5}



\end{document}

答案1

您可以在字幕开头检查当前页码,然后根据需要插入空白页:

\documentclass{beamer}

\author{Stefan Müller}
\title{The great test}

\usepackage{pgfpages}
\pgfpagesuselayout{4 on 1}[a4paper, border shrink=5mm, landscape]

\pgfpageslogicalpageoptions{1}{border code=\pgfusepath{stroke},
% resized height=.65\pgfphysicalheight,
% resized width=.65\pgfphysicalwidth, 
  center = \pgfpoint{.275\pgfphysicalwidth}{.74\pgfphysicalheight}
}
\pgfpageslogicalpageoptions{2}{border code=\pgfusepath{stroke},
% resized height=.65\pgfphysicalheight,
% resized width=.65\pgfphysicalwidth,
  center = \pgfpoint{.725\pgfphysicalwidth}{.74\pgfphysicalheight}
}
\pgfpageslogicalpageoptions{3}{border code=\pgfusepath{stroke},
% resized height=.65\pgfphysicalheight,
% resized width=.65\pgfphysicalwidth,
  center = \pgfpoint{.275\pgfphysicalwidth}{.26\pgfphysicalheight}
}
\pgfpageslogicalpageoptions{4}{border code=\pgfusepath{stroke},
% resized height=.65\pgfphysicalheight,
% resized width=.65\pgfphysicalwidth,
 center = \pgfpoint{.725\pgfphysicalwidth}{.26\pgfphysicalheight}
}

\usepackage{pgffor}

\pretocmd{\subtitle}{
  {
   \setbeamertemplate{navigation symbols}{}
   \pgfmathparse{int(mod(\thepage,4))}
   \let\foo\pgfmathresult

   \ifnum\foo=0
      \begin{frame}[plain,noframenumbering]
      \end{frame}   
   \fi      
   
   \ifnum\foo=2
      \begin{frame}[plain,noframenumbering]
      \end{frame}   
      \begin{frame}[plain,noframenumbering]
      \end{frame}   
      \begin{frame}[plain,noframenumbering]
      \end{frame}         
   \fi   
   
   \ifnum\foo=3
      \begin{frame}[plain,noframenumbering]
      \end{frame}   
      \begin{frame}[plain,noframenumbering]
      \end{frame}   
   \fi
   
  }
}{}{}

\makeatletter
\apptocmd{\beamer@subtitle}{\frame{\maketitle}}{}{}
\makeatother

\begin{document}

\frame{
\maketitle
}

\frame{
0
\pause
abc
}

\section{1}
\subtitle{Session 1}

\frame{1}
\section{2}
\frame{2}
\subtitle{Session 2}

\section{3}
\frame{3}
\section{4}
\frame{4}
\section{5}
\frame{5}

\end{document}

相关内容