summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/beamerswitch
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-06-06 21:12:52 +0000
committerKarl Berry <karl@freefriends.org>2020-06-06 21:12:52 +0000
commit55361ee45fe0afd48d8511ff1d2944966d1e5cb6 (patch)
treec167242f63de9364485ff240f317069f87a052e0 /Master/texmf-dist/tex/latex/beamerswitch
parent37f53e8a8423b2fc2d4d553ceeae604c7ce66b27 (diff)
beamerswitch (6jun20)
git-svn-id: svn://tug.org/texlive/trunk@55441 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/beamerswitch')
-rw-r--r--Master/texmf-dist/tex/latex/beamerswitch/beamerswitch.cls89
1 files changed, 85 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/latex/beamerswitch/beamerswitch.cls b/Master/texmf-dist/tex/latex/beamerswitch/beamerswitch.cls
index 7591022cc8c..98d8c5b898a 100644
--- a/Master/texmf-dist/tex/latex/beamerswitch/beamerswitch.cls
+++ b/Master/texmf-dist/tex/latex/beamerswitch/beamerswitch.cls
@@ -15,7 +15,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesClass{beamerswitch}
- [2020/01/20 v1.6.1 Convenient mode selection in Beamer documents]
+ [2020/06/06 v1.7 Convenient mode selection in Beamer documents]
\RequirePackage{xkeyval,xkvltxp,etoolbox,xstring,shellesc,iftex}
\define@boolkey[DC]{beamerswitch}{beamer}[true]{%
\ifbool{DC@beamerswitch@beamer}{%
@@ -165,12 +165,12 @@
\def\beamerswitch@handoutpaper{#1}%
}
\newcounter{beamerswitch@nupcase}
-\setcounter{beamerswitch@nupcase}{5}
-\define@choicekey+[HL]{beamerswitch}{nup}[\val\nr]{2, 3, 3plus, 4, 4plus, 6, 8}{%
+\setcounter{beamerswitch@nupcase}{7}
+\define@choicekey+[HL]{beamerswitch}{nup}[\val\nr]{1, 1plus, 2, 3, 3plus, 4, 4plus, 6, 8}{%
\setcounter{beamerswitch@nupcase}{\nr}
}{%
\ClassWarning{beamerswitch}{Value of `nup' not recognized.
- Allowed values are 2, 3, 3plus, 4, 4plus, 6, and 8.}%
+ Allowed values are 1, 1plus, 2, 3, 3plus, 4, 4plus, 6, and 8.}%
}
\newcommand*{\beamerswitch@Border}{\relax}
\define@key[HL]{beamerswitch}{border}[0.4pt]{%
@@ -223,6 +223,10 @@
}%
\ifbool{HL@beamerswitch@align}{%
\ifcase\value{beamerswitch@nupcase}\relax
+ \relax
+ \or
+ \addtolength{\beamerswitch@pnoadjust}{-0.333\beamerswitch@margin}%
+ \or
\addtolength{\beamerswitch@pnoadjust}{-0.333\beamerswitch@margin}%
\or
\addtolength{\beamerswitch@pnoadjust}{-0.5\beamerswitch@margin}%
@@ -247,6 +251,14 @@
\def\beamerswitch@footer{\stepcounter{handoutpno}}%
}%
\ifcase\value{beamerswitch@nupcase}\relax
+ \def\beamerswitch@nup{1}%
+ \pgfpagesuselayout{1 by 1}[\beamerswitch@handoutpaper,%
+ landscape,border shrink=\the\beamerswitch@margin]%
+ \or
+ \def\beamerswitch@nup{1}%
+ \pgfpagesuselayout{1 by 1 narrow}[\beamerswitch@handoutpaper,%
+ border shrink=\the\beamerswitch@margin]%
+ \or
\def\beamerswitch@nup{2}%
\pgfpagesuselayout{1 by 2}[\beamerswitch@handoutpaper,%
border shrink=\the\beamerswitch@margin]%
@@ -283,6 +295,75 @@
}%
}
\mode<handout>{%
+ \pgfpagesdeclarelayout{1 by 1}
+ {
+ \edef\pgfpageoptionheight{\the\paperheight}
+ \edef\pgfpageoptionwidth{\the\paperwidth}
+ \edef\pgfpageoptionborder{0pt}
+ \def\pgfpageoptionfirstshipout{1}
+ }
+ {
+ \pgfpagesphysicalpageoptions
+ {%
+ logical pages=1,%
+ physical height=\pgfpageoptionheight,%
+ physical width=\pgfpageoptionwidth,%
+ current logical shipout=\pgfpageoptionfirstshipout%
+ }
+ \pgfpageslogicalpageoptions{1}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ border code=\beamerswitch@Border,%
+ resized width=\pgfphysicalwidth,%
+ resized height=\pgfphysicalheight,%
+ center=\pgfpoint{.5\pgfphysicalwidth}{.5\pgfphysicalheight}%
+ }%
+ }%
+ \pgfpagesdeclarelayout{1 by 1 narrow}
+ {
+ \edef\pgfpageoptionheight{\the\paperwidth} % landscaped by default
+ \edef\pgfpageoptionwidth{\the\paperheight}
+ \def\pgfpageoptionborder{0pt}
+ \def\pgfpageoptionfirstshipout{1}
+ }
+ {
+ \pgfpagesphysicalpageoptions
+ {%
+ logical pages=1,%
+ physical height=\pgfpageoptionheight,%
+ physical width=\pgfpageoptionwidth,%
+ current logical shipout=\pgfpageoptionfirstshipout%
+ }
+ \ifdim\paperheight>\paperwidth\relax
+ % put side-by-side
+ \pgfpageslogicalpageoptions{1}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ border code=\beamerswitch@Border,%
+ resized width=.5\pgfphysicalwidth,%
+ resized height=\pgfphysicalheight,%
+ center=\ifbool{HL@beamerswitch@align}{%
+ \pgfpoint{.25\pgfphysicalwidth + 0.333\beamerswitch@margin}{.5\pgfphysicalheight}%
+ }{%
+ \pgfpoint{.25\pgfphysicalwidth}{.5\pgfphysicalheight}%
+ }%
+ }%
+ \else
+ % stack on top of one another
+ \pgfpageslogicalpageoptions{1}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ border code=\beamerswitch@Border,%
+ resized width=\pgfphysicalwidth,%
+ resized height=.5\pgfphysicalheight,%
+ center=\ifbool{HL@beamerswitch@align}{%
+ \pgfpoint{.5\pgfphysicalwidth}{.75\pgfphysicalheight - 0.333\beamerswitch@margin}%
+ }{%
+ \pgfpoint{.5\pgfphysicalwidth}{.75\pgfphysicalheight}%
+ }%
+ }%
+ \fi
+ }
\pgfpagesdeclarelayout{1 by 2}
{
\edef\pgfpageoptionheight{\the\paperwidth} % landscaped by default