diff options
author | Karl Berry <karl@freefriends.org> | 2019-01-28 22:04:15 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-01-28 22:04:15 +0000 |
commit | 99c613f04edeed8a28efac69411132ea2cd8164d (patch) | |
tree | 08dfa6b30c8ee0ed1fd6d71f5cde0542efb80cdd | |
parent | 3e868961dcbbe4a5ef7f395e1d9cb824100e0046 (diff) |
beamerswitch (28jan19)
git-svn-id: svn://tug.org/texlive/trunk@49849 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/beamerswitch/README.md | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-article.pdf | bin | 19449 -> 19248 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-handout.pdf | bin | 21750 -> 21461 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-trans.pdf | bin | 22398 -> 22069 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example.pdf | bin | 36065 -> 35523 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example.tex | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/beamerswitch/beamerswitch.pdf | bin | 180847 -> 184848 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/beamerswitch/Makefile (renamed from Master/texmf-dist/doc/latex/beamerswitch/Makefile) | 6 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/beamerswitch/beamerswitch.dtx | 87 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/beamerswitch/beamerswitch.ins | 8 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/beamerswitch/beamerswitch.cls | 18 |
11 files changed, 89 insertions, 36 deletions
diff --git a/Master/texmf-dist/doc/latex/beamerswitch/README.md b/Master/texmf-dist/doc/latex/beamerswitch/README.md index a9fa98d429a..78923edafbd 100644 --- a/Master/texmf-dist/doc/latex/beamerswitch/README.md +++ b/Master/texmf-dist/doc/latex/beamerswitch/README.md @@ -88,7 +88,7 @@ first three steps. ## Licence -Copyright 2016–2018 Alex Ball. +Copyright 2016–2019 Alex Ball. This work consists of the file beamerswitch.dtx and a Makefile. diff --git a/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-article.pdf b/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-article.pdf Binary files differindex 252abb8ebed..2336fbddcb0 100644 --- a/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-article.pdf +++ b/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-article.pdf diff --git a/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-handout.pdf b/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-handout.pdf Binary files differindex 2379a5e71ae..b833a07a919 100644 --- a/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-handout.pdf +++ b/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-handout.pdf diff --git a/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-trans.pdf b/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-trans.pdf Binary files differindex 345e28dc55a..7b3e5d6e3ce 100644 --- a/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-trans.pdf +++ b/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-trans.pdf diff --git a/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example.pdf b/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example.pdf Binary files differindex fbd9042cce9..63fb967d240 100644 --- a/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example.pdf +++ b/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example.pdf diff --git a/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example.tex b/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example.tex index 6fc2fa51423..9547ef4d16c 100644 --- a/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example.tex +++ b/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example.tex @@ -8,7 +8,7 @@ %% ---------------------------------------------------------------- %% beamerswitch --- Convenient mode selection in Beamer documents %% Author: Alex Ball -%% E-mail: a.j.ball@bath.ac.uk +%% 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 %% ---------------------------------------------------------------- @@ -77,6 +77,6 @@ Happy {\LaTeX}ing! \end{document} %% -%% Copyright (C) 2016-2018 by Alex Ball <a.j.ball@bath.ac.uk> +%% Copyright (C) 2016-2019 by Alex Ball <ab318@bath.ac.uk> %% %% End of file `beamerswitch-example.tex'. diff --git a/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch.pdf b/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch.pdf Binary files differindex b343110216f..cf23e0503ae 100644 --- a/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch.pdf +++ b/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch.pdf diff --git a/Master/texmf-dist/doc/latex/beamerswitch/Makefile b/Master/texmf-dist/source/latex/beamerswitch/Makefile index 351e476ea33..56df2d3e87e 100644 --- a/Master/texmf-dist/doc/latex/beamerswitch/Makefile +++ b/Master/texmf-dist/source/latex/beamerswitch/Makefile @@ -14,9 +14,11 @@ all: $(NAME).pdf $(NAME)-example.pdf clean $(NAME).cls $(NAME)-example.tex: $(NAME).dtx tex -interaction=batchmode $(NAME).dtx >/dev/null $(NAME).pdf: $(NAME).dtx - latexmk -silent -lualatex -synctex=1 -shell-escape -interaction=batchmode $(NAME).dtx >/dev/null + lualatex -shell-escape -recorder -interaction=batchmode $(NAME).dtx >/dev/null + if [ -f $(NAME).glo ]; then makeindex -q -s gglo.ist -o $(NAME).gls $(NAME).glo; fi + latexmk -silent -pdflua -shell-escape -interaction=batchmode $(NAME).dtx >/dev/null $(NAME)-example.pdf $(NAME)-example-trans.pdf $(NAME)-example-handout.pdf $(NAME)-example-article.pdf: $(NAME).cls $(NAME)-example.tex - latexmk -silent -lualatex -synctex=1 -shell-escape -interaction=batchmode $(NAME)-example.tex >/dev/null + latexmk -silent -pdflua -shell-escape -interaction=batchmode $(NAME)-example.tex >/dev/null clean: rm -f $(NAME){,-example,-example-article,-example-handout,-example-trans}.{aux,bbl,bcf,blg,doc,fdb_latexmk,fls,glo,gls,hd,idx,ilg,ind,listing,log,nav,out,run.xml,snm,synctex.gz,tcbtemp,toc,vrb} rm -rf _minted-$(NAME) diff --git a/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.dtx b/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.dtx index 38340046358..3c72f4f40d4 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–2018 Alex Ball. +Copyright 2016–2019 Alex Ball. This work consists of the file beamerswitch.dtx and a Makefile. @@ -185,7 +185,7 @@ This work is "maintained" (as per LPPL maintenance status) by ---------------------------------------------------------------- beamerswitch --- Convenient mode selection in Beamer documents Author: Alex Ball -E-mail: a.j.ball@bath.ac.uk +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 ---------------------------------------------------------------- @@ -193,7 +193,7 @@ See: http://www.latex-project.org/lppl.txt \endpreamble \postamble -Copyright (C) 2016-2018 by Alex Ball <a.j.ball@bath.ac.uk> +Copyright (C) 2016-2019 by Alex Ball <ab318@bath.ac.uk> \endpostamble \usedir{tex/latex/\jobname} @@ -228,7 +228,7 @@ Copyright (C) 2016-2018 by Alex Ball <a.j.ball@bath.ac.uk> %<class>\NeedsTeXFormat{LaTeX2e}[1999/12/01] %<class>\ProvidesClass{beamerswitch} %<*class> - [2018/09/05 v1.4.1 Convenient mode selection in Beamer documents] + [2019/01/28 v1.5 Convenient mode selection in Beamer documents] %</class> %<*driver> \documentclass[12pt]{article} @@ -331,26 +331,33 @@ Copyright (C) 2016-2018 by Alex Ball <a.j.ball@bath.ac.uk> \newcommand*{\env}[1]{\textcolor{Environment}{\ttfamily #1}} \newcommand*{\key}[1]{\textcolor{Option}{\ttfamily #1}} \newcommand*{\val}[1]{\textcolor{Value}{\ttfamily #1}} + +\makeatletter \renewenvironment{macro}[1]{% - \def\MyName{#1}% - \index{\MyName@\tcbIndexPrintComC {\MyName}|(emph}% + \StrSubstitute{#1}{\detokenize{@}}{"@}[\MyName]% + \edef\saved@macroname{\expandafter\string\csname #1\endcsname}% + \let\saved@indexname\saved@macroname + \index{\MyName @\tcbIndexPrintComC {\MyName}|(emph}% }{% \ifdef{\MyName}{}{% \errmessage{You have closed a macro environment you have not opened on \the\inputlineno.}% } - \index{\MyName@\tcbIndexPrintComC {\MyName}|)}% + \index{\MyName @\tcbIndexPrintComC {\MyName}|)}% } \renewenvironment{environment}[1]{% - \def\MyName{#1}% - \index{\MyName@\tcbIndexPrintEnvCA {\MyName}|(emph}% - \index{Environments!\MyName@\tcbIndexPrintEnvC {\MyName}|(emph}% + \StrSubstitute{#1}{\detokenize{@}}{"@}[\MyName]% + \edef\saved@macroname{#1}% + \let\saved@indexname\saved@macroname + \index{\MyName @\tcbIndexPrintEnvCA {\MyName}|(emph}% + \index{Environments!\MyName @\tcbIndexPrintEnvC {\MyName}|(emph}% }{% \ifdef{\MyName}{}{% \errmessage{You have closed an environment environment you have not opened on \the\inputlineno.}% } - \index{Environments!\MyName@\tcbIndexPrintEnvC {\MyName}|)}% - \index{\MyName@\tcbIndexPrintEnvCA {\MyName}|)}% + \index{Environments!\MyName @\tcbIndexPrintEnvC {\MyName}|)}% + \index{\MyName @\tcbIndexPrintEnvCA {\MyName}|)}% } +\makeatother \newenvironment{optionkey}[1]{% \def\MyName{#1}% \index{\MyName@\tcbIndexPrintKeyCA {\MyName}|(emph}% @@ -495,7 +502,6 @@ To contact the author about this package, please visit the GitHub page where the code is hosted: \url{https://github.com/alex-ball/beamerswitch}. \end{absquote} -\changes{v1.1}{2016/08/19}{Fix \key{maketitle} and \key{textinst} options.} \changes{v1.2}{2016/05/22}{Add `Quick start guide' section.} \section{Quick start guide} @@ -1081,9 +1087,7 @@ using the following command in the preamble. \end{docKey} \begin{docKey}{border}{=\meta{length}}{default 0.4pt, initially 0pt} - Puts a rectangular border of thickness \meta{length} around each slide. Note - that the borders are drawn regardless of whether a slide is actually printed, - so you may end up with empty boxes on the last page. + Puts a rectangular border of thickness \meta{length} around each slide. \end{docKey} \begin{docKey}{margin}{=\meta{length}}{default 0pt, initially 5mm} @@ -1357,8 +1361,8 @@ suggestions for improvements or new features to the % \end{macro} % \end{macro} % -% \changes{v1.3}{2017/12/10}{Decompose \cs{BeamerswitchSpawn} into further configurable macros.} % \begin{macro}{BeamerswitchSpawn} +% \changes{v1.3}{2017/12/10}{Decompose \cs{BeamerswitchSpawn} into further configurable macros.} % \begin{macro}{SpawnedTeX} % \begin{macro}{SpawnedPDFTeX} % \begin{macro}{SpawnedXeTeX} @@ -1572,19 +1576,31 @@ suggestions for improvements or new features to the % % \begin{optionkey}{border} % \begin{macro}{beamerswitch@Border} +% \changes{v1.5}{2019/01/28}{Remove empty frames from end of handout.} % The \key{borders} option switches on borders around the slides on handout % pages (and gaps where slides would appear if there were enough). The value % is used to set the width of the border. % % This is implemented as a PGF drawing command, which is initially set up to do -% nothing but gets filled out if the option is selected. +% nothing but gets filled out if the option is selected. As part of this, we +% calculate the number of the current slide (|handoutpno| gives the current page +% number minus one; \cs{beamerswitch@nup} is the number of slides per page; +% and \cs{pgf@cpn} gives the count of the current slide on the current page). +% If this exceeds the total number of slides, we suppress the border. % % \begin{macrocode} \newcommand*{\beamerswitch@Border}{\relax} \define@key[HL]{beamerswitch}{border}[0.4pt]{% \RequirePackage{pgf}% \ifdimcomp{#1}{>}{0pt}{% - \renewcommand*{\beamerswitch@Border}{\pgfsetlinewidth{#1}\pgfstroke}% + \renewcommand*{\beamerswitch@Border}{% + \ifnumcomp{(\value{handoutpno} * \beamerswitch@nup) + \the\pgf@cpn}% + {>}{\beamer@endpageofdocument}{% + \relax + }{% + \pgfsetlinewidth{#1}\pgfstroke + }% + }% }{% \renewcommand*{\beamerswitch@Border}{\relax}% }% @@ -1593,8 +1609,8 @@ suggestions for improvements or new features to the % \end{macro} % \end{optionkey} % -% \changes{v1.4}{2018/08/29}{Make margins around slides a configurable size} % \begin{optionkey}{margin} +% \changes{v1.4}{2018/08/29}{Make margins around slides a configurable size} % \begin{macro}{beamerswitch@margin} % The \key{margin} option controls how much white space is added around each % slide on handout pages. It corresponds to the \texttt{border shrink} option @@ -1650,9 +1666,24 @@ suggestions for improvements or new features to the % \end{macro} % % \begin{macro}{handoutlayout} -% \begin{macro}{beamerswitch@nup} +% \begin{macro}{beamerswitch@pnoadjust} % We set up the \cs{handoutlayout} command for applying these options. % +% The hook \cs{beamerswitch@footer} is used to step the page number +% counter |handoutpno|; if page numering is active, it also places the +% number on the page centered and \cs{handoutpnobaseline} up from the +% bottom. +% +% The length \cs{beamerswitch@pnoadjust} is, conceptually, the height +% of the page number. When page numbers are active, the margin around +% slides is automatically increased to guarantee that the top of the +% page number will not be higher than the bottom of the lowest slide. +% Currently this does not account for extra whitespace arising from +% aspect ratio issues. When the \key{align} option is active, the margin +% at the bottom of the page is increased, but to save a register we +% make the adjustment to \cs{beamerswitch@pnoadjust} instead of a copy +% of \cs{beamerswitch@margin}. +% % \begin{macrocode} \newlength{\beamerswitch@pnoadjust} \newcommand*{\handoutlayout}[1]{% @@ -1694,8 +1725,18 @@ suggestions for improvements or new features to the {\the\dimexpr\handoutpnobaseline + \beamerswitch@pnoadjust\relax}% }{}% }{% - \def\beamerswitch@footer{}% + \def\beamerswitch@footer{\stepcounter{handoutpno}}% }% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{beamerswitch@nup} +% The value of the \key{nup} option is used both to select the layout +% and set the value of \cs{beamerswitch@nup}. The latter is used to +% suppress unwanted borders and check if \cs{handoutlayout} has been +% called. +% +% \begin{macrocode} \ifcase\value{beamerswitch@nupcase}\relax \def\beamerswitch@nup{2}% \pgfpagesuselayout{1 by 2}[\beamerswitch@handoutpaper,% @@ -2315,6 +2356,7 @@ suggestions for improvements or new features to the \pgfpageslogicalpageoptions{1} {% border shrink=\pgfpageoptionborder,% + border code=\beamerswitch@Border,% resized width=.5\pgfphysicalwidth,% resized height=.333\pgfphysicalheight,% center=\ifbool{HL@beamerswitch@align}{% @@ -2630,6 +2672,7 @@ suggestions for improvements or new features to the % % We provide some options for configuring the appearance of article mode. % +% \changes{v1.1}{2016/08/19}{Fix \key{maketitle} and \key{textinst} options.} % \begin{optionkey}{maketitle} % The \key{maketitle} option triggers adjustments in how the title block is % printed. diff --git a/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.ins b/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.ins index 9db81b07ff1..5fedb56b8f0 100644 --- a/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.ins +++ b/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.ins @@ -8,7 +8,7 @@ %% ---------------------------------------------------------------- %% beamerswitch --- Convenient mode selection in Beamer documents %% Author: Alex Ball -%% E-mail: a.j.ball@bath.ac.uk +%% 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 %% ---------------------------------------------------------------- @@ -20,7 +20,7 @@ ---------------------------------------------------------------- beamerswitch --- Convenient mode selection in Beamer documents Author: Alex Ball -E-mail: a.j.ball@bath.ac.uk +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 ---------------------------------------------------------------- @@ -28,7 +28,7 @@ See: http://www.latex-project.org/lppl.txt \endpreamble \postamble -Copyright (C) 2016-2018 by Alex Ball <a.j.ball@bath.ac.uk> +Copyright (C) 2016-2019 by Alex Ball <ab318@bath.ac.uk> \endpostamble \usedir{tex/latex/\jobname} @@ -41,6 +41,6 @@ Copyright (C) 2016-2018 by Alex Ball <a.j.ball@bath.ac.uk> } \endbatchfile %% -%% Copyright (C) 2016-2018 by Alex Ball <a.j.ball@bath.ac.uk> +%% Copyright (C) 2016-2019 by Alex Ball <ab318@bath.ac.uk> %% %% 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 a9302bd920a..150b22391cf 100644 --- a/Master/texmf-dist/tex/latex/beamerswitch/beamerswitch.cls +++ b/Master/texmf-dist/tex/latex/beamerswitch/beamerswitch.cls @@ -8,14 +8,14 @@ %% ---------------------------------------------------------------- %% beamerswitch --- Convenient mode selection in Beamer documents %% Author: Alex Ball -%% E-mail: a.j.ball@bath.ac.uk +%% 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 %% ---------------------------------------------------------------- %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesClass{beamerswitch} - [2018/09/05 v1.4.1 Convenient mode selection in Beamer documents] + [2019/01/28 v1.5 Convenient mode selection in Beamer documents] \RequirePackage{xkeyval,xkvltxp,etoolbox,xstring,shellesc,iftex} \define@boolkey[DC]{beamerswitch}{beamer}[true]{% \ifbool{DC@beamerswitch@beamer}{% @@ -170,7 +170,14 @@ \define@key[HL]{beamerswitch}{border}[0.4pt]{% \RequirePackage{pgf}% \ifdimcomp{#1}{>}{0pt}{% - \renewcommand*{\beamerswitch@Border}{\pgfsetlinewidth{#1}\pgfstroke}% + \renewcommand*{\beamerswitch@Border}{% + \ifnumcomp{(\value{handoutpno} * \beamerswitch@nup) + \the\pgf@cpn}% + {>}{\beamer@endpageofdocument}{% + \relax + }{% + \pgfsetlinewidth{#1}\pgfstroke + }% + }% }{% \renewcommand*{\beamerswitch@Border}{\relax}% }% @@ -231,7 +238,7 @@ {\the\dimexpr\handoutpnobaseline + \beamerswitch@pnoadjust\relax}% }{}% }{% - \def\beamerswitch@footer{}% + \def\beamerswitch@footer{\stepcounter{handoutpno}}% }% \ifcase\value{beamerswitch@nupcase}\relax \def\beamerswitch@nup{2}% @@ -810,6 +817,7 @@ \pgfpageslogicalpageoptions{1} {% border shrink=\pgfpageoptionborder,% + border code=\beamerswitch@Border,% resized width=.5\pgfphysicalwidth,% resized height=.333\pgfphysicalheight,% center=\ifbool{HL@beamerswitch@align}{% @@ -1228,6 +1236,6 @@ }% } %% -%% Copyright (C) 2016-2018 by Alex Ball <a.j.ball@bath.ac.uk> +%% Copyright (C) 2016-2019 by Alex Ball <ab318@bath.ac.uk> %% %% End of file `beamerswitch.cls'. |