summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/beamerswitch
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-06-07 21:07:25 +0000
committerKarl Berry <karl@freefriends.org>2019-06-07 21:07:25 +0000
commit01c5863069156c826b8b5c15312db454a51c2264 (patch)
tree803ccdac833569d0409e99070d5abdff8ba86bb9 /Master/texmf-dist/source/latex/beamerswitch
parent7505e4e41b8f39a1b0869f6296bf66490f572a35 (diff)
beamerswitch (7jun19)
git-svn-id: svn://tug.org/texlive/trunk@51341 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/beamerswitch')
-rw-r--r--Master/texmf-dist/source/latex/beamerswitch/beamerswitch.dtx28
1 files changed, 22 insertions, 6 deletions
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 <ab318@bath.ac.uk>
%<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 @@ 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}{%