我正在使用beamer
XeLaTeX。每添加一个新部分,我都会在演示文稿中添加一个专门的部分页面。现在我开始在演示文稿中添加注释,并想使用该show notes on second screen
选项,因为我用于演示的软件非常适合这种格式。不幸的是,结果是没有显示部分幻灯片后面的框架内容。
它确实可以与 LuaTeX 和 pdfTeX 正常配合使用。
梅威瑟:
\documentclass{beamer}
\usepackage{pgfpages}
\setbeameroption{show notes on second screen}
\AtBeginSection{
\frame{\insertsectionhead}
}
\begin{document}
\section{My Section}
\begin{frame}{My Frametitle}
My Content
\end{frame}
\note{
My Notes
}
\end{document}
输出:
好像是个 bug。有什么修复/解决方法吗?
答案1
字体颜色似乎有问题,因此文本显示为白色。
解决方法
重置每一帧的字体颜色。以下代码添加\usebeamercolor[fg]{normal text}
到幻灯片的定义(取自beamerbaseframe.sty
)。
\documentclass{beamer}
\usepackage{pgfpages}
\setbeameroption{show notes on second screen}
\AtBeginSection{
\frame{\insertsectionhead}
}
\makeatletter
\renewenvironment{beamer@frameslide}{%
\ifbeamer@autobreak\else%
\ifx\beamer@againname\@empty%
{\let\@elt\beamer@restorecounter\beamer@overlaycounterresets}%
\else%
{\let\@elt\beamer@labelrestorecounter\beamer@overlaycounterresets}%
\fi%
\fi%
\global\c@beamerpauses=1\relax%
\expandafter\beamer@ifempty\expandafter{\beamer@framestartpage}{%
\stepcounter{subsectionslide}%
\xdef\beamer@framestartpage{\the\c@page}% only first time
}{\clearpage\beamer@notesactions}% cleanup from previous slide
\hypersetup{pdfpagetransition=R}%
\hypersetup{pdfpageduration=}%
\@ifundefined{thispdfpagelabel}{}{%
\thispdfpagelabel{\insertframenumber}}%
\xdef\beamer@frameendpage{\the\c@page}% every time
\beamer@setuplinks%
\beamer@displaybreak%
\global\setbox\beamer@zoombox=\box\voidb@x%
\def\beamer@zoomer{}%
\beamer@slidehaszoomfalse%
\gdef\insertframetitle{}%
\gdef\insertframesubtitle{}%
\gdef\beamer@frametitle{}%
\gdef\beamer@shortframetitle{}%
\gdef\beamer@framesubtitle{}%
\let\beamer@startcomment=\beamer@startcommentinframe%
% Start slide:
\usebeamercolor[fg]{normal text}% NEW
\beamer@framenotesbegin%
\global\setbox\beamer@framebox=\vbox\bgroup%
\beamer@inframetrue%
\let\frame=\framelatex% inside frames, use LaTeX's \frame command
\begin{beamer@framepauses}%
\refcounter{framenumber}%use frame number for \label
\ifbeamer@shrink%
\hsize=\beamer@shrinkfactorinv\hsize%
\textwidth=\beamer@shrinkfactorinv\textwidth%
\linewidth=\beamer@shrinkfactorinv\linewidth%
\fi%
% Insert labels if necessary:
\ifx\beamer@againname\@empty\else%
\nointerlineskip\vbox to0pt{\vss%
\label<\the\beamer@slideinframe>{\beamer@againname<\the\beamer@slideinframe>}%
\ifnum\beamer@slideinframe=1\relax%
\label<1>{\beamer@againname}%
\fi%
}\nointerlineskip%
\fi%
\ifx\beamer@framehypertargets\@empty\else%
\nointerlineskip\vbox to0pt{\vss%
\beamer@framehypertargets%
\global\let\beamer@framehypertargets\@empty%
}\nointerlineskip%
\fi%
\vskip-\parskip\vbox{}%
\beamer@initfirstlineunskip%
\ifbeamer@plainframe\nointerlineskip\fi%
\beamer@checkframetitle}%
{\par
\end{beamer@framepauses}%
\egroup%
\ifx\beamer@frametitle\@empty%
\setbox\beamer@frametitlebox=\box\voidb@x%
\else%
\setbox\beamer@frametitlebox=\vbox{%
\vbox{}%
{\parskip0pt\usebeamertemplate***{frametitle}\vskip0.25em}%
}%
\fi%
\ifbeamer@plainframe%
\beamer@frametextheight=\paperheight%
\else%
\beamer@frametextheight=\textheight%
\fi%
\advance\beamer@frametextheight by-\ht\beamer@frametitlebox%
\advance\beamer@frametextheight by-\dp\beamer@frametitlebox%
\advance\beamer@frametextheight by-\beamer@frametopskip%
\ifbeamer@shrink%
\beamer@shrinkframebox%
\fi%
\ifx\beamer@zoomer\@empty
\setbox\beamer@framebox=\vbox{%
\nobreak\vbox{}\nobreak\par\nobreak\beamer@entrycode\nobreak%
\nointerlineskip\unvbox\beamer@frametitlebox%
\nobreak%
\ifbeamer@autobreak%
\vskip\beamer@frametopskipautobreak%
\else%
\vskip\beamer@frametopskip%
\fi%
\nobreak%
\nointerlineskip\box\beamer@zoombox\nointerlineskip%
\nobreak%
\ifbeamer@slidehaszoom\box\beamer@framebox\else\unvbox\beamer@framebox\fi%
% bottom skip is added in autobreakframebox
}%
\beamer@autobreakframebox%
\else%
\beamer@zoomer%
\fi%
\beamer@undolabels%
\beamer@framenotesend%
\box\beamer@framebox}
\makeatother
\begin{document}
\section{My Section}
\begin{frame}{My Frametitle}
My Content
\note{hgv}
\end{frame}
\end{document}
编辑
在评论中@Benjamin 提出了这个更简单的解决方案:
\documentclass{beamer}
\usepackage{pgfpages}
\setbeameroption{show notes on second screen}
\AtBeginSection{
\frame{\insertsectionhead}
}
\makeatletter
\def\beamer@framenotesbegin{% at beginning of slide
\usebeamercolor[fg]{normal text}
\gdef\beamer@noteitems{}%
\gdef\beamer@notes{}%
}
\makeatother
\begin{document}
\section{My Section}
\begin{frame}{My Frametitle}
My Content
\note{hgv}
\end{frame}
\end{document}