texlive[58873] Master/texmf-dist: beamerswitch (14apr21)

commits+karl at tug.org commits+karl at tug.org
Wed Apr 14 22:06:10 CEST 2021


Revision: 58873
          http://tug.org/svn/texlive?view=revision&revision=58873
Author:   karl
Date:     2021-04-14 22:06:10 +0200 (Wed, 14 Apr 2021)
Log Message:
-----------
beamerswitch (14apr21)

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	2021-04-14 07:05:59 UTC (rev 58872)
+++ trunk/Master/texmf-dist/doc/latex/beamerswitch/README.md	2021-04-14 20:06:10 UTC (rev 58873)
@@ -88,7 +88,7 @@
 
 ## Licence
 
-Copyright 2016–2020 Alex Ball.
+Copyright 2016–2021 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	2021-04-14 07:05:59 UTC (rev 58872)
+++ trunk/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example.tex	2021-04-14 20:06:10 UTC (rev 58873)
@@ -13,9 +13,10 @@
 %% See:     http://www.latex-project.org/lppl.txt
 %% ----------------------------------------------------------------
 %% 
-\PassOptionsToClass{a4paper,12pt}{article}
-\PassOptionsToClass{14pt}{beamer}
-\documentclass[also={trans,handout,article}]{beamerswitch}
+\documentclass[%
+  beameroptions={ignorenonframetext,14pt},
+  articleoptions={a4paper,12pt},
+  also={trans,handout,article}]{beamerswitch}
 \handoutlayout{nup=3plus,border=1pt}
 \articlelayout{maketitle,frametitles=none}
 \usepackage[british]{babel}
@@ -32,8 +33,8 @@
 
 \title{A demonstration of the \textsf{beamerswitch} class}
 \subtitle{Testing features}
-\author{Alex Ball}
-\institute{University of Life}
+\author{Alex Ball\inst{1}}
+\institute{\inst{1}University of Life}
 \date{1 September 2016}
 \subject{A LaTeX class}
 \keywords{CTAN, literate programming}
@@ -77,6 +78,6 @@
   Happy {\LaTeX}ing!
 \end{document}
 %% 
-%% Copyright (C) 2016-2020 by Alex Ball <ab318 at bath.ac.uk>
+%% Copyright (C) 2016-2021 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	2021-04-14 07:05:59 UTC (rev 58872)
+++ trunk/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.dtx	2021-04-14 20:06:10 UTC (rev 58873)
@@ -93,7 +93,7 @@
 
 ## Licence
 
-Copyright 2016–2020 Alex Ball.
+Copyright 2016–2021 Alex Ball.
 
 This work consists of the file beamerswitch.dtx and a Makefile.
 
@@ -106,9 +106,10 @@
 
 %</readme>
 %<*example>
-\PassOptionsToClass{a4paper,12pt}{article}
-\PassOptionsToClass{14pt}{beamer}
-\documentclass[also={trans,handout,article}]{beamerswitch}
+\documentclass[%
+  beameroptions={ignorenonframetext,14pt},
+  articleoptions={a4paper,12pt},
+  also={trans,handout,article}]{beamerswitch}
 \handoutlayout{nup=3plus,border=1pt}
 \articlelayout{maketitle,frametitles=none}
 \usepackage[british]{babel}
@@ -125,8 +126,8 @@
 
 \title{A demonstration of the \textsf{beamerswitch} class}
 \subtitle{Testing features}
-\author{Alex Ball}
-\institute{University of Life}
+\author{Alex Ball\inst{1}}
+\institute{\inst{1}University of Life}
 \date{1 September 2016}
 \subject{A LaTeX class}
 \keywords{CTAN, literate programming}
@@ -193,7 +194,7 @@
 \endpreamble
 \postamble
 
-Copyright (C) 2016-2020 by Alex Ball <ab318 at bath.ac.uk>
+Copyright (C) 2016-2021 by Alex Ball <ab318 at bath.ac.uk>
 \endpostamble
 
 \usedir{tex/latex/\jobname}
