diff options
author | Karl Berry <karl@freefriends.org> | 2021-04-14 20:06:10 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-04-14 20:06:10 +0000 |
commit | 72c53c389c8fe1a5ace9910e0ef123a4e4384232 (patch) | |
tree | 483b0c063537539091805a9f7e631b3c3547dd9b /Master/texmf-dist/tex/latex/beamerswitch/beamerswitch.cls | |
parent | 83af909e5ead1dbdc0cf1b80399aa84fc1e31d36 (diff) |
beamerswitch (14apr21)
git-svn-id: svn://tug.org/texlive/trunk@58873 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/beamerswitch/beamerswitch.cls')
-rw-r--r-- | Master/texmf-dist/tex/latex/beamerswitch/beamerswitch.cls | 42 |
1 files changed, 29 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/latex/beamerswitch/beamerswitch.cls b/Master/texmf-dist/tex/latex/beamerswitch/beamerswitch.cls index 98d8c5b898a..4fbedc9910e 100644 --- a/Master/texmf-dist/tex/latex/beamerswitch/beamerswitch.cls +++ b/Master/texmf-dist/tex/latex/beamerswitch/beamerswitch.cls @@ -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@boolkey[DC]{beamerswitch}{beamer}[true]{% \ifbool{DC@beamerswitch@beamer}{% @@ -59,10 +59,12 @@ \define@key[DC]{beamerswitch}{also}{% \forcsvlist{\beamerswitch@SetAlso}{#1}% } +\define@cmdkey[DC]{beamerswitch}{beameroptions}[ignorenonframetext]{} +\define@cmdkey[DC]{beamerswitch}{articleoptions}[]{} \define@boolkey[DC]{beamerswitch}{nohyperref}[true]{} \define@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@beamerswitch@article}{% + \PassOptionsToClass{\cmdDC@beamerswitch@articleoptions}{article} \LoadClass{article} \RequirePackage{beamerarticle} + \def\beamer@insttitle#1{\textsuperscript{#1}} + \def\beamer@andtitle{\quad} + \def\beamer@instinst#1{\textsuperscript{#1}\ignorespaces} + \def\beamer@andinst{\linebreak} \ifbool{DC@beamerswitch@nohyperref}{}{% \RequirePackage[bookmarks=true,% bookmarksopen=true,% @@ -146,13 +153,16 @@ } }{% \ifbool{DC@beamerswitch@handout}{% - \LoadClass[ignorenonframetext,handout]{beamer} + \PassOptionsToClass{\cmdDC@beamerswitch@beameroptions}{beamer} + \LoadClass[handout]{beamer} \RequirePackage{pgfpages} }{% \ifbool{DC@beamerswitch@trans}{% - \LoadClass[ignorenonframetext,trans]{beamer} + \PassOptionsToClass{\cmdDC@beamerswitch@beameroptions}{beamer} + \LoadClass[trans]{beamer} }{% - \LoadClass[ignorenonframetext]{beamer} + \PassOptionsToClass{\cmdDC@beamerswitch@beameroptions}{beamer} + \LoadClass{beamer} }% } } @@ -1250,16 +1260,20 @@ \ClassWarning{beamerswitch}{Value of `frametitles' not recognized. Allowed values are para, margin, and none.}% } +\let\beamerswitch@andinst\beamer@andinst +\define@key[AL]{beamerswitch}{instbreak}{% + \def\beamerswitch@andinst{#1}% +} \newcommand{\articlelayout}[1]{% \setkeys[AL]{beamerswitch}{#1}% \mode<article>{% \ifcsstring{beamerswitch@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@andinst\beamerswitch@andinst \ifbool{AL@beamerswitch@maketitle}{% \renewcommand{\subtitle}[2][]{% \def\insertsubtitle{##2}\gappto\@title{\iftoggle{titlepunct}{}{:} ##2}% } \ifundef{\beamer@originstitute}{% - \renewcommand{\institute}[2][]{\def\insertinstitute{##2}}% + \renewcommand{\institute}[2][]{% + \def\insertinstitute{\def\inst{\beamer@instinst}\def\and{\beamer@andinst}##2}}% }{% \renewcommand{\institute}[2][]{% - \def\insertinstitute{##2}\beamer@originstitute{##2}}% + \def\insertinstitute{\def\inst{\beamer@instinst}\def\and{\beamer@andinst}##2}% + \beamer@originstitute{##2}}% }% \def\@maketitle{% \newpage @@ -1292,15 +1309,14 @@ {% \large\lineskip .5em% \begin{tabular}[t]{c}% + \def\inst{\beamer@insttitle}\def\and{\beamer@andtitle}% \@author \end{tabular}\par }% \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@bath.ac.uk> +%% Copyright (C) 2016-2021 by Alex Ball <ab318@bath.ac.uk> %% %% End of file `beamerswitch.cls'. |