summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/beamerswitch
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-09-06 20:46:11 +0000
committerKarl Berry <karl@freefriends.org>2018-09-06 20:46:11 +0000
commitd0c7cc17855848085c3c573b0b62f5495cecc326 (patch)
treead0f190302df6545e113eadb66b1842dcede5846 /Master/texmf-dist/source/latex/beamerswitch
parent377516403ae12dd92c9bd71db17077c8c3efb154 (diff)
beamerswitch (6sep18)
git-svn-id: svn://tug.org/texlive/trunk@48603 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/beamerswitch')
-rw-r--r--Master/texmf-dist/source/latex/beamerswitch/beamerswitch.dtx64
-rw-r--r--Master/texmf-dist/source/latex/beamerswitch/beamerswitch.ins4
2 files changed, 44 insertions, 24 deletions
diff --git a/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.dtx b/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.dtx
index 385951fe169..38340046358 100644
--- a/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.dtx
+++ b/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.dtx
@@ -93,7 +93,7 @@ first three steps.
## 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 @@ This work is "maintained" (as per LPPL maintenance status) by
\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 @@ This work is "maintained" (as per LPPL maintenance status) by
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 @@ This work is "maintained" (as per LPPL maintenance status) by
\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 @@ See: http://www.latex-project.org/lppl.txt
\endpreamble
\postamble
-Copyright (C) 2016-2017 by Alex Ball <a.j.ball@bath.ac.uk>
+Copyright (C) 2016-2018 by Alex Ball <a.j.ball@bath.ac.uk>
\endpostamble
\usedir{tex/latex/\jobname}
@@ -228,7 +228,7 @@ Copyright (C) 2016-2017 by Alex Ball <a.j.ball@bath.ac.uk>
%<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 @@ with \pkg{pgfpages} to get several slides on a single side of A4 (or Letter)
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 @@ using the following command in the preamble.
\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 @@ using the following command in the preamble.
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 @@ suggestions for improvements or new features to the
% \begin{macrocode}
\newlength{\handoutpnobaseline}
\setlength{\handoutpnobaseline}{5mm}
+\newcounter{handoutpno}
\define@boolkey[HL]{beamerswitch}{pnos}[true]{}
% \end{macrocode}
% \end{macro}
% \end{optionkey}
%
+% \begin{macro}{beamerswitch@footer}
+% In order to implement the page numbers, we need to add a hook to the
+% \pkg{pgfpages} shipout routine.
+%
+% \begin{macrocode}
+\def\beamerswitch@footer{}
+\patchcmd{\pgfpages@buildshipoutbox}{%
+ \pgfsys@endpicture
+}{%
+ \beamerswitch@footer\pgfsys@endpicture
+}{}{}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{handoutlayout}
% \begin{macro}{beamerswitch@nup}
% We set up the \cs{handoutlayout} command for applying these options.
@@ -1644,13 +1660,16 @@ suggestions for improvements or new features to the
\setlength{\beamerswitch@pnoadjust}{1em}%
\setkeys[HL]{beamerswitch}{#1}%
\ifbool{HL@beamerswitch@pnos}{%
- \def\pgfsys@endpicture{%
- \raisebox{\the\handoutpnobaseline}[0pt][0pt]{%
- \makebox[\pgfphysicalwidth]{%
- \the\numexpr(\value{page} - 2 + (\beamerswitch@nup / 2))%
- / \beamerswitch@nup\relax
- }%
- }\par
+ \def\beamerswitch@footer{%
+ \stepcounter{handoutpno}%
+ \setbox0\vbox{\makebox[0pt][c]{\arabic{handoutpno}}}%
+ \pgfsys@beginscope
+ \pgflowlevel{\pgftransformshift{%
+ \pgfpoint{.5\pgfphysicalwidth}{\handoutpnobaseline}}}%
+ \wd0=0pt%
+ \dp0=-\ht0%
+ \pgfsys@hbox0%
+ \pgfsys@endscope
}%
\ifbool{HL@beamerswitch@align}{%
\ifcase\value{beamerswitch@nupcase}\relax
@@ -1675,7 +1694,7 @@ suggestions for improvements or new features to the
{\the\dimexpr\handoutpnobaseline + \beamerswitch@pnoadjust\relax}%
}{}%
}{%
- \def\pgfsys@endpicture{}%
+ \def\beamerswitch@footer{}%
}%
\ifcase\value{beamerswitch@nupcase}\relax
\def\beamerswitch@nup{2}%
@@ -2777,7 +2796,8 @@ suggestions for improvements or new features to the
\ifundef{\beamer@originstitute}{%
\renewcommand{\institute}[2][]{\def\insertinstitute{##2}}%
}{%
- \renewcommand{\institute}[2][]{\def\insertinstitute{##2}\beamer@originstitute{##2}}%
+ \renewcommand{\institute}[2][]{%
+ \def\insertinstitute{##2}\beamer@originstitute{##2}}%
}%
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.ins b/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.ins
index e48670e9fbe..9db81b07ff1 100644
--- a/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.ins
+++ b/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.ins
@@ -28,7 +28,7 @@ See: http://www.latex-project.org/lppl.txt
\endpreamble
\postamble
-Copyright (C) 2016-2017 by Alex Ball <a.j.ball@bath.ac.uk>
+Copyright (C) 2016-2018 by Alex Ball <a.j.ball@bath.ac.uk>
\endpostamble
\usedir{tex/latex/\jobname}
@@ -41,6 +41,6 @@ Copyright (C) 2016-2017 by Alex Ball <a.j.ball@bath.ac.uk>
}
\endbatchfile
%%
-%% Copyright (C) 2016-2017 by Alex Ball <a.j.ball@bath.ac.uk>
+%% Copyright (C) 2016-2018 by Alex Ball <a.j.ball@bath.ac.uk>
%%
%% End of file `beamerswitch.ins'.