summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-03-31 22:45:51 +0000
committerKarl Berry <karl@freefriends.org>2012-03-31 22:45:51 +0000
commite48200a9daf7b606346dc7fdfe088b29c8671f75 (patch)
treeb3179be6d60cc04eb8bc712a225da3b26935a054
parentaeb52de85a365d28a2b85ef54696a7477a0b470b (diff)
new beamer package appendixnumberbeamer (21mar12)
git-svn-id: svn://tug.org/texlive/trunk@25809 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/appendixnumberbeamer/README6
-rw-r--r--Master/texmf-dist/tex/latex/appendixnumberbeamer/appendixnumberbeamer.sty64
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check3
-rwxr-xr-xMaster/tlpkg/libexec/ctan2tds1
-rw-r--r--Master/tlpkg/tlpsrc/appendixnumberbeamer.tlpsrc0
-rw-r--r--Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc1
6 files changed, 74 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/appendixnumberbeamer/README b/Master/texmf-dist/doc/latex/appendixnumberbeamer/README
new file mode 100644
index 00000000000..fe880ca8cf8
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/appendixnumberbeamer/README
@@ -0,0 +1,6 @@
+This package fixes the frame numbering in beamer when using an
+appendix such that the slides of the appendix are not counted in the
+total frame number of the main part of the document. The total frame
+number counter is reset to 0 and starts counting again when entering
+the appendix.
+
diff --git a/Master/texmf-dist/tex/latex/appendixnumberbeamer/appendixnumberbeamer.sty b/Master/texmf-dist/tex/latex/appendixnumberbeamer/appendixnumberbeamer.sty
new file mode 100644
index 00000000000..ec6b0066927
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/appendixnumberbeamer/appendixnumberbeamer.sty
@@ -0,0 +1,64 @@
+% vim:ft=plaintex:
+%
+% Written and (C) by Jérôme Lelong <jerome.lelong@gmail.com>
+% 2007 - 2012
+%
+% This program is free software; you can redistribute it and/or modify it
+% under the terms of the GNU General Public License as published by the
+% Free Software Foundation; either version 3 of the License, or (at your
+% option) any later version.
+%
+% This program is distributed in the hope that it will be useful, but
+% WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+% General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License along
+% with this program. If not, see <http://www.gnu.org/licenses/>.
+%
+% This small piece of code fixes the frame numbering in beamer when using
+% an appendix such that the slides of the appendix are not counted in the
+% total framenumber of the main part of the document. The total
+% framenumber counter is reset to 0 and starts counting again when
+% entering the appendix.
+%
+% Usage: \usepackage{appendixnumberbeamer}
+% and declare the appendix as usual using the \appendix command.
+
+
+\makeatletter
+
+
+\let\appendixtotalframenumber\empty
+\def\mainend{-1}
+\let\appendixorig\appendix
+
+% Redefine the \appendix command:
+% - it resets the framenumber counter
+% - freezes the total framenumber for this first part of the document
+\def\appendix{
+ \edef\mainend{\theframenumber}
+ \immediate\write\@auxout{\string\global\string\@namedef{mainendframenumber}{\mainend}}
+ \appendixorig
+ \def\inserttotalframenumber{\appendixtotalframenumber}%
+ \setcounter{framenumber}{0}
+}
+
+% To be called at the end of document to fix the total framenumber in the
+% main document and in the appendix.
+\def\pageatend{
+ \edef\appendixend{\theframenumber}
+ \ifnum\mainend>0%
+ \immediate\write\@auxout{\string\global\string\@namedef{appendixtotalframenumber}{\appendixend}}%
+ \immediate\write\@auxout{\string\global\string\@namedef{inserttotalframenumber}{\mainend}}%
+ \immediate\write\@auxout{\string\@writefile{nav}{\noexpand \headcommand {%
+ \noexpand \def\noexpand \inserttotalframenumber{\mainend}}}}%
+ \immediate\write\@auxout{\string\@writefile{nav}{\noexpand \headcommand {%
+ \noexpand \def\noexpand \appendixtotalframenumber{\appendixend}}}}%
+ \else
+ \fi
+}
+
+
+\AtEndDocument{\pageatend}
+\makeatother
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index 84902b62c17..c9597dfd002 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -35,7 +35,8 @@ my @TLP_working = qw(
amsldoc-it amsldoc-vn
amsmath amsmath-it amsrefs amstex amsthdoc-it
animate anonchap answers antiqua antomega antt anyfontsize anysize
- aomart apa apa6 apa6e apacite apalike2 appendix apprends-latex
+ aomart apa apa6 apa6e apacite apalike2
+ appendix appendixnumberbeamer apprends-latex
arabi arabtex arabxetex archaic arcs arev
around-the-bend arphic arrayjobx arsclassica
arydshln
diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds
index 99cc872a7c6..f5c14d86b38 100755
--- a/Master/tlpkg/libexec/ctan2tds
+++ b/Master/tlpkg/libexec/ctan2tds
@@ -624,6 +624,7 @@ chomp ($Build = `cd $Master/../Build/source && pwd`);
'opensans', "&MAKEcopy",
'otibet', "&MAKEflatten",
'oxford', "die 'skipping, nosell license'",
+ 'pageframe', "die 'skipping, noinfo license'",
'pageno', "die 'skipping, nosell license'",
'pagesLTS', "die 'skipping, use pageslts'",
'pandora', "&MAKEflatten",
diff --git a/Master/tlpkg/tlpsrc/appendixnumberbeamer.tlpsrc b/Master/tlpkg/tlpsrc/appendixnumberbeamer.tlpsrc
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/appendixnumberbeamer.tlpsrc
diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
index 4c7bc305a08..add060ca15b 100644
--- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
@@ -29,6 +29,7 @@ depend anonchap
depend answers
depend anyfontsize
depend appendix
+depend appendixnumberbeamer
depend arcs
depend arrayjobx
depend assignment