From 55361ee45fe0afd48d8511ff1d2944966d1e5cb6 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 6 Jun 2020 21:12:52 +0000 Subject: beamerswitch (6jun20) git-svn-id: svn://tug.org/texlive/trunk@55441 c570f23f-e606-0410-a88d-b1316a301751 --- .../beamerswitch/beamerswitch-example-article.pdf | Bin 20059 -> 20075 bytes .../beamerswitch/beamerswitch-example-handout.pdf | Bin 22330 -> 22344 bytes .../beamerswitch/beamerswitch-example-trans.pdf | Bin 22942 -> 22958 bytes .../latex/beamerswitch/beamerswitch-example.pdf | Bin 36569 -> 36590 bytes .../doc/latex/beamerswitch/beamerswitch.pdf | Bin 183145 -> 194565 bytes .../source/latex/beamerswitch/beamerswitch.dtx | 164 ++++++++++++++++++--- .../source/latex/beamerswitch/beamerswitch.ins | 46 ------ .../tex/latex/beamerswitch/beamerswitch.cls | 89 ++++++++++- 8 files changed, 229 insertions(+), 70 deletions(-) delete mode 100644 Master/texmf-dist/source/latex/beamerswitch/beamerswitch.ins diff --git a/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-article.pdf b/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-article.pdf index 462f7f4e949..a2914883796 100644 Binary files a/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-article.pdf and b/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-article.pdf differ diff --git a/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-handout.pdf b/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-handout.pdf index 6b4de86e8a4..e635ac4025a 100644 Binary files a/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-handout.pdf and b/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-handout.pdf differ diff --git a/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-trans.pdf b/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-trans.pdf index 194dbf7faef..69b8a10f0ca 100644 Binary files a/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-trans.pdf and b/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-trans.pdf differ diff --git a/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example.pdf b/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example.pdf index 9e92dcb904e..de2af6109b3 100644 Binary files a/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example.pdf and b/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example.pdf differ diff --git a/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch.pdf b/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch.pdf index d5fe18fa203..4d36201a452 100644 Binary files a/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch.pdf and b/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch.pdf differ diff --git a/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.dtx b/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.dtx index e683b58287f..e8a6919c147 100644 --- a/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.dtx +++ b/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.dtx @@ -228,7 +228,7 @@ Copyright (C) 2016-2020 by Alex Ball %\NeedsTeXFormat{LaTeX2e}[1999/12/01] %\ProvidesClass{beamerswitch} %<*class> - [2020/01/20 v1.6.1 Convenient mode selection in Beamer documents] + [2020/06/06 v1.7 Convenient mode selection in Beamer documents] % %<*driver> \documentclass[12pt]{article} @@ -381,6 +381,7 @@ Copyright (C) 2016-2020 by Alex Ball \index{\MyName@\tcbIndexPrintValCA {\MyName}|)}% } \makeatletter +\def\MY@EQUALS{=}% \newcommand{\resetmintedformat}{% % Comments \expandafter\def\csname PYGdefault@tok@c\endcsname{\let\PYGdefault@it=\textit\def\PYGdefault@tc####1{\textcolor{gray}{####1}}} @@ -893,6 +894,7 @@ directives: load \pkg{hyperref} yourself at a different point, use this option. \end{docKey} +\pagebreak % TWEAK: may not be needed in future versions \begin{docKey}{textinst}{}{no value, initially unset} In all modes, patches the \cs{inst} command so that it prints its argument using \cs{textsuperscript} instead of a mathematical superscript. This helps @@ -917,13 +919,13 @@ using the following command in the preamble. \key{resize to} layout. \end{docKey} -\begin{docKey}{nup}{=\val{2}\textbar \val{3}\textbar \val{3plus}\textbar \val{4}\textbar \val{4plus}\textbar \val{6}\textbar \val{8}}{no default, initially \val{6}} +\begin{docKey}{nup}{=\val{1}\textbar \val{1plus}\textbar \val{2}\textbar \val{3}\textbar \val{3plus}\textbar \val{4}\textbar \val{4plus}\textbar \val{6}\textbar \val{8}}{no default, initially \val{6}} Selects how many slides are shown on a single page in \key{handout} mode. The `plus' layouts leave blank space for recipients to make handwritten notes - next to each slide. The effects of the various values are shown in Figure~\ref{fig:layouts} on page~\pageref{fig:layouts}. Note that the \docValue{2}, - \docValue{3plus}, \docValue{4} and \docValue{6} layouts are intended for - slides in the usual 4:3 aspect ratio, while the \docValue{3}, \docValue{4plus} - and \docValue{8} layouts are intended for widescreen slides. + next to each slide. The effects of the various values are shown in Figure~\ref{fig:layouts} on page~\pageref{fig:layouts}. Note that the \val{2}, \val{3plus}, \val{4} + and \val{6} layouts are intended for slides in the usual 4:3 aspect ratio, + while the \val{3}, \val{4plus} and \val{8} layouts are intended for widescreen + slides. \end{docKey} \newtcolorbox{pseudopage}[1][]% @@ -962,7 +964,30 @@ using the following command in the preamble. ,#1 } \begin{figure}[t!] + \newcounter{subfig}% + \def\sfno{\rule[-\bigskipamount]{0pt}{1em}\stepcounter{subfig}(\alph{subfig})\space}% \centering + \begin{minipage}[b]{11em} + \centering + \begin{pseudopage}[width=10em,height=7.1em] + \begin{pseudoslide}[width=8em,height=6em] + \texttt{1} + \end{pseudoslide} + \end{pseudopage} + \par + \sfno\key{nup}=\docValue{1} + \end{minipage} + \begin{minipage}[b]{11em} + \centering + \begin{pseudopage} + \begin{pseudoslide}[width=6em,height=4.5em] + \texttt{1} + \end{pseudoslide}\par\smallskip + \vbox to 4.5em{} + \end{pseudopage} + \par + \sfno\key{nup}=\docValue{1plus} + \end{minipage} \begin{minipage}[b]{11em} \centering \begin{pseudopage} @@ -974,7 +999,7 @@ using the following command in the preamble. \end{pseudoslide} \end{pseudopage} \par - (a) \key{nup}=\val{2} + \sfno\key{nup}=\docValue{2} \end{minipage} \begin{minipage}[b]{11em} \centering @@ -992,7 +1017,7 @@ using the following command in the preamble. \end{pseudowideslide} \end{pseudopage} \par - (b) \key{nup}=\val{3} + \sfno\key{nup}=\docValue{3} \end{minipage} \begin{minipage}[b]{11em} \centering @@ -1004,9 +1029,8 @@ using the following command in the preamble. \begin{pseudoslide}\texttt{3}\end{pseudoslide} \end{pseudopage} \par - (c) \key{nup}=\val{3plus} + \sfno\key{nup}=\docValue{3plus} \end{minipage} - \par\bigskip \begin{minipage}[b]{11em} \centering \begin{pseudopage}[width=10em,height=7.1em] @@ -1024,7 +1048,7 @@ using the following command in the preamble. \end{pseudoslide} \end{pseudopage} \par - (d) \key{nup}=\val{4} + \sfno\key{nup}=\docValue{4} \end{minipage} \begin{minipage}[b]{11em} \centering @@ -1038,7 +1062,7 @@ using the following command in the preamble. \begin{pseudowideslide}\texttt{4}\end{pseudowideslide} \end{pseudopage} \par - (e) \key{nup}=\val{4plus} + \sfno\key{nup}=\docValue{4plus} \end{minipage} \begin{minipage}[b]{11em} \centering @@ -1053,9 +1077,8 @@ using the following command in the preamble. \begin{pseudoslide}\texttt{6}\end{pseudoslide} \end{pseudopage} \par - (f) \key{nup}=\val{6} + \sfno\key{nup}=\docValue{6} \end{minipage} - \par\bigskip \begin{minipage}[b]{11em} \centering \begin{pseudopage} @@ -1072,9 +1095,9 @@ using the following command in the preamble. \begin{pseudowideslide}\texttt{8}\end{pseudowideslide} \end{pseudopage} \par - (g) \key{nup}=\val{8} + \sfno\key{nup}=\docValue{8} \end{minipage} - \par + \\ \caption{Handout layouts provided by \pkg{beamerswitch}} \label{fig:layouts} \end{figure} @@ -1181,6 +1204,7 @@ suggestions for improvements or new features to the \href{https://github.com/alex-ball/beamerswitch/issues}{Issue Tracker} on GitHub. \StopEventually{^^A + \newpage \PrintChanges \printindex } @@ -1561,6 +1585,8 @@ suggestions for improvements or new features to the % \end{optionkey} % % \begin{optionkey}{nup} +% \begin{optionvalue}{1} +% \begin{optionvalue}{1plus} % \begin{optionvalue}{2} % \begin{optionvalue}{3} % \begin{optionvalue}{3plus} @@ -1568,17 +1594,19 @@ suggestions for improvements or new features to the % \begin{optionvalue}{4plus} % \begin{optionvalue}{6} % \begin{optionvalue}{8} +% \changes{v1.7}{2020/06/06}{Add \key{nup}\string\MY@EQUALS\val{1} option.} +% \changes{v1.7}{2020/06/06}{Add \key{nup}\string\MY@EQUALS\val{1plus} option.} % The \key{nup} option specifies how many slides to include per page. % The `plus' keyword indicates a layout with additional gaps for writing. % % \begin{macrocode} \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.}% } % \end{macrocode} % \end{optionvalue} @@ -1588,6 +1616,8 @@ suggestions for improvements or new features to the % \end{optionvalue} % \end{optionvalue} % \end{optionvalue} +% \end{optionvalue} +% \end{optionvalue} % \end{optionkey} % % \begin{optionkey}{border} @@ -1720,6 +1750,10 @@ suggestions for improvements or new features to the }% \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}% @@ -1754,6 +1788,14 @@ suggestions for improvements or new features to the % % \begin{macrocode} \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]% @@ -1801,10 +1843,92 @@ suggestions for improvements or new features to the % Though \pkg{pgfpages} defines some perfectly fine layouts, we need to add % configurability to the existing ones and provide some new ones. % -% The `1 by 2' layout is similar to the normal \key{2 on 1} layout. +% \changes{v1.7}{2020/06/06}{Add `1 by 1' layout.} +% The `1 by 1' layout has a single slide per page. % % \begin{macrocode} \mode{% + \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}% + }% + }% +% \end{macrocode} +% +% \changes{v1.7}{2020/06/06}{Add `1 by 1 narrow' layout.} +% The `1 by 1 narrow' layout is similar to the normal \key{2 on 1} layout, but +% there is a notes area instead of the second slide. +% +% \begin{macrocode} + \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 + } +% \end{macrocode} +% +% The `1 by 2' layout is similar to the normal \key{2 on 1} layout. +% +% \begin{macrocode} \pgfpagesdeclarelayout{1 by 2} { \edef\pgfpageoptionheight{\the\paperwidth} % landscaped by default diff --git a/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.ins b/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.ins deleted file mode 100644 index e3358a2652b..00000000000 --- a/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.ins +++ /dev/null @@ -1,46 +0,0 @@ -%% -%% This is file `beamerswitch.ins', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% beamerswitch.dtx (with options: `install') -%% ---------------------------------------------------------------- -%% beamerswitch --- Convenient mode selection in Beamer documents -%% Author: Alex Ball -%% E-mail: ab318@bath.ac.uk -%% License: Released under the LaTeX Project Public License v1.3c or later -%% See: http://www.latex-project.org/lppl.txt -%% ---------------------------------------------------------------- -%% -\input docstrip.tex -\keepsilent -\askforoverwritefalse -\preamble ----------------------------------------------------------------- -beamerswitch --- Convenient mode selection in Beamer documents -Author: Alex Ball -E-mail: ab318@bath.ac.uk -License: Released under the LaTeX Project Public License v1.3c or later -See: http://www.latex-project.org/lppl.txt ----------------------------------------------------------------- - -\endpreamble -\postamble - -Copyright (C) 2016-2020 by Alex Ball -\endpostamble - -\usedir{tex/latex/\jobname} -\generate{ - \file{\jobname.cls}{\from{\jobname.dtx}{class}} -} -\usedir{doc/latex/\jobname} -\generate{ - \file{\jobname-example.tex}{\from{\jobname.dtx}{example}} -} -\endbatchfile -%% -%% Copyright (C) 2016-2020 by Alex Ball -%% -%% End of file `beamerswitch.ins'. 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{% + \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 -- cgit v1.2.3