blob: c8f611e8c6752d12ccb82565aff1225a52c800be (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
|
% Copyright 2003--2007 by Till Tantau
% Copyright 2010 by Vedran Mileti\'c
% Copyright 2012,2015 by Vedran Mileti\'c, Joseph Wright
% Copyright 2017,2018 by Louis Stuart, Joseph Wright
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%
% See the file doc/licenses/LICENSE for more details.
\mode
<presentation>
\newbox\beamer@frameboxcopy
\newif\ifbeamer@twoscreensnotes
% Notes options
\defbeameroption{hide notes}[]%
{
\beamer@notesfalse
}
\defbeameroption{show notes}[]%
{
\beamer@notestrue
}
\defbeameroption{show notes on second screen}[right]%
{
\ifx\@onlypreamble\@notprerr
\ltx@ifpackageloaded{pgfpages}{}{%
\ClassError{beamer}{`pgfpages' package necessary for this option}{}%
}%
\else%
\RequirePackage{pgfpages}%
\fi%
\pgfpagesuselayout{two screens with optional second}[second #1]
\beamer@twoscreensnotestrue
\beamer@notestrue
}
\defbeameroption{show only notes}[]%
{
\beamer@notestrue
\beamer@notesnormalsfalse
\nofiles
}
\defbeameroption{show only slides with notes}[]%
{
\beamer@notestrue
\beamer@frameswithnotesonlytrue
\nofiles
}
%
% Notes
%
\define@key{beamernotes}{enumerate}[true]{%
\def\beamer@noteenvstart{\begin{enumerate}\itemsep=0pt\parskip=0pt}%
\def\beamer@noteenvend{\end{enumerate}}}
\define@key{beamernotes}{itemize}[true]{%
\def\beamer@noteenvstart{\begin{itemize}\itemsep=0pt\parskip=0pt}%
\def\beamer@noteenvend{\end{itemize}}}
\newcommand\beamer@outsideframenote[2][]{%
\beamer@savemode%
\ifbeamer@inlecture%
\def\beamer@noteenvstart{}%
\def\beamer@noteenvend{}%
\setkeys{beamernotes}{#1}%
\ifbeamer@notes
\begingroup
\setbeamertemplate{itemize item}{\textbullet}
\setbeamertemplate{itemize subitem}{--}
\setbeamertemplate{enumerate item}{\insertenumlabel.}
\setbeamertemplate{enumerate subitem}{\insertenumlabel.\insertsubenumlabel}
\def\@oddhead{}
\def\@oddfoot{}
\let\@evenhead\@oddhead
\let\@evenfoot\@oddfoot
\def\beamer@backgroundtemplate{}%
\setbeamercolor{item}{fg=black,bg=white}
\color{black}%
\nointerlineskip
\hbox{\hskip-\Gm@lmargin\hskip1cm\vbox to\textheight{%
%pretend to have ``standard'' margins
\edef\beamer@origlmargin{\Gm@lmargin}%
\edef\beamer@origrmargin{\Gm@rmargin}%
\def\Gm@lmargin{1cm}%
\def\Gm@rmargin{1cm}%
\textwidth=\dimexpr\paperwidth-\Gm@lmargin-\Gm@rmargin\relax%
\hsize=\textwidth%
\@arrayparboxrestore%
\vskip-\headheight%
\def\insertnote{\vbox{}%
\beamer@noteenvstart#2\beamer@noteenvend%
}%
\usebeamertemplate*{note page}%
\vfil%
\vskip-4pt% foot separator
\vskip-\footheight}\hskip-\Gm@lmargin\hskip1cm}%
\ifbeamer@twoscreensnotes%
\pgfpagescurrentpagewillbelogicalpage{2}%
\advance\c@page by-1\relax%
\fi%
\clearpage
\endgroup
\fi%
\fi%
\beamer@resumemode}
%
% Notes in frames
%
\def\beamer@itemtext{item}
\newcommand<>{\beamer@inframenote}[2][]{%
\ifbeamer@inlecture%
\only#3{%
\def\beamer@temp{#1}%
\ifx\beamer@temp\beamer@itemtext%
\expandafter\gdef\expandafter\beamer@noteitems%
\expandafter{\beamer@noteitems\item#2}%
\else
\expandafter\gdef\expandafter\beamer@notes%
\expandafter{\beamer@notes#2}%
\fi%
}%
\fi%
}
\def\note{%
\ifbeamer@inframe%
\let\next=\beamer@inframenote%
\else%
\let\next=\beamer@outsideframenote%
\fi%
\next}
\def\beamer@framenotesbegin{% at beginning of slide
\gdef\beamer@noteitems{}%
\gdef\beamer@notes{}%
}
\def\beamer@framenotesend
{% at end of slide
\global\setbox\beamer@frameboxcopy
=\hbox{\leaders\copy\beamer@framebox\hskip\wd\beamer@framebox}
\ifx\beamer@noteitems\@empty%
\ifx\beamer@notes\@empty%
% possibly suppress this slide
\ifbeamer@frameswithnotesonly
% suppress frame
\global\setbox\beamer@framebox=\box\voidb@x%
\fi%
\ifbeamer@twoscreensnotes%
\beamer@setupnote%
\fi%
\else%
\beamer@setupnote%
\fi
\else%
\beamer@setupnote%
\fi
\ifbeamer@notesnormals%
\else%
\global\setbox\beamer@framebox=\box\voidb@x%
\fi%
}
\def\beamer@setupnote{%
\gdef\beamer@notesactions{%
\beamer@outsideframenote{%
% Notice that the note page is typeset at the beginning of the next slide
\advance\beamer@slideinframe by-1\relax
\beamer@atbeginnote%
\beamer@notes%
\ifx\beamer@noteitems\@empty\else
\begin{enumerate}\itemsep=0pt\parskip=0pt%
\beamer@noteitems%
\end{enumerate}%
\fi%
\beamer@atendnote%
\advance\beamer@slideinframe by 1\relax%
}%
\gdef\beamer@notesactions{}%
}
}
\def\beamer@notesactions{}
\newcommand\AtBeginNote[1]{\long\def\beamer@atbeginnote{#1}}
\newcommand\AtEndNote[1]{\long\def\beamer@atendnote{#1}}
\AtBeginNote{}
\AtEndNote{}
%
% Note frame insert
%
\newcommand{\insertslideintonotes}[1]{{%
\begin{pgfpicture}{0cm}{0cm}{#1\paperwidth}{#1\paperheight}
\begin{pgflowlevelscope}{\pgftransformscale{#1}}%
\color{normal text.bg}
\pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\paperwidth}{\paperheight}}
\pgfusepath{fill,clip}
\color{normal text.fg}
{\pgftransformshift{\pgfpoint{\beamer@origlmargin}{\footheight}}\pgftext[left,bottom]{\copy\beamer@frameboxcopy}}
\end{pgflowlevelscope}
\end{pgfpicture}%
}}
\mode
<article>
{
\newcommand<>\note[2][]{}
}
\mode
<all>
|