diff options
author | Karl Berry <karl@freefriends.org> | 2017-06-06 21:54:50 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-06-06 21:54:50 +0000 |
commit | 9fc9e3041c5412f3fdb979bdb587f7c90bfaf8bb (patch) | |
tree | 88900a8c128118aca53a473b4828efb757dbf4bd /Master/texmf-dist/source | |
parent | d065000138908e78e45f5e66e97ad1349866e0c3 (diff) |
beamerswitch (23may17)
git-svn-id: svn://tug.org/texlive/trunk@44508 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r-- | Master/texmf-dist/source/latex/beamerswitch/beamerswitch.dtx | 229 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/beamerswitch/beamerswitch.ins | 4 |
2 files changed, 185 insertions, 48 deletions
diff --git a/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.dtx b/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.dtx index ed9996a4ba4..79c482e7101 100644 --- a/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.dtx +++ b/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.dtx @@ -5,76 +5,95 @@ %<*readme> # beamerswitch: Convenient mode selection in Beamer documents -This class is a wrapper around the `beamer` class to make it easier to use the -same document to generate the different forms of the presentation: the slides -themselves, an abbreviated slide set for transparencies or online reference, -an n-up handout version, and a transcript or set of notes using the `article` -class. +This class is a wrapper around the [beamer](http://ctan.org/pkg/beamer) class to +make it easier to use the same document to generate the different forms of the +presentation: the slides themselves, an abbreviated slide set for transparencies +or online reference, an n-up handout version, and a transcript or set of notes +using the `article` class. ## Installation ### Dependencies -To compile the documentation you will need to have the `minted` package working, -which in turn relies on Python 2.6+ and Pygments. See the documentation of that -package for details. +To compile the documentation you will need to have the +[minted](http://ctan.org/pkg/minted) package working, which in turn relies on +Python 2.6+ and Pygments. See the documentation of that package for details. + +There is an example file that demonstrates the features of the class. The class +itself depends only on packages easily available through TeX distributions and +CTAN. One feature relies on [latexmk](http://ctan.org/pkg/latexmk) though you +can work around that if you have the patience. -There is an example file that demonstrates the features of the class. -The class itself depends only on packages easily available through TeX -distributions and CTAN. One feature relies on `latexmk` though you can work -around that if you have the patience. +Note that the zip file on the +[Releases](https://github.com/alex-ball/beamerswitch/releases) page on GitHub +contains all the files you need, pre-compiled. You can also avoid the hassle by +installing the class from your TeX distribution's package manager. -Note that the zip file on the [Releases] page on GitHub contains all the files -you need, pre-compiled. +### Managed way -[Releases]: https://github.com/alex-ball/beamerswitch/releases +The latest stable release of the beamerswitch class has been packaged for +TeX Live and MiKTeX. If you are running TeX Live and have `tlmgr` +installed, you can install the package simply by running +`tlmgr install beamerswitch`. If you are running MiKTeX, you can install the +package by running `mpm --install=beamerswitch`. Both `tlmgr` and `mpm` have +GUI versions that you might find friendlier. ### Automated way A makefile is provided which you can use with the Make utility: + * Running `make beamerswitch.cls` just generates the class file (and a few + others). * Running `make` generates the class file and documentation. - * Running `make inst` installs the files to your home TeX tree. - * Running `make install` installs the files to the local TeX tree. - * Running `make uninst` uninstalls the files to your home TeX tree. - * Running `make uninstall` uninstalls the files to the local TeX tree. + * Running `make inst` generates and installs the files to your home TeX tree. + (To undo, run `make uninst`.) + * Running `make install` generates and installs the files to the local TeX + tree. (To undo, run `make uninstall`.) + * Running `make clean` removes auxiliary files from the working directory. + * Running `make distclean` removes the generated from the working directory + files as well. ### Manual way To install the class from scratch, follow these instructions. If you have downloaded the zip file from the [Releases] page on GitHub, you can skip the -first two steps. +first three steps. - 1. Process `beamerswitch.dtx` with your favourite version of LaTeX with shell + 1. Run `tex beamerswitch.dtx` to generate the class file and the example file + `beamerswitch-example.tex`. (You can safely skip this step if you are + confident about step 2.) + + 2. Compile `beamerswitch.dtx` with your favourite version of LaTeX with shell escape enabled (as required by `minted` for typesetting the listings). You - will also need to run it through `makeindex`. This will generate the class - file and the main documentation (DVI or PDF), plus an example file - `beamerswitch-example.tex`. + will also need to run it through `makeindex`. This will generate the main + documentation (DVI or PDF). - 2. Process `beamerswitch-example.tex` with your favourite version of LaTeX. If + 3. Compile `beamerswitch-example.tex` with your favourite version of LaTeX. If you enable shell escape and have `latexmk` installed you will end up with another four documents (DVI or PDF). Otherwise you will get one. - 3. To install the files, create the following folders in your chosen TeX tree + 4. To install the files, create the following folders in your chosen TeX tree and copy the files across as shown (read `.pdf` as `.dvi` if that is what you generated): - - * `source/latex/beamerswitch`: - `beamerswitch.dtx`, - (`beamerswitch.ins`) - * `tex/latex/beamerswitch`: - `beamerswitch.cls` - * `doc/latex/beamerswitch`: - `beamerswitch.pdf`, - `beamerswitch-example.tex`, - `beamerswitch-example.pdf`, - `beamerswitch-example-article.pdf`, - `beamerswitch-example-handout.pdf`, - `beamerswitch-example-trans.pdf` + - `source/latex/beamerswitch`: + `beamerswitch.dtx`, + (`beamerswitch.ins`) + - `tex/latex/beamerswitch`: + `beamerswitch.cls` + - `doc/latex/beamerswitch`: + `beamerswitch.pdf`, + `beamerswitch-example.tex`, + `beamerswitch-example.pdf`, + `beamerswitch-example-article.pdf`, + `beamerswitch-example-handout.pdf`, + `beamerswitch-example-trans.pdf` + + 5. You may then have to update your installation's file name database + before TeX and friends can see the files. ## Licence -Copyright 2016 Alex Ball. +Copyright 2016–2017 Alex Ball. This work consists of the file beamerswitch.dtx and a Makefile. @@ -174,7 +193,7 @@ See: http://www.latex-project.org/lppl.txt \endpreamble \postamble -Copyright (C) 2016 by Alex Ball <a.j.ball@bath.ac.uk> +Copyright (C) 2016-2017 by Alex Ball <a.j.ball@bath.ac.uk> \endpostamble \usedir{tex/latex/\jobname} @@ -209,7 +228,7 @@ Copyright (C) 2016 by Alex Ball <a.j.ball@bath.ac.uk> %<class>\NeedsTeXFormat{LaTeX2e}[1999/12/01] %<class>\ProvidesClass{beamerswitch} %<*class> - [2016/08/19 v1.1 Convenient mode selection in Beamer documents] + [2017/05/22 v1.2 Convenient mode selection in Beamer documents] %</class> %<*driver> \documentclass[12pt]{article} @@ -298,6 +317,7 @@ Copyright (C) 2016 by Alex Ball <a.j.ball@bath.ac.uk> , color key=Option , color value=Value , color color=Color + , colbacktitle=ExampleFrame!33!ExampleBack } \renewcommand{\theFancyVerbLine}{\footnotesize\itshape\color{gray}\arabic{FancyVerbLine}} \let\tcbcs=\cs @@ -452,7 +472,6 @@ Copyright (C) 2016 by Alex Ball <a.j.ball@bath.ac.uk> \DisableCrossrefs \makeindex -%\CodelineIndex \RecordChanges \begin{document} @@ -476,6 +495,109 @@ To contact the author about this package, please visit the GitHub page where the code is hosted: \url{https://github.com/alex-ball/beamerswitch}. \end{absquote} +\changes{v1.1}{2016/08/19}{Fix \key{maketitle} and \key{textinst} options.} +\changes{v1.2}{2016/05/22}{Add `Quick start guide' section.} +\section{Quick start guide} + +Here are the key facts: + +\begin{itemize} +\item + The \pkg{beamerswitch} class makes it easier to switch between + \pkg{beamer} modes. +\item + It is aimed at you if you want to generate handouts from your + presentation, whether printouts of your slides or something more like a paper + or article. +\item + It is \emph{not} a drop-in replacement for \pkg{beamer}. +\end{itemize} + +If you have an existing \pkg{beamer} presentation and want convert it to use +\pkg{beamerswitch} instead, here's what you need to do. + +\begin{enumerate} +\item + Have you specified class options other than \key{ignorenonframetext}? + If so, start by rewriting your \cs{documentclass} line in terms of + \cs{PassOptionsToClass}: + + \begin{multicols}{2} +\begin{dispListing*}{title=Before,coltitle=black,fonttitle=\sffamily} +\documentclass[10pt]{beamer} +\end{dispListing*} + \columnbreak +\begin{dispListing*}{title=After,coltitle=black,fonttitle=\sffamily} +\PassOptionsToClass{10pt}{beamer} +\end{dispListing*} + \end{multicols} + + Then add `\cs{documentclass}\brackets{beamerswitch}' directly below. + + Otherwise, simply replace your \cs{documentclass} line with the + \texttt{beamerswitch} one. + +\item + If you did \emph{not} specify \key{ignorenonframetext} as one of your + \pkg{beamer} options, add a `\cs{mode}\texttt{<all>}' line directly after + `\cs{begin}\brackets{document}'. + +\item + Wrap any preamble content intended only for your slides (like \cs{usetheme} + or \cs{usepackage} commands) with `\cs{mode}\texttt{<presentation>}\meta{\dots}' + or something more specific, as required. +\end{enumerate} + +\pagebreak +In summary, here is an example: + +\begin{multicols}{2} +\begin{dispListing*}{title=Before,coltitle=black,fonttitle=\sffamily} +\documentclass[10pt]{beamer} + + + +\usetheme{metropolis} + +\title{Test presentation} + +\begin{document} + + + \maketitle + +\end{document} +\end{dispListing*} + \columnbreak +\begin{dispListing*}{title=After,coltitle=black,fonttitle=\sffamily} +\PassOptionsToClass{10pt}{beamer} +\documentclass{beamerswitch} + +\mode<presentation>{% + \usetheme{metropolis} +} +\title{Test presentation} + +\begin{document} +\mode<all> + + \maketitle + +\end{document} +\end{dispListing*} +\end{multicols} + +At this point the document should compile exactly as before. + +If you intend to use article mode at all, I strongly suggest that you +proceed by converting your document body so it that works without the +`\cs{mode}\texttt{<all>}' line. That means making sure all slide content is in +a \env{frame} environment, new command definitions are moved to the preamble, +and so on. + +Lastly, read through the rest of this manual and see what \pkg{beamerswitch} can +do for you! + \section{Introduction} With \pkg{beamer}, it is possible to typeset the same document code in different @@ -699,12 +821,13 @@ compilation processes, it is possible to do that. Bear in mind, though, that other version on a previous run so you have to take care of that yourself. The command that does the business is this: +\changes{v1.1}{2016/08/19}{Improve documentation of \cs{BeamerswitchSpawn}, \cs{handoutlayout} and \cs{articlelayout}.} \begin{docCommand}{BeamerswitchSpawn}{\marg{suffix}} Spawns a new compilation process with \meta{suffix} appended to the \cs{jobname}. \end{docCommand} -See the \hyperref[sec:implementation]{Implementation} section below for the +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: @@ -1163,7 +1286,7 @@ suggestions for improvements or new features to the \ProcessOptionsX[DC]<beamerswitch> % \end{macrocode} % -% \subsection{Jobname-based mode switching} +% \subsection{Jobname-based mode switching}\label{sec:switching} % % \begin{macro}{BeamerSuffix} % \begin{macro}{TransSuffix} @@ -1185,7 +1308,8 @@ suggestions for improvements or new features to the % \begin{macro}{BeamerswitchSpawn} % 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. +% perhaps using a different automation tool; it should take one argument, being +% the jobname suffix. % % \begin{macrocode} \providecommand{\BeamerswitchSpawn}[1]{% @@ -2164,6 +2288,9 @@ suggestions for improvements or new features to the % \end{macro} % % \begin{optionkey}{frametitles} +% \begin{optionvalue}{para} +% \begin{optionvalue}{margin} +% \begin{optionvalue}{none} % \begin{macro}{beamerswitch@articleframetitles} % We offer some alternatives for handling frame titles in article mode. % \begin{itemize} @@ -2184,6 +2311,9 @@ suggestions for improvements or new features to the } % \end{macrocode} % \end{macro} +% \end{optionvalue} +% \end{optionvalue} +% \end{optionvalue} % \end{optionkey} % % \begin{macro}{articlelayout} @@ -2204,6 +2334,9 @@ suggestions for improvements or new features to the % easily end up duplicating section headings in running text, or captions in % figures. You may have other ideas, so we keep this behaviour configurable. % +% \begin{optionvalue}{margin} +% \begin{optionvalue}{none} +% \begin{optionvalue}{para} % The \val{margin} value is implemented using \cs{marginpar}. % % \begin{macrocode} @@ -2227,6 +2360,9 @@ suggestions for improvements or new features to the }% } % \end{macrocode} +% \end{optionvalue} +% \end{optionvalue} +% \end{optionvalue} % % This is where we make our adjustments to \cs{maketitle}. We start by joining % the subtitle to the title by means of a colon instead of a newline. @@ -2248,6 +2384,7 @@ suggestions for improvements or new features to the }% % \end{macrocode} % +% \changes{v1.1}{2016/08/19}{Remove personal customizations from \key{maketitle} code.} % Our first change to \cs{maketitle} itself is to remove the initial vertical % space. % diff --git a/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.ins b/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.ins index d59e171ef16..e48670e9fbe 100644 --- a/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.ins +++ b/Master/texmf-dist/source/latex/beamerswitch/beamerswitch.ins @@ -28,7 +28,7 @@ See: http://www.latex-project.org/lppl.txt \endpreamble \postamble -Copyright (C) 2016 by Alex Ball <a.j.ball@bath.ac.uk> +Copyright (C) 2016-2017 by Alex Ball <a.j.ball@bath.ac.uk> \endpostamble \usedir{tex/latex/\jobname} @@ -41,6 +41,6 @@ Copyright (C) 2016 by Alex Ball <a.j.ball@bath.ac.uk> } \endbatchfile %% -%% Copyright (C) 2016 by Alex Ball <a.j.ball@bath.ac.uk> +%% Copyright (C) 2016-2017 by Alex Ball <a.j.ball@bath.ac.uk> %% %% End of file `beamerswitch.ins'. |