summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/beamerswitch/beamerswitch.dtx')
-rw-r--r--Master/texmf-dist/source/latex/beamerswitch/beamerswitch.dtx94
1 files changed, 76 insertions, 18 deletions
diff --git a/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.dtx b/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.dtx
index 79c482e7101..a5ea3ae3e60 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-2017 by Alex Ball <a.j.ball@bath.ac.uk>
%<class>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<class>\ProvidesClass{beamerswitch}
%<*class>
- [2017/05/22 v1.2 Convenient mode selection in Beamer documents]
+ [2017/12/10 v1.3 Convenient mode selection in Beamer documents]
%</class>
%<*driver>
\documentclass[12pt]{article}
@@ -827,17 +827,59 @@ command that does the business is this:
\cs{jobname}.
\end{docCommand}
-See the \hyperref[sec:switching]{Implementation} section below for the
-default definition. Again, if you want to pre-define this to do something else,
-you have to do it before loading the class:
+By default, \cs{BeamerswitchSpawn} checks which \LaTeX\ engine you are running,
+and then runs the matching one of \cs{SpawnedPDFTeX}, \cs{SpawnedXeTeX},
+\cs{SpawnedLuaTeX}, or if all the tests fail, \cs{SpawnedTeX}, with the converted
+\cs{jobname}. These commands all add an engine-selecting option to a base
+command, \cs{SpawnedCompiler}, which by default is \pkg{latexmk} with synctex
+enabled, shell escape disabled and interaction set to batch mode. See the
+\hyperref[sec:switching]{Implementation} section below for details.
+
+Any of these commands can be pre-defined to something else, depending on what
+you want to do. So, for example, if you want to change the base \pkg{latexmk}
+options, pre-define \cs{SpawnedCompiler} to \texttt{latexmk} plus your chosen
+options:
+
+\begin{dispListing}
+\newcommand*{\SpawnedCompiler}{%
+ latexmk -silent -shell-escape -interaction=nonstopmode}
+\documentclass{beamerswitch}
+\end{dispListing}
+
+If you want to switch to using \texttt{rubber}, say, pre-define
+\cs{SpawnedPDFTeX} and friends accordingly (perhaps taking advantage of
+\cs{SpawnedCompiler} to reduce repetition):
\begin{dispListing}
-\newcommand{\BeamerswitchSpawn}[1]{%
- \ShellEscape{...}%
+\newcommand*{\SpawnedCompiler}{rubber -q --synctex}
+\newcommand*{\SpawnedPDFTeX}{\SpawnedCompiler -m pdftex}
+\newcommand*{\SpawnedXeTeX}{\SpawnedCompiler -m xelatex}
+\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:
+
+\begin{dispListing}
+\newcommand*{\BeamerswitchSpawn}[1]{%
+ \ShellEscape{... -jobname=\jobname#1 \jobname}%
}
\documentclass{beamerswitch}
\end{dispListing}
+If you want to use \pkg{arara} to compile everything, the class options won't
+help you as \pkg{arara} does not let you change \cs{jobname}s on the command line.
+That's no problem, though, because you can do it manually within your list of
+directives:
+
+\begin{dispListing}
+% arara: lualatex
+% arara: lualatex: { options: "-jobname beamerswitch-example-article" }
+% arara: lualatex: { options: "-jobname beamerswitch-example-handout" }
+% arara: lualatex: { options: "-jobname beamerswitch-example-trans" }
+\documentclass{beamerswitch}
+\end{dispListing}
+
\subsection{Improving compatibility}
\begin{docKey}{nohyperref}{}{no value, initially unset}
@@ -1059,6 +1101,14 @@ preamble.
modes. The available \meta{options} are listed below.
\end{docCommand}
+\begin{docKey}{frametitles}{=\val{para}\textbar\val{margin}\textbar\val{none}}{no default, initially \val{para}}
+ In \key{article} mode, affects how frame titles are printed. By default,
+ \pkg{beamerarticle} prints them as paragraph headings, represented by
+ the value \docValue{para}. To have them printed in the margin (using
+ \cs{marginpar}), use \docValue{margin}. To omit them altogether, use the value
+ \docValue{none}.
+\end{docKey}
+
\begin{docKey}{maketitle}{}{no value, initially unset}
In \key{article} mode, adjusts the \cs{maketitle} routine:
\begin{itemize}
@@ -1084,14 +1134,6 @@ preamble.
\end{dispListing}
\end{docKey}
-\begin{docKey}{frametitles}{=\val{para}\textbar\val{margin}\textbar\val{none}}{no default, initially \val{para}}
- In \key{article} mode, affects how frame titles are printed. By default,
- \pkg{beamerarticle} prints them as paragraph headings, represented by
- the value \docValue{para}. To have them printed in the margin (using
- \cs{marginpar}), use \docValue{margin}. To omit them altogether, use the value
- \docValue{none}.
-\end{docKey}
-
\section{Tips for further configuration}
There are some other ways to customize the behaviour of the various modes.
@@ -1305,30 +1347,46 @@ suggestions for improvements or new features to the
% \end{macro}
% \end{macro}
%
+% \changes{v1.3}{2017/12/10}{Decompose \cs{BeamerswitchSpawn} into further configurable macros.}
% \begin{macro}{BeamerswitchSpawn}
+% \begin{macro}{SpawnedTeX}
+% \begin{macro}{SpawnedPDFTeX}
+% \begin{macro}{SpawnedXeTeX}
+% \begin{macro}{SpawnedLuaTeX}
+% \begin{macro}{SpawnedCompiler}
% We provide a special routine for spawning new \LaTeX\ processes. We allow
% for the possibility of the user overriding this routine with another one,
% perhaps using a different automation tool; it should take one argument, being
% the jobname suffix.
%
% \begin{macrocode}
+\providecommand{\SpawnedCompiler}{latexmk -silent -synctex=1 -interaction=batchmode }
+\providecommand{\SpawnedTeX}{\SpawnedCompiler}
+\providecommand{\SpawnedPDFTeX}{\SpawnedCompiler -pdf }
+\providecommand{\SpawnedLuaTeX}{\SpawnedCompiler -pdflua }
+\providecommand{\SpawnedXeTeX}{\SpawnedCompiler -pdfxe }
\providecommand{\BeamerswitchSpawn}[1]{%
\ifbool{PDFTeX}{%
- \ShellEscape{latexmk -silent -pdf -synctex=1 -interaction=batchmode -jobname=\jobname#1 \jobname}
+ \ShellEscape{\SpawnedPDFTeX -jobname=\jobname#1 \jobname}
}{%
\ifbool{LuaTeX}{%
- \ShellEscape{latexmk -silent -lualatex -synctex=1 -interaction=batchmode -jobname=\jobname#1 \jobname}
+ \ShellEscape{\SpawnedLuaTeX -jobname=\jobname#1 \jobname}
}{%
\ifbool{XeTeX}{%
- \ShellEscape{latexmk -silent -xelatex -synctex=1 -interaction=batchmode -jobname=\jobname#1 \jobname}
+ \ShellEscape{\SpawnedXeTeX -jobname=\jobname#1 \jobname}
}{%
- \ShellEscape{latexmk -silent -synctex=1 -interaction=batchmode -jobname=\jobname#1 \jobname}
+ \ShellEscape{\SpawnedTeX -jobname=\jobname#1 \jobname}
}%
}%
}%
}
% \end{macrocode}
% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
% 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.