texlive[48603] Master/texmf-dist: beamerswitch (6sep18)
commits+karl at tug.org
commits+karl at tug.org
Thu Sep 6 22:46:11 CEST 2018
Revision: 48603
http://tug.org/svn/texlive?view=revision&revision=48603
Author: karl
Date: 2018-09-06 22:46:11 +0200 (Thu, 06 Sep 2018)
Log Message:
-----------
beamerswitch (6sep18)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/beamerswitch/README.md
trunk/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-article.pdf
trunk/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-handout.pdf
trunk/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-trans.pdf
trunk/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example.pdf
trunk/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example.tex
trunk/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch.pdf
trunk/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.dtx
trunk/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.ins
trunk/Master/texmf-dist/tex/latex/beamerswitch/beamerswitch.cls
Modified: trunk/Master/texmf-dist/doc/latex/beamerswitch/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/beamerswitch/README.md 2018-09-06 20:45:47 UTC (rev 48602)
+++ trunk/Master/texmf-dist/doc/latex/beamerswitch/README.md 2018-09-06 20:46:11 UTC (rev 48603)
@@ -88,7 +88,7 @@
## Licence
-Copyright 2016–2017 Alex Ball.
+Copyright 2016–2018 Alex Ball.
This work consists of the file beamerswitch.dtx and a Makefile.
Modified: trunk/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-article.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-handout.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-trans.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example.tex 2018-09-06 20:45:47 UTC (rev 48602)
+++ trunk/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example.tex 2018-09-06 20:46:11 UTC (rev 48603)
@@ -77,6 +77,6 @@
Happy {\LaTeX}ing!
\end{document}
%%
-%% Copyright (C) 2016-2017 by Alex Ball <a.j.ball at bath.ac.uk>
+%% Copyright (C) 2016-2018 by Alex Ball <a.j.ball at bath.ac.uk>
%%
%% End of file `beamerswitch-example.tex'.
Modified: trunk/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.dtx 2018-09-06 20:45:47 UTC (rev 48602)
+++ trunk/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.dtx 2018-09-06 20:46:11 UTC (rev 48603)
@@ -93,7 +93,7 @@
## Licence
-Copyright 2016–2017 Alex Ball.
+Copyright 2016–2018 Alex Ball.
This work consists of the file beamerswitch.dtx and a Makefile.
@@ -135,10 +135,10 @@
\begin{frame}
\maketitle
\end{frame}
-
+
This very brief demonstration shows how to use the \textsf{beamerswitch} class.
It allows easy switching between four \textsf{beamer} modes:
-
+
\begin{frame}{Beamer modes}
\begin{itemize}[<+->]
\item \textbf{beamer:} regular slides
@@ -148,9 +148,9 @@
document based on the slides
\end{itemize}
\end{frame}
-
+
Notice how the text outside frames is only shown in article mode. Also,
-
+
\begin{frame}{Features shown in this example}
\begin{itemize}[<+->]
\item Different class options are passed to the \textsf{beamer} and
@@ -160,13 +160,13 @@
\item The handout has three slides to a page with room for handwritten
notes at the side, and is in black and white.
\end{itemize}
-
+
\uncover<+->{See the source code of this example to see how it was done.}
\end{frame}
-
+
This PDF also has title and author information saved in the metadata (look
at the properties in your PDF viewer).
-
+
Happy {\LaTeX}ing!
\end{document}
%</example>
@@ -193,7 +193,7 @@
\endpreamble
\postamble
-Copyright (C) 2016-2017 by Alex Ball <a.j.ball at bath.ac.uk>
+Copyright (C) 2016-2018 by Alex Ball <a.j.ball at bath.ac.uk>
\endpostamble
\usedir{tex/latex/\jobname}
@@ -228,7 +228,7 @@
%<class>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<class>\ProvidesClass{beamerswitch}
%<*class>
- [2018/08/29 v1.4 Convenient mode selection in Beamer documents]
+ [2018/09/05 v1.4.1 Convenient mode selection in Beamer documents]
%</class>
%<*driver>
\documentclass[12pt]{article}
@@ -617,7 +617,7 @@
paper.
Beamer can also produce a double-height or double-width slide set, with the
-intention that each half will be shown on a different display (e.g. one for
+intention that each half will be shown on a different display (e.g.\@ one for
the audience, one for the speaker). There are three variations of this,
activated using \cs{setbeameroption}:
@@ -1076,7 +1076,8 @@
\begin{docKey}{pnos}{}{no value, initially unset}
Adds page numbers to the bottom of each page. The number appears at a distance
of \cs{handoutpnobaseline} (initially 5mm) from the bottom edge of the page.
- You change this with \cs{setlength}.
+ You can change this before calling \cs{handoutlayout}, if you like, using the
+ usual mechanisms (e.g.\@ \cs{setlength}).
\end{docKey}
\begin{docKey}{border}{=\meta{length}}{default 0.4pt, initially 0pt}
@@ -1089,7 +1090,7 @@
Sets how much extra space to leave around each slide on the page. To achieve
this it uses the \key{border shrink} option from \pkg{pgfpages}. If you add
page numbers, this value will increase if necessary to prevent the number
- colliding with the slides.
+ colliding with the slides, so treat it as a minimum.
\end{docKey}
\begin{docKey}{align}{}{no value, initially unset}
@@ -1628,11 +1629,26 @@
% \begin{macrocode}
\newlength{\handoutpnobaseline}
\setlength{\handoutpnobaseline}{5mm}
+\newcounter{handoutpno}
\define at boolkey[HL]{beamerswitch}{pnos}[true]{}
% \end{macrocode}
% \end{macro}
% \end{optionkey}
%
+% \begin{macro}{beamerswitch at footer}
+% In order to implement the page numbers, we need to add a hook to the
+% \pkg{pgfpages} shipout routine.
+%
+% \begin{macrocode}
+\def\beamerswitch at footer{}
+\patchcmd{\pgfpages at buildshipoutbox}{%
+ \pgfsys at endpicture
+}{%
+ \beamerswitch at footer\pgfsys at endpicture
+}{}{}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{handoutlayout}
% \begin{macro}{beamerswitch at nup}
% We set up the \cs{handoutlayout} command for applying these options.
@@ -1644,13 +1660,16 @@
\setlength{\beamerswitch at pnoadjust}{1em}%
\setkeys[HL]{beamerswitch}{#1}%
\ifbool{HL at beamerswitch@pnos}{%
- \def\pgfsys at endpicture{%
- \raisebox{\the\handoutpnobaseline}[0pt][0pt]{%
- \makebox[\pgfphysicalwidth]{%
- \the\numexpr(\value{page} - 2 + (\beamerswitch at nup / 2))%
- / \beamerswitch at nup\relax
- }%
- }\par
+ \def\beamerswitch at footer{%
+ \stepcounter{handoutpno}%
+ \setbox0\vbox{\makebox[0pt][c]{\arabic{handoutpno}}}%
+ \pgfsys at beginscope
+ \pgflowlevel{\pgftransformshift{%
+ \pgfpoint{.5\pgfphysicalwidth}{\handoutpnobaseline}}}%
+ \wd0=0pt%
+ \dp0=-\ht0%
+ \pgfsys at hbox0%
+ \pgfsys at endscope
}%
\ifbool{HL at beamerswitch@align}{%
\ifcase\value{beamerswitch at nupcase}\relax
@@ -1675,7 +1694,7 @@
{\the\dimexpr\handoutpnobaseline + \beamerswitch at pnoadjust\relax}%
}{}%
}{%
- \def\pgfsys at endpicture{}%
+ \def\beamerswitch at footer{}%
}%
\ifcase\value{beamerswitch at nupcase}\relax
\def\beamerswitch at nup{2}%
@@ -2777,7 +2796,8 @@
\ifundef{\beamer at originstitute}{%
\renewcommand{\institute}[2][]{\def\insertinstitute{##2}}%
}{%
- \renewcommand{\institute}[2][]{\def\insertinstitute{##2}\beamer at originstitute{##2}}%
+ \renewcommand{\institute}[2][]{%
+ \def\insertinstitute{##2}\beamer at originstitute{##2}}%
}%
% \end{macrocode}
%
Modified: trunk/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.ins 2018-09-06 20:45:47 UTC (rev 48602)
+++ trunk/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.ins 2018-09-06 20:46:11 UTC (rev 48603)
@@ -28,7 +28,7 @@
\endpreamble
\postamble
-Copyright (C) 2016-2017 by Alex Ball <a.j.ball at bath.ac.uk>
+Copyright (C) 2016-2018 by Alex Ball <a.j.ball at bath.ac.uk>
\endpostamble
\usedir{tex/latex/\jobname}
@@ -41,6 +41,6 @@
}
\endbatchfile
%%
-%% Copyright (C) 2016-2017 by Alex Ball <a.j.ball at bath.ac.uk>
+%% Copyright (C) 2016-2018 by Alex Ball <a.j.ball at bath.ac.uk>
%%
%% End of file `beamerswitch.ins'.
Modified: trunk/Master/texmf-dist/tex/latex/beamerswitch/beamerswitch.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/beamerswitch/beamerswitch.cls 2018-09-06 20:45:47 UTC (rev 48602)
+++ trunk/Master/texmf-dist/tex/latex/beamerswitch/beamerswitch.cls 2018-09-06 20:46:11 UTC (rev 48603)
@@ -15,7 +15,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesClass{beamerswitch}
- [2018/08/29 v1.4 Convenient mode selection in Beamer documents]
+ [2018/09/05 v1.4.1 Convenient mode selection in Beamer documents]
\RequirePackage{xkeyval,xkvltxp,etoolbox,xstring,shellesc,iftex}
\define at boolkey[DC]{beamerswitch}{beamer}[true]{%
\ifbool{DC at beamerswitch@beamer}{%
@@ -183,7 +183,14 @@
\define at boolkey[HL]{beamerswitch}{align}[true]{}
\newlength{\handoutpnobaseline}
\setlength{\handoutpnobaseline}{5mm}
+\newcounter{handoutpno}
\define at boolkey[HL]{beamerswitch}{pnos}[true]{}
+\def\beamerswitch at footer{}
+\patchcmd{\pgfpages at buildshipoutbox}{%
+ \pgfsys at endpicture
+}{%
+ \beamerswitch at footer\pgfsys at endpicture
+}{}{}
\newlength{\beamerswitch at pnoadjust}
\newcommand*{\handoutlayout}[1]{%
\only<handout>{%
@@ -190,13 +197,16 @@
\setlength{\beamerswitch at pnoadjust}{1em}%
\setkeys[HL]{beamerswitch}{#1}%
\ifbool{HL at beamerswitch@pnos}{%
- \def\pgfsys at endpicture{%
- \raisebox{\the\handoutpnobaseline}[0pt][0pt]{%
- \makebox[\pgfphysicalwidth]{%
- \the\numexpr(\value{page} - 2 + (\beamerswitch at nup / 2))%
- / \beamerswitch at nup\relax
- }%
- }\par
+ \def\beamerswitch at footer{%
+ \stepcounter{handoutpno}%
+ \setbox0\vbox{\makebox[0pt][c]{\arabic{handoutpno}}}%
+ \pgfsys at beginscope
+ \pgflowlevel{\pgftransformshift{%
+ \pgfpoint{.5\pgfphysicalwidth}{\handoutpnobaseline}}}%
+ \wd0=0pt%
+ \dp0=-\ht0%
+ \pgfsys at hbox0%
+ \pgfsys at endscope
}%
\ifbool{HL at beamerswitch@align}{%
\ifcase\value{beamerswitch at nupcase}\relax
@@ -221,7 +231,7 @@
{\the\dimexpr\handoutpnobaseline + \beamerswitch at pnoadjust\relax}%
}{}%
}{%
- \def\pgfsys at endpicture{}%
+ \def\beamerswitch at footer{}%
}%
\ifcase\value{beamerswitch at nupcase}\relax
\def\beamerswitch at nup{2}%
@@ -1174,7 +1184,8 @@
\ifundef{\beamer at originstitute}{%
\renewcommand{\institute}[2][]{\def\insertinstitute{##2}}%
}{%
- \renewcommand{\institute}[2][]{\def\insertinstitute{##2}\beamer at originstitute{##2}}%
+ \renewcommand{\institute}[2][]{%
+ \def\insertinstitute{##2}\beamer at originstitute{##2}}%
}%
\def\@maketitle{%
\newpage
@@ -1217,6 +1228,6 @@
}%
}
%%
-%% Copyright (C) 2016-2017 by Alex Ball <a.j.ball at bath.ac.uk>
+%% Copyright (C) 2016-2018 by Alex Ball <a.j.ball at bath.ac.uk>
%%
%% End of file `beamerswitch.cls'.
More information about the tex-live-commits
mailing list