From 01c5863069156c826b8b5c15312db454a51c2264 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 7 Jun 2019 21:07:25 +0000 Subject: beamerswitch (7jun19) git-svn-id: svn://tug.org/texlive/trunk@51341 c570f23f-e606-0410-a88d-b1316a301751 --- .../beamerswitch/beamerswitch-example-article.pdf | Bin 19248 -> 19393 bytes .../beamerswitch/beamerswitch-example-handout.pdf | Bin 21461 -> 21591 bytes .../beamerswitch/beamerswitch-example-trans.pdf | Bin 22069 -> 22207 bytes .../latex/beamerswitch/beamerswitch-example.pdf | Bin 35523 -> 35830 bytes .../doc/latex/beamerswitch/beamerswitch.pdf | Bin 184848 -> 187164 bytes .../source/latex/beamerswitch/beamerswitch.dtx | 28 ++++++++++++++++----- .../tex/latex/beamerswitch/beamerswitch.cls | 16 ++++++++---- 7 files changed, 33 insertions(+), 11 deletions(-) diff --git a/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-article.pdf b/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-article.pdf index 2336fbddcb0..fb0f88db163 100644 Binary files a/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-article.pdf and b/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-article.pdf differ diff --git a/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-handout.pdf b/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-handout.pdf index b833a07a919..bc273c67fbc 100644 Binary files a/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-handout.pdf and b/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-handout.pdf differ diff --git a/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-trans.pdf b/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-trans.pdf index 7b3e5d6e3ce..77ddeb0dfad 100644 Binary files a/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-trans.pdf and b/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example-trans.pdf differ diff --git a/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example.pdf b/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example.pdf index 63fb967d240..59f55e434d4 100644 Binary files a/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example.pdf and b/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch-example.pdf differ diff --git a/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch.pdf b/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch.pdf index cf23e0503ae..5f976ef64c0 100644 Binary files a/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch.pdf and b/Master/texmf-dist/doc/latex/beamerswitch/beamerswitch.pdf differ diff --git a/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.dtx b/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.dtx index 3c72f4f40d4..c61a227ede0 100644 --- a/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.dtx +++ b/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.dtx @@ -228,7 +228,7 @@ Copyright (C) 2016-2019 by Alex Ball %\NeedsTeXFormat{LaTeX2e}[1999/12/01] %\ProvidesClass{beamerswitch} %<*class> - [2019/01/28 v1.5 Convenient mode selection in Beamer documents] + [2019/06/06 v1.6 Convenient mode selection in Beamer documents] % %<*driver> \documentclass[12pt]{article} @@ -1402,20 +1402,36 @@ suggestions for improvements or new features to the % \end{macro} % \end{macro} % +% \begin{macro}{JobName} +% \changes{v1.6}{2019/06/06}{Fix bug triggered by spaces in job names.} % We check for special jobnames and use them to override the above mode-related -% options. Note that if this happens, the \key{also*} options are ignored. +% options. In certain circumstances, the jobname is wrapped in quote marks, so +% in that case we strip them off before running the tests. % % \begin{macrocode} -\IfEndWith*{\jobname}{\BeamerSuffix}{% +\IfBeginWith*{\jobname}{"}{% + \IfEndWith*{\jobname}{"}{% + \StrGobbleLeft{\jobname}{1}[\JobName]% + \StrGobbleRight{\JobName}{1}[\JobName]% + }{\let\JobName\jobname}% +}{\let\JobName\jobname} +% \end{macrocode} +% \end{macro} +% +% Now we run the tests. Note that the \key{also*} options are only acted upon +% if the all the tests fail. +% +% \begin{macrocode} +\IfEndWith*{\JobName}{\BeamerSuffix}{% \setkeys[DC]{beamerswitch}{beamer=true} }{% - \IfEndWith*{\jobname}{\TransSuffix}{% + \IfEndWith*{\JobName}{\TransSuffix}{% \setkeys[DC]{beamerswitch}{trans=true} }{% - \IfEndWith*{\jobname}{\HandoutSuffix}{% + \IfEndWith*{\JobName}{\HandoutSuffix}{% \setkeys[DC]{beamerswitch}{handout=true} }{% - \IfEndWith*{\jobname}{\ArticleSuffix}{% + \IfEndWith*{\JobName}{\ArticleSuffix}{% \setkeys[DC]{beamerswitch}{article=true} }{% \ifbool{DC@beamerswitch@alsobeamer}{% diff --git a/Master/texmf-dist/tex/latex/beamerswitch/beamerswitch.cls b/Master/texmf-dist/tex/latex/beamerswitch/beamerswitch.cls index 150b22391cf..5caee0e9d24 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} - [2019/01/28 v1.5 Convenient mode selection in Beamer documents] + [2019/06/06 v1.6 Convenient mode selection in Beamer documents] \RequirePackage{xkeyval,xkvltxp,etoolbox,xstring,shellesc,iftex} \define@boolkey[DC]{beamerswitch}{beamer}[true]{% \ifbool{DC@beamerswitch@beamer}{% @@ -88,16 +88,22 @@ }% }% } -\IfEndWith*{\jobname}{\BeamerSuffix}{% +\IfBeginWith*{\jobname}{"}{% + \IfEndWith*{\jobname}{"}{% + \StrGobbleLeft{\jobname}{1}[\JobName]% + \StrGobbleRight{\JobName}{1}[\JobName]% + }{\let\JobName\jobname}% +}{\let\JobName\jobname} +\IfEndWith*{\JobName}{\BeamerSuffix}{% \setkeys[DC]{beamerswitch}{beamer=true} }{% - \IfEndWith*{\jobname}{\TransSuffix}{% + \IfEndWith*{\JobName}{\TransSuffix}{% \setkeys[DC]{beamerswitch}{trans=true} }{% - \IfEndWith*{\jobname}{\HandoutSuffix}{% + \IfEndWith*{\JobName}{\HandoutSuffix}{% \setkeys[DC]{beamerswitch}{handout=true} }{% - \IfEndWith*{\jobname}{\ArticleSuffix}{% + \IfEndWith*{\JobName}{\ArticleSuffix}{% \setkeys[DC]{beamerswitch}{article=true} }{% \ifbool{DC@beamerswitch@alsobeamer}{% -- cgit v1.2.3