texlive[51341] Master/texmf-dist: beamerswitch (7jun19)

commits+karl at tug.org commits+karl at tug.org
Fri Jun 7 23:07:25 CEST 2019


Revision: 51341
          http://tug.org/svn/texlive?view=revision&revision=51341
Author:   karl
Date:     2019-06-07 23:07:25 +0200 (Fri, 07 Jun 2019)
Log Message:
-----------
beamerswitch (7jun19)

Modified Paths:
--------------
    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.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/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.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.dtx	2019-06-07 21:07:10 UTC (rev 51340)
+++ trunk/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.dtx	2019-06-07 21:07:25 UTC (rev 51341)
@@ -228,7 +228,7 @@
 %<class>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
 %<class>\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]
 %</class>
 %<*driver>
 \documentclass[12pt]{article}
@@ -1402,20 +1402,36 @@
 % \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 at beamerswitch@alsobeamer}{%

Modified: trunk/Master/texmf-dist/tex/latex/beamerswitch/beamerswitch.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/beamerswitch/beamerswitch.cls	2019-06-07 21:07:10 UTC (rev 51340)
+++ trunk/Master/texmf-dist/tex/latex/beamerswitch/beamerswitch.cls	2019-06-07 21:07:25 UTC (rev 51341)
@@ -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 at boolkey[DC]{beamerswitch}{beamer}[true]{%
   \ifbool{DC at 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 at beamerswitch@alsobeamer}{%



More information about the tex-live-commits mailing list