@@ -228,7 +229,7 @@
 %<class>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
 %<class>\ProvidesClass{beamerswitch}
 %<*class>
-    [2020/06/06 v1.7 Convenient mode selection in Beamer documents]
+    [2021/04/12 v1.8 Convenient mode selection in Beamer documents]
 %</class>
 %<*driver>
 \documentclass[12pt]{article}
@@ -296,7 +297,7 @@
   \egroup
 }
 \makeatother
-\tcbuselibrary{documentation,breakable,minted}
+\tcbuselibrary{documentation,breakable,minted,raster}
 \colorlet{Option}{violet}
 \colorlet{Command}{red!75!black}
 \colorlet{Environment}{blue!75!black}
@@ -311,6 +312,13 @@
     , numbersep=20pt
     , firstnumber=last
     }
+  , documentation minted options=
+    { breaklines
+    , fontsize=\small
+    , breakbefore=\{\[
+    , breakafter=/\}\]
+    , breakbeforesymbolpre={}
+    }
   , index format=pgf
   , color command=Command
   , color environment=Environment
@@ -381,7 +389,6 @@
   \index{\MyName@\tcbIndexPrintValCA {\MyName}|)}%
 }
 \makeatletter
-\def\MY at EQUALS{=}%
 \newcommand{\resetmintedformat}{%
   % Comments
   \expandafter\def\csname PYGdefault at tok@c\endcsname{\let\PYGdefault at it=\textit\def\PYGdefault at tc####1{\textcolor{gray}{####1}}}
@@ -525,31 +532,44 @@
 
 \begin{enumerate}
 \item
-  Have you specified class options other than \key{ignorenonframetext}?
-  If so, start by rewriting your \cs{documentclass} line in terms of
-  \cs{PassOptionsToClass} -- note that the optional argument (in square
-  brackets) becomes mandatory (in curly braces):
+  Replace the class \pkg{beamer} with \pkg{beamerswitch}.
 
-  \begin{multicols}{2}
+  Wrap any class options you have specified in braces and turn them into the
+  value of the \key{beameroptions} option:
+
+  \begin{tcbraster}[raster equal height=rows]
 \begin{dispListing*}{title=Before,coltitle=black,fonttitle=\sffamily}
 \documentclass[10pt]{beamer}
 \end{dispListing*}
-    \columnbreak
 \begin{dispListing*}{title=After,coltitle=black,fonttitle=\sffamily}
-\PassOptionsToClass{10pt}{beamer}
+\documentclass[beameroptions={10pt}]{beamerswitch}
 \end{dispListing*}
-  \end{multicols}
+  \end{tcbraster}
 
-  Then add `\cs{documentclass}\brackets{beamerswitch}' directly below.
+  If you didn't specify any options, then give \key{beameroptions} a blank
+  value:
 
-  Otherwise, simply replace your \cs{documentclass} line with the
-  \texttt{beamerswitch} one.
+  \begin{tcbraster}[raster equal height=rows]
+\begin{dispListing*}{title=Before,coltitle=black,fonttitle=\sffamily}
+\documentclass{beamer}
+\end{dispListing*}
+\begin{dispListing*}{title=After,coltitle=black,fonttitle=\sffamily}
+\documentclass[beameroptions={}]{beamerswitch}
+\end{dispListing*}
+  \end{tcbraster}
 
-\item
-  If you did \emph{not} specify \key{ignorenonframetext} as one of your
-  \pkg{beamer} options, add a `\cs{mode}\texttt{<all>}' line directly after
-  `\cs{begin}\brackets{document}'.
+  If you only specified \key{ignorenonframetext}, then you don't
+  need \key{beameroptions}:
 
+  \begin{tcbraster}[raster equal height=rows]
+\begin{dispListing*}{title=Before,coltitle=black,fonttitle=\sffamily}
+\documentclass[ignorenonframetext]{beamer}
+\end{dispListing*}
+\begin{dispListing*}{title=After,coltitle=black,fonttitle=\sffamily}
+\documentclass{beamerswitch}
+\end{dispListing*}
+  \end{tcbraster}
+
 \item
   Wrap any preamble content intended only for your slides (like \cs{usetheme}
   or \cs{usepackage} commands) with `\cs{mode}\texttt{<presentation>}\meta{\dots}'
@@ -558,7 +578,7 @@
 
 In summary, here is an example:
 
-\begin{multicols}{2}
+\begin{tcbraster}[raster equal height=rows]
 \begin{dispListing*}{title=Before,coltitle=black,fonttitle=\sffamily}
 \documentclass[10pt]{beamer}
 
@@ -567,32 +587,28 @@
 
 \title{Test presentation}
 \begin{document}
-
   \maketitle
 \end{document}
 \end{dispListing*}
-  \columnbreak
 \begin{dispListing*}{title=After,coltitle=black,fonttitle=\sffamily}
-\PassOptionsToClass{10pt}{beamer}
-\documentclass{beamerswitch}
+\documentclass[beameroptions={10pt}]{beamerswitch}
 \mode<presentation>{%
   \usetheme{metropolis}
 }
 \title{Test presentation}
 \begin{document}
-\mode<all>
   \maketitle
 \end{document}
 \end{dispListing*}
-\end{multicols}
+\end{tcbraster}
 
 At this point the document should compile exactly as before.
 
 If you intend to use article mode at all, I strongly suggest that you
-proceed by converting your document body so it that works without the
-`\cs{mode}\texttt{<all>}' line. That means making sure all slide content is in
-a \env{frame} environment, new command definitions are moved to the preamble,
-and so on.
+proceed by converting your document body so it that works with \pkg{beamer}'s
+\key{ignorenonframetext} option in place. That means making sure all slide
+content is in a \env{frame} environment, new command definitions are moved
+to the preamble, and so on.
 
 Lastly, read through the rest of this manual and see what \pkg{beamerswitch} can
 do for you!
@@ -705,13 +721,27 @@
 
 The various options are described below.
 
+\subsection{Passing options to the underlying classes}
+
+\begin{docKey}{articleoptions}{=\marg{options}}{default and initially empty}
+  Passes the \meta{options} to the \pkg{article} class when in \key{article}
+  mode.
+\end{docKey}
+
+\begin{docKey}{beameroptions}{=\marg{options}}{default and initially \val{ignorenonframetext}}
+  Passes the \meta{options} to the \pkg{beamer} class when in \key{beamer},
+  \key{handout} or \key{trans} mode. Do not specify \val{handout} or \val{trans}
+  among the options as \pkg{beamerswitch} handles those for you. Note that the
+  default behaviour is to pass the \val{ignorenonframetext} option, so remember
+  to include it yourself if you start specifying other options.
+\end{docKey}
+
+
 \subsection{Choosing the mode of the current run}
 
 The \pkg{beamerswitch} class, as explained above, does not do much itself but
 rather helps you to switch between \pkg{beamer} modes, specifically
-\key{article}, \key{beamer}, \key{trans} and \key{handout}. Note that it loads
-\pkg{beamer} with the \key{ignorenonframetext} option, so that text outside
-frames is only shown in \key{article} mode.
+\key{article}, \key{beamer}, \key{trans} and \key{handout}.
 
 The normal way of choosing the mode is to use the respective class options.
 
@@ -856,8 +886,8 @@
 \documentclass{beamerswitch}
 \end{dispListing}
 
-If you don't need the engine selection routine provided, simply pre-define
-\cs{BeamerswitchSpawn} to do whatever you need it to do:
+If you don't need the engine selection routine provided, you can replace it
+by pre-defining \cs{BeamerswitchSpawn} to do whatever you need it to do instead:
 
 \begin{dispListing}
 \newcommand*{\BeamerswitchSpawn}[1]{%
@@ -894,13 +924,6 @@
   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
-  avoid unnecessary font changes.
-\end{docKey}
-
 \section{Setting the layout of the handouts}
 
 The class provides a simplified interface to the \pkg{pgfpages} package. By
@@ -1171,12 +1194,20 @@
 \end{dispListing}
 \end{docKey}
 
+\begin{docKey}{instbreak}{=\meta{definition}}{no default, initially \cs{linebreak}}
+   In \key{article} mode, defines how \cs{and} is rendered when
+   \cs{insertinstitute} is used (such when the \key{maketitle} option is
+   active). Another good \meta{definition} to use might be \cs{quad}.
+\end{docKey}
+
+
 \section{Tips for further configuration}
 
 There are some other ways to customize the behaviour of the various modes.
 
 You can use the standard \LaTeX\ methods for customizing how the \pkg{article}
-and \pkg{beamer} classes are loaded:
+and \pkg{beamer} classes are loaded, if you don't like the class facilities for
+doing this:
 
 \begin{dispListing}
 \PassOptionsToClass{a4paper,11pt}{article} % for article mode
@@ -1335,6 +1366,26 @@
 % \end{optionkey}
 % \end{optionkey}
 %
+% \changes{v1.8}{2021/04/12}{Add \key{beameroptions} option.}
+% \begin{optionkey}{beameroptions}
+%
+% The \key{beameroptions} will passed to the \pkg{beamer} class.
+%
+%    \begin{macrocode}
+\define at cmdkey[DC]{beamerswitch}{beameroptions}[ignorenonframetext]{}
+%    \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.
+%
+%    \begin{macrocode}
+\define at cmdkey[DC]{beamerswitch}{articleoptions}[]{}
+%    \end{macrocode}
+% \end{optionkey}
+%
 % \begin{optionkey}{nohyperref}
 % The \key{nohyperref} option stops the class from loading the \pkg{hyperref}
 % package in article mode.
@@ -1344,9 +1395,10 @@
 %    \end{macrocode}
 % \end{optionkey}
 %
+% \changes{v1.8}{2021/04/12}{Deprecate redundant \key{textinst} option.}
 % \begin{optionkey}{textinst}
-% The \key{textinst} option adjusts the superscript used for institution
-% markers.
+% The \key{textinst} option enforces \cs{textsuperscript} for institution
+% markers. Recent versions of \pkg{beamer} do this by default.
 %
 %    \begin{macrocode}
 \define at boolkey[DC]{beamerswitch}{textinst}[true]{}
@@ -1357,7 +1409,7 @@
 %
 %    \begin{macrocode}
 \setkeys[DC]{beamerswitch}{beamer=true,alsobeamer=false,alsotrans=false,%
-  alsohandout=false,alsoarticle=false}
+  alsohandout=false,alsoarticle=false,beameroptions,articleoptions}
 %    \end{macrocode}
 %
 % Now we process the options given by the user.
@@ -1481,12 +1533,27 @@
 % 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}
+% We also add some beamer base macros that are needed for the
+%\cs{insertinstitute} command.
 %
 %    \begin{macrocode}
 \ifbool{DC at beamerswitch@article}{%
+  \PassOptionsToClass{\cmdDC at beamerswitch@articleoptions}{article}
   \LoadClass{article}
   \RequirePackage{beamerarticle}
+  \def\beamer at insttitle#1{\textsuperscript{#1}}
+  \def\beamer at andtitle{\quad}
+  \def\beamer at instinst#1{\textsuperscript{#1}\ignorespaces}
+  \def\beamer at andinst{\linebreak}
 %    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
 %
 % It seems as though \pkg{beamerarticle} expects \pkg{hyperref} to be loaded,
 % but doesn't actually do it itself. So we oblige, using the default options
@@ -1532,7 +1599,8 @@
 %
 %    \begin{macrocode}
   \ifbool{DC at beamerswitch@handout}{%
-    \LoadClass[ignorenonframetext,handout]{beamer}
+    \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
@@ -1547,9 +1615,11 @@
 %    \begin{macrocode}
   }{%
     \ifbool{DC at beamerswitch@trans}{%
-      \LoadClass[ignorenonframetext,trans]{beamer}
+      \PassOptionsToClass{\cmdDC at beamerswitch@beameroptions}{beamer}
+      \LoadClass[trans]{beamer}
     }{%
-      \LoadClass[ignorenonframetext]{beamer}
+      \PassOptionsToClass{\cmdDC at beamerswitch@beameroptions}{beamer}
+      \LoadClass{beamer}
     }%
   }
 }
@@ -1557,8 +1627,10 @@
 %
 % \subsection{Mode-independent layout}
 %
+% \begin{macro}{beamer at insttitle}
+% \begin{macro}{beamer at instinst}
 % We implement the option that formats institution markers in text mode rather
-% than math mode.
+% than math mode in older versions of \pkg{beamer}.
 %
 %    \begin{macrocode}
 \ifbool{DC at beamerswitch@textinst}{%
@@ -1566,7 +1638,10 @@
   \def\beamer at instinst#1{\textsuperscript{#1}\ignorespaces}
 }{}
 %    \end{macrocode}
+% \end{macro}
+% \end{macro}
 %
+% \begin{macro}{handoutlayout}
 % \subsection{Handout layout}
 %
 % \begin{optionkey}{paper}
@@ -1594,8 +1669,8 @@
 % \begin{optionvalue}{4plus}
 % \begin{optionvalue}{6}
 % \begin{optionvalue}{8}
-% \changes{v1.7}{2020/06/06}{Add \key{nup}\string\MY at EQUALS\val{1} option.}
-% \changes{v1.7}{2020/06/06}{Add \key{nup}\string\MY at EQUALS\val{1plus} option.}
+% \changes{v1.7}{2020/06/06}{Add \key{nup}!=\val{1} option.}
+% \changes{v1.7}{2020/06/06}{Add \key{nup}!=\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.
 %
@@ -1656,7 +1731,7 @@
 % \end{optionkey}
 %
 % \begin{optionkey}{margin}
-% \changes{v1.4}{2018/08/29}{Make margins around slides a configurable size}
+% \changes{v1.4}{2018/08/29}{Make margins around slides a configurable size.}
 % \begin{macro}{beamerswitch at 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
@@ -1711,7 +1786,6 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}{handoutlayout}
 % \begin{macro}{beamerswitch at pnoadjust}
 % We set up the \cs{handoutlayout} command for applying these options.
 %
@@ -2808,6 +2882,7 @@
 }
 %    \end{macrocode}
 %
+% \begin{macro}{articlelayout}
 % \subsection{Article layout}
 %
 % We provide some options for configuring the appearance of article mode.
@@ -2834,7 +2909,7 @@
 %    \end{macrocode}
 %
 % \begin{macro}{bsw at punct@test}
-% \changes{v1.6.1}{2020/01/20}{Update expl3 syntax}
+% \changes{v1.6.1}{2020/01/20}{Update expl3 syntax.}
 % Of course, we would rather not bother the user with this, so we introduce a
 % command for testing the title for final punctuation.
 %
@@ -2916,7 +2991,20 @@
 % \end{optionvalue}
 % \end{optionkey}
 %
-% \begin{macro}{articlelayout}
+% \changes{v1.8}{2021/04/12}{Add \key{instbreak} option.}
+% \begin{optionkey}{instbreak}
+% \begin{macro}{beamerswitch at andinst}
+% We offer an easy way of customizing how institutes are strung together.
+%
+%    \begin{macrocode}
+\let\beamerswitch at andinst\beamer at andinst
+\define at key[AL]{beamerswitch}{instbreak}{%
+  \def\beamerswitch at andinst{#1}%
+}
+%    \end{macrocode}
+% \end{macro}
+% \end{optionkey}
+%
 % We provide a command for setting these options.
 %
 %    \begin{macrocode}
@@ -2943,10 +3031,10 @@
     \ifcsstring{beamerswitch at articleframetitles}{margin}{%
       \setbeamertemplate{frametitle}{%
         \marginpar[%
-          \raggedleft\noindent\emshape\textbf{\insertframetitle}\par
+          \raggedleft\noindent\itshape\textbf{\insertframetitle}\par
           \noindent\insertframesubtitle\par
         ]{%
-          \raggedright\noindent\emshape\textbf{\insertframetitle}\par
+          \raggedright\noindent\itshape\textbf{\insertframetitle}\par
           \noindent\insertframesubtitle\par
         }%
       }
@@ -2964,6 +3052,12 @@
 % \end{optionvalue}
 % \end{optionvalue}
 %
+% This is where the \key{instbreak} option takes effect.
+%
+%    \begin{macrocode}
+    \let\beamer at andinst\beamerswitch at andinst
+%    \end{macrocode}
+%
 % This is where we make our adjustments to \cs{maketitle}. We start by joining
 % the subtitle to the title by means of a colon instead of a newline.
 %
@@ -2978,10 +3072,12 @@
 %
 %    \begin{macrocode}
       \ifundef{\beamer at originstitute}{%
-        \renewcommand{\institute}[2][]{\def\insertinstitute{##2}}%
+        \renewcommand{\institute}[2][]{%
+          \def\insertinstitute{\def\inst{\beamer at instinst}\def\and{\beamer at andinst}##2}}%
       }{%
         \renewcommand{\institute}[2][]{%
-          \def\insertinstitute{##2}\beamer at originstitute{##2}}%
+          \def\insertinstitute{\def\inst{\beamer at instinst}\def\and{\beamer at andinst}##2}%
+          \beamer at originstitute{##2}}%
       }%
 %    \end{macrocode}
 %
@@ -2999,21 +3095,28 @@
           \vskip 1.5em%
           {%
             \large\lineskip .5em%
+%    \end{macrocode}
+%
+% \changes{v1.8}{2021/04/12}{Ensure proper rendering of \cs{inst} and \cs{and}
+%   in \cs{author}.}
+% The second is to add the beamer definitions for \cs{inst} and \cs{and} in the
+% author row.
+%
+%    \begin{macrocode}
             \begin{tabular}[t]{c}%
+              \def\inst{\beamer at insttitle}\def\and{\beamer at andtitle}%
               \@author
             \end{tabular}\par
           }%
 %    \end{macrocode}
 %
-% The other is to add in a row for the institute information.
+% The third is to add in a row for the institute information.
 %
 %    \begin{macrocode}
           \ifdefvoid{\insertinstitute}{}{%
             {%
               \normalsize\lineskip .5em%
-              \begin{tabular}[t]{c}%
-                \insertinstitute
-              \end{tabular}\par
+              \insertinstitute\par
             }%
           }%
           \vskip 1em%

Modified: trunk/Master/texmf-dist/tex/latex/beamerswitch/beamerswitch.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/beamerswitch/beamerswitch.cls	2021-04-14 07:05:59 UTC (rev 58872)
+++ trunk/Master/texmf-dist/tex/latex/beamerswitch/beamerswitch.cls	2021-04-14 20:06:10 UTC (rev 58873)
@@ -15,7 +15,7 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}[1999/12/01]
 \ProvidesClass{beamerswitch}
-    [2020/06/06 v1.7 Convenient mode selection in Beamer documents]
+    [2021/04/12 v1.8 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}{%
@@ -59,10 +59,12 @@
 \define at key[DC]{beamerswitch}{also}{%
   \forcsvlist{\beamerswitch at SetAlso}{#1}%
 }
+\define at cmdkey[DC]{beamerswitch}{beameroptions}[ignorenonframetext]{}
+\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}
+  alsohandout=false,alsoarticle=false,beameroptions,articleoptions}
 \ProcessOptionsX[DC]<beamerswitch>
 \providecommand*{\BeamerSuffix}{-slides}
 \providecommand*{\TransSuffix}{-trans}
@@ -123,8 +125,13 @@
   }%
 }%
 \ifbool{DC at beamerswitch@article}{%
+  \PassOptionsToClass{\cmdDC at beamerswitch@articleoptions}{article}
   \LoadClass{article}
   \RequirePackage{beamerarticle}
+  \def\beamer at insttitle#1{\textsuperscript{#1}}
+  \def\beamer at andtitle{\quad}
+  \def\beamer at instinst#1{\textsuperscript{#1}\ignorespaces}
+  \def\beamer at andinst{\linebreak}
   \ifbool{DC at beamerswitch@nohyperref}{}{%
     \RequirePackage[bookmarks=true,%
     bookmarksopen=true,%
@@ -146,13 +153,16 @@
   }
 }{%
   \ifbool{DC at beamerswitch@handout}{%
-    \LoadClass[ignorenonframetext,handout]{beamer}
+    \PassOptionsToClass{\cmdDC at beamerswitch@beameroptions}{beamer}
+    \LoadClass[handout]{beamer}
     \RequirePackage{pgfpages}
   }{%
     \ifbool{DC at beamerswitch@trans}{%
-      \LoadClass[ignorenonframetext,trans]{beamer}
+      \PassOptionsToClass{\cmdDC at beamerswitch@beameroptions}{beamer}
+      \LoadClass[trans]{beamer}
     }{%
-      \LoadClass[ignorenonframetext]{beamer}
+      \PassOptionsToClass{\cmdDC at beamerswitch@beameroptions}{beamer}
+      \LoadClass{beamer}
     }%
   }
 }
@@ -1250,6 +1260,10 @@
   \ClassWarning{beamerswitch}{Value of `frametitles' not recognized.
     Allowed values are para, margin, and none.}%
 }
