summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/beamer/beamerbasetwoscreens.sty
blob: d3796b0f02dd9989610772736a5f6fa863d5fb70 (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
% Copyright 2003--2007 by Till Tantau
% Copyright 2010 by Vedran Mileti\'c
% Copyright 2017 by Joseph Wright
% Copyright 2020 by Joseph Wright, samcarter
%
% 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 LICENSE.md for more details.
%
% version 1.71 bugfix for \pgfpagescurrentpagewillbelogicalpage (hv)
%
%
\mode
<presentation>

\newif\ifbeamer@twoscreenstext
\newif\ifbeamer@dosecondmode

\defbeameroption{previous slide 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 lagging second}[second #1]%
  \beamer@twoscreenstexttrue
  \nofiles
}

\defbeameroption{second mode text 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@twoscreenstexttrue
}

\defbeameroption{always typeset second mode}[true]%
{%
  \def\beamer@defaultdosecondmode{#1}%
}
\def\beamer@defaultdosecondmode{false}

\long\def\beamer@dosecondscreennow#1{% called from \beamer@doseveralframes
  \ifbeamer@dosecondmode%
    {%
      \clearpage
      \def\beamer@currentmode{second}%
      \gdef\beamer@doifnotinframe{}%
      \def\beamer@doifinframe{\begin{beamer@frameslide}%
          #1%
        \end{beamer@frameslide}%
        \pgfpagescurrentpagewillbelogicalpage{2}%
        \clearpage
      }%
      \beamer@masterdecode{\beamer@whichframes}%
      \beamer@donow
    }%
  \fi
}

\mode
<all>