diff options
author | Karl Berry <karl@freefriends.org> | 2009-05-28 00:22:45 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-05-28 00:22:45 +0000 |
commit | 0261fc078b85578551c16a76f23ebfdb8c913cd7 (patch) | |
tree | e675041f722ba5a08d3a984a1d04880f6c72294c /Master/texmf-dist/tex/latex/pagecont | |
parent | 1253550b4126fb28972becd97fb0296324250c1f (diff) |
new latex package pagecont (26may09)
git-svn-id: svn://tug.org/texlive/trunk@13500 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/pagecont')
-rw-r--r-- | Master/texmf-dist/tex/latex/pagecont/pagecont.sty | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/pagecont/pagecont.sty b/Master/texmf-dist/tex/latex/pagecont/pagecont.sty new file mode 100644 index 00000000000..d2b85739c76 --- /dev/null +++ b/Master/texmf-dist/tex/latex/pagecont/pagecont.sty @@ -0,0 +1,59 @@ +%% +%% This is file `pagecont.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% pagecont.dtx +%% +%% Copyright (C) 2007 Miguel V. S. Frasson (mvsfrasson@gmail.com) +%% +%% This file is part of the `pagecont' package. +%% +%% This package may be distributed under the terms of the LaTeX +%% Project Public License, as described in lppl.txt in the base +%% LaTeX distribution, either version 1.2 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. +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{pagecont}% + [2009/05/26 v1 Page numbering continuation between documents] + \RequirePackage{keyval} +\newif\ifPGC@first +\PGC@firstfalse +\DeclareOption{first}{\PGC@firsttrue} +\newcommand{\PGC@savefile}{pagecont.pco} +\define@key{PGC@}{savefile}{\renewcommand{\PGC@savefile}{#1}} +\newcommand{\PGC@kvsetkeys}[1]{\setkeys{PGC@}{#1}} +\DeclareOption*{\expandafter\PGC@kvsetkeys\expandafter{\CurrentOption}} +\ProcessOptions +\newcommand{\PGC@lastfilelastpage}{0} +\newcommand{\PGC@info}[3]{% + \edef\PGC@jobname{\jobname}% + \def\PGC@jobnamesaved{#1}% + \edef\PGC@jobnamesaved{\expandafter\strip@prefix\meaning\PGC@jobnamesaved}% + \ifx\PGC@jobname\PGC@jobnamesaved + \renewcommand{\PGC@lastfilelastpage}{#2}% + \setcounter{page}{#2}% + \else + \renewcommand{\PGC@lastfilelastpage}{#3}% + \setcounter{page}{#3}% + \fi +\addtocounter{page}{1}} +\newcommand{\PGC@saveinfo}{% + \newwrite\PGC@file + \expandafter\openout\expandafter\PGC@file\PGC@savefile\relax + \write\PGC@file + {\string\PGC@info{\jobname}{\PGC@lastfilelastpage}{\arabic{page}}}} +\AtEndDocument{\PGC@saveinfo} +\ifPGC@first +\else + \IfFileExists{\PGC@savefile}{\input{\PGC@savefile}}{} +\fi +\endinput +%% +%% End of file `pagecont.sty'. |