+\let\beamerswitch at andinst\beamer at andinst
+\define at key[AL]{beamerswitch}{instbreak}{%
+  \def\beamerswitch at andinst{#1}%
+}
 \newcommand{\articlelayout}[1]{%
   \setkeys[AL]{beamerswitch}{#1}%
   \mode<article>{%
@@ -1256,10 +1270,10 @@
     \ifcsstring{beamerswitch at articleframetitles}{margin}{%
       \setbeamertemplate{frametitle}{%
         \marginpar[%
-          \raggedleft\noindent\emshape\textbf{\insertframetitle}\par
+          \raggedleft\noindent\itshape\textbf{\insertframetitle}\par
           \noindent\insertframesubtitle\par
         ]{%
-          \raggedright\noindent\emshape\textbf{\insertframetitle}\par
+          \raggedright\noindent\itshape\textbf{\insertframetitle}\par
           \noindent\insertframesubtitle\par
         }%
       }
@@ -1272,15 +1286,18 @@
         }{}%
       }%
     }
+    \let\beamer at andinst\beamerswitch at andinst
     \ifbool{AL at beamerswitch@maketitle}{%
       \renewcommand{\subtitle}[2][]{%
         \def\insertsubtitle{##2}\gappto\@title{\iftoggle{titlepunct}{}{:} ##2}%
       }
       \ifundef{\beamer at originstitute}{%
-        \renewcommand{\institute}[2][]{\def\insertinstitute{##2}}%
+        \renewcommand{\institute}[2][]{%
+          \def\insertinstitute{\def\inst{\beamer at instinst}\def\and{\beamer at andinst}##2}}%
       }{%
         \renewcommand{\institute}[2][]{%
-          \def\insertinstitute{##2}\beamer at originstitute{##2}}%
+          \def\insertinstitute{\def\inst{\beamer at instinst}\def\and{\beamer at andinst}##2}%
+          \beamer at originstitute{##2}}%
       }%
       \def\@maketitle{%
         \newpage
@@ -1292,6 +1309,7 @@
           {%
             \large\lineskip .5em%
             \begin{tabular}[t]{c}%
+              \def\inst{\beamer at insttitle}\def\and{\beamer at andtitle}%
               \@author
             \end{tabular}\par
           }%
@@ -1298,9 +1316,7 @@
           \ifdefvoid{\insertinstitute}{}{%
             {%
               \normalsize\lineskip .5em%
-              \begin{tabular}[t]{c}%
-                \insertinstitute
-              \end{tabular}\par
+              \insertinstitute\par
             }%
           }%
           \vskip 1em%
@@ -1323,6 +1339,6 @@
   }%
 }
 %% 
-%% Copyright (C) 2016-2020 by Alex Ball <ab318 at bath.ac.uk>
+%% Copyright (C) 2016-2021 by Alex Ball <ab318 at bath.ac.uk>
 %%
 %% End of file `beamerswitch.cls'.



More information about the tex-live-commits mailing list.