diff options
Diffstat (limited to 'Master/texmf-dist/tex')
-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'. |