texlive[64174] Master/texmf-dist: beamerswitch (23aug22)
commits+karl at tug.org
commits+karl at tug.org
Tue Aug 23 22:12:25 CEST 2022
Revision: 64174
http://tug.org/svn/texlive?view=revision&revision=64174
Author: karl
Date: 2022-08-23 22:12:25 +0200 (Tue, 23 Aug 2022)
Log Message:
-----------
beamerswitch (23aug22)
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/tex/latex/beamerswitch/beamerswitch.cls
Modified: trunk/Master/texmf-dist/doc/latex/beamerswitch/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/beamerswitch/README.md 2022-08-23 20:12:06 UTC (rev 64173)
+++ trunk/Master/texmf-dist/doc/latex/beamerswitch/README.md 2022-08-23 20:12:25 UTC (rev 64174)
@@ -88,7 +88,7 @@
## Licence
-Copyright 2016–2021 Alex Ball.
+Copyright 2016–2022 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 2022-08-23 20:12:06 UTC (rev 64173)
+++ trunk/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example.tex 2022-08-23 20:12:25 UTC (rev 64174)
@@ -78,6 +78,6 @@
Happy {\LaTeX}ing!
\end{document}
%%
-%% Copyright (C) 2016-2021 by Alex Ball <ab318 at bath.ac.uk>
+%% Copyright (C) 2016-2022 by Alex Ball <ab318 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 2022-08-23 20:12:06 UTC (rev 64173)
+++ trunk/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.dtx 2022-08-23 20:12:25 UTC (rev 64174)
@@ -93,7 +93,7 @@
## Licence
-Copyright 2016–2021 Alex Ball.
+Copyright 2016–2022 Alex Ball.
This work consists of the file beamerswitch.dtx and a Makefile.
@@ -194,7 +194,7 @@
\endpreamble
\postamble
-Copyright (C) 2016-2021 by Alex Ball <ab318 at bath.ac.uk>
+Copyright (C) 2016-2022 by Alex Ball <ab318 at bath.ac.uk>
\endpostamble
\usedir{tex/latex/\jobname}
@@ -229,7 +229,7 @@
%<class>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<class>\ProvidesClass{beamerswitch}
%<*class>
- [2021/04/12 v1.8 Convenient mode selection in Beamer documents]
+ [2022/08/20 v1.9 Convenient mode selection in Beamer documents]
%</class>
%<*driver>
\documentclass[12pt]{article}
@@ -723,9 +723,13 @@
\subsection{Passing options to the underlying classes}
+\begin{docKey}{articleclass}{=\meta{class}}{default and initially \val{article}}
+ Selects the \meta{class} to use when in \key{article} mode.
+\end{docKey}
+
\begin{docKey}{articleoptions}{=\marg{options}}{default and initially empty}
- Passes the \meta{options} to the \pkg{article} class when in \key{article}
- mode.
+ Passes the \meta{options} to the underlying class (selected by \key{articleclass})
+ when in \key{article} mode.
\end{docKey}
\begin{docKey}{beameroptions}{=\marg{options}}{default and initially \val{ignorenonframetext}}
@@ -882,6 +886,7 @@
\begin{dispListing}
\newcommand*{\SpawnedCompiler}{rubber -q --synctex}
\newcommand*{\SpawnedPDFTeX}{\SpawnedCompiler -m pdftex}
+\newcommand*{\SpawnedLuaTeX}{\SpawnedCompiler -m lualatex} % needs v1.6.0+
\newcommand*{\SpawnedXeTeX}{\SpawnedCompiler -m xelatex}
\documentclass{beamerswitch}
\end{dispListing}
@@ -1266,10 +1271,12 @@
% \pkg{shellesc} for running parallel compilations
% \item
% \pkg{iftex} for determining which engine to use
+% \item
+% \pkg{expl3} for cleaning options passed onward to underlying classes.
% \end{itemize}
%
% \begin{macrocode}
-\RequirePackage{xkeyval,xkvltxp,etoolbox,xstring,shellesc,iftex}
+\RequirePackage{xkeyval,xkvltxp,etoolbox,xstring,shellesc,iftex,expl3}
% \end{macrocode}
%
% \subsection{Class options}
@@ -1376,10 +1383,22 @@
% \end{macrocode}
% \end{optionkey}
%
+% \changes{v1.9}{2022/08/20}{Add \key{articleclass} option.}
+% \begin{optionkey}{articleclass}
+%
+% The \key{articleclass} option allows the class used for article mode
+% to be customized.
+%
+% \begin{macrocode}
+\define at cmdkey[DC]{beamerswitch}{articleclass}[article]{}
+% \end{macrocode}
+% \end{optionkey}
+%
% \changes{v1.8}{2021/04/12}{Add \key{articleoptions} option.}
% \begin{optionkey}{articleoptions}
%
-% The \key{articleoptions} will passed to the \pkg{article} class.
+% The \key{articleoptions} will passed to the class used for
+% \key{article} mode.
%
% \begin{macrocode}
\define at cmdkey[DC]{beamerswitch}{articleoptions}[]{}
@@ -1409,7 +1428,8 @@
%
% \begin{macrocode}
\setkeys[DC]{beamerswitch}{beamer=true,alsobeamer=false,alsotrans=false,%
- alsohandout=false,alsoarticle=false,beameroptions,articleoptions}
+ alsohandout=false,alsoarticle=false,beameroptions,articleclass,%
+ articleoptions}
% \end{macrocode}
%
% Now we process the options given by the user.
@@ -1418,6 +1438,16 @@
\ProcessOptionsX[DC]<beamerswitch>
% \end{macrocode}
%
+% We remove problematic whitespace from \key{articleoptions} and
+% \key{beameroptions}.
+%
+% \begin{macrocode}
+\ExplSyntaxOn
+\tl_replace_all:Nnn \cmdDC at beamerswitch@articleoptions { ,~ } { , }
+\tl_replace_all:Nnn \cmdDC at beamerswitch@beameroptions { ,~ } { , }
+\ExplSyntaxOff
+% \end{macrocode}
+%
% \subsection{Jobname-based mode switching}\label{sec:switching}
%
% \begin{macro}{BeamerSuffix}
@@ -1530,20 +1560,20 @@
%
% \subsection{Setting up modes}
%
-% For article mode, we load the \pkg{article} class and the \pkg{beamerarticle}
-% support package. Apologies for anyone hoping for \pkg{scrartcl} or
-% \pkg{memoir} alternatives.
% \begin{macro}{beamer at insttitle}
% \begin{macro}{beamer at andtitle}
% \begin{macro}{beamer at instinst}
% \begin{macro}{beamer at andinst}
+% For article mode, we load the class selected by the \key{articleclass}
+% option and require the \pkg{beamerarticle} support package.
% We also add some beamer base macros that are needed for the
-%\cs{insertinstitute} command.
+% \cs{insertinstitute} command.
%
% \begin{macrocode}
\ifbool{DC at beamerswitch@article}{%
- \PassOptionsToClass{\cmdDC at beamerswitch@articleoptions}{article}
- \LoadClass{article}
+ \PassOptionsToClass{\cmdDC at beamerswitch@articleoptions}{%
+ \cmdDC at beamerswitch@articleclass}
+ \LoadClass{\cmdDC at beamerswitch@articleclass}
\RequirePackage{beamerarticle}
\def\beamer at insttitle#1{\textsuperscript{#1}}
\def\beamer at andtitle{\quad}
@@ -1592,27 +1622,17 @@
}{%
% \end{macrocode}
%
+% For the presentation modes, we load the \pkg{beamer} class with the
+% appropriate mode option as well those chosen using \key{beameroptions}.
%
-% For the presentation modes, we load the \pkg{beamer} class with appropriate
-% options. Since we are targeting users wanting different versions of their
-% presentations with the same code, we activate \key{ignorenonframetext}.
+% Handout mode lays multiple slides out on a single page. For this we use
+% \pkg{pgfpages}. The actual configuration is handled later.
%
% \begin{macrocode}
\ifbool{DC at beamerswitch@handout}{%
\PassOptionsToClass{\cmdDC at beamerswitch@beameroptions}{beamer}
\LoadClass[handout]{beamer}
-% \end{macrocode}
-%
-% Handout mode lays multiple slides out on a single page. For this we use
-% \pkg{pgfpages}. The actual configuration is handled later.
-%
-% \begin{macrocode}
\RequirePackage{pgfpages}
-% \end{macrocode}
-%
-% We also activate \key{ignorenonframetext} for the other two modes.
-%
-% \begin{macrocode}
}{%
\ifbool{DC at beamerswitch@trans}{%
\PassOptionsToClass{\cmdDC at beamerswitch@beameroptions}{beamer}
Modified: trunk/Master/texmf-dist/tex/latex/beamerswitch/beamerswitch.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/beamerswitch/beamerswitch.cls 2022-08-23 20:12:06 UTC (rev 64173)
+++ trunk/Master/texmf-dist/tex/latex/beamerswitch/beamerswitch.cls 2022-08-23 20:12:25 UTC (rev 64174)
@@ -15,8 +15,8 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesClass{beamerswitch}
- [2021/04/12 v1.8 Convenient mode selection in Beamer documents]
-\RequirePackage{xkeyval,xkvltxp,etoolbox,xstring,shellesc,iftex}
+ [2022/08/20 v1.9 Convenient mode selection in Beamer documents]
+\RequirePackage{xkeyval,xkvltxp,etoolbox,xstring,shellesc,iftex,expl3}
\define at boolkey[DC]{beamerswitch}{beamer}[true]{%
\ifbool{DC at beamerswitch@beamer}{%
\setkeys[DC]{beamerswitch}{trans=false}
@@ -60,12 +60,18 @@
\forcsvlist{\beamerswitch at SetAlso}{#1}%
}
\define at cmdkey[DC]{beamerswitch}{beameroptions}[ignorenonframetext]{}
+\define at cmdkey[DC]{beamerswitch}{articleclass}[article]{}
\define at cmdkey[DC]{beamerswitch}{articleoptions}[]{}
\define at boolkey[DC]{beamerswitch}{nohyperref}[true]{}
\define at boolkey[DC]{beamerswitch}{textinst}[true]{}
\setkeys[DC]{beamerswitch}{beamer=true,alsobeamer=false,alsotrans=false,%
- alsohandout=false,alsoarticle=false,beameroptions,articleoptions}
+ alsohandout=false,alsoarticle=false,beameroptions,articleclass,%
+ articleoptions}
\ProcessOptionsX[DC]<beamerswitch>
+\ExplSyntaxOn
+\tl_replace_all:Nnn \cmdDC at beamerswitch@articleoptions { ,~ } { , }
+\tl_replace_all:Nnn \cmdDC at beamerswitch@beameroptions { ,~ } { , }
+\ExplSyntaxOff
\providecommand*{\BeamerSuffix}{-slides}
\providecommand*{\TransSuffix}{-trans}
\providecommand*{\HandoutSuffix}{-handout}
@@ -125,8 +131,9 @@
}%
}%
\ifbool{DC at beamerswitch@article}{%
- \PassOptionsToClass{\cmdDC at beamerswitch@articleoptions}{article}
- \LoadClass{article}
+ \PassOptionsToClass{\cmdDC at beamerswitch@articleoptions}{%
+ \cmdDC at beamerswitch@articleclass}
+ \LoadClass{\cmdDC at beamerswitch@articleclass}
\RequirePackage{beamerarticle}
\def\beamer at insttitle#1{\textsuperscript{#1}}
\def\beamer at andtitle{\quad}
@@ -1339,6 +1346,6 @@
}%
}
%%
-%% Copyright (C) 2016-2021 by Alex Ball <ab318 at bath.ac.uk>
+%% Copyright (C) 2016-2022 by Alex Ball <ab318 at bath.ac.uk>
%%
%% End of file `beamerswitch.cls'.
More information about the tex-live-commits
mailing list.