diff options
author | Karl Berry <karl@freefriends.org> | 2010-06-11 00:42:40 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-06-11 00:42:40 +0000 |
commit | 030ea45adcac9c8cf31e5e2ad474965155c8d4e0 (patch) | |
tree | 54cb7b81fb3e505b3f9672a7baa0ac50bbaa2e1a | |
parent | 8e5e9bbf8afd30acf79e6efd665b94f96e697a2c (diff) |
new latex pkg pageslts 1.1b (10jun10)
git-svn-id: svn://tug.org/texlive/trunk@18883 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/pageslts/README | 224 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/pageslts/ltxdoc.cfg | 121 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/pageslts/pagesLTS-example.pdf | bin | 0 -> 463052 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/pageslts/pagesLTS-example.tex | 991 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/pageslts/pagesLTS.pdf | bin | 0 -> 941453 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/pageslts/pagesLTS.drv | 109 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/pageslts/pagesLTS.dtx | 4747 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/pageslts/pagesLTS.ins | 161 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/pageslts/pagesLTS.sty | 975 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tlpkg-ctan-check | 2 | ||||
-rwxr-xr-x | Master/tlpkg/libexec/ctan2tds | 1 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc | 1 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/pageslts.tlpsrc | 0 |
13 files changed, 7331 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/pageslts/README b/Master/texmf-dist/doc/latex/pageslts/README new file mode 100644 index 00000000000..ae5f878ad58 --- /dev/null +++ b/Master/texmf-dist/doc/latex/pageslts/README @@ -0,0 +1,224 @@ +README for pagesLTS package, 2010/06/03, v1.1b + + +TABLE OF CONTENTS +================= + +1 Introduction +2 Download +3 Installation +4 Additional Packages +5 Package Compatibility +6 Author/Maintainer +7 Bug Reports +8 Known Problems + + +1 INTRODUCTION +============== + +This package puts the labels LastPage (\AtEndDocument) and +VeryLastPage (\AfterLastShipout) into the .aux file, +allowing the user to refer to the (very) last page of a +document. This might be particularly useful in places like +headers or footers. +When more than one page numbering scheme is used, these +references do not give the total number of pages. For this +case the label LastPages is introduced. Additionally, at the +last page of each page numbering scheme a label +pagesLTS.<numbering scheme> is placed, where +<numbering scheme> is e. g. arabic, roman, Roman, alph, or +Alph. For fnsymbol please use +\lastpageref{pagesLTS.fnsymbol} instead of +\pageref{pagesLTS.fnsymbol}. When the same numbering scheme +is used twice, the page numbers are either reset to one or +continued automatically, depending on the option given when +the package is called. The command \theCurrentPage prints +the current total/absolute page number - in contrast to +\thepage, which gives only the page name in the current page +numbering scheme. \theCurrentPageLocal gives the current +number of pages in the current page numbering scheme. +\thepage and \theCurrentPageLocal are different e. g. when +\addtocounter{pageg}{...} or \setcounter{page}{...} were +used. +At the first page of the document a label pagesLTS.0 is +created. This label can be referred to, too. Further labels +are provided for special cases. +The alphalph package is supported, i. e. page numbers alph +or Alph > 26 and fnyambol > 9 can be used (with according +options set). Even zero and negative page numbers can be +used with arabic, alph, Alph, roman, Roman, and fnsymbol +page numbering (with alphalph package and according +options). + + +2 DOWNLOAD +========== + +`pagesLTS' should become available on CTAN soon: + CTAN:macros/latex/contrib/muench/pagesLTS/ + +Also a ZIP file is provided that contains the files, already +sorted in a TDS tree (should become available on CTAN soon): + CTAN:install/macros/latex/contrib/muench/pagesLTS.tds.zip + +`CTAN:' means one of the `Comprehensive TeX Archive Network' +nodes or one of its mirrors. This is explained in + http://www.tex.ac.uk/cgi-bin/texfaq2html?label=archives + +The CTAN stuff will be mirrored automatically from the +ftp server, so + ftp://ftp.tug.org/pub/tex/muench/pagesLTS/ +corresponds to + CTAN:macros/latex/contrib/muench/pagesLTS/ + + +3 INSTALLATION +============== + +Installation with ZIP file in TDS format +---------------------------------------- +The ZIP file `pagesLTS.tds.zip' contains the files sorted +in a TDS tree. Thus you can directly unpack the ZIP file +inside a TDS tree. + (See CTAN:tds.zip for an explanation of TDS.) +Example: + cd /...somewhere.../texmf + unzip /...downloadpath.../pagesLTS.tds.zip +Do not forget to refresh the file name database of this +TDS tree. +Example: + texhash /...somewhere.../texmf + +Manual installation +------------------- +a) Download the pagesLTS files from CTAN or the TUG server. + If necessary, unpack them. +b) If directory `beta' exists, replace the files by the + counterparts in this directory, if you want to use the + latest versions. +c) Generate the package and driver files: + tex pagesLTS.ins +d) Install the files `*.sty' and `*.cfg' in your TDS tree: + cp *.sty *.cfg TDS:tex/latex/muench/pagesLTS/ + Replace `TDS:' by the prefix of your TDS tree + (texmf directory). +e) Copy the documentation files to + "TDS:doc/latex/pagesLTS/": + README, pagesLTS.pdf,pagesLTS-example.tex, + pagesLTS-example.pdf. +f) Update the databases if necessary, e. g. for teTeX: + mktexlsr .../texmf + + +4 ADDITIONAL PACKAGES +===================== + +Depending on the driver and option settings, pagesLTS loads +other packages: + +For unpacking the pagesLTS.dtx file and constructing the +documentation it is required: +- TeXFormat LaTeX2e, 1994/06/01, v2e +- document class ltxdoc, 2007/11/11, v2.0u, + CTAN:macros/latex/base/ltxdoc.dtx +- package holtxdoc, 2010/04/24, v0.19, + CTAN:macros/latex/contrib/oberdiek/holtxdoc.dtx +- package hypdoc, 2010/03/26, v1.9, + CTAN:macros/latex/contrib/oberdiek/hypdoc.dtx +- package geometry, 2010/03/13, v5.3, + CTAN:macros/latex/contrib/geometry/geometry.dtx + +The pagesLTS.sty for LATEX2e (i. e. all documents using the + pagesLTS package) requires: +- TeXFormat LaTeX2e, 1994/06/01, v2e +- package atveryend, 2010/03/24, v1.5, + CTAN:macros/latex/contrib/oberdiek/atveryend.dtx +- package everyshi, 2001/05/15, v3.00, + CTAN:macros/latex/contrib/ms/everyshi.dtx +- package kvoptions, 2010/02/22, v3.7, + CTAN:macros/latex/contrib/oberdiek/kvoptions.dtx +- package undolabl, 2010/06/03, v1.0b, + CTAN:macros/latex/contrib/muench/undolabl/undolabl.dtx + (submitted, should become available at that location + soon) + +The pagesLTS-example.tex requires the same files as all + documents using the pagesLTS package, and additionally: +- package alphalph, 2010/04/18, v2.3, + CTAN:macros/latex/generic/oberdiek/alphalph.dtx +- package lipsum, 2005/01/26, v1.0, + CTAN:macros/latex/contrib/lipsum/lipsum.dtx +- package showkeys, 2007/08/07, v3.15, + CTAN:macros/latex/required/tools/showkeys.dtx +- package hyperref, 2010/05/13, v6.81e, + CTAN:macros/latex/contrib/hyperref.zip +- package pagesLTS, 2010/06/03, v1.1b, + CTAN:macros/latex/contrib/muench/pagesLTS/pagesLTS.dtx + (submitted, should become available at that location + soon) + (Well, it is the example file for this package, and + because you are reading the README for the pagesLTS + package, it can be assumed that you already have some + version of it - is it the current one?) + +which again load other packages +(see the result of the \listfiles comman in the log-file + of the example). + + +5 PACKAGE COMPATIBILITY +======================= + +* endfloat package + pagesLTS is not compatible with very old versions of + endfloat(2.0 and older). + Just get the recent version of the endfloat package. + +* lastpage package + \usepackage[pagecontinue=false,alphMult=0,AlphMulti=0, + fnsymbolmult=false,romanMult=false,RomanMulti=false] + {pagesLTS} + can simulate the behaviour of the lastpage package. + Using the lastpage before the pagesLTS before the hyperref + package results in multiply definitions of the LastPage + label. + + +6 AUTHOR/MAINTAINER +===================== + +* Hans-Martin Münch + + +7 BUG REPORTS +============== + +A bug report should contain: +* Comprehensive problem description. This includes error or + warning messages. + * \errorcontextlines=\maxdimen can be added in the + TeX code to get more informations in TeX error messages. +* Minimal test file that shows the problem, but does not + contain any unnecessary packages and code. +* Used drivers/programs. +* Version information about used packages and programs. + * If you are using LaTeX, then add "\listfiles". Then + a list of version informations is printed at the end + of the LaTeX run. +* Please no other files than the minimal test file. + The other files .log, .dvi, .ps, .pdf are seldom + necessary, so send them only on request. +* Please .zip or .tar.gz your file(s) before sending them! + +Bug address +----------- +Bug reports can be send to the maintainer: + Hans-Martin Münch + <Martin [dot] Muench [at] Uni-Bonn [dot] de> + + +8 KNOWN PROBLEMS +================= + +* as yet: none...
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/pageslts/ltxdoc.cfg b/Master/texmf-dist/doc/latex/pageslts/ltxdoc.cfg new file mode 100644 index 00000000000..480d7dcd308 --- /dev/null +++ b/Master/texmf-dist/doc/latex/pageslts/ltxdoc.cfg @@ -0,0 +1,121 @@ +%% +%% This is file `ltxdoc.cfg', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% pagesLTS.dtx (with options: `ltxdoc') +%% +%% This is a generated file. +%% +%% IMPORTANT NOTICE: +%% On the first page backslash pagenumbering should be called +%% (with the appropriate argument out of e.g. +%% * roman - Lowercase Roman numerals: i, ii, iii, iv,... +%% * Roman - Uppercase Roman numerals: I, II, III, IV,... +%% * arabic - Arabic numerals: 1, 2, 3, 4,... +%% * alph - Lowercase letters: a, b, c, d,... +%% * Alph - Uppercase letters: A, B, C, D,... +%% * fnsymbol - Footnote symbols: *, † (ddagger), ‡ (dddagger), +%% § (mathsection),... +%% ). The command backslash pagenumbering is renewed, but no change +%% should be visible to the output text, because only labels are added. +%% backslash OrigPagenumbering can be used to get the original meaning +%% of backslash pagenumbering, but in that case this package does not +%% see the change in the page numbering scheme and will make mistakes. +%% The package takes options. +%% +%% The usual disclaimers apply: +%% If it doesn't work right that's your problem. +%% (Nevertheless, send an e-mail to the maintainer +%% when you find an error in this package.) +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either +%% version 1.3c of this license or (at your option) any later +%% version. This version of this license is in +%% http://www.latex-project.org/lppl/lppl-1-3c.txt +%% and the latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of +%% LaTeX version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is H.-Martin Muench +%% (Martin dot Muench at Uni-Bonn dot de). +%% +%% This package first started as a revision of the lastpage +%% package of Jeffrey P. Goldberg (jeffrey+news at goldmark dot org), +%% but it became obviouse that a replacement was needed. +%% +%% This work consists of the main source file pagesLTS.dtx +%% and the derived files +%% pagesLTS.sty, pagesLTS.pdf, pagesLTS.ins, pagesLTS.drv, +%% pagesLTS-example.tex. +%% +\NeedsTeXFormat{LaTeX2e}[1994/06/01] +\ProvidesFile{ltxdoc.cfg}[2010/05/15 v1.0 configuration file for pagesLTS (HMM)] + %% Code from original ltxdoc.cfg [2007/01/08 latex-tds: ltxdoc.cls configuration (HO)], %% + % copyrighted 2006, 2007 Heiko Oberdiek, part of project `latex-tds'. + % That file may be distributed and/or modified under the + % conditions of the LaTeX Project Public License, either version 1.3 + % of this license or (at your option) any later version. + % The latest version of this license is in + % http://www.latex-project.org/lppl.txt + % and version 1.3c or later is part of all distributions of LaTeX + % version 2005/12/01 or later. + % That work has the LPPL maintenance status `maintained'. + % The Current Maintainer of that work is Heiko Oberdiek. + % + \PassOptionsToClass{a4paper}{article} + \AtEndOfClass{% + \RequirePackage[numbered]{hypdoc}[2010/03/26]% v1.9 + \pdfstringdefDisableCommands{% + \let\env\relax % longtable.dtx + \let\mytt\relax % tabularx.dtx + }% + \addtolength{\topmargin}{-10mm}% + \addtolength{\textheight}{20mm}% + % Depending on the page style, the head or foot area + % are put into the text area. + % Usually the page style is the default "plain". + % tools/verbatim.dtx uses "myheadings". + \def\string@plain{plain}% + \def\string@myheadings{myheadings}% + \def\current@pagestyle{plain}% + \let\ltxdoc@cfg@pagestyle\pagestyle + \def\pagestyle#1{% + \def\current@pagestyle{#1}% + \ltxdoc@cfg@pagestyle{#1}% + }% + \edef\ltxdoc@cfg@jobname{\jobname}% + \def\ltxdoc@cfg@longtable{longtable}% + \@onelevel@sanitize\ltxdoc@cfg@longtable + \ifx\ltxdoc@cfg@jobname\ltxdoc@cfg@longtable + \def\current@pagestyle{both}% + \fi + \let\ltxdoc@cfg@document\document + \def\document{% + \ifx\current@pagestyle\string@plain + \addtolength{\textheight}{\headheight}% + \addtolength{\textheight}{\headsep}% + \setlength{\headheight}{0pt}% + \setlength{\headsep}{0pt}% + \global\textheight\textheight + \global\headheight\headheight + \global\headsep\headsep + \fi + \ifx\current@pagestyle\string@myheadings + \addtolength{\textheight}{\footskip}% + \global\textheight\textheight + \fi + \ltxdoc@cfg@document + }% + %% End of code from original ltxdoc.cfg [2007/01/08 latex-tds: ltxdoc.cls configuration (HO)] %% + %% Place additional code here. %% + } + +\endinput +%% +%% End of file `ltxdoc.cfg'. diff --git a/Master/texmf-dist/doc/latex/pageslts/pagesLTS-example.pdf b/Master/texmf-dist/doc/latex/pageslts/pagesLTS-example.pdf Binary files differnew file mode 100644 index 00000000000..c86908aa5a3 --- /dev/null +++ b/Master/texmf-dist/doc/latex/pageslts/pagesLTS-example.pdf diff --git a/Master/texmf-dist/doc/latex/pageslts/pagesLTS-example.tex b/Master/texmf-dist/doc/latex/pageslts/pagesLTS-example.tex new file mode 100644 index 00000000000..ab5135b55da --- /dev/null +++ b/Master/texmf-dist/doc/latex/pageslts/pagesLTS-example.tex @@ -0,0 +1,991 @@ +%% +%% This is file `pagesLTS-example.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% pagesLTS.dtx (with options: `example') +%% +%% This is a generated file. +%% +%% IMPORTANT NOTICE: +%% On the first page backslash pagenumbering should be called +%% (with the appropriate argument out of e.g. +%% * roman - Lowercase Roman numerals: i, ii, iii, iv,... +%% * Roman - Uppercase Roman numerals: I, II, III, IV,... +%% * arabic - Arabic numerals: 1, 2, 3, 4,... +%% * alph - Lowercase letters: a, b, c, d,... +%% * Alph - Uppercase letters: A, B, C, D,... +%% * fnsymbol - Footnote symbols: *, † (ddagger), ‡ (dddagger), +%% § (mathsection),... +%% ). The command backslash pagenumbering is renewed, but no change +%% should be visible to the output text, because only labels are added. +%% backslash OrigPagenumbering can be used to get the original meaning +%% of backslash pagenumbering, but in that case this package does not +%% see the change in the page numbering scheme and will make mistakes. +%% The package takes options. +%% +%% The usual disclaimers apply: +%% If it doesn't work right that's your problem. +%% (Nevertheless, send an e-mail to the maintainer +%% when you find an error in this package.) +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either +%% version 1.3c of this license or (at your option) any later +%% version. This version of this license is in +%% http://www.latex-project.org/lppl/lppl-1-3c.txt +%% and the latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of +%% LaTeX version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is H.-Martin Muench +%% (Martin dot Muench at Uni-Bonn dot de). +%% +%% This package first started as a revision of the lastpage +%% package of Jeffrey P. Goldberg (jeffrey+news at goldmark dot org), +%% but it became obviouse that a replacement was needed. +%% +%% This work consists of the main source file pagesLTS.dtx +%% and the derived files +%% pagesLTS.sty, pagesLTS.pdf, pagesLTS.ins, pagesLTS.drv, +%% pagesLTS-example.tex. +%% +\documentclass[british]{article} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage{alphalph}[2010/04/18]% v2.3 +\usepackage{lipsum}[2005/01/26]% v1.0 +\usepackage[draft]{showkeys}[2007/08/07]% v3.15 +%% Use final instead of draft to hide the keys. %% +\usepackage{hyperref}[2010/05/13]% v6.81e +\hypersetup{% + extension=pdf,% + plainpages=false,% + pdfpagelabels=true,% + hyperindex=false,% + pdflang={en},% + pdftitle={pagesLTS package example},% + pdfauthor={Hans-Martin Muench},% + pdfsubject={Example for the pagesLTS package},% + pdfkeywords={LaTeX, pagesLTS, Hans-Martin Muench},% + pdfview=Fit,% + pdfstartview=Fit,% + pdfpagelayout=SinglePage,% + bookmarksopen=true% +} +\usepackage[pagecontinue=true,alphMult=ab,AlphMulti=AB,fnsymbolmult=true,romanMult=true,RomanMulti=true]{pagesLTS}[2010/06/03]% v1.1b +%% These are the default options. %% +\makeatletter + \renewcommand{\@evenfoot}% + {Page \thepage\ (\theCurrentPage; local: \theCurrentPageLocal) of % + \lastpageref{pagesLTS.roman}(\lastpageref{pagesLTS.roman.local}) + % + \lastpageref{pagesLTS.Roman}(\lastpageref{pagesLTS.Roman.local}) + % + \lastpageref{pagesLTS.arabic}(\lastpageref{pagesLTS.arabic.local}) + % + \lastpageref{pagesLTS.fnsymbol}(\lastpageref{pagesLTS.fnsymbol.local}) + % + \lastpageref{pagesLTS.alph}(\lastpageref{pagesLTS.alph.local}) + % + \lastpageref{pagesLTS.Alph}(\lastpageref{pagesLTS.Alph.local}) = % + \lastpageref{LastPages} pages.% + } + \renewcommand{\@oddfoot}{\@evenfoot} + \newcounter{pagesLTS.exampleArabic} + \setcounter{pagesLTS.exampleArabic}{3} + \newcounter{pagesLTS.examplealph} + \setcounter{pagesLTS.examplealph}{23} +%% Code from tcilatex.tex, Macros for Scientific Word and Scientific WorkPlace 5.5 <06 Oct 2005> %% +%% Copyright (C) 2005 Mackichan Software, Inc. %% +%% That macro file is NOT proprietary and may be freely copied and distributed. %% + \def\unit#1{\mathord{\thinspace\rm #1}}% +%% End of code from tcilatex.tex %% +\makeatother +\listfiles +\begin{document} +\pagenumbering{roman} +%% Note the first \pagenumbering immediately behind \begin{document}. %% + +%%\addtocounter{page}{-2} %% + +\section*{Example for pagesLTS} +\addcontentsline{toc}{section}{Example for pagesLTS} +\markboth{Example for pagesLTS}{Example for pagesLTS} + +This example demonstrates the most common uses of package\\ +\textsf{pagesLTS}, v1.1b as of 2010/06/03 (HMM).\\ +The used options were \texttt{pagecontinue=true}, +\texttt{alphMult=ab}, \texttt{AlphMulti=AB}, \linebreak +\texttt{fnsymbolmult=true}, +\texttt{romanMult=true}, and \texttt{RomanMulti=true} +(the default ones).\\ +For more details please see the documentation!\\ + +\label{keys} To hide the \pageref{keys}{\qquad } use option +\texttt{final} instead of \texttt{draft} with the \textsf{showkeys} +package (or remove the package call from the preamble of +this document).\\ + +\textbf{Trademarks} appear throughout this example without any +trademark symbol; they are the property of their respective +trademark owner. There is no intention of infringement; the +usage is to the benefit of the trademark owner.\\ + +\textbf{Tip}: Use \textit{logical page numbers} for +the display of the pdf!\\ +(In Adobe Reader 9.3.1: \underline{E}dit $>$ +Prefere\underline{n}ces (Ctrl+k) $>$ Page Display $>$ +Page Content and Information $>$ Use logical page +\nolinebreak{\underline{n}umbers.)}\\ + +You want negative page numbers? Not only arabic, but even roman, +Roman, alph, Alph or fnsymbol ones? No problem, e.\,g. just give a\\ +\texttt{\textbackslash addtocounter\{page\}\{- \textit{some number}\}} +in the source code of this example file (or uncomment the prepared +line)! + +\bigskip + +Save per page about $200\unit{ml}$ water, $2\unit{g}$ CO$_{2}$ +and $2\unit{g}$ wood:\\ +Therefore please print only if this is really necessary. + +\newpage + +\tableofcontents + +\newpage + +\pagenumbering{roman} + % in case the page numbering is changed before, + % otherwise pagesLTS.current.local.roman on this page + % would be undefined + +\section{roman} + +\noindent (\texttt{roman} page numbering was started before, +becaue the page numbering scheme was needed to start at +the first page, of course.)\\ + +\noindent First page (\texttt{\textbackslash lastpageref\{pagesLTS.0\}}): +\lastpageref{pagesLTS.0}\\ + +\noindent The page (\texttt{\textbackslash thepage}): \thepage \\ + +\noindent Current page (\texttt{\textbackslash theCurrentPage}), +i.\,e. counted continuously from the first page): \theCurrentPage \\ +You can get this also in other formats: +\roman{CurrentPage}, \Roman{CurrentPage}, \arabic{CurrentPage}, +\fnsymbol{CurrentPage}, \alph{CurrentPage}, \Alph{CurrentPage}. + +\noindent CurrentPageLocal (\texttt{\textbackslash theCurrentPageLocal}), +i.\,e. counted continuously from the first page of the +current page numbering sheme): \theCurrentPageLocal \\ +You can get also this in other formats, too: +\roman{pagesLTS.current.local.roman}, \Roman{pagesLTS.current.local.roman}, +\arabic{pagesLTS.current.local.roman}, \fnsymbol{pagesLTS.current.local.roman}, +\alph{pagesLTS.current.local.roman}, \Alph{pagesLTS.current.local.roman}, +but probably it only makes sense if page numbering scheme and format are +the same, e.\,g.\\ +\texttt{\textbackslash Roman\{pagesLTS.current.local.Roman\}}\\ +or \texttt{\textbackslash Alph\{pagesLTS.current.local.Alph\}}.\ % +\texttt{\textbackslash arabic\{\ldots \}}\ could make sense +even if combined with another page numbering scheme. +And this is exactly what \texttt{\textbackslash theCurrentPageLocal} does:\\ +\nolinebreak{\texttt{\textbackslash def\textbackslash theCurrentPageLocal% +\{\textbackslash arabic\{pagesLTS.current.local.\textbackslash pagesLTS@pnc\}\}}.}\\ + +\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em } +(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\ + +\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em } +(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\ +\lastpages{Roman}{1}~pages in the first Roman sector +(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\ +\lastpages{Roman}{2}~pages in the second Roman sector +(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\ +\lastpages{Roman}{3}~pages in the third Roman sector +(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\ + +When the option \texttt{pagecontinue=false} is used with the +\textsf{pagesLTS} package, the +\texttt{\textbackslash lastpageref\{pagesLTS.Roman\}} will point +to the same page as before, but this will have a lower number.\\ +The \texttt{\textbackslash lastpageref\{pagesLTS.Roman.local\}} +will not change, because the number of pages does not change +(only the page numbers).\\ + +\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em } +(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.exampleArabic}\}} was used.)\\ + +\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\ +(\texttt{\textbackslash lastpageref\{pagesLTS.fnsymbol\}} -- never +\texttt{\textbackslash pageref\{pagesLTS.fnsymbol\}}!)\\ +(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\ + +\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em } +(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.examplealph}\}} was used.)\\ + +\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em } +(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\ + +\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\ + +\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\ +(\texttt{lastpage} and \texttt{VeryLastPage} are identical, unless +a package with output \linebreak +\texttt{\textbackslash AtEndDocument} after the \textsf{pagesLTS} package +was added.)\\ + +\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em } +(=~total number of pages)\\ + +\lipsum[1-3] + +\newpage + +\pagenumbering{Roman} + +\section{Roman\label{Roman}} +\subsection{Common Roman page numbering} + +\noindent First page (\texttt{\textbackslash lastpageref\{pagesLTS.0\}}): +\lastpageref{pagesLTS.0}\\ + +\noindent The page (\texttt{\textbackslash thepage}): \thepage \\ + +\noindent Current page (\texttt{\textbackslash theCurrentPage}), +i.\,e. counted continuously from the first page): \theCurrentPage \\ + +\noindent CurrentPageLocal (\texttt{\textbackslash theCurrentPageLocal}), +i.\,e. counted continuously from the first page of the +current page numbering sheme): \theCurrentPageLocal \\ + +\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em } +(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\ + +\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em } +(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\ +\lastpages{Roman}{1}~pages in the first Roman sector +(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\ +\lastpages{Roman}{2}~pages in the second Roman sector +(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\ +\lastpages{Roman}{3}~pages in the third Roman sector +(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\ + +\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em } +(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.exampleArabic}\}} was used.)\\ + +\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\ +(\texttt{\textbackslash lastpageref\{pagesLTS.fnsymbol\}} -- never +\texttt{\textbackslash pageref\{pagesLTS.fnsymbol\}}!)\\ +(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\ + +\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em } +(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.examplealph}\}} was used.)\\ + +\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em } +(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\ + +\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\ + +\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\ +(\texttt{LastPage} and \texttt{VeryLastPage} are identical, unless +a package with output \linebreak +\texttt{\textbackslash AtEndDocument} after the \textsf{pagesLTS} package +was added.)\\ + +\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em } +(=~total number of pages)\\ + +\lipsum[1-4] + +\newpage + +\subsection{Last page of first Roman sector} +\texttt{\textbackslash lastpageref\{pagesLTS.Roman\}} does \textbf{not} +refer to this page (but there: \lastpageref{pagesLTS.Roman}), +because the option \texttt{pagecontinue=true} +was chosen. When a reference to this page is wanted,\\ +\texttt{\textbackslash lastpageref\{pagesLTS.Roman.1\}} +can be used: \lastpageref{pagesLTS.Roman.1}.\\ + +\bigskip +There are \lastpages{Roman}{1}~pages +(\texttt{\textbackslash lastpages\{Roman\}\{1\}}) +in this first Roman sector.\\ +The Roman page numbering scheme is continued later in +section~\ref{Roman2})! + +\newpage + +\pagenumbering{arabic} + +\section{arabic} + +\subsection{Standard page numbering} + +\noindent First page (\texttt{\textbackslash lastpageref\{pagesLTS.0\}}): +\lastpageref{pagesLTS.0}\\ + +\noindent The page (\texttt{\textbackslash thepage}): \thepage \\ + +\noindent Current page (\texttt{\textbackslash theCurrentPage}), +i.\,e. counted continuously from the first page): \theCurrentPage \\ + +\noindent CurrentPageLocal (\texttt{\textbackslash theCurrentPageLocal}), +i.\,e. counted continuously from the first page of the +current page numbering sheme): \theCurrentPageLocal \\ + +\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em } +(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\ + +\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em } +(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\ +\lastpages{Roman}{1}~pages in the first Roman sector +(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\ +\lastpages{Roman}{2}~pages in the second Roman sector +(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\ +\lastpages{Roman}{3}~pages in the third Roman sector +(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\ + +\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em } +(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.exampleArabic}\}} was used.)\\ + +\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\ +(\texttt{\textbackslash lastpageref\{pagesLTS.fnsymbol\}} -- never +\texttt{\textbackslash pageref\{pagesLTS.fnsymbol\}}!)\\ +(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\ + +\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em } +(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.examplealph}\}} was used.)\\ + +\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em } +(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\ + +\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\ + +\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\ +(\texttt{LastPage} and \texttt{VeryLastPage} are identical, unless +a package with output \linebreak +\texttt{\textbackslash AtEndDocument} after the \textsf{pagesLTS} package +was added.)\\ + +\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em } +(=~total number of pages)\\ + +\lipsum[1-4] +\newpage + +\subsection[Empty page style]{Also an empty page style is no problem\ % +for the current or total page count} + +\bigskip + +\thispagestyle{empty} + +\noindent First page (\texttt{\textbackslash lastpageref\{pagesLTS.0\}}): +\lastpageref{pagesLTS.0}\\ + +\noindent The page (\texttt{\textbackslash thepage}): \thepage \\ + +\noindent Current page (\texttt{\textbackslash theCurrentPage}), +i.\,e. counted continuously from the first page): \theCurrentPage \\ + +\noindent CurrentPageLocal (\texttt{\textbackslash theCurrentPageLocal}), +i.\,e. counted continuously from the first page of the +current page numbering sheme): \theCurrentPageLocal \\ + +\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em } +(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\ + +\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em } +(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\ +\lastpages{Roman}{1}~pages in the first Roman sector +(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\ +\lastpages{Roman}{2}~pages in the second Roman sector +(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\ +\lastpages{Roman}{3}~pages in the third Roman sector +(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\ + +\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em } +(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.exampleArabic}\}} was used.)\\ + +\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\ +(\texttt{\textbackslash lastpageref\{pagesLTS.fnsymbol\}} -- never +\texttt{\textbackslash pageref\{pagesLTS.fnsymbol\}}!)\\ +(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\ + +\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em } +(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.examplealph}\}} was used.)\\ + +\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em } +(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\ + +\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\ + +\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\ +(\texttt{LastPage} and \texttt{VeryLastPage} are identical, unless +a package with output \linebreak +\texttt{\textbackslash AtEndDocument} after the \textsf{pagesLTS} package +was added.)\\ + +\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em } +(=~total number of pages)\\ + +\lipsum[1-4] + +\newpage + +\subsection[addtocounter, setcounter]{Neither\ % +\texttt{\textbackslash addtocounter\{page\}} or\ % +\texttt{\textbackslash setcounter\{page\}} is a problem for the\ % +current or total page numbers} + +(Here is an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.exampleArabic}\}} +in the source code.)\\ +\addtocounter{page}{\value{pagesLTS.exampleArabic}} + +\noindent The page (from \texttt{\textbackslash thepage} command): \thepage \\ + +\noindent Current page (from \texttt{\textbackslash theCurrentPage}\ % +command), i.\,e. counted continuously from the first page): \theCurrentPage \\ + +\noindent CurrentPageLocal (from \texttt{\textbackslash theCurrentPageLocal}\ % +command), i.\,e. counted continuously from the first page of the +current page numbering sheme): \theCurrentPageLocal\\ + +\noindent Last page's number (LastPages): \lastpageref{LastPages}{\hskip3em } +(= total number of pages)\\ + +\lipsum[1-7] + +\newpage + +\pagenumbering{fnsymbol} + +\section{fnsymbol} + +Adobe Acrobat Reader 9.3.1 does not show the correct page names +for all pages with \texttt{fnsymbol} page numbering scheme: + +\begin{tabular}{c|c|c|c} +page number & page name & shown by the Reader & \textsf{alphalph} \\ \hline +$-1$ & \texttt{LaTeX Error} & & \ensuremath {- *} \\ + $0$ & (ignored by \LaTeX) & & 0 \\ + $1$ & \ensuremath {*} & * & \ensuremath {*} \\ + $2$ & \ensuremath {\dagger } & & \ensuremath {\dagger } \\ + $3$ & \ensuremath {\ddagger } & & \ensuremath {\ddagger } \\ + $4$ & \ensuremath {\mathsection } & & \ensuremath {\mathsection } \\ + $5$ & \ensuremath {\mathparagraph } & & \ensuremath {\mathparagraph } \\ + $6$ & \ensuremath {\delimiter "026B30D } & "026B30D & \ensuremath {**} \\ + $7$ & \ensuremath {**} & ** & \ensuremath {\dagger \dagger } \\ + $8$ & \ensuremath {\dagger \dagger } & & \ensuremath {\ddagger \ddagger } \\ + $9$ & \ensuremath {\ddagger \ddagger } & & \ensuremath {\mathsection \mathsection } \\ +$10$ & \texttt{LaTeX Error} & & \ensuremath {\mathparagraph \mathparagraph } \\ +$11$ & \texttt{LaTeX Error} & & \ensuremath {***} \\ +$12$ & \texttt{LaTeX Error} & & \ensuremath {\dagger \dagger \dagger } \\ +\end{tabular} + +\noindent and so on, while at least the (\ldots\ of \ldots ) part +of the page number is displayed correctly.\\ + +\bigskip + +Without option \texttt{fnsymbolmult=true} of the \textsf{pagesLTS} package +(and the help of Heiko Oberdiek's \textsf{alphalph} package), +after page~9 +(\textquotedblleft \ensuremath {\ddagger \ddagger }\textquotedblright ) +(and also for negative page numbers) there would just appear a +\begin{quote} +\begin{verbatim} +LaTeX Error: Counter too large +See the LaTeX manual or LaTeX Companion for explanation. +You've lost some text. Try typing <return> to proceed. +If that doesn't work, type X <return> to quit. +\end{verbatim} +\end{quote} +Now the page numbers after 5 (\ensuremath {\mathparagraph }) are +continued with the doubled \textquotedblleft number\textquotedblright\ of +the first, second, third,\ldots\ page (\ensuremath {**}, +\ensuremath {\dagger \dagger }, \ensuremath {\ddagger \ddagger }, +\ensuremath {\mathsection \mathsection }, +\ensuremath {\mathparagraph \mathparagraph }), +and after the tenth page the \textquotedblleft number\textquotedblright\ is +tripled (\ensuremath {***}, \ensuremath {\dagger \dagger \dagger },\ldots). +Page zero is named 0 and negative pages just named like the positive ones +with addition of a minus sign~($-$). + +\bigskip + +\noindent First page (\texttt{\textbackslash lastpageref\{pagesLTS.0\}}): +\lastpageref{pagesLTS.0}\\ + +\noindent The page (\texttt{\textbackslash thepage}): \thepage \\ + +\noindent Current page (\texttt{\textbackslash theCurrentPage}), +i.\,e. counted continuously from the first page): \theCurrentPage \\ + +\noindent CurrentPageLocal (\texttt{\textbackslash theCurrentPageLocal}), +i.\,e. counted continuously from the first page of the +current page numbering sheme): \theCurrentPageLocal \\ + +\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em } +(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\ + +\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em } +(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\ +\lastpages{Roman}{1}~pages in the first Roman sector +(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\ +\lastpages{Roman}{2}~pages in the second Roman sector +(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\ +\lastpages{Roman}{3}~pages in the third Roman sector +(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\ + +\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em } +(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.exampleArabic}\}} was used.)\\ + +\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\ +(\texttt{\textbackslash lastpageref\{pagesLTS.fnsymbol\}} -- never +\texttt{\textbackslash pageref\{pagesLTS.fnsymbol\}}!)\\ +(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\ + +\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em } +(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.examplealph}\}} was used.)\\ + +\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em } +(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\ + +\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\ + +\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\ +(\texttt{LastPage} and \texttt{VeryLastPage} are identical, unless +a package with output \linebreak +\texttt{\textbackslash AtEndDocument} after the \textsf{pagesLTS} package +was added.)\\ + +\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em } +(=~total number of pages)\\ + +\lipsum[1-60] + +\newpage + +\pagenumbering{Roman} + +\section{Roman - again!\label{Roman2}} + +The page number would start with +\textquotedblleft I\textquotedblright\ again -- but +for the \textsf{pagesLTS} package (with option \texttt{pagecontinue=true}, +or with option just \texttt{pagecontinue}, or even just +\nolinebreak{with\textbf{out}} option \texttt{pagecontinue=false}). +This package remembered the +(\arabic{pagesLTS.double.Roman}-1)\footnote{OK, here\ % +you have to compute this value for yourself, but\ % +subtracting one should be managable for \TeX nicians.} pages already +done in Roman output, and therefore continues with page +\textquotedblleft \thepage \textquotedblright .\\ +If you want to start with \textquotedblleft I\textquotedblright\ all +over again, you will have two pages with the same name, +but nevertheless you can do this by using option \texttt{pagecontinue=false} +or a \texttt{\textbackslash setcounter\{page\}\{1\}}\ here +(not demonstrated in this example file).\\ + +\noindent First page (\texttt{\textbackslash lastpageref\{pagesLTS.0\}}): + \lastpageref{pagesLTS.0}\\ + +\noindent The page (\texttt{\textbackslash thepage}): \thepage \\ + +\noindent Current page (\texttt{\textbackslash theCurrentPage}), +i.\,e. counted continuously from the first page): \theCurrentPage \\ + +\noindent CurrentPageLocal (\texttt{\textbackslash theCurrentPageLocal}), +i.\,e. counted continuously from the first page of the +current page numbering sheme): \theCurrentPageLocal \\ + +\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em } +(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\ + +\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em } +(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\ +\lastpages{Roman}{1}~pages in the first Roman sector +(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\ +\lastpages{Roman}{2}~pages in the second Roman sector +(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\ +\lastpages{Roman}{3}~pages in the third Roman sector +(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\ + +\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em } +(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.exampleArabic}\}} was used.)\\ + +\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\ +(\texttt{\textbackslash lastpageref\{pagesLTS.fnsymbol\}} -- never +\texttt{\textbackslash pageref\{pagesLTS.fnsymbol\}}!)\\ +(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\ + +\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em } +(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.examplealph}\}} was used.)\\ + +\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em } +(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\ + +\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\ + +\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\ +(\texttt{LastPage} and \texttt{VeryLastPage} are identical, unless +a package with output \linebreak +\texttt{\textbackslash AtEndDocument} after the \textsf{pagesLTS} package +was added.)\\ + +\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em } +(=~total number of pages)\\ + +\lipsum[1-6] + +\newpage + +\texttt{\textbackslash lastpageref\{pagesLTS.Roman\}} does \textbf{not} +refer to this page (but there: \lastpageref{pagesLTS.Roman}), +because the option \texttt{pagecontinue=true} +was chosen. When a reference to this page is wanted,\\ +\texttt{\textbackslash lastpageref\{pagesLTS.Roman.2\}} +can be used: \lastpageref{pagesLTS.Roman.2}.\\ + +\bigskip +There are \lastpages{Roman}{2}~pages +(\texttt{\textbackslash lastpages\{Roman\}\{2\}}) +in this second Roman sector.\\ +The Roman page numbering scheme is continued later in +section~\ref{Roman3})! + +\newpage + +\pagenumbering{alph} + +\section{alph\label{alph}} + +\noindent First page (\texttt{\textbackslash lastpageref\{pagesLTS.0\}}): + \lastpageref{pagesLTS.0}\\ + +\noindent The page (\texttt{\textbackslash thepage}): \thepage \\ + +\noindent Current page (\texttt{\textbackslash theCurrentPage}), +i.\,e. counted continuously from the first page): \theCurrentPage \\ + +\noindent CurrentPageLocal (\texttt{\textbackslash theCurrentPageLocal}), +i.\,e. counted continuously from the first page of the +current page numbering sheme): \theCurrentPageLocal \\ + +\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em } +(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\ + +\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em } +(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\ +\lastpages{Roman}{1}~pages in the first Roman sector +(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\ +\lastpages{Roman}{2}~pages in the second Roman sector +(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\ +\lastpages{Roman}{3}~pages in the third Roman sector +(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\ + +\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em } +(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.exampleArabic}\}} was used.)\\ + +\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\ +(\texttt{\textbackslash lastpageref\{pagesLTS.fnsymbol\}} -- never +\texttt{\textbackslash pageref\{pagesLTS.fnsymbol\}}!)\\ +(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\ + +\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em } +(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.examplealph}\}} was used.)\\ + +\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em } +(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\ + +\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\ + +\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\ +(\texttt{LastPage} and \texttt{VeryLastPage} are identical, unless +a package with output \linebreak +\texttt{\textbackslash AtEndDocument} after the \textsf{pagesLTS} package +was added.)\\ + +\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em } +(=~total number of pages)\\ + +\lipsum[1-4] + +\newpage + +Without option \texttt{alphMult=ab} of the \textsf{pagesLTS} (and the help of +Heiko Oberdiek's \textsf{alphalph} package), after page +\textquotedblleft z\textquotedblright\ there would just appear a +\begin{quote} +\begin{verbatim} +LaTeX Error: Counter too large +See the LaTeX manual or LaTeX Companion for explanation. +You've lost some text. Try typing <return> to proceed. +If that doesn't work, type X <return> to quit. +\end{verbatim} +\end{quote} +Now the page numbers are continued aa, ab, ac,\ldots\ (aa, bb, cc,\ldots\ is +also possible, see the \textsf{pagesLTS} documentation).\\ +To demonstrate this, we add a\\ +\texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.examplealph}\}}\\ +in the source code here. + +\addtocounter{page}{\arabic{pagesLTS.examplealph}} + +\bigskip + +\lipsum[1-18] + +\newpage + +\pagenumbering{Roman} + +\section{Roman - third time!\label{Roman3}} + +The page number would start with +\textquotedblleft I\textquotedblright\ again -- but +for the \textsf{pagesLTS} package (with option \texttt{pagecontinue=true}, +or with option just \texttt{pagecontinue}, or even just +\nolinebreak{with\textbf{out}} option \texttt{pagecontinue=false}). +This package remembered the +(\arabic{pagesLTS.double.Roman}-1)\footnote{OK, here\ % +you have to compute this value for yourself, but\ % +subtracting one should be managable for \TeX nicians.} pages already +done in Roman output, and therefore continues with page +\textquotedblleft \thepage \textquotedblright .\\ +If you want to start with \textquotedblleft I\textquotedblright\ all +over again, you will have (at least) two pages with the same name, +but nevertheless you can do this by using option +\texttt{pagecontinue=false} instead of \texttt{pagecontinue=true} +(not demonstrated here).\\ + +\noindent First page (\texttt{\textbackslash lastpageref\{pagesLTS.0\}}): + \lastpageref{pagesLTS.0}\\ + +\noindent The page (\texttt{\textbackslash thepage}): \thepage \\ + +\noindent Current page (\texttt{\textbackslash theCurrentPage}), +i.\,e. counted continuously from the first page): \theCurrentPage \\ + +\noindent CurrentPageLocal (\texttt{\textbackslash theCurrentPageLocal}), +i.\,e. counted continuously from the first page of the +current page numbering sheme): \theCurrentPageLocal \\ + +\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em } +(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\ + +\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em } +(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\ +\lastpages{Roman}{1}~pages in the first Roman sector +(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\ +\lastpages{Roman}{2}~pages in the second Roman sector +(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\ +\lastpages{Roman}{3}~pages in the third Roman sector +(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\ + +\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em } +(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.exampleArabic}\}} was used.)\\ + +\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\ +(\texttt{\textbackslash lastpageref\{pagesLTS.fnsymbol\}} -- never +\texttt{\textbackslash pageref\{pagesLTS.fnsymbol\}}!)\\ +(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\ + +\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em } +(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.examplealph}\}} was used.)\\ + +\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em } +(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\ + +\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\ + +\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\ +(\texttt{LastPage} and \texttt{VeryLastPage} are identical, unless +a package with output \linebreak +\texttt{\textbackslash AtEndDocument} after the \textsf{pagesLTS} package +was added.)\\ + +\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em } +(=~total number of pages)\\ + +\lipsum[1-3] + +\newpage + +\lastpageref{pagesLTS.Roman} +(\texttt{\textbackslash lastpageref\{pagesLTS.Roman\}}) +\textbf{does} refers to this page, because the option +\texttt{pagecontinue=true} was chosen. Also\\ +\texttt{\textbackslash lastpageref\{pagesLTS.Roman.3\}} +can be used: \lastpageref{pagesLTS.Roman.3}.\\ + +\bigskip + +There are \lastpages{Roman}{3}~pages +(\texttt{\textbackslash lastpages\{Roman\}\{3\}}) +in this third Roman sector.\\ + +\newpage + +\pagenumbering{Alph} + +\section{Alph} + +\noindent First page (\texttt{\textbackslash lastpageref\{pagesLTS.0\}}): + \lastpageref{pagesLTS.0}\\ + +\noindent The page (\texttt{\textbackslash thepage}): \thepage \\ + +\noindent Current page (\texttt{\textbackslash theCurrentPage}), +i.\,e. counted continuously from the first page): \theCurrentPage \\ + +\noindent CurrentPageLocal (\texttt{\textbackslash theCurrentPageLocal}), +i.\,e. counted continuously from the first page of the +current page numbering sheme): \theCurrentPageLocal \\ + +\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em } +(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\ + +\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em } +(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\ +\lastpages{Roman}{1}~pages in the first Roman sector +(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\ +\lastpages{Roman}{2}~pages in the second Roman sector +(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\ +\lastpages{Roman}{3}~pages in the third Roman sector +(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\ + +\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em } +(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.exampleArabic}\}} was used.)\\ + +\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\ +(\texttt{\textbackslash lastpageref\{pagesLTS.fnsymbol\}} -- never +\texttt{\textbackslash pageref\{pagesLTS.fnsymbol\}}!)\\ +(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\ + +\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em } +(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.examplealph}\}} was used.)\\ + +\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em } +(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\ + +\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\ + +\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\ +(\texttt{LastPage} and \texttt{VeryLastPage} are identical, unless +a package with output \linebreak +\texttt{\textbackslash AtEndDocument} after the \textsf{pagesLTS} package +was added.)\\ + +\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em } +(=~total number of pages)\\ + +\lipsum[1-3] + +Without option \texttt{alphMulti=AB} of the \textsf{pagesLTS} (and the help of +Heiko Oberdiek's \textsf{alphalph} package), after page +\textquotedblleft Z\textquotedblright\ there would just appear a +\begin{quote} +\begin{verbatim} +LaTeX Error: Counter too large +See the LaTeX manual or LaTeX Companion for explanation. +You've lost some text. Try typing <return> to proceed. +If that doesn't work, type X <return> to quit. +\end{verbatim} +\end{quote} +Now the page numbers are continued AA, AB, AC,\ldots\ (AA, BB, CC,\ldots\ is +also possible, see the \textsf{pagesLTS} documentation).\\ +This is not demonstrated here, but see section~\ref{alph}. + +\newpage + +\section{The End} + +\noindent First page (\texttt{\textbackslash lastpageref\{pagesLTS.0\}}): + \lastpageref{pagesLTS.0}\\ + +\noindent The page (\texttt{\textbackslash thepage}): \thepage \\ + +\noindent Current page (\texttt{\textbackslash theCurrentPage}), +i.\,e. counted continuously from the first page): \theCurrentPage \\ + +\noindent CurrentPageLocal (\texttt{\textbackslash theCurrentPageLocal}), +i.\,e. counted continuously from the first page of the +current page numbering sheme): \theCurrentPageLocal \\ + +\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em } +(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\ + +\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em } +(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\ +\lastpages{Roman}{1}~pages in the first Roman sector +(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\ +\lastpages{Roman}{2}~pages in the second Roman sector +(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\ +\lastpages{Roman}{3}~pages in the third Roman sector +(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\ + +\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em } +(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.exampleArabic}\}} was used.)\\ + +\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\ +(\texttt{\textbackslash lastpageref\{pagesLTS.fnsymbol\}} -- never +\texttt{\textbackslash pageref\{pagesLTS.fnsymbol\}}!)\\ +(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\ + +\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em } +(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.examplealph}\}} was used.)\\ + +\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em } +(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\ + +\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\ + +\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\ +(\texttt{LastPage} and \texttt{VeryLastPage} are identical, unless +a package with output \linebreak +\texttt{\textbackslash AtEndDocument} after the \textsf{pagesLTS} package +was added.)\\ + +\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em } +(=~total number of pages)\\ + +\medskip + +\noindent Page \thepage\ (\theCurrentPage; local: \theCurrentPageLocal) of % +\lastpageref{pagesLTS.roman} (\lastpageref{pagesLTS.roman.local}) + % +\lastpageref{pagesLTS.Roman} (\lastpageref{pagesLTS.Roman.local}) + % +\lastpageref{pagesLTS.arabic} (\lastpageref{pagesLTS.arabic.local}) + % +\lastpageref{pagesLTS.fnsymbol} (\lastpageref{pagesLTS.fnsymbol.local}) + % +\lastpageref{pagesLTS.alph} (\lastpageref{pagesLTS.alph.local}) + % +\lastpageref{pagesLTS.Alph} (\lastpageref{pagesLTS.Alph.local}) = % +\lastpageref{LastPages} pages. + +\end{document} +\endinput +%% +%% End of file `pagesLTS-example.tex'. diff --git a/Master/texmf-dist/doc/latex/pageslts/pagesLTS.pdf b/Master/texmf-dist/doc/latex/pageslts/pagesLTS.pdf Binary files differnew file mode 100644 index 00000000000..1966ac4b7f2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/pageslts/pagesLTS.pdf diff --git a/Master/texmf-dist/source/latex/pageslts/pagesLTS.drv b/Master/texmf-dist/source/latex/pageslts/pagesLTS.drv new file mode 100644 index 00000000000..9f5e33db690 --- /dev/null +++ b/Master/texmf-dist/source/latex/pageslts/pagesLTS.drv @@ -0,0 +1,109 @@ +%% +%% This is file `pagesLTS.drv', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% pagesLTS.dtx (with options: `driver') +%% +%% This is a generated file. +%% +%% IMPORTANT NOTICE: +%% On the first page backslash pagenumbering should be called +%% (with the appropriate argument out of e.g. +%% * roman - Lowercase Roman numerals: i, ii, iii, iv,... +%% * Roman - Uppercase Roman numerals: I, II, III, IV,... +%% * arabic - Arabic numerals: 1, 2, 3, 4,... +%% * alph - Lowercase letters: a, b, c, d,... +%% * Alph - Uppercase letters: A, B, C, D,... +%% * fnsymbol - Footnote symbols: *, † (ddagger), ‡ (dddagger), +%% § (mathsection),... +%% ). The command backslash pagenumbering is renewed, but no change +%% should be visible to the output text, because only labels are added. +%% backslash OrigPagenumbering can be used to get the original meaning +%% of backslash pagenumbering, but in that case this package does not +%% see the change in the page numbering scheme and will make mistakes. +%% The package takes options. +%% +%% The usual disclaimers apply: +%% If it doesn't work right that's your problem. +%% (Nevertheless, send an e-mail to the maintainer +%% when you find an error in this package.) +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either +%% version 1.3c of this license or (at your option) any later +%% version. This version of this license is in +%% http://www.latex-project.org/lppl/lppl-1-3c.txt +%% and the latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of +%% LaTeX version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is H.-Martin Muench +%% (Martin dot Muench at Uni-Bonn dot de). +%% +%% This package first started as a revision of the lastpage +%% package of Jeffrey P. Goldberg (jeffrey+news at goldmark dot org), +%% but it became obviouse that a replacement was needed. +%% +%% This work consists of the main source file pagesLTS.dtx +%% and the derived files +%% pagesLTS.sty, pagesLTS.pdf, pagesLTS.ins, pagesLTS.drv, +%% pagesLTS-example.tex. +%% +\NeedsTeXFormat{LaTeX2e}[1994/06/01] +\ProvidesFile{pagesLTS.drv}[2010/06/03 v1.1b% + Refers to special pages' numbers/names (HMM)]% +\documentclass[landscape]{ltxdoc}[2007/11/11]% v2.0u +\usepackage{geometry}[2010/03/13]% v5.3 +\usepackage{holtxdoc}[2010/04/18]% v0.18 +%% pagesLTS may work with earlier versions of LaTeX2e and those +%% class and package, but this was not tested. +%% Please consider updating your LaTeX, class, and package +%% to the most recent version (if they are not already the most +%% recent version). +%% Warning: holtxdoc, 2010/04/18 v0.18, requires the packages +%% hypdoc, 2010/03/26 +%% hyperref, 2010/03/30 +%% pdftexcmds, 2010/04/01 +%% ltxcmds, 2010/03/09 +%% hologo, 2010/04/08 +%% array +%% and does neither work with nor check for earlier versions! +\hypersetup{% + pdfsubject={Refers to special pages' numbers/names (HMM)},% + pdfkeywords={LaTeX, pagesLTS, lastpage, page number, page name, Hans-Martin Muench},% + pdfencoding=auto,% + pdflang={en},% + breaklinks=true,% + linktoc=all,% + pdfstartview=FitH,% + pdfpagelayout=OneColumn,% + bookmarksnumbered=true,% + bookmarksopen=true,% + bookmarksopenlevel=2,% + pdfmenubar=true,% + pdftoolbar=true,% + pdfwindowui=true,% + pdfnewwindow=true% +} +\setlength\hfuzz{1pt} % Ignore slight overfulls. +\CodelineIndex +\EnableCrossrefs +\hyphenation{created every-thing ignored} +\makeatletter +%% Code from tcilatex.tex, Macros for Scientific Word and Scientific WorkPlace 5.5 <06 Oct 2005> %% +%% Copyright (C) 2005 Mackichan Software, Inc. %% +%% That macro file is NOT proprietary and may be freely copied and distributed. %% + \def\unit#1{\mathord{\thinspace\rm #1}}% +%% End of code from tcilatex.tex %% +\makeatother +\begin{document} + \DocInput{pagesLTS.dtx}% +\end{document} +\endinput +%% +%% End of file `pagesLTS.drv'. diff --git a/Master/texmf-dist/source/latex/pageslts/pagesLTS.dtx b/Master/texmf-dist/source/latex/pageslts/pagesLTS.dtx new file mode 100644 index 00000000000..6d6147049df --- /dev/null +++ b/Master/texmf-dist/source/latex/pageslts/pagesLTS.dtx @@ -0,0 +1,4747 @@ +% \iffalse meta-comment +% +% pagesLTS package +% file version: v1.1b +% file date: 2010/06/03 +% documentation date: 2010/06/03 +% +% Copyright (C) 2010 H.-Martin M\"{u}nch (Martin dot Muench at Uni-Bonn dot de) +% Portions of code copyrighted by other people as marked. +% +% This package first started as a revision of the \textsf{lastpage} +% package of Jeffrey P. Goldberg (jeffrey+news at goldmark dot org), +% but it became obviouse that a replacement was needed. +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either +% version 1.3c of this license or (at your option) any later +% version. This version of this license is in +% http://www.latex-project.org/lppl/lppl-1-3c.txt +% and the latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3c or later is part of all distributions of +% LaTeX version 2005/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is H.-Martin Muench. +% +% This work consists of the main source file pagesLTS.dtx +% and the derived files +% pagesLTS.sty, pagesLTS.ins, pagesLTS.drv, +% pagesLTS-example.tex, pagesLTS.pdf. +% +% Unpacking: +% (a) If pagesLTS.ins is present: +% tex pagesLTS.ins +% (b) Without pagesLTS.ins: +% tex pagesLTS.dtx +% (c) If you insist on using LaTeX +% latex \let\install=y\input{pagesLTS.dtx} +% (quote the arguments according to the demands of your shell) +% +% Documentation: +% (a) If pagesLTS.drv is present: +% (pdf)latex pagesLTS.drv +% makeindex -s gind.ist pagesLTS.idx +% (pdf)latex pagesLTS.drv +% makeindex -s gind.ist pagesLTS.idx +% (pdf)latex pagesLTS.drv +% (b) Without pagesLTS.drv: +% (pdf)latex pagesLTS.dtx +% makeindex -s gind.ist pagesLTS.idx +% (pdf)latex pagesLTS.dtx +% makeindex -s gind.ist pagesLTS.idx +% (pdf)latex pagesLTS.dtx +% +% The class ltxdoc loads the configuration file ltxdoc.cfg +% if available. Here you can specify further options, e.g. +% use DIN A4 as paper format: +% \PassOptionsToClass{a4paper}{article} +% +% Programm calls to get the documentation (for example): +% pdflatex pagesLTS.dtx +% makeindex -s gind.ist pagesLTS.idx +% % makeindex -s gglo.ist -o pagesLTS.gls pagesLTS.glo +% pdflatex pagesLTS.dtx +% makeindex -s gind.ist pagesLTS.idx +% % makeindex -s gglo.ist -o pagesLTS.gls pagesLTS.glo +% pdflatex pagesLTS.dtx +% +% Installation: +% TDS:tex/latex/muench/pagesLTS/pagesLTS.sty +% TDS:doc/latex/muench/pagesLTS/pagesLTS.pdf +% TDS:doc/latex/muench/pagesLTS/pagesLTS-example.tex +% TDS:source/latex/muench/pagesLTS/pagesLTS.dtx +% +%<*ignore> +\begingroup + \def\x{LaTeX2e}% +\expandafter\endgroup +\ifcase 0\ifx\install y1\fi\expandafter + \ifx\csname processbatchFile\endcsname\relax\else1\fi + \ifx\fmtname\x\else 1\fi\relax +\else\csname fi\endcsname +%</ignore> +%<*install> +\input docstrip.tex + +\obeyspaces +\Msg{*****************************************************} +\Msg{* Installation *} +\Msg{* Package: pagesLTS v1.1b 2010/06/03 LaTeX2e package *} +\Msg{* Refers to special pages' numbers/names (HMM) *} +\Msg{*****************************************************} + +\keepsilent +\askforoverwritefalse + +\let\MetaPrefix\relax +\preamble + +This is a generated file. + +IMPORTANT NOTICE: +On the first page backslash pagenumbering should be called +(with the appropriate argument out of e.g. + * roman - Lowercase Roman numerals: i, ii, iii, iv,... + * Roman - Uppercase Roman numerals: I, II, III, IV,... + * arabic - Arabic numerals: 1, 2, 3, 4,... + * alph - Lowercase letters: a, b, c, d,... + * Alph - Uppercase letters: A, B, C, D,... + * fnsymbol - Footnote symbols: *, † (ddagger), ‡ (dddagger), + § (mathsection),... +). The command backslash pagenumbering is renewed, but no change +should be visible to the output text, because only labels are added. +backslash OrigPagenumbering can be used to get the original meaning +of backslash pagenumbering, but in that case this package does not +see the change in the page numbering scheme and will make mistakes. +The package takes options. + +The usual disclaimers apply: +If it doesn't work right that's your problem. +(Nevertheless, send an e-mail to the maintainer + when you find an error in this package.) + +This work may be distributed and/or modified under the +conditions of the LaTeX Project Public License, either +version 1.3c of this license or (at your option) any later +version. This version of this license is in + http://www.latex-project.org/lppl/lppl-1-3c.txt +and the latest version of this license is in + http://www.latex-project.org/lppl.txt +and version 1.3c or later is part of all distributions of +LaTeX version 2005/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is H.-Martin Muench +(Martin dot Muench at Uni-Bonn dot de). + +This package first started as a revision of the lastpage +package of Jeffrey P. Goldberg (jeffrey+news at goldmark dot org), +but it became obviouse that a replacement was needed. + +This work consists of the main source file pagesLTS.dtx +and the derived files + pagesLTS.sty, pagesLTS.pdf, pagesLTS.ins, pagesLTS.drv, + pagesLTS-example.tex. + +\endpreamble +\let\MetaPrefix\DoubleperCent + +\generate{% + \file{pagesLTS.ins}{\from{pagesLTS.dtx}{install}}% + \file{pagesLTS.drv}{\from{pagesLTS.dtx}{driver}}% + \file{ltxdoc.cfg}{\from{pagesLTS.dtx}{ltxdoc}}% + %%\file{lastpage209.sty}{\from{pagesLTS.dtx}{lastpage209}}% + \usedir{tex/latex/muench/pagesLTS}% + \file{pagesLTS.sty}{\from{pagesLTS.dtx}{package}}% + \usedir{doc/latex/muench/pagesLTS}% + \file{pagesLTS-example.tex}{\from{pagesLTS.dtx}{example}}% +} + +\obeyspaces +\Msg{**************************************************************} +\Msg{* *} +\Msg{* To finish the installation you have to move the following *} +\Msg{* file into a directory searched by TeX: *} +\Msg{* *} +\Msg{* pagesLTS.sty *} +\Msg{* *} +\Msg{* To produce the documentation run the file `pagesLTS.drv' *} +\Msg{* through (pdf)LaTeX, e. g. *} +\Msg{* pdflatex pagesLTS.dtx *} +\Msg{* makeindex -s gind.ist pagesLTS.idx *} +\Msg{* pdflatex pagesLTS.dtx *} +\Msg{* makeindex -s gind.ist pagesLTS.idx *} +\Msg{* pdflatex pagesLTS.dtx *} +\Msg{* *} +\Msg{* At least three runs are necessary e. g. to get the *} +\Msg{* references right! *} +\Msg{* *} +\Msg{* Happy TeXing! *} +\Msg{* *} +\Msg{**************************************************************} + +\endbatchfile + +%</install> +%<*ignore> +\fi +%</ignore> +% +% \section{The documentation driver file} +% +% The next bit of code contains the documentation driver file for +% \TeX{}, i.\,e., the file that will produce the documentation you +% are currently reading. It will be extracted from this file by the +% \texttt{docstrip} programme. That is, run \LaTeX\ on \texttt{docstrip} +% and specify the \texttt{driver} option when \texttt{docstrip} +% asks for options. +% +% \begin{macrocode} +%<*driver> +\NeedsTeXFormat{LaTeX2e}[1994/06/01] +\ProvidesFile{pagesLTS.drv}[2010/06/03 v1.1b% + Refers to special pages' numbers/names (HMM)]% +\documentclass[landscape]{ltxdoc}[2007/11/11]% v2.0u +\usepackage{geometry}[2010/03/13]% v5.3 +\usepackage{holtxdoc}[2010/04/18]% v0.18 +%% pagesLTS may work with earlier versions of LaTeX2e and those +%% class and package, but this was not tested. +%% Please consider updating your LaTeX, class, and package +%% to the most recent version (if they are not already the most +%% recent version). +%% Warning: holtxdoc, 2010/04/18 v0.18, requires the packages +%% hypdoc, 2010/03/26 +%% hyperref, 2010/03/30 +%% pdftexcmds, 2010/04/01 +%% ltxcmds, 2010/03/09 +%% hologo, 2010/04/08 +%% array +%% and does neither work with nor check for earlier versions! +\hypersetup{% + pdfsubject={Refers to special pages' numbers/names (HMM)},% + pdfkeywords={LaTeX, pagesLTS, lastpage, page number, page name, Hans-Martin Muench},% + pdfencoding=auto,% + pdflang={en},% + breaklinks=true,% + linktoc=all,% + pdfstartview=FitH,% + pdfpagelayout=OneColumn,% + bookmarksnumbered=true,% + bookmarksopen=true,% + bookmarksopenlevel=2,% + pdfmenubar=true,% + pdftoolbar=true,% + pdfwindowui=true,% + pdfnewwindow=true% +} +\setlength\hfuzz{1pt} % Ignore slight overfulls. +\CodelineIndex +%\PageIndex % instead of \CodelineIndex to get the page numbers +\EnableCrossrefs +%\DisableCrossrefs % Say \DisableCrossrefs if index is ready. +%\RecordChanges % Gather update information. +%\OnlyDescription % Comment out for implementation details. +\hyphenation{created every-thing ignored} +\makeatletter +%% Code from tcilatex.tex, Macros for Scientific Word and Scientific WorkPlace 5.5 <06 Oct 2005> %% +%% Copyright (C) 2005 Mackichan Software, Inc. %% +%% That macro file is NOT proprietary and may be freely copied and distributed. %% + \def\unit#1{\mathord{\thinspace\rm #1}}% +%% End of code from tcilatex.tex %% +\makeatother +\begin{document} + \DocInput{pagesLTS.dtx}% +\end{document} +%</driver> +% \end{macrocode} +% +% \begin{macrocode} +%<*ltxdoc> +\NeedsTeXFormat{LaTeX2e}[1994/06/01] +\ProvidesFile{ltxdoc.cfg}[2010/05/15 v1.0 configuration file for pagesLTS (HMM)] + %% Code from original ltxdoc.cfg [2007/01/08 latex-tds: ltxdoc.cls configuration (HO)], %% + % copyrighted 2006, 2007 Heiko Oberdiek, part of project `latex-tds'. + % That file may be distributed and/or modified under the + % conditions of the LaTeX Project Public License, either version 1.3 + % of this license or (at your option) any later version. + % The latest version of this license is in + % http://www.latex-project.org/lppl.txt + % and version 1.3c or later is part of all distributions of LaTeX + % version 2005/12/01 or later. + % That work has the LPPL maintenance status `maintained'. + % The Current Maintainer of that work is Heiko Oberdiek. + % + \PassOptionsToClass{a4paper}{article} + \AtEndOfClass{% + \RequirePackage[numbered]{hypdoc}[2010/03/26]% v1.9 + \pdfstringdefDisableCommands{% + \let\env\relax % longtable.dtx + \let\mytt\relax % tabularx.dtx + }% + \addtolength{\topmargin}{-10mm}% + \addtolength{\textheight}{20mm}% + % Depending on the page style, the head or foot area + % are put into the text area. + % Usually the page style is the default "plain". + % tools/verbatim.dtx uses "myheadings". + \def\string@plain{plain}% + \def\string@myheadings{myheadings}% + \def\current@pagestyle{plain}% + \let\ltxdoc@cfg@pagestyle\pagestyle + \def\pagestyle#1{% + \def\current@pagestyle{#1}% + \ltxdoc@cfg@pagestyle{#1}% + }% + \edef\ltxdoc@cfg@jobname{\jobname}% + \def\ltxdoc@cfg@longtable{longtable}% + \@onelevel@sanitize\ltxdoc@cfg@longtable + \ifx\ltxdoc@cfg@jobname\ltxdoc@cfg@longtable + \def\current@pagestyle{both}% + \fi + \let\ltxdoc@cfg@document\document + \def\document{% + \ifx\current@pagestyle\string@plain + \addtolength{\textheight}{\headheight}% + \addtolength{\textheight}{\headsep}% + \setlength{\headheight}{0pt}% + \setlength{\headsep}{0pt}% + \global\textheight\textheight + \global\headheight\headheight + \global\headsep\headsep + \fi + \ifx\current@pagestyle\string@myheadings + \addtolength{\textheight}{\footskip}% + \global\textheight\textheight + \fi + \ltxdoc@cfg@document + }% + %% End of code from original ltxdoc.cfg [2007/01/08 latex-tds: ltxdoc.cls configuration (HO)] %% + %% Place additional code here. %% + } + +%</ltxdoc> +% \end{macrocode} +% +% \fi +% +% \CheckSum{0} +% +% \CharacterTable +% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +% Digits \0\1\2\3\4\5\6\7\8\9 +% Exclamation \! Double quote \" Hash (number) \# +% Dollar \$ Percent \% Ampersand \& +% Acute accent \' Left paren \( Right paren \) +% Asterisk \* Plus \+ Comma \, +% Minus \- Point \. Solidus \/ +% Colon \: Semicolon \; Less than \< +% Equals \= Greater than \> Question mark \? +% Commercial at \@ Left bracket \[ Backslash \\ +% Right bracket \] Circumflex \^ Underscore \_ +% Grave accent \` Left brace \{ Vertical bar \| +% Right brace \} Tilde \~} +% +% \GetFileInfo{pagesLTS.drv} +% +% \begingroup +% \def\x{\#,\$,\^,\_,\~,\ ,\&,\{,\},\%}% +% \makeatletter +% \@onelevel@sanitize\x +% \expandafter\endgroup +% \expandafter\DoNotIndex\expandafter{\x} +% \expandafter\DoNotIndex\expandafter{\string\ } +% \begingroup +% \makeatletter +% \lccode`9=32\relax +% \lowercase{%^^A +% \edef\x{\noexpand\DoNotIndex{\@backslashchar9}}%^^A +% }%^^A +% \expandafter\endgroup\x +% \DoNotIndex{\documentclass,\usepackage,\hfuzz,\small,\tt,\begin,\end} +% \DoNotIndex{\NeedsTeXFormat,\filedate,\fileversion,\DoNotIndex} +% \DoNotIndex{\def,\edef,\divide,\advance,\multiply} +% \DoNotIndex{\",\-,\,,\\,\hskip,\H,\ldots,\indent,\noindent,\textbackslash} +% \DoNotIndex{\textbf,\textit,\textquotedblleft,\textquotedblright,\textsf,\texttt} +% \DoNotIndex{\ifthenelse,\and,\equal,\whiledo,\if,\ifx,\ifnum,\else,\fi} +% \DoNotIndex{\CodelineIndex,\EnableCrossrefs,\DisableCrossrefs} +% \DoNotIndex{\DocInput,\AltMacroFont} +% \DoNotIndex{\@ne,\tw@,\thr@@} +% \DoNotIndex{\newpage,\pagebreak,\newline,\linebreak,\nolinebreak} +% \DoNotIndex{\lipsum,\MessageBreak,\pageref,\protect} +% \DoNotIndex{\RecordChanges,\OnlyDescription} +% \DoNotIndex{\smallskip,\medskip,\bigskip,\space} +% \DoNotIndex{\item} +% \DoNotIndex{\plainTeX,\TeX,\LaTeX,\pdfLaTeX} +% \DoNotIndex{option: pagecontinue} +% \DoNotIndex{{pagesLTS.arabic, pagesLTS.roman, pagesLTS.Roman, pagesLTS.alph, pagesLTS.Alph,\ldots }} +% +% \title{The \textsf{pagesLTS} package\footnote{This file% +% has version number v1.1b, last% +% revised 2010/06/03, documentation dated 2010/06/03.}} +% \author{H.-Martin M\"{u}nch\\ +% (\texttt{Martin dot Muench at Uni-Bonn dot de})} +% \date{2010/06/03} +% +% \maketitle +% +% \begin{abstract} +% This package puts the labels \texttt{LastPage} +% (\texttt{\textbackslash AtEndDocument}) and +% \texttt{VeryLastPage} (\texttt{\textbackslash AfterLastShipout}) +% into the \texttt{.aux} file, allowing the user to refer +% to the (very) last page of a document. This might be +% particularly useful in places like headers or footers. +% When more than one page numbering scheme is used, +% these references do not give the total \textit{number} of pages. +% For this case the label \texttt{LastPages} is introduced. +% Additionally, at the last page of each page numbering +% scheme a label \texttt{pagesLTS.<numbering scheme>} is +% placed, where \texttt{<numbering scheme>} is e.\,g. +% arabic, roman, Roman, alph, or Alph. For fnsymbol +% please use \texttt{\textbackslash lastpageref\{pagesLTS.fnsymbol\}} +% instead of \texttt{\textbackslash pageref\{pagesLTS.fnsymbol\}}. +% When the same numbering scheme is used twice, +% the page numbers are either reset to one or continued +% automatically, depending on the option given when the package +% is called. The command \texttt{\textbackslash theCurrentPage} +% prints the current total/absolute page number -- in contrast to +% \texttt{\textbackslash thepage}, which gives only the page +% \textit{name} in the current page numbering scheme. +% \texttt{\textbackslash theCurrentPageLocal} gives the current +% number of pages in the current page numbering scheme. +% \texttt{\textbackslash thepage} and +% \texttt{\textbackslash theCurrentPageLocal} are different e.\,g. +% when \texttt{\textbackslash addtocounter\{page\}\{\ldots \}} or +% \texttt{\textbackslash setcounter\{page\}\{\ldots \}} were used. +% At the first page of the document a label \texttt{pagesLTS.0} is +% created. This label can be referred to, too. +% Further labels are provided for special cases.\\ +% The \textsf{alphalph} package is supported, i.\,e. +% page numbers alph or Alph $>26$ and fnyambol $>9$ +% can be used (with according options set). Even zero +% and negative page numbers can be used with \texttt{arabic}, +% \texttt{alph}, \texttt{Alph}, \texttt{roman}, \texttt{Roman}, +% and \texttt{fnsymbol} page numbering (with \textsf{alphalph} package +% and according options). +% \end{abstract} +% +% \bigskip +% +% \noindent Right after \texttt{\textbackslash begin\{document\}} +% a \texttt{\textbackslash pagenumbering\{\ldots \}} should be called -- +% with the appropriate argument out of e.\,g.\\ +% arabic (Arabic numerals: 1, 2, 3, 4,\ldots),\\ +% roman (Lowercase Roman numerals: i, ii, iii, iv,\ldots), +% Roman (Uppercase Roman numerals: I, II, III, IV,\ldots),\\ +% alph (Lowercase letters: a, b, c, d,\ldots), +% Alph (Uppercase letters: A, B, C, D,\ldots),\\ +% fnsymbol (Footnote symbols: $*$, $\dagger $, $\ddagger $, $\mathsection $,\ldots). +% +% \bigskip +% +% \noindent This package first started as a revision of the +% \textsf{lastpage} package of \textbf{Jeffrey P. Goldberg} (Thanks!), +% but then it became obviouse that a replacement was needed. +% +% \bigskip +% +% \noindent Disclaimer for web links: The author is not responsible for any contents +% referred to in this work unless he has full knowledge of illegal contents. +% If any damage occurs by the use of information presented there, only the +% author of the respective pages might be liable, not the one who has referred +% to these pages. +% +% \bigskip +% +% \noindent Save per page about $200\unit{ml}$ water, +% $2\unit{g}$ CO$_{2}$ and $2\unit{g}$ wood: +% Therefore please print only if this is really necessary. +% +% \newpage +% +% \tableofcontents +% +% \newpage +% +% \section{Introduction} +% +% \indent This package puts the labels \texttt{LastPage} +% (\texttt{\textbackslash AtEndDocument}) (like the \textsf{LastPage} +% package of Jeffrey P. Goldberg) and +% \texttt{VeryLastPage} (\texttt{\textbackslash AfterLastShipout}) +% into the \texttt{.aux} file, allowing the user to refer +% to the (very) last page of a document via +% |\lastpageref{LastPage}| and |\lastpageref{VeryLastPage}|. +% This might be particularly useful in places like headers or +% footers. When more than one page numbering scheme is used, +% these references do not give the total \textit{number} of pages. +% For this case the label \texttt{LastPages} is introduced +% (similar to label |TotPages| of the \textsf{TotPages} package, +% but set later in the document). +% Additionally, at the last page of each page numbering +% scheme a label \texttt{pagesLTS.<numbering scheme>} is +% placed, where \texttt{<numbering scheme>} is e.\,g. +% arabic, roman, Roman, alph, or Alph. For fnsymbol +% please use \texttt{\textbackslash lastpageref\{pagesLTS.fnsymbol\}} +% instead of \texttt{\textbackslash pageref\{pagesLTS.fnsymbol\}}. +% When the same numbering scheme is used twice, +% the page numbers are either reset to one or continued +% automatically, depending on the option given when the package +% is called. The command \texttt{\textbackslash theCurrentPage} +% prints the current total/absolute page number - in contrast to +% \texttt{\textbackslash thepage}, which gives only the page +% \textit{name} in the current page numbering scheme. +% \texttt{\textbackslash theCurrentPageLocal} gives the current +% number of pages in the current page numbering scheme. +% \texttt{\textbackslash thepage} and +% \texttt{\textbackslash theCurrentPageLocal} are different e.\,g. +% when \texttt{\textbackslash addtocounter\{page\}\{\ldots \}} or +% \texttt{\textbackslash setcounter\{page\}\{\ldots \}} were used. +% (See also \LaTeX\ bug~3421: 3rd~page is even (twoside, titlepage, +% abstract), +% \url{http://www.latex-project.org/cgi-bin/ltxbugs2html?category=LaTeX&responsible=anyone&state=anything&keyword=pagenumber&pr=latex%2F3421&search=}.) +% At the first page of the document a label \texttt{pagesLTS.0} is +% created. This label can be referred to, too. +% Further labels are provided for special cases.\\ +% The \textsf{alphalph} package is supported, i.\,e. +% page numbers \texttt{alph} or \texttt{Alph} $>26$ and +% \texttt{fnyambol} $>9$ can be used (with the according +% options set). Even zero or negative page numbers can be used +% with \texttt{arabic}, \texttt{alph}, \texttt{Alph}, and +% \texttt{fnsymbol} page numbering (with \textsf{alphalph} package +% and according options), and zero \texttt{roman} and +% \texttt{Roman} pages, too. +% +% \bigskip +% \noindent Right after \texttt{\textbackslash begin\{document\}} +% a \texttt{\textbackslash pagenumbering\{\ldots \}} should be called -- +% with the appropriate argument out of e.\,g.\\ +% arabic (Arabic numerals: 1, 2, 3, 4,\ldots),\\ +% roman (Lowercase Roman numerals: i, ii, iii, iv,\ldots), +% Roman (Uppercase Roman numerals: I, II, III, IV,\ldots),\\ +% alph (Lowercase letters: a, b, c, d,\ldots), +% Alph (Uppercase letters: A, B, C, D,\ldots),\\ +% fnsymbol (Footnote symbols: $*$, $\dagger $, $\ddagger $, $\mathsection $,\ldots). +% +% \bigskip +% \noindent This package first started as a revision of the +% \textsf{lastpage} package of \textbf{Jeffrey P. Goldberg} (Thanks!), +% but then it became obviouse that a replacement was needed. +% +% \bigskip +% \noindent \textbf{Trademarks} appear throughout this +% documentation without any trademark symbol; they are the +% property of their respective trademark owner. There is no +% intention of infringement; the usage is to the benefit of +% the trademark owner. +% +% \bigskip +% \phantomsection +% \DescribeMacro{logical page numbers} +% \noindent \textbf{Tip}: For the display of the pdf file use +% \textbf{logical page numbers} together with +% \textsf{hyperref}!\label{logical page numbers} +% \begin{description} +% \item [-] In Adobe Reader 9.3.1 enable:\\ +% \underline{E}dit $>$ Prefere\underline{n}ces (Ctrl+k) +% $>$ Page Display $>$ Page Content and Information +% $>$ Use logical page \nolinebreak{\underline{n}umbers\ .} +% +% \item[-] Use the \textsf{hyperref} package with option |plainpages=false|\,. +% \end{description} +% The display will be e.\,g.\ \textquotedblleft 7~(7~of~9)\textquotedblright, +% or, in case of Roman instead of arabic numbers, +% \textquotedblleft VII~(7~of~9)\textquotedblright, and when different +% page numbers are used (see below) e.\,g. arabic after 10~Roman +% pages: \textquotedblleft 17~(27~of~30)\textquotedblright. +% Please try this with the compiled \textsf{pagesLTS-example} file! +% +% \bigskip +% \noindent The name of the \textsf{pagesLTS} package refers to +% Last, Total, and page numbering Schemes pages. +% +% \pagebreak +% +% \section{Usage} +% +% \indent Just load the package placing +% \begin{quote} +% |\usepackage[<|\textit{options}|>]{pagesLTS}| +% \end{quote} +% \noindent in the preamble of your \LaTeXe\ source file +% (about |\AtEndDocument| see subsection~\ref{ssec:aed}) +% and place a |\pagenumbering{...}| with appropriate argument +% (e.\,g.~arabic, roman, Roman, fnsymbol, alph, or Alph) +% right behind |\begin{document}| (see subsubsection~\ref{sss:nopnc})!\\ +% +% \indent For example for various draft forms it is desirable to have a +% page reference to the last page, so that e.\,g. page footers can +% contain something like \textquotedblleft page $N$ of $K$\textquotedblright, +% where $N$ is the current page and $K$ is the last page. Once the package +% is loaded, anywhere in the text references can be made +% to the labels \texttt{LastPage}, \texttt{VeryLastPage}, and +% \texttt{LastPages} (most times with |\pageref{...}|, but more save +% with |\lastpageref{...}|). +% In particular one can use the \textsf{fancyhdr} or \textsf{nccfancyhdr} +% package, or redefinitions of the page headings and footings to get +% a reference to the (very) last page. +% +% \subsection{Options} +% \DescribeMacro{options} +% \indent The \textsf{pagesLTS} package takes the following options: +% +% \subsubsection{pagecontinue\label{sss:pagecontinue}} +% \DescribeMacro{pagecontinue} +% \indent When option \texttt{pagecontinue=false} is \textbf{not} given +% (i.\,e. \texttt{pagecontinue} or \texttt{pagecontinue=true} +% or no \texttt{pagecontinue} option at all), at each +% |\pagenumbering{...}| command the number of the page numbering +% will be continued with the page number following the last page +% of the same page numbering scheme. +% For example, if there are V~Roman pages in the frontmatter, +% some arabic ones in the mainmatter, and then Roman ones again +% in the backmatter, the last ones will start with VI instead +% of~I again.\\ +% \indent If you want to start with I (or i, 1, a, A, *,\ldots ) again, +% set option +% \texttt{pagecontinue=false}. If you want to generally continue +% the numbers, but for some page numbering scheme do not want this, +% use \texttt{pagecontinue=true} and say |\setcounter{page}{1}| +% after |\pagenumbering{...}| for that page numbering scheme. +% +% \subsubsection{alphMult, AlphMulti, fnsymbolmult\label{sss:alphalph}} +% +% \indent The page number printed in +% \nolinebreak{\texttt{fnsymbol}\footnote{% +% \ensuremath {*},% +% \ensuremath {\dagger },% +% \ensuremath {\ddagger },% +% \ensuremath {\mathsection },% +% \ensuremath {\mathparagraph },% +% \ensuremath {\delimiter "026B30D },% +% \ensuremath {**},% +% \ensuremath {\dagger \dagger },% +% \ensuremath {\ddagger \ddagger }}} +% must be $>0$ and $<10$ and those printed in +% \nolinebreak{\texttt{alph}\footnote{a, b, c, d, e, f, g, h,% +% i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z}} and +% \nolinebreak{\texttt{Alph}\footnote{A, B, C, D, E, F, G, H,% +% I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z}} must +% be $>0$ and $<27$. After page~Z\quad \LaTeX\ \textit{should} +% continue with AA, AB, AC,\ldots\ Some people prefer +% AA, BB, CC,\ldots, but in hexadecimal it is $AA_{16}=170_{10}$ +% and $171_{10}=AB_{16}$, whereas $BB_{16}=187_{10}$. In any way +% it should continue at all (maybe even with an user option to +% choose between the two continuations), but instead only gives +% an error: +% \begin{quote} +% |LaTeX Error: Counter too large|\\ +% |See the LaTeX manual or LaTeX Companion for explanation.|\\ +% |You've lost some text. Try typing <return> to proceed.|\\ +% |If that doesn't work, type X <return> to quit.| +% \end{quote} +% But thanks to the \textsf{alphalph} package by Heiko Oberdiek +% these limitation no longer hold. With his |\erroralph| command +% now even negative or zero page +% \textquotedblleft numbers\textquotedblright\ are possible.\\ +% +% \DescribeMacro{alphMult} +% The string option \texttt{alphMult} takes three values: ab, bb, 0: +% \begin{description} +% \item[ab] After page z, the page +% \textquotedblleft numbers\textquotedblright\ continue with +% aa, ab, ac, ad,\ldots, fxshrxw (the default), and before a with +% 0, -a, -b,\ldots, -z, -aa, -ab,\ldots, -fxshrxw ($=-2147483647$). +% \item[bb] After page z, the page +% \textquotedblleft numbers\textquotedblright\ continue with +% aa, bb, cc, dd,\ldots, and before a with +% 0, -a, -b,\ldots, -z, -aa, -bb,\ldots\\ +% (Internally up~to $\pm 55\,834\,558$ is allowed, but when printed will +% exceed the \LaTeX\ capacity even for smaller numbers -- +% in the example file this happens at about $6\,500$.)\\ +% (If you have a document with more than +% $6\,500$~pages, you might think about splitting it in volumes. +% And page \textquotedblleft numbers\textquotedblright\ with +% about 100~digits are probably not easy to grasp for the reader, too.)\\ +% \item[0] (zero) The \textsf{pagesLTS} package does nothing, +% thus the user is free to define the page +% \textquotedblleft numbers\textquotedblright\ after~z and before~a.\\ +% (But if the user does not do anything at all, the\\ +% \ |LaTeX Error: Counter too large|\\ +% will appear again.) +% \end{description} +% +% \DescribeMacro{AlphMulti} +% The string option \texttt{AlphMulti} takes three values: AB, BB, 0: +% \begin{description} +% \item[AB] After page Z, the page +% \textquotedblleft numbers\textquotedblright\ continue with +% AA, AB, AC, AD,\ldots, FXSHRXW (the default), and before A with +% 0, -A, -B,\ldots, -Z, -AA, -AB,\ldots, -FXSHRXW. +% \item[BB] After page Z, the page +% \textquotedblleft numbers\textquotedblright\ continue with +% AA, BB, CC, DD,\ldots, and before A with +% 0, -A, -B,\ldots, -Z, -AA, -BB,\ldots \\ +% (About the limits please see |alphMult| above.) +% \item[0] (zero) The \textsf{pagesLTS} package does nothing, +% thus the user is free to define the page +% \textquotedblleft numbers\textquotedblright\ after~Z and before~A.\\ +% (But if the user does not do anything at all, the\\ +% \ |LaTeX Error: Counter too large|\\ +% will appear again.) +% \end{description} +% +% \DescribeMacro{fnsymbolmult} +% When option \texttt{fnsymbolmult=false} is \textbf{not} given +% (i.\,e. \texttt{fnsymbolmult} or \texttt{fnsymbolmult=true} +% or no \texttt{fnsymbolmult} option at all), +% after 5 (\ensuremath {\mathparagraph }) the page +% \textquotedblleft number\textquotedblright\ is continued with +% the doubled \textquotedblleft number\textquotedblright\ of the +% first, second, third,\ldots\ page (\ensuremath {**}, +% \ensuremath {\dagger \dagger }, \ensuremath {\ddagger \ddagger }, +% \ensuremath {\mathsection \mathsection }, +% \ensuremath {\mathparagraph \mathparagraph }), +% and after the tenth page the +% \textquotedblleft number\textquotedblright\ is tripled +% (\ensuremath {***}, \ensuremath {\dagger \dagger \dagger },\ldots). +% Compile the \textsf{pagesLTS-example.tex} with \pdfLaTeX\ and +% see the resulting pdf file.\\ +% Before \ensuremath {*} (page~1) the page +% \textquotedblleft numbers\textquotedblright\ are continued with +% 0, \ensuremath {- * }, \ensuremath {- \dagger },\ldots, +% \ensuremath {- \mathparagraph }, \ensuremath {- **}, +% \ensuremath {- \dagger \dagger },\ldots \\ +% If this is not wanted, set option \texttt{fnsymbolmult=false}, +% and \textsf{pageLTS} will do nothing and allow the user to change +% the page \textquotedblleft number\textquotedblright . (But if the +% user does not do anything at all, the\\ +% \ |LaTeX Error: Counter too large|\\ +% will appear again.)\\ +% While in \LaTeXe\ arabic (page) numbers are possible up~to +% |MAX|\,$ = 2\,147\,483\,647$ (cf.~the \textsf{alphalph} package),\\ +% |\erroralphalph{\fnsymbolmult}{...}| numbers are possible up~to +% 10\,737\,415 only. If this number is not only used internally +% but printed, after number about 11\,705 (which is +% 2\,341 times \ensuremath {\mathparagraph }) the \LaTeXe\ capacity +% is exeeded, depending on the remaining file and its use of +% \TeX\ capacity, of course. (If you have a document with more than +% 11\,705~pages, you might think about splitting it in volumes. +% And page \textquotedblleft numbers\textquotedblright\ with +% 2\,341~digits are probably not easy to grasp for the reader, too.)\\ +% +% \subsubsection{romanMult, RomanMulti\label{sss:romanMult}} +% +% \DescribeMacro{romanMult} +% \DescribeMacro{RomanMulti} +% The options \texttt{romanMult(=true)} and \texttt{RomanMulti(=true)} +% expand the |\roman| and |\Roman| page numbering scheme to values +% below one ($<1$), i.\,e. 0, -i, -ii, -iii, -iv,\ldots\ and +% 0, -I, -II, -III, -IV,\ldots, respectively.\\ +% Again the \TeX\ capacity will be exceeded before +% \nolinebreak{$\pm$ |MAX|\,}$ = \pm 2\,147\,483\,647$, and even if +% $1\,000\,000\,000$ is internally possible, this would print +% $1\,000\,000$ times the letter~m, which would require either +% very small print or quite huge paper size.\\ +%(If you have a document with so many pages, you might think +% about splitting it in volumes. And page +% \textquotedblleft numbers\textquotedblright\ with +% thousands of digits are probably not easy to grasp for the reader, +% too.)\\ +% If the expansion below $1$ is not wanted, set options +% \texttt{romanMult=false} and/or \texttt{RomanMulti=false}, +% and \textsf{pageLTS} will do nothing and allow the user +% to change the page \textquotedblleft number\textquotedblright . +% (But if the user does not do anything at all, \LaTeX\ will just +% ignore the values - not even a warning is given.) +% +% \subsubsection{Arabic page numbers} +% +% \DescribeMacro{Arabic page numbers} +% In \LaTeXe\ arabic (page) numbers are already possible between +% |-MAX...MAX|, where |MAX|\,$ = 2\,147\,483\,647$ (cf.~the +% \textsf{alphalph} package), without any expansion necessary. +% (But if you have a document with so many pages, you might think +% about splitting it in volumes!) +% +% \subsection{Labels} +% +% \DescribeMacro{pagesLTS.0} +% \indent At the first page a label \texttt{pagesLTS.0} is created. +% If |\pagenumbering{...}| is used right after +% |\begin{document}|, this is much easier for the +% \textsf{pagesLTS} package (and chances for successful placing +% of all labels are much higher; +% \nolinebreak{cf.~subsubsection~\ref{sss:once}).}\\ +% +% \DescribeMacro{LastPage} +% \texttt{\textbackslash AtEndDocument} (see subsection~\ref{ssec:aed}) +% this package defines a label, \texttt{LastPage}, +% which the user can refer to with the \linebreak +% |\lastpageref{LastPage}| +% command. While |\pageref{LastPage}| is also possible +% (especially for backward compatibility with the \textsf{LastPage} +% package), this is discouraged, because it will not work +% when it is used together with the \textsf{hyperref} package and +% the \textsf{fnsymbol} page numbering scheme. (The \textsf{LastPage} +% package did not work with this combination, too, so if you want to, +% you can reproduce the old error -- but you do not have to do it, +% but can use |\lastpageref{LastPage}|.)\\ +% +% \DescribeMacro{VeryLastPage} +% \texttt{\textbackslash AfterLastShipout} the label \texttt{VeryLastPage} +% is defined, which the user can also refer to with the +% |\lastpageref{VeryLastPage}| command. +% Depending on usage of \texttt{\textbackslash AtEndDocument} +% by other packages, \texttt{LastPage} might not point to the very last +% page, but |\lastpageref{VeryLastPage}| should do this +% (cf.~subsection~\ref{ssec:aed}).\\ +% +% \DescribeMacro{LastPages} +% \DescribeMacro{page number} +% \DescribeMacro{number of pages} +% When more than one page numbering scheme is used, +% neither \texttt{LastPage} nor \texttt{VeryLastPage} give +% the total \textbf{number} of pages. +% For example, for a document with VI+36 pages, both give +% \textquotedblleft 36\textquotedblright as reference to the last page. +% While this is correct, the total number of pages is 42, and this is +% given by the reference to \texttt{LastPage\underline{s}}: +% \nolinebreak{|\lastpageref{LastPage|\underline{|s|}|}|} (note the +% \textquotedblleft s\textquotedblright\ at the end). When the +% page number was manipulated by |\addtocounter{page}{...}| +% or |\setcounter{page}{...}|, \texttt{LastPages} ignores this. +% (At a page numbering change the page is reset to one +% (without option |pagecontinue|). This is done by +% |\setcounter{page}{1}|, thus this is ignored, too.)\\ +% |\pageref{totpages}| of the \textsf{totpages} package is +% similar to |\lastpageref{LastPages}|, but while +% the target for |\pageref{totpages}| is placed |\AtEndDocument|, +% the target for +% |\lastpageref{LastPages}| is placed |\AfterLastShipout|, +% therefore |\lastpageref{LastPages}| is safer to really +% get the total page number.\\ +% +% \pagebreak +% +% \DescribeMacro{\theCurrentPage} +% |\theCurrentPage| gives the current total/absolute page, +% in contrast to +% |\thepage|, which gives only the page +% \textit{name} in the current page numbering scheme. For example, +% when there are Roman VII pages in the frontmatter and afterwards +% in the mainmatter you are at arabic page 9, then |\theCurrentPage| +% is 16, whereas |\thepage| is 9. When the page +% \textquotedblleft number\textquotedblright\ (name) is manipulated +% by |\addtocounter{page}{...}| or |\setcounter{page}{...}|, +% |\theCurrentPage| +% \nolinebreak{ignores} this. Because \texttt{CurrentPage} +% is a normal counter, you can also say e.\,g.~|\Roman{CurrentPage}| +% to get the value in Roman page numbering +% scheme (e.\,g.~VIII for 8).\\ +% +% \phantomsection +% \label{CurrentPageLocal} +% \DescribeMacro{\theCurrentPageLocal} +% |\theCurrentPageLocal| gives the current (arabic) number of +% pages in the current page numbering scheme. |\thepage| and +% |\theCurrentPageLocal| are different e.\,g. when +% |\addtocounter{page}{...}| or |\setcounter{page}{...}| were used.\\ +% |\theCurrentPageLocal| can be printed in other formats, e.\,g. +% |\roman{pagesLTS.current.local.roman}|, but probably it only makes +% sense if page numbering scheme and format are the same, e.\,g. +% |\Roman{pagesLTS.current.local.Roman}| or\\ +% |\Alph{pagesLTS.current.local.Alph}|.\\ +% \texttt{\textbackslash arabic\{pagesLTS.current.local.\ldots \}} +% probably make sense even when combined with another page +% numbering scheme. And this is exactly what +% |\theCurrentPageLocal| does:\\ +% |\def\theCurrentPageLocal{\arabic{pagesLTS.current.local.\pagesLTS@pnc}}|.\\ +% +% \DescribeMacro{pagesLTS. page numbering scheme . number } +% If you want to refer to the last page of the first, +% second,\ldots\ use of a page numbering scheme, you can refer to \linebreak +% |pagesLTS.<page numbering scheme>.<number>|, e.\,g. +% |\lastpageref{pagesLTS.Roman.1}|, where |<number>| is the occurrence +% of the page numbering scheme. For details please see +% page~\pageref{pagesLTS.pnscheme.nr}.\\ +% \bigskip +% +% \DescribeMacro{\lastpageref} +% For pages with the \texttt{fnsymbol} page numbering scheme, +% |\lastpageref{...}| \nolinebreak{instead} of |\pageref{...}| +% \textit{must} be used. This is required for pages some\-where +% inside of the document as well as the (very) last page(s). +% Because |\lastpageref{...}| is a synonym for |\pageref{...}|, +% where no \textsf{fnsymbol} page numbering scheme is used, +% it is save(r) to use it for all references to labels provided +% by the \textsf{pagesLTS} package. +% +% \subsection[\texttt{\textbackslash pagenumbering\{\ldots \}}]{\DescribeMacro{\pagenumbering}\texttt{\textbackslash pagenumbering\{\ldots \}}} +% +% \subsubsection{If \texttt{\textbackslash pagenumbering\{\ldots \}} is \textbf{not} used\label{sss:nopnc}} +% +% \indent When the \textsf{pagesLTS} package is used, but |\pagenumbering{...}| +% (with an argument like arabic, roman, Roman, fnsymbol, alph, or Alph) +% is not used, there should be no problem, except that you might need +% more~(!) compiler runs to get all references right, and some references +% might even be missing (see below). The \textsf{pagesLTS} +% package tries to determine the page numbering scheme at the first +% shipout, but success is not guaranteed. Thus please use |\pagenumbering{...}| +% at the beginning of your document!\\ +% \indent Without |\pagenumbering{<something>}| (|<something>| e.\,g. = arabic) +% at the beginning of the document, the page numbers might be given in +% arabic \textit{by} (class) \textit{default}, but the \textsf{pagesLTS} +% package does not know about this without |\pagenumbering{arabic}|.~--\\ +% \indent The label \texttt{pagesLTS.0} is created at the first +% page even if no |\pagenumbering{...}| command is given. +% Maybe have a look at the \xfile{.aux} file after compiling your +% document to detect further labels (of other packages, too).\\ +% +% \pagebreak +% +% \subsubsection{If \texttt{\textbackslash pagenumbering\{\ldots \}} is used once\label{sss:once}} +% +% \DescribeMacro{pagesLTS.0} +% At the first page a label \texttt{pagesLTS.0} is created. +% If |\pagenumbering{...}| is used right after +% |\begin{document}|, this is much easier for the +% \textsf{pagesLTS} package (and chances for successful placing +% of all labels are much higher). +% +% \subsubsection{If \texttt{\textbackslash pagenumbering\{\ldots \}} is used more than once} +% +% \indent Everything from the preceding subsubsections applies and additionally +% the following:\\ +% \indent When different page numbering schemes are used, e.\,g. +% Roman numbers for the frontmatter and arabic numbers for the +% mainmatter, please use +% |\pagenumbering{...}| for each of them! +% Even if you do this, the reference to neither the label \texttt{LastPage} +% nor the label \texttt{VeryLastPage} gives the \textbf{total} +% number of pages, but only the number of pages of the last used page +% numbering scheme (which could be exactly what you want, e.\,g. if +% you want to refer to the last page itself and do not want to +% give the total number of pages).\\ +% \DescribeMacro{LastPages} +% \indent For remediation the label +% \nolinebreak{\texttt{LastPage}\textbf{\underline{s}}} +% (with \textquotedblleft s\textquotedblright at its end) is +% introduced. Please then refer to this label by +% |\lastpageref{LastPages}| instead of \texttt{LastPage} or +% \texttt{VeryLastPage}.\\ +% +% \DescribeMacro{pagesLTS.arabic} +% \DescribeMacro{pagesLTS.roman} +% \DescribeMacro{pagesLTS.Roman} +% \DescribeMacro{pagesLTS.alph} +% \DescribeMacro{pagesLTS.Alph} +% \DescribeMacro{pagesLTS.fnsymbol} +% Additionally, at the last page of each page numbering +% scheme a label \texttt{pagesLTS.<numbering scheme>} is +% placed, where \texttt{<numbering scheme>} is e.\,g.\ +% arabic, roman, Roman, alph, Alph,\ldots .\\ +% For the \textbf{fnsymbol} page numbering scheme +% |\lastpageref{pagesLTS.fnsymbol}| is needed instead of +% |\pageref{pagesLTS.fnsymbol}|. You can and should use +% |\lastpageref{...}| also for the other page numbering schemes.\\ +% +% \bigskip +% +% While at the time of the last revision of the \textsf{pagesLTS} package +% no other page numbering schemes were known to the maintainer, +% this package in principle works with every scheme which is +% recognized by the original |\pagenumbering| command. +% But the \textsf{hyperref} package only then works with +% crazy page names, if the references to those pages are given in a certain way, +% thus the combination of a new page numbering scheme, the \textsf{hyperref} +% and the \textsf{pagesLTS} package might not work.~-- +% The \textsf{pagesLTS} package by itself also works with schemes, +% which the original |\pagenumbering{...}| does not recognize, but because +% the original |\pagenumbering{...}| is called by the \textsf{pagesLTS} +% package, this might cause an error, see subsection~\ref{sec:unknown}! +% (And if the number format is unknown to \LaTeX, the pages will have +% no number, and therefore cannot be referenced. You might be able to +% help yourself by using the \textsf{hyperref} package and +% manually placing |\hypertarget|s and |\href|s.) +% +% \subsubsection{If the same \texttt{\textbackslash pagenumbering\{\ldots \}} scheme is used more than once\label{sss:twice}} +% +% \indent Everything from the preceding subsubsections applies and additionally +% the following:\\ +% \DescribeMacro{pagecontinue} +% \indent If the same page numbering scheme is used twice (or even more often) +% in one document (e.\,g. in the frontmatter Roman: I--V, in the +% mainmatter arabic: 1--20, and in the backmatter again Roman: VI--X), +% the second time it is used, the page numbering is either continued (option +% \texttt{pagecontinue} or \texttt{pagecontinue=true} or no option +% \texttt{pagecontinue}; the default) or reset to one (option +% \texttt{pagecontinue=false}). It is even possible to use +% a~page numbering scheme more than twice.\\ +% +% \pagebreak +% +% \phantomsection +% \label{pagesLTS.pnscheme.nr} +% \DescribeMacro{pagesLTS. page numbering scheme . number } +% If you want to refer to the last page of the first, +% second,\ldots\ use of a page numbering scheme, page~V in the +% example above, you can refer to +% |pagesLTS.<page numbering scheme>.<number>|, e.\,g. +% |\lastpageref{pagesLTS.Roman.1}|, where |<number>| is the occurrence +% of the page numbering scheme.\\ +% +% If you want to refer to the first page of a page numbering scheme, +% just place a label there, e.\,g.\\ +% \indent |\pagenumbering{Roman}| \\ +% \indent |\section{Section title\label{RomanSection}}| \\ +% (You know where you use |\pagenumbering{...}| and this is the +% \textsf{pagesLTS} package, not the \textsf{firstpage} one).\\ +% When you want to give the number of pages of each +% \textquotedblleft sector\textquotedblright\ of the page numbering +% scheme, you can use\\ +% \DescribeMacro{pagesLTS. page numbering scheme . number .local.cnt} +% |\lastpages{<page numbering scheme>}{<number>}|, \\ +% where |<page numbering scheme>| is e.\,g. Roman, arabic,\ldots\ and +% |<number>| the \textquotedblleft sector\textquotedblright\ number, +% e.\,g.~|\lastpages{Roman}{2}|.\\ +% (Internally, the counter has the format +% |pagesLTS.<page numbering scheme>.<number>.local.cnt|.) +% +% \noindent If you used the page numbering scheme Roman for three times, +% you could say +% \begin{verbatim} +% Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}\\ +% There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\ +% \lastpages{Roman}{1}~pages in the first Roman sector +% (\pageref{Roman} -- \lastpageref{pagesLTS.Roman.1}),\\ +% \lastpages{Roman}{2}~pages in the second Roman sector +% (\pageref{Roman2} -- \lastpageref{pagesLTS.Roman.2}), and\\ +% \lastpages{Roman}{3}~pages in the third Roman sector +% (\pageref{Roman3} -- \lastpageref{pagesLTS.Roman.3}.\\ +% \end{verbatim} +% to get +% \begin{quote} +% Last Roman page (pagesLTS.Roman): VIII\\ +% There are 8 pages with Roman numbers:\\ +% 3 pages in the first Roman sector (I -- III),\\ +% 4 pages in the second Roman sector (IV -- VII), and\\ +% 3 pages in the third Roman sector (VIII -- X).\\ +% \end{quote} +% (see e.\,g. the compiled \textsf{pagesLTS-example} file).\\ +% +% If you want to continue one page numbering scheme, but later on +% (third use of it, or for another page numbering scheme) want to +% reset the page number, just say |\setcounter{page}{1}| there.\\ +% +% \pagebreak +% +% \noindent In your document the code +% \begin{verbatim} +% \makeatletter +% \renewcommand{\@evenfoot}% +% {\normalsize\slshape DRAFT \today\hfil \upshape page {\thepage} (\theCurrentPage) of\ % +% \lastpageref{pagesLTS.Roman} + \lastpageref{pagesLTS.arabic}\ = \lastpageref{LastPages} pages% +% } +% \renewcommand{\@oddfoot}{\@evenfoot} +% \makeatother +%\end{verbatim} +% \noindent creates footers like\\ +% +% \textquotedblleft\mbox{\textsl{DRAFT \today}\hspace{1cm}page V (5) of VII + 35 = 42 pages}\textquotedblright\\ +% +% \noindent or\\ +% +% \textquotedblleft\mbox{\textsl{DRAFT \today}\hspace{1cm}page 10 (17) of VII + 35 = 42 pages}\textquotedblright\\ +% +% \noindent in the compiled document (cf.~the \texttt{pagesLTS-example} file). +% +% \noindent Code like +% \begin{verbatim} +% This book has \lastpageref{pagesLTS.Roman}+\lastpageref{pagesLTS.arabic} pages (\lastpageref{LastPages} pages in total). +% \end{verbatim} +% \noindent produces output like +% \begin{quote} +% This book has X+85 pages (95 pages in total). +% \end{quote} +% \noindent (when using the \textsf{hyperref} package, +% the references are even hyperlinked).\\ +% +% If |\addtocounter{page}{...}| or |\setcounter{page}{...}| have been used, +% the local version of \texttt{CurrentPage} can be used, |\theCurrentPageLocal|, +% see subsection~\ref{CurrentPageLocal}.\\ +% +% \subsection{\textsf{papermas}(s) package\label{ss:papermas}} +% There is a kind of an add-on to this package, the \textsf{papermas} +% package, which can be used to compute the number of sheets of paper +% needed to print a document (you can print more than one page of a +% document on one sheet of paper) as well as the approximate mass +% of the printout. Please see the \ref{ss:Downloads} subsection. +% +% \newpage +% +% \section{A few warnings\label{sec:warn}} +% +% \subsection{\texttt{\textbackslash AtEndDocument}\label{ssec:aed}} +% +% \indent The output of a \LaTeXe\ run is not independent of the order +% in which packages are loaded. It is often the case that the same +% formats for which one must put tables and figure at the end, +% are the ones in which endnotes are also required. +% If one wants to use |\AtEndDocument| here as well (as done for +% |\lastpageref{LastPage}|), then it is easy to get to three separate +% uses of |\AtEndDocument| (assuming one uses this for the endnotes +% as well). Clearly it is not safe for any package writer or user +% to assume that no material will follow what they put into +% |\AtEndDocument|. Therefore a message, which begins with +% \texttt{AED}, is included in every usage of |\AtEndDocument|, +% and it is tried to minimize any side effects the usage may have.\\ +% +% As now Heiko Oberdiek's \texttt{atveryend} package is used, +% the references +% |\lastpageref{VeryLastPage}| and |\lastpageref{LastPages}| +% should work all right. About how to get the \texttt{atveryend} package, +% please see subsection~\ref{ss:Downloads}. +% +% \subsection{Interaction with very old versions of the \textsf{endfloat} package\label{sec:endfloat}} +% +% \indent The very old version~2.0 (and earlier) of the \textsf{endfloat} +% package actually redefined the |\enddocument| command, +% and so interferred drastically with the \LaTeXe\ commands which +% make use of |\AtEndDocument|. Newer versions of \textsf{endfloat} +% exists (at the time of writing this documentation: v2.4i as of 1995/10/11) +% in modern documentation form, which should be available from +% the same source where you received this file, see subsection~\ref{ss:Downloads}.\\ +% A note is placed in the style file at the |\RequirePackage| section, +% and later it is even checked whether a (very) old \textsf{endfloat} +% package is in use. If it is, a warning or even an error message +% is given, depending on \textsf{endfloat} version. +% This assumes, that the old versions of endfloat at least gave +% a version date, of course.\\ +% If you want your \texttt{LastPage} to label the last page of +% these end floats, you need to load \textsf{pagesLTS} after +% loading \textsf{endfloat}, or to use \texttt{VeryLastPage} instead. +% If, on the other hand, you \textit{want}\ \texttt{LastPage} to refer +% to the (not so) last page, exclusive of the the floats at the end, +% then load in the reverse order. Independent from the order of +% \textsf{pagesLTS} and \textsf{endfloat}, you will still need the +% modified\footnote{The \textquotedblleft new\textquotedblright\ version +% is nearly 15~years old, so it might be time to update to this +% version, +% if you did not do it already.} version of \textsf{endfloat}.\\ +% Using the +% \nolinebreak{\texttt{LastPage}\textbf{\underline{s}}\ (\textit{s}!)}\ label +% should get you to the last page in all cases: |\lastpageref{LastPages}|.\\ +% +% Other \LaTeX209\ (!) packages also seem to like to redefine +% |\enddocument|. In addition to the old \textsf{endfloat}, +% \textsf{harvard} comes to mind. All of these will need to be +% modified swiftly. \textbf{If possible, update to \LaTeXe!} +% +% \subsection{\textsf{lastpage} package\label{ssec:lastpage}} +% +% This package first started as a revision of the \textsf{lastpage} +% package of Jeffrey P. Goldberg (jeffrey+news at goldmark dot org), +% but it became obviouse that a replacement was needed. For backward +% compatibility, a label named |LastPage| is provided. +% Thus |\usepackage{lastpage}| can be replaced by\\ +% |\usepackage[pagecontinue=false,alphMult=0,AlphMulti=0,fnsymbolmult=false,romanMult=false,RomanMulti=false]{pagesLTS}|,\\ +% if the behaviour of the \textsf{lastpage} package should be simulated. +% Using the \textsf{lastpage} before the \textsf{pagesLTS} before the +% \textsf{hyperref} [2010/04/17, v6.80x; probably an update will be issued] +% package results in multiply definitions of the |LastPage| label. +% +% \subsection{Using an unknown page numbering scheme\label{sec:unknown}} +% +% \indent I do not know whether \LaTeXe\ can handle another page numbering +% scheme (e.\,g.~hebraic), but if you want to use it, this should be +% no problem for the \textsf{pagesLTS} package. But the original +% |\pagenumbering{...}| as well as the \textsf{hyperref} package +% (if~used) might want to vote against it, especially when used +% together with the \textsf{pagesLTS} package. +% Especially especially (\textit{sic}!) if the last page uses +% this new page numbering scheme, you should check everything +% double (at least).\\ +% (And if the number format is unknown to \LaTeX, the pages will have +% no number, and therefore cannot be referenced. You might be able to +% help yourself by using the \textsf{hyperref} package and +% manually placing |\hypertarget|s and |\href|s.) +% +% \subsection{Page counter overflow\label{ss:overflow}} +% +% \indent Without the use of the \textsf{alphalph} package, the\\ +% \textquotedblleft ranges of supported counter values are more or less +% restricted. Only \cs{arabic} can be used with any counter +% value \TeX\ supports. +% \begin{quote} +% \catcode`\|=12 % +% \begin{tabular}{@{}l|l|l|l@{}} +% Presentation & Supported & Ignored & Error message\\ +% command & domain & values & `Counter too large'\\ +% \hline +% \cs{arabic} +% & \ttfamily -MAX..MAX & &\\ +% \cs{roman}, \cs{Roman} +% & \ttfamily 1..MAX & \ttfamily -MAX..0 &\\ +% \cs{alph}, \cs{Alph} +% & \ttfamily 1..26 & 0 & \ttfamily -MAX..-1, 27..MAX\\ +% \cs{fnsymbol} +% & \ttfamily 1..9 & 0 & \ttfamily -MAX..-1, 10..MAX\\ +% \hline +% \end{tabular}\\[1ex] +% \texttt{MAX} = \texttt{2147483647} +% \end{quote} +% \textquotedblright\ (Heiko Oberdiek: +% The \textsf{alphalph} package, 2010/04/18, v2.3, first table, p.~2).\\ +% Please see subsubsections~\ref{sss:alphalph} and +% \ref{sss:romanMult} for instructions how to overcome +% these limitations. +% +% \newpage +% +% \subsection{Using the \textsf{fnsymbol} page numbering scheme\label{ss:fnsymbol}} +% +% \indent Using the \texttt{fnsymbol} page numbering scheme can result in +% problems -- big ones!\\ +% \textbf{When using this page numbering scheme,% +% it is very important to use}\ |\lastpageref{...}| \textbf{instead of}\ % +% |\pageref{...}| \textbf{for any link to any label provided by the% +% \textsf{pagesLTS} package.}\\ +% While the \textsf{pagesLTS} package tries really very hard +% to circumvent any problem, other packages might skrew up -- +% and quite totally for that. So, you have been warned!\\ +% +% \begin{description} +% \item[-] There can be a counter overflow, see preceding subsection~\ref{ss:overflow}. +% +% \item[-] Adobe Acrobat Reader 9.3.1 does not show the correct page names +% for all pages with \texttt{fnsymbol} page numbering scheme: +% +% \begin{center} +% \begin{tabular}{c|c|c|c} +% page number & page name & shown by the Reader & with \textsf{alphalph} package and with \\ +% & & & \textsf{pagesLTS} package with |fnsymbolmult| option \\ \hline +% $-1$ & \texttt{LaTeX Error} & & \ensuremath {- *} \\ +% $0$ & (ignored by \LaTeX) & & 0 \\ +% $1$ & \ensuremath {*} & * & \ensuremath {*} \\ +% $2$ & \ensuremath {\dagger } & & \ensuremath {\dagger } \\ +% $3$ & \ensuremath {\ddagger } & & \ensuremath {\ddagger } \\ +% $4$ & \ensuremath {\mathsection } & & \ensuremath {\mathsection } \\ +% $5$ & \ensuremath {\mathparagraph } & & \ensuremath {\mathparagraph } \\ +% $6$ & \ensuremath {\delimiter "026B30D } & "026B30D & \ensuremath {**} \\ +% $7$ & \ensuremath {**} & ** & \ensuremath {\dagger \dagger } \\ +% $8$ & \ensuremath {\dagger \dagger } & & \ensuremath {\ddagger \ddagger } \\ +% $9$ & \ensuremath {\ddagger \ddagger } & & \ensuremath {\mathsection \mathsection } \\ +% $10$ & \texttt{LaTeX Error} & & \ensuremath {\mathparagraph \mathparagraph } \\ +% $11$ & \texttt{LaTeX Error} & & \ensuremath {***} \\ +% $12$ & \texttt{LaTeX Error} & & \ensuremath {\dagger \dagger \dagger } \\ +% \end{tabular} +% \end{center} +% +% \noindent and so on, while at least the (\ldots\ of \ldots ) +% part of the page number is displayed correctly (see +% page~\pageref{logical page numbers}, tip about logical page numbers). +% When the \textsf{alphalph} package and the \textsf{pagesLTS} package with +% |fnsymbolmult| option are used, page names like +% \ensuremath {- *}, 0, \ensuremath {*}, \ensuremath {**} are +% also presented correctly by the Reader. +% \end{description} +% +% \newpage +% +% \section{Alternatives\label{sec:Alternatives}} +% +% There are similar packages, which do (or do not) similar +% things. As I neither know what exactly you want to accomplish +% when using this package (e.\,g.~page number vs. page name, +% hyperlinks or not), nor what resources you have (e.\,g.~\eTeX), +% here is a list of some possible alternatives:\\ +% +% \DescribeMacro{lastpage209.sty} +% \begin{description} +% \item[-] If \LaTeX2.09\ is still used, and if you are unable +% to switch to \LaTeXe, the \LaTeX2.09\ compatible +% \textsf{lastpage209.sty} of Jeffrey P. Goldberg +% (jeffrey+news at goldmark dot org) can be used, +% which is defined as follows:\\ +% (You can get it also by un-commenting the\\ +% \texttt{\%\% \textbackslash file\{lastpage209.sty\}\{\textbackslash from\{pagesLTS.dtx\}\{lastpage209\}\}\% }\\ +% line in the \xfile{pagesLTS.ins} file and running\\ +% |tex pagesLTS.ins|.) +% +% \begin{macrocode} +%<*lastpage209> + % FOR LaTeX 2.09 ONLY - FOR LaTeX 2e USE lastpage.sty OR pagesLTS.sty! + % This is lastpage209.sty by Jeffrey P. Goldberg (jeffrey+news at goldmark dot org). +\let\origenddocument=\enddocument +\def\enddocument{\clearpage + {\addtocounter{page}{-1} + \immediate\write\@mainaux + {\string\newlabel{LastPage}{{}{\thepage}}}} + \addtocounter{page}{+1} + \origenddocument% + } +%</lastpage209> +% \end{macrocode} +% +% (after Piet van Oostrum: Page layout in \LaTeX, March~2, 2004, +% section~16; fancyhdr.pdf). Because |\enddocument| is redefined, +% similar problems as with the old version of the \textsf{endfloat} +% package (see subsection~\ref{sec:endfloat}) will arise.\\ +% The \textsf{lastpage209} style only provides the |LastPage| +% label - nothing else!\\ +% \textbf{If possible, update to \LaTeXe!} +% \end{description} +% +% \DescribeMacro{LastPage} +% \begin{description} +% \item[-] The \textsf{LastPage} package also provides the +% \texttt{LastPage} label (but not \texttt{VeryLastPage} or +% \texttt{LastPages}). If you only want this and have a very +% limited amount of \TeX\ resources, you might want to use that +% package instead. +% \end{description} +% +% \DescribeMacro{totpages} +% \begin{description} +% \item[-] The \textsf{totpages} package provides a +% \texttt{totpages} label similar to \texttt{LastPages}, +% but |\AtEndDocument| instead of |\AfterLastShipout|. Therefore +% you should stay with \textsf{pagesLTS}. The \textsf{totpages} +% package additionally computes the number of paper sheets needed to +% (double) print the document (with one, two, three,\ldots\ pages +% on one sheet of paper). +% \end{description} +% +% \pagebreak +% +% \DescribeMacro{nofm.sty} +% \begin{description} +% \item[-] \textquotedblleft There is a package \textsf{nofm.sty} +% available, but some versions of it are defective, and most +% don't work with \textsf{fancyhdr} because they take over the +% complete page layout.\textquotedblright (Piet van Oostrum: +% Page layout in \LaTeX, March~2, 2004, section~16; fancyhdr.pdf)\\ +% \textsf{nofm} as of 1991/02/25 (without version number), available at\\ +% \url{ftp://tug.ctan.org/pub/tex-archive/obsolete/macros/latex209/contrib/misc/nofm.sty},\\ +% does not work with e.\,g. \textsf{hyperref}, redefines |\enddocument| +% as well as |\@oddhead|, |\@evenhead|, |\@oddfoot|, and |\@evenfoot|.\\ +% If you know the (\CTAN{}) location of a \textbf{working}~(!) version, +% please send me an e-mail, thanks! +% \end{description} +% +% \DescribeMacro{count1to} +% \begin{description} +% \item[-] You may want to have a look at the \textsf{count1to} package. +% \end{description} +% +% \DescribeMacro{zref} +% \begin{description} +% \item[-] The \textsf{zref} package of Heiko Oberdiek requires +% \eTeX. \textsf{pagesLTS} does not require \eTeX, but if you +% already have \eTeX, you may have a look at the extensive +% \textsf{zref} package, whether it suits your needs better +% (or additionally or whatsoever). +% \end{description} +% +% \bigskip +% +% \noindent (You programmed or found another alternative, +% which is available at \CTAN{}?\\ +% OK, send an e-mail to me with the name, location at \CTAN{}, +% and a short notice, and I will probably include it in +% the list above.)\\ +% +% \smallskip +% +% \noindent About how to get those packages, please see subsection~\ref{ss:Downloads}. +% +% \newpage +% +% \section{Example} +% +% \begin{macrocode} +%<*example> +\documentclass[british]{article} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage{alphalph}[2010/04/18]% v2.3 +\usepackage{lipsum}[2005/01/26]% v1.0 +\usepackage[draft]{showkeys}[2007/08/07]% v3.15 +%% Use final instead of draft to hide the keys. %% +\usepackage{hyperref}[2010/05/13]% v6.81e +\hypersetup{% + extension=pdf,% + plainpages=false,% + pdfpagelabels=true,% + hyperindex=false,% + pdflang={en},% + pdftitle={pagesLTS package example},% + pdfauthor={Hans-Martin Muench},% + pdfsubject={Example for the pagesLTS package},% + pdfkeywords={LaTeX, pagesLTS, Hans-Martin Muench},% + pdfview=Fit,% + pdfstartview=Fit,% + pdfpagelayout=SinglePage,% + bookmarksopen=true% +} +\usepackage[pagecontinue=true,alphMult=ab,AlphMulti=AB,fnsymbolmult=true,romanMult=true,RomanMulti=true]{pagesLTS}[2010/06/03]% v1.1b +%% These are the default options. %% +\makeatletter + \renewcommand{\@evenfoot}% + {Page \thepage\ (\theCurrentPage; local: \theCurrentPageLocal) of % + \lastpageref{pagesLTS.roman}(\lastpageref{pagesLTS.roman.local}) + % + \lastpageref{pagesLTS.Roman}(\lastpageref{pagesLTS.Roman.local}) + % + \lastpageref{pagesLTS.arabic}(\lastpageref{pagesLTS.arabic.local}) + % + \lastpageref{pagesLTS.fnsymbol}(\lastpageref{pagesLTS.fnsymbol.local}) + % + \lastpageref{pagesLTS.alph}(\lastpageref{pagesLTS.alph.local}) + % + \lastpageref{pagesLTS.Alph}(\lastpageref{pagesLTS.Alph.local}) = % + \lastpageref{LastPages} pages.% + } + \renewcommand{\@oddfoot}{\@evenfoot} + \newcounter{pagesLTS.exampleArabic} + \setcounter{pagesLTS.exampleArabic}{3} + \newcounter{pagesLTS.examplealph} + \setcounter{pagesLTS.examplealph}{23} +%% Code from tcilatex.tex, Macros for Scientific Word and Scientific WorkPlace 5.5 <06 Oct 2005> %% +%% Copyright (C) 2005 Mackichan Software, Inc. %% +%% That macro file is NOT proprietary and may be freely copied and distributed. %% + \def\unit#1{\mathord{\thinspace\rm #1}}% +%% End of code from tcilatex.tex %% +\makeatother +\listfiles +\begin{document} +\pagenumbering{roman} +%% Note the first \pagenumbering immediately behind \begin{document}. %% + +%%\addtocounter{page}{-2} %% + +\section*{Example for pagesLTS} +\addcontentsline{toc}{section}{Example for pagesLTS} +\markboth{Example for pagesLTS}{Example for pagesLTS} + +This example demonstrates the most common uses of package\\ +\textsf{pagesLTS}, v1.1b as of 2010/06/03 (HMM).\\ +The used options were \texttt{pagecontinue=true}, +\texttt{alphMult=ab}, \texttt{AlphMulti=AB}, \linebreak +\texttt{fnsymbolmult=true}, +\texttt{romanMult=true}, and \texttt{RomanMulti=true} +(the default ones).\\ +For more details please see the documentation!\\ + +\label{keys} To hide the \pageref{keys}{\qquad } use option +\texttt{final} instead of \texttt{draft} with the \textsf{showkeys} +package (or remove the package call from the preamble of +this document).\\ + +\textbf{Trademarks} appear throughout this example without any +trademark symbol; they are the property of their respective +trademark owner. There is no intention of infringement; the +usage is to the benefit of the trademark owner.\\ + +\textbf{Tip}: Use \textit{logical page numbers} for +the display of the pdf!\\ +(In Adobe Reader 9.3.1: \underline{E}dit $>$ +Prefere\underline{n}ces (Ctrl+k) $>$ Page Display $>$ +Page Content and Information $>$ Use logical page +\nolinebreak{\underline{n}umbers.)}\\ + +You want negative page numbers? Not only arabic, but even roman, +Roman, alph, Alph or fnsymbol ones? No problem, e.\,g. just give a\\ +\texttt{\textbackslash addtocounter\{page\}\{- \textit{some number}\}} +in the source code of this example file (or uncomment the prepared +line)! + +\bigskip + +Save per page about $200\unit{ml}$ water, $2\unit{g}$ CO$_{2}$ +and $2\unit{g}$ wood:\\ +Therefore please print only if this is really necessary. + +\newpage + +\tableofcontents + +\newpage + +\pagenumbering{roman} + % in case the page numbering is changed before, + % otherwise pagesLTS.current.local.roman on this page + % would be undefined + +\section{roman} + +\noindent (\texttt{roman} page numbering was started before, +becaue the page numbering scheme was needed to start at +the first page, of course.)\\ + +\noindent First page (\texttt{\textbackslash lastpageref\{pagesLTS.0\}}): +\lastpageref{pagesLTS.0}\\ + +\noindent The page (\texttt{\textbackslash thepage}): \thepage \\ + +\noindent Current page (\texttt{\textbackslash theCurrentPage}), +i.\,e. counted continuously from the first page): \theCurrentPage \\ +You can get this also in other formats: +\roman{CurrentPage}, \Roman{CurrentPage}, \arabic{CurrentPage}, +\fnsymbol{CurrentPage}, \alph{CurrentPage}, \Alph{CurrentPage}. + +\noindent CurrentPageLocal (\texttt{\textbackslash theCurrentPageLocal}), +i.\,e. counted continuously from the first page of the +current page numbering sheme): \theCurrentPageLocal \\ +You can get also this in other formats, too: +\roman{pagesLTS.current.local.roman}, \Roman{pagesLTS.current.local.roman}, +\arabic{pagesLTS.current.local.roman}, \fnsymbol{pagesLTS.current.local.roman}, +\alph{pagesLTS.current.local.roman}, \Alph{pagesLTS.current.local.roman}, +but probably it only makes sense if page numbering scheme and format are +the same, e.\,g.\\ +\texttt{\textbackslash Roman\{pagesLTS.current.local.Roman\}}\\ +or \texttt{\textbackslash Alph\{pagesLTS.current.local.Alph\}}.\ % +\texttt{\textbackslash arabic\{\ldots \}}\ could make sense +even if combined with another page numbering scheme. +And this is exactly what \texttt{\textbackslash theCurrentPageLocal} does:\\ +\nolinebreak{\texttt{\textbackslash def\textbackslash theCurrentPageLocal% +\{\textbackslash arabic\{pagesLTS.current.local.\textbackslash pagesLTS@pnc\}\}}.}\\ + +\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em } +(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\ + +\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em } +(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\ +\lastpages{Roman}{1}~pages in the first Roman sector +(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\ +\lastpages{Roman}{2}~pages in the second Roman sector +(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\ +\lastpages{Roman}{3}~pages in the third Roman sector +(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\ + +When the option \texttt{pagecontinue=false} is used with the +\textsf{pagesLTS} package, the +\texttt{\textbackslash lastpageref\{pagesLTS.Roman\}} will point +to the same page as before, but this will have a lower number.\\ +The \texttt{\textbackslash lastpageref\{pagesLTS.Roman.local\}} +will not change, because the number of pages does not change +(only the page numbers).\\ + +\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em } +(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.exampleArabic}\}} was used.)\\ + +\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\ +(\texttt{\textbackslash lastpageref\{pagesLTS.fnsymbol\}} -- never +\texttt{\textbackslash pageref\{pagesLTS.fnsymbol\}}!)\\ +(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\ + +\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em } +(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.examplealph}\}} was used.)\\ + +\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em } +(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\ + +\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\ + +\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\ +(\texttt{lastpage} and \texttt{VeryLastPage} are identical, unless +a package with output \linebreak +\texttt{\textbackslash AtEndDocument} after the \textsf{pagesLTS} package +was added.)\\ + +\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em } +(=~total number of pages)\\ + +\lipsum[1-3] + +\newpage + +\pagenumbering{Roman} + +\section{Roman\label{Roman}} +\subsection{Common Roman page numbering} + +\noindent First page (\texttt{\textbackslash lastpageref\{pagesLTS.0\}}): +\lastpageref{pagesLTS.0}\\ + +\noindent The page (\texttt{\textbackslash thepage}): \thepage \\ + +\noindent Current page (\texttt{\textbackslash theCurrentPage}), +i.\,e. counted continuously from the first page): \theCurrentPage \\ + +\noindent CurrentPageLocal (\texttt{\textbackslash theCurrentPageLocal}), +i.\,e. counted continuously from the first page of the +current page numbering sheme): \theCurrentPageLocal \\ + +\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em } +(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\ + +\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em } +(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\ +\lastpages{Roman}{1}~pages in the first Roman sector +(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\ +\lastpages{Roman}{2}~pages in the second Roman sector +(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\ +\lastpages{Roman}{3}~pages in the third Roman sector +(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\ + +\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em } +(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.exampleArabic}\}} was used.)\\ + +\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\ +(\texttt{\textbackslash lastpageref\{pagesLTS.fnsymbol\}} -- never +\texttt{\textbackslash pageref\{pagesLTS.fnsymbol\}}!)\\ +(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\ + +\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em } +(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.examplealph}\}} was used.)\\ + +\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em } +(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\ + +\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\ + +\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\ +(\texttt{LastPage} and \texttt{VeryLastPage} are identical, unless +a package with output \linebreak +\texttt{\textbackslash AtEndDocument} after the \textsf{pagesLTS} package +was added.)\\ + +\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em } +(=~total number of pages)\\ + +\lipsum[1-4] + +\newpage + +\subsection{Last page of first Roman sector} +\texttt{\textbackslash lastpageref\{pagesLTS.Roman\}} does \textbf{not} +refer to this page (but there: \lastpageref{pagesLTS.Roman}), +because the option \texttt{pagecontinue=true} +was chosen. When a reference to this page is wanted,\\ +\texttt{\textbackslash lastpageref\{pagesLTS.Roman.1\}} +can be used: \lastpageref{pagesLTS.Roman.1}.\\ + +\bigskip +There are \lastpages{Roman}{1}~pages +(\texttt{\textbackslash lastpages\{Roman\}\{1\}}) +in this first Roman sector.\\ +The Roman page numbering scheme is continued later in +section~\ref{Roman2})! + +\newpage + +\pagenumbering{arabic} + +\section{arabic} + +\subsection{Standard page numbering} + +\noindent First page (\texttt{\textbackslash lastpageref\{pagesLTS.0\}}): +\lastpageref{pagesLTS.0}\\ + +\noindent The page (\texttt{\textbackslash thepage}): \thepage \\ + +\noindent Current page (\texttt{\textbackslash theCurrentPage}), +i.\,e. counted continuously from the first page): \theCurrentPage \\ + +\noindent CurrentPageLocal (\texttt{\textbackslash theCurrentPageLocal}), +i.\,e. counted continuously from the first page of the +current page numbering sheme): \theCurrentPageLocal \\ + +\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em } +(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\ + +\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em } +(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\ +\lastpages{Roman}{1}~pages in the first Roman sector +(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\ +\lastpages{Roman}{2}~pages in the second Roman sector +(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\ +\lastpages{Roman}{3}~pages in the third Roman sector +(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\ + +\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em } +(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.exampleArabic}\}} was used.)\\ + +\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\ +(\texttt{\textbackslash lastpageref\{pagesLTS.fnsymbol\}} -- never +\texttt{\textbackslash pageref\{pagesLTS.fnsymbol\}}!)\\ +(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\ + +\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em } +(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.examplealph}\}} was used.)\\ + +\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em } +(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\ + +\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\ + +\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\ +(\texttt{LastPage} and \texttt{VeryLastPage} are identical, unless +a package with output \linebreak +\texttt{\textbackslash AtEndDocument} after the \textsf{pagesLTS} package +was added.)\\ + +\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em } +(=~total number of pages)\\ + +\lipsum[1-4] +\newpage + +\subsection[Empty page style]{Also an empty page style is no problem\ % +for the current or total page count} + +\bigskip + +\thispagestyle{empty} + +\noindent First page (\texttt{\textbackslash lastpageref\{pagesLTS.0\}}): +\lastpageref{pagesLTS.0}\\ + +\noindent The page (\texttt{\textbackslash thepage}): \thepage \\ + +\noindent Current page (\texttt{\textbackslash theCurrentPage}), +i.\,e. counted continuously from the first page): \theCurrentPage \\ + +\noindent CurrentPageLocal (\texttt{\textbackslash theCurrentPageLocal}), +i.\,e. counted continuously from the first page of the +current page numbering sheme): \theCurrentPageLocal \\ + +\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em } +(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\ + +\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em } +(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\ +\lastpages{Roman}{1}~pages in the first Roman sector +(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\ +\lastpages{Roman}{2}~pages in the second Roman sector +(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\ +\lastpages{Roman}{3}~pages in the third Roman sector +(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\ + +\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em } +(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.exampleArabic}\}} was used.)\\ + +\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\ +(\texttt{\textbackslash lastpageref\{pagesLTS.fnsymbol\}} -- never +\texttt{\textbackslash pageref\{pagesLTS.fnsymbol\}}!)\\ +(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\ + +\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em } +(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.examplealph}\}} was used.)\\ + +\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em } +(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\ + +\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\ + +\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\ +(\texttt{LastPage} and \texttt{VeryLastPage} are identical, unless +a package with output \linebreak +\texttt{\textbackslash AtEndDocument} after the \textsf{pagesLTS} package +was added.)\\ + +\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em } +(=~total number of pages)\\ + +\lipsum[1-4] + +\newpage + +\subsection[addtocounter, setcounter]{Neither\ % +\texttt{\textbackslash addtocounter\{page\}} or\ % +\texttt{\textbackslash setcounter\{page\}} is a problem for the\ % +current or total page numbers} + +(Here is an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.exampleArabic}\}} +in the source code.)\\ +\addtocounter{page}{\value{pagesLTS.exampleArabic}} + +\noindent The page (from \texttt{\textbackslash thepage} command): \thepage \\ + +\noindent Current page (from \texttt{\textbackslash theCurrentPage}\ % +command), i.\,e. counted continuously from the first page): \theCurrentPage \\ + +\noindent CurrentPageLocal (from \texttt{\textbackslash theCurrentPageLocal}\ % +command), i.\,e. counted continuously from the first page of the +current page numbering sheme): \theCurrentPageLocal\\ + +\noindent Last page's number (LastPages): \lastpageref{LastPages}{\hskip3em } +(= total number of pages)\\ + +\lipsum[1-7] + +\newpage + +\pagenumbering{fnsymbol} + +\section{fnsymbol} + +Adobe Acrobat Reader 9.3.1 does not show the correct page names +for all pages with \texttt{fnsymbol} page numbering scheme: + +\begin{tabular}{c|c|c|c} +page number & page name & shown by the Reader & \textsf{alphalph} \\ \hline +$-1$ & \texttt{LaTeX Error} & & \ensuremath {- *} \\ + $0$ & (ignored by \LaTeX) & & 0 \\ + $1$ & \ensuremath {*} & * & \ensuremath {*} \\ + $2$ & \ensuremath {\dagger } & & \ensuremath {\dagger } \\ + $3$ & \ensuremath {\ddagger } & & \ensuremath {\ddagger } \\ + $4$ & \ensuremath {\mathsection } & & \ensuremath {\mathsection } \\ + $5$ & \ensuremath {\mathparagraph } & & \ensuremath {\mathparagraph } \\ + $6$ & \ensuremath {\delimiter "026B30D } & "026B30D & \ensuremath {**} \\ + $7$ & \ensuremath {**} & ** & \ensuremath {\dagger \dagger } \\ + $8$ & \ensuremath {\dagger \dagger } & & \ensuremath {\ddagger \ddagger } \\ + $9$ & \ensuremath {\ddagger \ddagger } & & \ensuremath {\mathsection \mathsection } \\ +$10$ & \texttt{LaTeX Error} & & \ensuremath {\mathparagraph \mathparagraph } \\ +$11$ & \texttt{LaTeX Error} & & \ensuremath {***} \\ +$12$ & \texttt{LaTeX Error} & & \ensuremath {\dagger \dagger \dagger } \\ +\end{tabular} + +\noindent and so on, while at least the (\ldots\ of \ldots ) part +of the page number is displayed correctly.\\ + +\bigskip + +Without option \texttt{fnsymbolmult=true} of the \textsf{pagesLTS} package +(and the help of Heiko Oberdiek's \textsf{alphalph} package), +after page~9 +(\textquotedblleft \ensuremath {\ddagger \ddagger }\textquotedblright ) +(and also for negative page numbers) there would just appear a +\begin{quote} +\begin{verbatim} +LaTeX Error: Counter too large +See the LaTeX manual or LaTeX Companion for explanation. +You've lost some text. Try typing <return> to proceed. +If that doesn't work, type X <return> to quit. +\end{verbatim} +\end{quote} +Now the page numbers after 5 (\ensuremath {\mathparagraph }) are +continued with the doubled \textquotedblleft number\textquotedblright\ of +the first, second, third,\ldots\ page (\ensuremath {**}, +\ensuremath {\dagger \dagger }, \ensuremath {\ddagger \ddagger }, +\ensuremath {\mathsection \mathsection }, +\ensuremath {\mathparagraph \mathparagraph }), +and after the tenth page the \textquotedblleft number\textquotedblright\ is +tripled (\ensuremath {***}, \ensuremath {\dagger \dagger \dagger },\ldots). +Page zero is named 0 and negative pages just named like the positive ones +with addition of a minus sign~($-$). + +\bigskip + +\noindent First page (\texttt{\textbackslash lastpageref\{pagesLTS.0\}}): +\lastpageref{pagesLTS.0}\\ + +\noindent The page (\texttt{\textbackslash thepage}): \thepage \\ + +\noindent Current page (\texttt{\textbackslash theCurrentPage}), +i.\,e. counted continuously from the first page): \theCurrentPage \\ + +\noindent CurrentPageLocal (\texttt{\textbackslash theCurrentPageLocal}), +i.\,e. counted continuously from the first page of the +current page numbering sheme): \theCurrentPageLocal \\ + +\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em } +(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\ + +\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em } +(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\ +\lastpages{Roman}{1}~pages in the first Roman sector +(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\ +\lastpages{Roman}{2}~pages in the second Roman sector +(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\ +\lastpages{Roman}{3}~pages in the third Roman sector +(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\ + +\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em } +(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.exampleArabic}\}} was used.)\\ + +\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\ +(\texttt{\textbackslash lastpageref\{pagesLTS.fnsymbol\}} -- never +\texttt{\textbackslash pageref\{pagesLTS.fnsymbol\}}!)\\ +(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\ + +\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em } +(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.examplealph}\}} was used.)\\ + +\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em } +(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\ + +\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\ + +\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\ +(\texttt{LastPage} and \texttt{VeryLastPage} are identical, unless +a package with output \linebreak +\texttt{\textbackslash AtEndDocument} after the \textsf{pagesLTS} package +was added.)\\ + +\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em } +(=~total number of pages)\\ + +\lipsum[1-60] + +\newpage + +\pagenumbering{Roman} + +\section{Roman - again!\label{Roman2}} + +The page number would start with +\textquotedblleft I\textquotedblright\ again -- but +for the \textsf{pagesLTS} package (with option \texttt{pagecontinue=true}, +or with option just \texttt{pagecontinue}, or even just +\nolinebreak{with\textbf{out}} option \texttt{pagecontinue=false}). +This package remembered the +(\arabic{pagesLTS.double.Roman}-1)\footnote{OK, here\ % +you have to compute this value for yourself, but\ % +subtracting one should be managable for \TeX nicians.} pages already +done in Roman output, and therefore continues with page +\textquotedblleft \thepage \textquotedblright .\\ +If you want to start with \textquotedblleft I\textquotedblright\ all +over again, you will have two pages with the same name, +but nevertheless you can do this by using option \texttt{pagecontinue=false} +or a \texttt{\textbackslash setcounter\{page\}\{1\}}\ here +(not demonstrated in this example file).\\ + +\noindent First page (\texttt{\textbackslash lastpageref\{pagesLTS.0\}}): + \lastpageref{pagesLTS.0}\\ + +\noindent The page (\texttt{\textbackslash thepage}): \thepage \\ + +\noindent Current page (\texttt{\textbackslash theCurrentPage}), +i.\,e. counted continuously from the first page): \theCurrentPage \\ + +\noindent CurrentPageLocal (\texttt{\textbackslash theCurrentPageLocal}), +i.\,e. counted continuously from the first page of the +current page numbering sheme): \theCurrentPageLocal \\ + +\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em } +(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\ + +\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em } +(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\ +\lastpages{Roman}{1}~pages in the first Roman sector +(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\ +\lastpages{Roman}{2}~pages in the second Roman sector +(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\ +\lastpages{Roman}{3}~pages in the third Roman sector +(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\ + +\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em } +(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.exampleArabic}\}} was used.)\\ + +\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\ +(\texttt{\textbackslash lastpageref\{pagesLTS.fnsymbol\}} -- never +\texttt{\textbackslash pageref\{pagesLTS.fnsymbol\}}!)\\ +(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\ + +\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em } +(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.examplealph}\}} was used.)\\ + +\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em } +(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\ + +\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\ + +\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\ +(\texttt{LastPage} and \texttt{VeryLastPage} are identical, unless +a package with output \linebreak +\texttt{\textbackslash AtEndDocument} after the \textsf{pagesLTS} package +was added.)\\ + +\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em } +(=~total number of pages)\\ + +\lipsum[1-6] + +\newpage + +\texttt{\textbackslash lastpageref\{pagesLTS.Roman\}} does \textbf{not} +refer to this page (but there: \lastpageref{pagesLTS.Roman}), +because the option \texttt{pagecontinue=true} +was chosen. When a reference to this page is wanted,\\ +\texttt{\textbackslash lastpageref\{pagesLTS.Roman.2\}} +can be used: \lastpageref{pagesLTS.Roman.2}.\\ + +\bigskip +There are \lastpages{Roman}{2}~pages +(\texttt{\textbackslash lastpages\{Roman\}\{2\}}) +in this second Roman sector.\\ +The Roman page numbering scheme is continued later in +section~\ref{Roman3})! + +\newpage + +\pagenumbering{alph} + +\section{alph\label{alph}} + +\noindent First page (\texttt{\textbackslash lastpageref\{pagesLTS.0\}}): + \lastpageref{pagesLTS.0}\\ + +\noindent The page (\texttt{\textbackslash thepage}): \thepage \\ + +\noindent Current page (\texttt{\textbackslash theCurrentPage}), +i.\,e. counted continuously from the first page): \theCurrentPage \\ + +\noindent CurrentPageLocal (\texttt{\textbackslash theCurrentPageLocal}), +i.\,e. counted continuously from the first page of the +current page numbering sheme): \theCurrentPageLocal \\ + +\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em } +(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\ + +\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em } +(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\ +\lastpages{Roman}{1}~pages in the first Roman sector +(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\ +\lastpages{Roman}{2}~pages in the second Roman sector +(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\ +\lastpages{Roman}{3}~pages in the third Roman sector +(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\ + +\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em } +(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.exampleArabic}\}} was used.)\\ + +\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\ +(\texttt{\textbackslash lastpageref\{pagesLTS.fnsymbol\}} -- never +\texttt{\textbackslash pageref\{pagesLTS.fnsymbol\}}!)\\ +(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\ + +\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em } +(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.examplealph}\}} was used.)\\ + +\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em } +(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\ + +\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\ + +\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\ +(\texttt{LastPage} and \texttt{VeryLastPage} are identical, unless +a package with output \linebreak +\texttt{\textbackslash AtEndDocument} after the \textsf{pagesLTS} package +was added.)\\ + +\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em } +(=~total number of pages)\\ + +\lipsum[1-4] + +\newpage + +Without option \texttt{alphMult=ab} of the \textsf{pagesLTS} (and the help of +Heiko Oberdiek's \textsf{alphalph} package), after page +\textquotedblleft z\textquotedblright\ there would just appear a +\begin{quote} +\begin{verbatim} +LaTeX Error: Counter too large +See the LaTeX manual or LaTeX Companion for explanation. +You've lost some text. Try typing <return> to proceed. +If that doesn't work, type X <return> to quit. +\end{verbatim} +\end{quote} +Now the page numbers are continued aa, ab, ac,\ldots\ (aa, bb, cc,\ldots\ is +also possible, see the \textsf{pagesLTS} documentation).\\ +To demonstrate this, we add a\\ +\texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.examplealph}\}}\\ +in the source code here. + +\addtocounter{page}{\arabic{pagesLTS.examplealph}} + +\bigskip + +\lipsum[1-18] + +\newpage + +\pagenumbering{Roman} + +\section{Roman - third time!\label{Roman3}} + +The page number would start with +\textquotedblleft I\textquotedblright\ again -- but +for the \textsf{pagesLTS} package (with option \texttt{pagecontinue=true}, +or with option just \texttt{pagecontinue}, or even just +\nolinebreak{with\textbf{out}} option \texttt{pagecontinue=false}). +This package remembered the +(\arabic{pagesLTS.double.Roman}-1)\footnote{OK, here\ % +you have to compute this value for yourself, but\ % +subtracting one should be managable for \TeX nicians.} pages already +done in Roman output, and therefore continues with page +\textquotedblleft \thepage \textquotedblright .\\ +If you want to start with \textquotedblleft I\textquotedblright\ all +over again, you will have (at least) two pages with the same name, +but nevertheless you can do this by using option +\texttt{pagecontinue=false} instead of \texttt{pagecontinue=true} +(not demonstrated here).\\ + +\noindent First page (\texttt{\textbackslash lastpageref\{pagesLTS.0\}}): + \lastpageref{pagesLTS.0}\\ + +\noindent The page (\texttt{\textbackslash thepage}): \thepage \\ + +\noindent Current page (\texttt{\textbackslash theCurrentPage}), +i.\,e. counted continuously from the first page): \theCurrentPage \\ + +\noindent CurrentPageLocal (\texttt{\textbackslash theCurrentPageLocal}), +i.\,e. counted continuously from the first page of the +current page numbering sheme): \theCurrentPageLocal \\ + +\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em } +(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\ + +\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em } +(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\ +\lastpages{Roman}{1}~pages in the first Roman sector +(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\ +\lastpages{Roman}{2}~pages in the second Roman sector +(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\ +\lastpages{Roman}{3}~pages in the third Roman sector +(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\ + +\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em } +(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.exampleArabic}\}} was used.)\\ + +\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\ +(\texttt{\textbackslash lastpageref\{pagesLTS.fnsymbol\}} -- never +\texttt{\textbackslash pageref\{pagesLTS.fnsymbol\}}!)\\ +(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\ + +\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em } +(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.examplealph}\}} was used.)\\ + +\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em } +(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\ + +\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\ + +\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\ +(\texttt{LastPage} and \texttt{VeryLastPage} are identical, unless +a package with output \linebreak +\texttt{\textbackslash AtEndDocument} after the \textsf{pagesLTS} package +was added.)\\ + +\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em } +(=~total number of pages)\\ + +\lipsum[1-3] + +\newpage + +\lastpageref{pagesLTS.Roman} +(\texttt{\textbackslash lastpageref\{pagesLTS.Roman\}}) +\textbf{does} refers to this page, because the option +\texttt{pagecontinue=true} was chosen. Also\\ +\texttt{\textbackslash lastpageref\{pagesLTS.Roman.3\}} +can be used: \lastpageref{pagesLTS.Roman.3}.\\ + +\bigskip + +There are \lastpages{Roman}{3}~pages +(\texttt{\textbackslash lastpages\{Roman\}\{3\}}) +in this third Roman sector.\\ + +\newpage + +\pagenumbering{Alph} + +\section{Alph} + +\noindent First page (\texttt{\textbackslash lastpageref\{pagesLTS.0\}}): + \lastpageref{pagesLTS.0}\\ + +\noindent The page (\texttt{\textbackslash thepage}): \thepage \\ + +\noindent Current page (\texttt{\textbackslash theCurrentPage}), +i.\,e. counted continuously from the first page): \theCurrentPage \\ + +\noindent CurrentPageLocal (\texttt{\textbackslash theCurrentPageLocal}), +i.\,e. counted continuously from the first page of the +current page numbering sheme): \theCurrentPageLocal \\ + +\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em } +(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\ + +\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em } +(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\ +\lastpages{Roman}{1}~pages in the first Roman sector +(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\ +\lastpages{Roman}{2}~pages in the second Roman sector +(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\ +\lastpages{Roman}{3}~pages in the third Roman sector +(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\ + +\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em } +(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.exampleArabic}\}} was used.)\\ + +\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\ +(\texttt{\textbackslash lastpageref\{pagesLTS.fnsymbol\}} -- never +\texttt{\textbackslash pageref\{pagesLTS.fnsymbol\}}!)\\ +(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\ + +\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em } +(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.examplealph}\}} was used.)\\ + +\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em } +(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\ + +\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\ + +\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\ +(\texttt{LastPage} and \texttt{VeryLastPage} are identical, unless +a package with output \linebreak +\texttt{\textbackslash AtEndDocument} after the \textsf{pagesLTS} package +was added.)\\ + +\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em } +(=~total number of pages)\\ + +\lipsum[1-3] + +Without option \texttt{alphMulti=AB} of the \textsf{pagesLTS} (and the help of +Heiko Oberdiek's \textsf{alphalph} package), after page +\textquotedblleft Z\textquotedblright\ there would just appear a +\begin{quote} +\begin{verbatim} +LaTeX Error: Counter too large +See the LaTeX manual or LaTeX Companion for explanation. +You've lost some text. Try typing <return> to proceed. +If that doesn't work, type X <return> to quit. +\end{verbatim} +\end{quote} +Now the page numbers are continued AA, AB, AC,\ldots\ (AA, BB, CC,\ldots\ is +also possible, see the \textsf{pagesLTS} documentation).\\ +This is not demonstrated here, but see section~\ref{alph}. + +\newpage + +\section{The End} + +\noindent First page (\texttt{\textbackslash lastpageref\{pagesLTS.0\}}): + \lastpageref{pagesLTS.0}\\ + +\noindent The page (\texttt{\textbackslash thepage}): \thepage \\ + +\noindent Current page (\texttt{\textbackslash theCurrentPage}), +i.\,e. counted continuously from the first page): \theCurrentPage \\ + +\noindent CurrentPageLocal (\texttt{\textbackslash theCurrentPageLocal}), +i.\,e. counted continuously from the first page of the +current page numbering sheme): \theCurrentPageLocal \\ + +\noindent Last roman page (pagesLTS.roman): \lastpageref{pagesLTS.roman}{\hskip4em } +(There are \lastpageref{pagesLTS.roman.local} pages with roman numbers.)\\ + +\noindent Last Roman page (pagesLTS.Roman): \lastpageref{pagesLTS.Roman}{\hskip3em } +(There are \lastpageref{pagesLTS.Roman.local}~pages with Roman numbers:\\ +\lastpages{Roman}{1}~pages in the first Roman sector +(\pageref{Roman}{\hskip3em }-\lastpageref{pagesLTS.Roman.1}{\hskip3em }),\\ +\lastpages{Roman}{2}~pages in the second Roman sector +(\pageref{Roman2}{\hskip3em }-\lastpageref{pagesLTS.Roman.2}{\hskip3em }), and\\ +\lastpages{Roman}{3}~pages in the third Roman sector +(\pageref{Roman3}{\hskip3em }-\lastpageref{pagesLTS.Roman.3}{\hskip3em }).\\ + +\noindent Last arabic page (pagesLTS.arabic): \lastpageref{pagesLTS.arabic}{\hskip5em } +(There are only \lastpageref{pagesLTS.arabic.local} pages with arabic numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.exampleArabic}\}} was used.)\\ + +\noindent Last fnsymbol page (pagesLTS.fnsymbol): \lastpageref{pagesLTS.fnsymbol} \\ +(\texttt{\textbackslash lastpageref\{pagesLTS.fnsymbol\}} -- never +\texttt{\textbackslash pageref\{pagesLTS.fnsymbol\}}!)\\ +(There are \lastpageref{pagesLTS.fnsymbol.local} pages with fnsymbol numbers.)\\ + +\noindent Last alph page (pagesLTS.alph): \lastpageref{pagesLTS.alph}{\hskip4em } +(There are only \lastpageref{pagesLTS.alph.local} pages with alph numbers, +because an \texttt{\textbackslash addtocounter\{page\}\{\arabic{pagesLTS.examplealph}\}} was used.)\\ + +\noindent Last Alph page (pagesLTS.Alph): \lastpageref{pagesLTS.Alph}{\hskip4em } +(There are \lastpageref{pagesLTS.Alph.local} pages with Alph numbers.)\\ + +\noindent Last page's \textit{name} (LastPage): \lastpageref{LastPage}\\ + +\noindent Very last page's \textit{name} (VeryLastPage): \lastpageref{VeryLastPage}\\ +(\texttt{LastPage} and \texttt{VeryLastPage} are identical, unless +a package with output \linebreak +\texttt{\textbackslash AtEndDocument} after the \textsf{pagesLTS} package +was added.)\\ + +\noindent Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em } +(=~total number of pages)\\ + +\medskip + +\noindent Page \thepage\ (\theCurrentPage; local: \theCurrentPageLocal) of % +\lastpageref{pagesLTS.roman} (\lastpageref{pagesLTS.roman.local}) + % +\lastpageref{pagesLTS.Roman} (\lastpageref{pagesLTS.Roman.local}) + % +\lastpageref{pagesLTS.arabic} (\lastpageref{pagesLTS.arabic.local}) + % +\lastpageref{pagesLTS.fnsymbol} (\lastpageref{pagesLTS.fnsymbol.local}) + % +\lastpageref{pagesLTS.alph} (\lastpageref{pagesLTS.alph.local}) + % +\lastpageref{pagesLTS.Alph} (\lastpageref{pagesLTS.Alph.local}) = % +\lastpageref{LastPages} pages. + +\end{document} +%</example> +% \end{macrocode} +% +% \newpage +% +% \section{The implementation} +% +% (This and the source code of the example file are the reasons +% for printing the documentation in landscape format instead of portrait.)\\ +% +% We start off by checking that we are loading into \LaTeXe\ and +% announcing the name and version of this package. +% +% \begin{macrocode} +%<*package> +% \end{macrocode} +% +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e}[1994/06/01] +\ProvidesPackage{pagesLTS}[2010/06/03 v1.1b + Refers to special pages' numbers/names (HMM)]% + +% \end{macrocode} +% +% A short description of the \textsf{pagesLTS} package: +% +% \begin{macrocode} +%% Allow for things like\\ +%% |Page \thepage\ (\theCurrentPage; local: \theCurrentPageLocal) of % +%% \lastpageref{pagesLTS.roman}(\lastpageref{pagesLTS.roman.local}) + % +%% \lastpageref{pagesLTS.Roman}(\lastpageref{pagesLTS.Roman.local}) + % +%% \lastpageref{pagesLTS.arabic}(\lastpageref{pagesLTS.arabic.local}) + % +%% \lastpageref{pagesLTS.fnsymbol}(\lastpageref{pagesLTS.fnsymbol.local}) + % +%% \lastpageref{pagesLTS.alph}(\lastpageref{pagesLTS.alph.local}) + % +%% \lastpageref{pagesLTS.Alph}(\lastpageref{pagesLTS.Alph.local}) = % +%% \lastpageref{LastPages} pages.|\\ +%% to get\\ +%% 'Page d (57; local: 4) of ii(2) + XX(20) + *(1) + 30(30) + e(5) + C(3) = 61 pages.'. + +% \end{macrocode} +% +% For its |\AfterLastShipout| command we need the \textsf{atveryend} +% package of Heiko Oberdiek (see subsection~\ref{ss:Downloads}): +% +% \begin{macrocode} +\RequirePackage{atveryend}[2010/03/24]% v1.5 +% \end{macrocode} +% +% For its |\EveryShipout| command we need the \textsf{everyshi} +% package of Martin Schr\"oder (see subsection~\ref{ss:Downloads}): +% +% \begin{macrocode} +\RequirePackage{everyshi}[2001/05/15]%v 3.00 +% \end{macrocode} +% +% For the handling of the options we need the \textsf{kvoptions} +% package of Heiko Oberdiek (see subsection~\ref{ss:Downloads}): +% +% \begin{macrocode} +\RequirePackage{kvoptions}[2010/02/22]% v3.7 +% \end{macrocode} +% +% The \textsf{undolabl} package of H.-Martin M\"{u}nch, +% with code from Ulrich Diez, (see subsection~\ref{ss:Downloads}) +% is needed to overwrite labels, when the same page numbering scheme +% is used twice (or even more often). +% +% \begin{macrocode} +\RequirePackage{undolabl}[2010/06/03]% v1.0b +% \end{macrocode} +% +% We must not forget to give the source of |Prelim@EveryShipout|: +% +% \begin{macrocode} +%% pagesLTS package uses Prelim@EveryShipout code from the +%% prelim2e package [2009/05/29 v1.3] by Martin Schr\"{o}der, thanks! + +% \end{macrocode} +% +% About the \textsf{prelim2e} package of Martin Schr\"{o}der +% see subsection~\ref{ss:Downloads}.\\ +% +% A last information for the user(s): +% +% \begin{macrocode} +%% pagesLTS may work with earlier versions of those packages, +%% but this was not tested. Please consider updating your packages +%% to the most recent version (if they are not already the most +%% recent version). + +% \end{macrocode} +% See subsection~\ref{ss:Downloads} about how to get them.\\ +% +% The very old version~2.0 (and earlier) of the \textsf{endfloat} +% package actually redefined the |\enddocument| command, +% and so interferred drastically with the \LaTeXe\ commands which +% make use of |\AtEndDocument|. Newer versions of \textsf{endfloat} +% exists (at the time of writing this documentation: v2.4i as of 1995/10/11) +% in modern documentation form, which should be available from \CTAN{} +% (see subsection~\ref{ss:Downloads}). +% A~note is placed here, and later it is checked whether a (very) old +% \textsf{endfloat} package is in use. If it is, a warning or even +% an error message is given, depending on \textsf{endfloat} version. +% This assumes, that the old versions of endfloat at least gave +% a version date, of course. +% +% \begin{macrocode} +%% The recent version of the endfloat package is v2.4i as of 1995/10/11. +%% The pagesLTS package is not fully compatible with version 2.0 +%% (and earlier) of the endfloat package, because those versions +%% redefined the \enddocument command. + +% \end{macrocode} +% +% The options are introduced: +% +% \begin{macrocode} +\SetupKeyvalOptions{family = pagesLTS,prefix = pagesLTS@} +\DeclareBoolOption[true]{pagecontinue} % \pagesLTS@pagecontinue +\DeclareStringOption{alphMult}[ab] +\DeclareStringOption{AlphMulti}[AB] +\DeclareBoolOption[true]{romanMult} +\DeclareBoolOption[true]{RomanMulti} +\DeclareBoolOption[true]{fnsymbolmult} + +\ProcessKeyvalOptions* + +% \end{macrocode} +% +% For comparisons, zero and one are defined (|\z@| and |\@ne| +% do not work for this). +% +% \begin{macrocode} +\def\pagesLTS@zero{0} +\def\pagesLTS@one{1} + +% \end{macrocode} +% +% The traditional behaviour is a reset of the page number to one, +% each time the page numbering scheme changes. The option +% |pagecontinue| changes this to a continuation with the +% number/name following the last page number/name of the same +% page numbering scheme. The user is informed accordingly. +% +% \begin{macrocode} +\ifpagesLTS@pagecontinue% +\PackageInfo{pagesLTS}{Option pagecontinue enabled\MessageBreak% + (maybe by default):\MessageBreak% + The pagesLTS package will continue the page numbering,\MessageBreak% + when the same page numbering scheme is used twice.\MessageBreak% + If you do not want this, call pagesLTS with option\MessageBreak% + pagecontinue=false\MessageBreak% + (or use \ setcounter{page}=1).\MessageBreak% +}% +\else% +\PackageWarningNoLine{pagesLTS}{Option pagecontinue is false:\MessageBreak% + The pagesLTS package was used, but the option\MessageBreak% + pagecontinue was set to false.\MessageBreak% + If you want the page numbers to be continued,\MessageBreak% + when the same page numbering scheme is used twice,\MessageBreak% + please call pagesLTS with option pagecontinue=true,\MessageBreak% + otherwise the page number is reset to one each time\MessageBreak% + the page numbering scheme is changed.\MessageBreak% + For details please see the documentation!\MessageBreak% +}% +\fi% + +% \end{macrocode} +% +% The page number printed in \texttt{alph} or in \texttt{Alph} +% page numbering scheme had to be $>0$ and \nolinebreak{$<27$.}\ Now +% the \textsf{AlphAlph} package allows to extend the +% numbering scheme (not only for pages). Because some users +% prefer aa, ab, ac, ad,\ldots\ and some aa, bb, cc, dd,\ldots, +% both schemes can be choosen via the options. +% The \texttt{fnsymbol} page numbering scheme was restricted to values +% $>0$ and \nolinebreak{$<10$.}\ The \textsf{AlphAlph} package allows +% to extend this page numbering scheme, too. Option \texttt{fnsymbolmult} +% can be choosen with the \textsf{pagesLTS} package. +% If no extension is whished (or another extension is whished +% and implemented manually), \textsf{pagesLTS} can be called with +% options set to 0 (zero) and flase: |alphMult=0|, |AlphMulti=0|, +% |fnsymbolmult=false|. +% +% \begin{macrocode} +\def\pagesLTS@ab{ab} +\def\pagesLTS@bb{bb} +\def\pagesLTS@ABi{AB} +\def\pagesLTS@BBi{BB} +\def\pagesLTS@messageaMz{Option alphMult=0 found:\MessageBreak% + The pagesLTS package was used, but the option\MessageBreak% + alphMult was set to 0 (zero).\MessageBreak% + If you want the page numbers to be extended\MessageBreak% + after z, you have to organize this yourself now.\MessageBreak% + For automatic continuation, please use the\MessageBreak% + alphalph package and call pagesLTS\MessageBreak% + with option alphMult=ab (for aa, ab, ac, ad,...) or\MessageBreak% + with option alphMult=bb (for aa, bb, cc, dd,...).\MessageBreak% + For details please see the documentation!\MessageBreak% +} +\def\pagesLTS@messageAMiz{Option AlphMulti=0 found:\MessageBreak% + The pagesLTS package was used, but the option\MessageBreak% + AlphMulti was set to 0 (zero).\MessageBreak% + If you want the page numbers to be extended\MessageBreak% + after Z, you have to organize this yourself now.\MessageBreak% + For automatic continuation, please use the\MessageBreak% + alphalph package and call pagesLTS\MessageBreak% + with option AlphMulti=AB (for AA, AB, AC, AD,...) or\MessageBreak% + with option AlphMulti=BB (for AA, BB, CC, DD,...).\MessageBreak% + For details please see the documentation!\MessageBreak% +} +\def\pagesLTS@messagefsmz{Option fnsymbolmult is set to false:\MessageBreak% + The pagesLTS package was used, but the option\MessageBreak% + fnsymbolmult was set to false.\MessageBreak% + If you want the page numbering of the footnotesymbol\MessageBreak% + scheme to be extended using the AlphAlph package,\MessageBreak% + please call pagesLTS with option fnsymbolmult=true,\MessageBreak% + otherwise page numbers of the footnotesymbol scheme\MessageBreak% + greater than nine will need to be defined otherwise.\MessageBreak% + For details please see the documentation!\MessageBreak% +} + +\ifx\pagesLTS@alphMult\pagesLTS@ab% + \relax% +\else% + \ifx\pagesLTS@alphMult\pagesLTS@bb% + \relax% + \else% + \ifx\pagesLTS@alphMult\pagesLTS@zero% + \PackageWarningNoLine{pagesLTS}{\pagesLTS@messageaMz }% + \else% + \PackageError{pagesLTS}{Unknown option value}% + {The pagesLTS package was used with option\MessageBreak% + alphMult= \pagesLTS@alphMult . Only values\MessageBreak% + ab, bb, and 0 (zero) are valid.\MessageBreak% + The default ab is set.\MessageBreak% + For details please see the documentation!\MessageBreak% + }% + \setkeys{pagesLTS}{alphMult=ab}% + \fi% + \fi% +\fi% + +\ifx\pagesLTS@AlphMulti\pagesLTS@ABi% + \relax% +\else% + \ifx\pagesLTS@AlphMulti\pagesLTS@BBi% + \relax% + \else% + \ifx\pagesLTS@AlphMulti\pagesLTS@zero% + \PackageWarningNoLine{pagesLTS}{\pagesLTS@messageAMiz }% + \else% + \PackageError{pagesLTS}{Unknown option value}% + {The pagesLTS package was used with option\MessageBreak% + AlphMulti= \pagesLTS@AlphMulti . Only values\MessageBreak% + AB, BB, and 0 (zero) are valid.\MessageBreak% + The default AB is set.\MessageBreak% + For details please see the documentation!\MessageBreak% + }% + \setkeys{pagesLTS}{AlphMulti=AB}% + \fi% + \fi% +\fi% + +% \end{macrocode} +% +% For the roman page numbering scheme, it is just the +% choice of an extension by \textsf{pagesLTS} or not. +% +% \begin{macrocode} +\ifpagesLTS@romanMult% + \PackageInfo{pagesLTS}{Option romanMult enabled\MessageBreak% + (maybe by default):\MessageBreak% + The pagesLTS package will extend the page numbering\MessageBreak% + of the roman scheme below i with\MessageBreak% + 0, -i, -ii, -iii, -iv,...\MessageBreak% + If you do not want this, call pagesLTS with option\MessageBreak% + romanMult=false.\MessageBreak% + }% +\else% + \PackageWarningNoLine{pagesLTS}{Option romanMult is set to false:\MessageBreak% + The pagesLTS package was used, but the option\MessageBreak% + romanMult was set to false.\MessageBreak% + If you want the page numbering of the roman scheme\MessageBreak% + to be extended below i,\MessageBreak% + please call pagesLTS with option romanMult=true,\MessageBreak% + otherwise zero and negative page numbers of the\MessageBreak% + roman scheme will need to be defined otherwise.\MessageBreak% + For details please see the documentation!\MessageBreak% + }% +\fi% + +% \end{macrocode} +% +% Same for the Roman page numbering scheme. +% +% \begin{macrocode} +\ifpagesLTS@RomanMulti% + \PackageInfo{pagesLTS}{Option RomanMulti enabled\MessageBreak% + (maybe by default):\MessageBreak% + The pagesLTS package will extend the page numbering\MessageBreak% + of the Roman scheme below I with\MessageBreak% + 0, -I, -II, -III, -IV,...\MessageBreak% + If you do not want this, call pagesLTS with option\MessageBreak% + RomanMulti=false.\MessageBreak% + }% +\else% + \PackageWarningNoLine{pagesLTS}{Option RomanMulti is set to false:\MessageBreak% + The pagesLTS package was used, but the option\MessageBreak% + RomanMulti was set to false.\MessageBreak% + If you want the page numbering of the Roman scheme\MessageBreak% + to be extended below i,\MessageBreak% + please call pagesLTS with option RomanMulti=true,\MessageBreak% + otherwise zero and negative page numbers of the\MessageBreak% + Roman scheme will need to be defined otherwise.\MessageBreak% + For details please see the documentation!\MessageBreak% + }% +\fi% + +% \end{macrocode} +% +% For the footnotesymbol page numbering scheme, it is also +% just the choice of a extension by \textsf{pagesLTS} or not. +% +% \begin{macrocode} +\ifpagesLTS@fnsymbolmult% + \PackageInfo{pagesLTS}{Option fnsymbolmult enabled\MessageBreak% + (maybe by default):\MessageBreak% + The pagesLTS package will extend the page numbering\MessageBreak% + of the footnotesymbol scheme using the AlphAlph\MessageBreak% + package.\MessageBreak% + If you do not want this, call pagesLTS with option\MessageBreak% + fnsymbolmult=false.\MessageBreak% + }% +\else% + \PackageWarningNoLine{pagesLTS}{\pagesLTS@messagefsmz }% +\fi% + +% \end{macrocode} +% +% Now defining some variables, place-holders, and abbreviations: +% +% \begin{macrocode} +\def\pagesLTS@pnc{0} +\def\pagesLTS@called{0} +\def\pagesLTS@fns{fnsymbol} +\def\pagesLTS@alph{alph} +\def\pagesLTS@Alph{Alph} +\def\pagesLTS@AlphAlph{0} +\def\pagesLTS@hyper{0} +\def\pagesLTS@rerun{0} +\def\pagesLTS@eso{0} +\def\pagesLTS@esov{0} +\def\lastpageref{\lastpagereftxt} +% \end{macrocode} +% +% \newpage +% +% \begin{macrocode} +\def\pagesLTS@messageNPN{% + The pagesLTS package was used, but\MessageBreak% + \textbackslash pagenumbering\MessageBreak% + was not called at the beginning of the document\MessageBreak% + (maybe earlier or later).\MessageBreak% + Please use \textbackslash pagenumbering\MessageBreak% + (with an argument like arabic, roman, Roman,\MessageBreak% + fnsymbol, alph, or Alph) at the beginning\MessageBreak% + of your document! Otherwise your document\MessageBreak% + will probably compile, but the pagesLTS\MessageBreak% + package might not be able to get all labels\MessageBreak% + for the references to the respective pages\MessageBreak% + right.\MessageBreak% + } + +% \end{macrocode} +% +% \begin{macro}{\pagenumbering} +% \indent \qquad To keep the original meaning of |\pagenumbering|: +% +% \begin{macrocode} +\let\OrigPagenumbering\pagenumbering + +% \end{macrocode} +% \end{macro} +% +% Defining some new counters (and doing related things): +% +% \begin{macrocode} +\newcounter{CurrentPage} +\setcounter{CurrentPage}{1} +\def\theCurrentPageLocal{\arabic{pagesLTS.current.local.\pagesLTS@pnc}} +% \end{macrocode} +% +% The counter |pagesLTS.pagenr| is for saving the total page +% number of the last page in the \xfile{.aux} file. +% +% \begin{macrocode} +\newcounter{pagesLTS.pagenr} +% \end{macrocode} +% +% The |pagesLTS.fnsymbol| and |pagesLTS.fnsymbol.local| need to +% already have been defined when they are used. +% +% \begin{macrocode} +\newcounter{pagesLTS.fnsymbol} +\newcounter{pagesLTS.fnsymbol.local} +% \end{macrocode} +% +% The counter |pagesLTS.fnsymbol.cont| is for the number of pages +% with \textsf{fnsymbol} page numbering scheme which have been +% put out at the time the value of the counter is read. +% +% \begin{macrocode} +\newcounter{pagesLTS.fnsymbol.cont} +% \end{macrocode} +% +% While generally +% |\pagesLTS@ifcounter{pagesLTS.double.\pagesLTS@pnc}| +% is used, for the beginning of the document \linebreak +%|pagesLTS.double.0| is predefined. +% (A~|\pagesLTS@ifcounter{pagesLTS.double.\pagesLTS@pnc}| +% could be used for this, too, but we know that |pagesLTS.double.0| +% was not defined, so we can just do the definition here.) +% +% \begin{macrocode} +\newcounter{pagesLTS.double.0} +% \end{macrocode} +% +% The same holds for |pagesLTS.current.local.0|, +% and the first local page gets the number one. +% +% \begin{macrocode} +\newcounter{pagesLTS.current.local.0} +\setcounter{pagesLTS.current.local.0}{1} +% \end{macrocode} +% +% And the same again for |pagesLTS.pnc.0|. +% +% \begin{macrocode} +\newcounter{pagesLTS.pnc.0} + +% \end{macrocode} +% +% \DescribeMacro{\xroman}\label{xroman} +% When |\roman{...}| is used with a value $<1$, \LaTeX\ just ignores this +% (see subsection~\ref{ss:overflow}). Here we provide a command +% |\xroman{...}| \nolinebreak{(e\textbf{x}panded} roman), +% which gives the usual |\roman| numbers (i, ii, iii, iv,\ldots) +% for positive values, +% $-\left\vert \ldots \right\vert $ (i.\,e. -i, -ii, -iii, -iv,\ldots) +% for negative values, and 0 for all other values (which should be zero). +% +% \begin{macrocode} +\newcommand{\xroman}[1]{% + \ifnum\value{#1}>0 % + \roman{#1}% + \else% + \ifnum\value{#1}<0 % +% \end{macrocode} +% +% |\arabic{#1}| gives the arabic number of argument |#1|, +% which is negative here (for example $-7$), +% \textquotedblleft |-|\textquotedblright\ puts another minus +% sign in front of it (for example $--7$), |\number| removes +% all unnecessary preceding zeros, plus and minus signs +% (for example $7$), |\romannumeral| turns it into a |roman| +% number (for example vii), and +% \textquotedblleft |-|\textquotedblright\ puts the minus +% sign back in front of it (for example -vii). +% +% \begin{macrocode} + -\romannumeral\number-\arabic{#1} + \else% + 0% + \fi% + \fi% + } + +% \end{macrocode} +% +% \DescribeMacro{\XXRoman} +% |\XXRoman| does the same for uppercase |\Roman| numbers. +% |-\uppercase{\romannumeral\number-\arabic{#1}}| cannot be used, +% because the result in the example is |-\uppercase{vii}| and +% not |-VII|.\footnote{This does not matter for the print out,% +% but for the display of the logical page numbers% +% as well as the \xfile{aux} file.} Therefore we have a look +% at \LaTeX's own |\@Roman\FOOcounter|,\\ +% |\def\@Roman#1{\expandafter\@slowromancap\romannumeral #1@}|,\\ +% and use |\@slowromancap|, which is a fully expandable macro, +% to do the trick for this: \textquotedblleft +% \begin{quote} +%\begin{verbatim} +%\def\@slowromancap#1{\ifx @#1% then terminate +%\else +%\if i#1I\else\if v#1V\else\if x#1X\else\if l#1L\else\if +%c#1C\else\if d#1D\else \if m#1M\else#1\fi\fi\fi\fi\fi\fi\fi +%\expandafter\@slowromancap +%\fi +%} +%\end{verbatim} +% \end{quote} +% \textquotedblright\ (1998/05/16 Version v1.1g LaTeX Kernel File~m +% ltcounts.dtx 105 Counters and Lengths). +% +% \begin{macrocode} +\newcommand{\XXRoman}[1]{% + \ifnum\value{#1}>0 % + \Roman{#1}% + \else% + \ifnum\value{#1}<0 % + -\expandafter\@slowromancap\romannumeral\number-\arabic{#1}@% + \else% + 0% + \fi% + \fi% + } + +% \end{macrocode} +% +% \DescribeMacro{\lastpages} +% We provide a command to give the number of pages in a sector +% of a split page numbering scheme (see page~\pageref{pagesLTS.pnscheme.nr},\\ +% |pagesLTS.<page numbering scheme>.<number>.local.cnt|): +% +% \begin{macrocode} +\newcommand{\lastpages}[2]{% + \@ifundefined{c@pagesLTS.#1.#2.local.cnt}{% + \newcounter{pagesLTS.#1.#2.local.cnt}}{\relax}% + \arabic{pagesLTS.#1.#2.local.cnt}% + } + +% \end{macrocode} +% +% \DescribeMacro{\pagesLTS@ifcounter} +% We provide a way to create counters like +% \begin{itemize} +% \item[-] \DescribeMacro{pagesLTS.pnc. page numbering scheme } +% |pagesLTS.pnc.<page numbering scheme>|, e.\,g. |pagesLTS.pnc.Roman|, +% \item[-] \DescribeMacro{pagesLTS.double. page numbering scheme } +% |pagesLTS.double.<page numbering scheme>|, e.\,g. |pagesLTS.double.Roman|, +% \item[-] \DescribeMacro{PageCurrentLocal. page numbering scheme } +% |PageCurrentLocal.<page numbering scheme>|, e.\,g. |PageCurrentLocal.Roman|, +% \end{itemize} +% for all page numbering schemes, even those not supported +% by the current original |\pagenumbering| +% (1994/05/19 v1.1a LaTeX Kernel File w ltpageno.dtx 52 Page Numbering), +% which is defined as\\ +% \begin{quote} +%\begin{verbatim} +%\countdef\c@page=0 \c@page=1 +%\def\cl@page{} +%\def\pagenumbering#1{% +% \global\c@page \@ne \gdef\thepage{\csname @#1\endcsname +% \c@page}} +%\end{verbatim} +% \end{quote} +% +% \begin{macrocode} +\newcommand{\pagesLTS@ifcounter}[1]{% + \@ifundefined{c@#1}{\newcounter{#1}}{\relax}% + } + +% \end{macrocode} +% +% \begin{macro}{\pagesLTS@writelabel} +% \indent At last defining the writing of a label: +% +% \begin{macrocode} +\newcommand{\pagesLTS@writelabel}[1]{% + \addtocounter{page}{+1}% +% \end{macrocode} +% +% \noindent |\addtocounter{page}{+1}| because |\pagesLTS@putlabel| includes an\\ +% |\addtocounter{page}{-1}|, which is not necessary here.\\ +% Into the \xfile{.aux} file something like\\ +% |\newlabel{pagesLTS.Roman}{{}{VIII}{}{page.VIII}{}}|\\ +% is written, thus |\lastpageref{pagesLTS.Roman}| prints |VIII| and +% links to |page.VIII|. +% +% \begin{macrocode} + \pagesLTS@putlabel{pagesLTS.#1}{\thepage} + \addtocounter{page}{-1}% + \ifx\pagesLTS@pnc\pagesLTS@zero% + \relax% +% \end{macrocode} +% +% i.\,e. if the current page numbering scheme is +% \textquotedblleft 0\textquotedblright, i.\,e. before the first +% |\pagenumbering{...}| command, do nothing, +% +% \begin{macrocode} + \else% + \addtocounter{page}{+1}% + \pagesLTS@putlabel{pagesLTS.#1.local}{\theCurrentPageLocal} +% \end{macrocode} +% +% otherwise write into the \xfile{.aux} file something like\\ +% |\newlabel{pagesLTS.arabic.local}{{}{5}{}{page.8}{}}|,\\ +% thus |\lastpageref{pagesLTS.arabic.local}| prints |5| and +% links to |page.8|. Here (and in the example file) it is not +% \textquotedblleft print |8| and link to |page.8|\textquotedblright , +% because |\addtocounter{page}{3}| has been used, thus the page with +% \textquotedblleft number\textquotedblright\ (name) |8| is the +% \textbf{fifth} $(=8-3)$ page. +% +% \begin{macrocode} + \addtocounter{page}{-1}% + \fi% + } + +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\erroralphalph} +% \indent |\erroralphalph| extends the +% \textquotedblleft numbers\textquotedblright\ of counters +% to zero and negative values for representations usually +% not supporting this: |\alphalph|, |\AlphAlph|, and +% |\fnsymbolmult| of the \textsf{alphalph} package.\\ +% |\alph|, |\Alph|, and |\fnsymbol| would not support +% \textquotedblleft numbers\textquotedblright\ below one.\\ +% |\arabic| already supports negative numbers and zero.\\ +% |\roman| and |\Roman| support neither negative numbers +% nor zero, but are expanded in this package +% (|\xroman| and |\XXRoman|), see page~\pageref{xroman}.\\ +% +% \begin{macrocode} + +%% The following code is from Heiko Oberdiek [2010/04/18], %% +%% expanding his alphalph package [2010/04/18] v2.3. (Thanks!) %% +\newcommand*{\erroralphalph}[2]{% + \ifnum\value{#2}>0 % + #1{\value{#2}}% + \else + \ifnum\value{#2}<0 % + -#1{\expandafter\@gobble\the\value{#2}}% + \else + 0% + \fi + \fi + } +%% End of code from Heiko Oberdiek %% +%% Check and Error/Warning messages have been moved to %% +%% \EveryShipout, because messages inside e. g. the \pageref %% +%% command can cause trouble. %% + +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\expandPagenumbering} +% \indent Here the |\erroralphalph| command is called with the +% appropriate arguments for each page numbering scheme. +% +% \begin{macrocode} + +\newcommand{\expandPagenumbering}[1]{% + \let\Origthepage\thepage% + \def\pagesLTS@tmpC{arabic}% + \ifx\pagesLTS@pnc\pagesLTS@tmpC% + \relax% +% \end{macrocode} +% +% |\arabic| already supports negative numbers and zero +% (|-MAX...MAX|, where |MAX|\,$ = 2\,147\,483\,647$). +% +% \begin{macrocode} + \else% + \def\pagesLTS@tmpC{roman}% + \ifx\pagesLTS@pnc\pagesLTS@tmpC% + \ifpagesLTS@romanMult% +% \end{macrocode} +% +% |\erroralphalph{\roman}{page}| cannot be used, because +% |-\roman{\expandafter\@gobble\the\value{page}}| does not work. +% If option |romanMult| is not false, +% |\xroman| (see page~\pageref{xroman}) expands the usable +% roman page numbers to values below 1 (i, I, respectively), +% see subsubsection~\ref{sss:romanMult}. +% +% \begin{macrocode} + \renewcommand*{\thepage}{\xroman{page}}% + \fi% + \else% + \def\pagesLTS@tmpC{Roman}% + \ifx\pagesLTS@pnc\pagesLTS@tmpC% + \ifpagesLTS@RomanMulti% +% \end{macrocode} +% +% The same for |\Roman| page numbering, expanded by |\XXRoman| +% (see page~\pageref{xroman}). +% +% \begin{macrocode} + \renewcommand*{\thepage}{\XXRoman{page}}% + \fi% + \else% + \ifx\pagesLTS@pnc\pagesLTS@alph% +% \end{macrocode} +% +% |\alph| and |\Alph| page numberings are expanded to negative +% and zero values, and to values greater than +% \textquotedblleft z\textquotedblright\ or +% \textquotedblleft Z\textquotedblright\ with the +% \textsf{alphalph} package. -- +% If |\pagesLTS@alphMult| was zero, nothing is done. +% +% \begin{macrocode} + \ifx\pagesLTS@alphMult\pagesLTS@ab% + \renewcommand*{\thepage}{\erroralphalph{\alphalph}{page}}% + \else \ifx\pagesLTS@alphMult\pagesLTS@bb% + \renewcommand*{\thepage}{\erroralphalph{\alphMult}{page}}% + \fi% + \fi% + \else% + \ifx\pagesLTS@pnc\pagesLTS@Alph% + \ifx\pagesLTS@AlphMulti\pagesLTS@ABi% + \renewcommand*{\thepage}{\erroralphalph{\AlphAlph}{page}}% + \else \ifx\pagesLTS@AlphMulti\pagesLTS@BBi% + \renewcommand*{\thepage}{\erroralphalph{\AlphMult}{page}}% + \fi% + \fi% + \else% + \ifx\pagesLTS@pnc\pagesLTS@fns% +% \end{macrocode} +% +% Same for |\fnsymbol| page numbers. +% +% \begin{macrocode} + \ifpagesLTS@fnsymbolmult% + \renewcommand*{\thepage}{\erroralphalph{\fnsymbolmult}{page}}% + \fi% + \else% +% \end{macrocode} +% +% If the used page numbering scheme has not been recognized by the +% \textsf{pagesLTS} package so far, we can do nothing, and problems +% might result.\\ +% +% \begin{macrocode} + \PackageError{pagesLTS}{unknown page numbering scheme}{% + The pagesLTS package encountered the unknown\MessageBreak% + page numbering scheme\MessageBreak% + `#1'. \MessageBreak% + If this is no typing mistake, it might work\MessageBreak% + - or it might not work.\MessageBreak% + \@ehc% + } + \fi% + \fi% + \fi% + \fi% + \fi% + \fi% + \let\pagesLTS@tmpC\undefined% + } + +% \end{macrocode} +% \end{macro} +% +% \pagebreak +% \begin{macro}{\pagenumbering} +% \indent Now for the \textbf{new} version of the |\pagenumbering| command: +% +% \begin{macrocode} +\renewcommand{\pagenumbering}[1]{% +% \end{macrocode} +% +% If the current page numbering scheme, |\pagesLTS@pnc|, and the +% requested page numbering scheme, |#1|, is the same one, nothing +% is done, otherwise the real action begins. +% +% \begin{macrocode} + \edef\pagesLTS@tmpA{#1}% + \ifx\pagesLTS@pnc\pagesLTS@tmpA% + \relax% + \else% +% \end{macrocode} +% +% The next code is executed, when we are at a page after the first one. +% This distinction is done for two reasons:\\ +% On the one hand, |\pagenumbering| could be called \textit{before} +% |\begin{document}| (where the current page should not be +% greater than one), and on the other hand we go one page back to +% aim all references to that page. Obviousely at the first page +% there is no going backward. +% +% \begin{macrocode} + \ifnum \value{CurrentPage}>1% + \addtocounter{page}{-1}% + \addtocounter{pagesLTS.current.local.\pagesLTS@pnc}{-1}% +% \end{macrocode} +% +% For the case that the page numbering scheme is or will be splitted, +% like e.\,g. the Roman one in the |pagesLTS-example.tex|, a counter +% like +% |pagesLTS.Roman.1.local.count| +% (or |pagesLTS.Roman.2.local.count|, +% |pagesLTS.Roman.3.local.count|,\ldots ) is introduced and set to the +% number of the local page. +% +% \begin{macrocode} + \newcounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}% + \setcounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}{% + \value{pagesLTS.current.local.\pagesLTS@pnc}}% +% \end{macrocode} +% +% If the page numbering scheme is \textsf{fnsymbol}, +% and if it \textit{was} used before, +% from said counter the number of pages of the preceding uses +% of the same page numbering scheme, |pagesLTS.\pagesLTS@pnc.done|, +% is subtracted (same as for the other schemes, see below): +% +% \begin{macrocode} + \ifx\pagesLTS@pnc\pagesLTS@fns% + \ifnum \value{pagesLTS.pnc.\pagesLTS@pnc}>1% + \pagesLTS@ifcounter{pagesLTS.tmpa}% + \setcounter{pagesLTS.tmpa}{\value{pagesLTS.pnc.\pagesLTS@pnc}}% + \addtocounter{pagesLTS.tmpa}{-1}% + \pagesLTS@ifcounter{pagesLTS.tmpb}% + \addtocounter{pagesLTS.tmpb}{\value{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.tmpa}.local.count}}% + \addtocounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}{% + -\value{pagesLTS.tmpb}}% + \fi% +% \end{macrocode} +% +% If the page numbering scheme is \textit{not} \textsf{fnsymbol}, +% a numbered label is written: +% +% \begin{macrocode} + \else% + \pagesLTS@writelabel{\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}}% +% \end{macrocode} +% +% If the page numbering scheme was \textit{not} used before, +% +% \begin{macrocode} + \ifnum \value{pagesLTS.pnc.\pagesLTS@pnc}<2% +% \end{macrocode} +% +% an unnumbered label is also written: +% +% \begin{macrocode} + \pagesLTS@writelabel{\pagesLTS@pnc}% +% \end{macrocode} +% +% If the page numbering scheme \textit{was} used before, +% from said counter the number of pages of the preceding uses +% of the same page numbering scheme, |pagesLTS.\pagesLTS@pnc.done|, +% is subtracted. +% +% \begin{macrocode} + \else% + \pagesLTS@ifcounter{pagesLTS.tmpa}% + \setcounter{pagesLTS.tmpa}{\value{pagesLTS.pnc.\pagesLTS@pnc}}% + \addtocounter{pagesLTS.tmpa}{-1}% + \pagesLTS@ifcounter{pagesLTS.\pagesLTS@pnc.done}% + \addtocounter{pagesLTS.\pagesLTS@pnc.done}{% + \value{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.tmpa}.local.count}}% + \addtocounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}{% + -\value{pagesLTS.\pagesLTS@pnc.done}}% + \fi% +% \end{macrocode} +% +% The values are written to the \xfile{.aux} file +% (if writing is allowed: |\if@filesw|), +% because they must be available at the beginning of the document: +% +% \begin{macrocode} + \if@filesw% + \immediate\write\@auxout{\string + \pagesLTS@ifcounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.cnt}}% + \fi% + \edef\pagesLTS@tmpB{\arabic{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}}% + \if@filesw% + \immediate\write\@auxout{\string + \setcounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.cnt}{\pagesLTS@tmpB}}% + \fi% + \fi% +% \end{macrocode} +% +% For further code for the case of \textsf{fnsymbol} please see below +% (|\lastpagereftxt|, page~\pageref{lastpagereftxtlabel}).\\ +% The last page number is saved, in case the same page +% numbering scheme is continued later: +% +% \begin{macrocode} + \setcounter{pagesLTS.double.\pagesLTS@pnc}{\value{page}}% +% \end{macrocode} +% +% We went back one page, so we must go forward again: +% +% \begin{macrocode} + \addtocounter{pagesLTS.current.local.\pagesLTS@pnc}{+1}% + \addtocounter{page}{+1}% +% \end{macrocode} +% +% The page numbering scheme |\pagesLTS@pnc| is now set to +% the new one, given by the user as argument with the +% |\pagenumbering{...}| command: +% +% \begin{macrocode} + \global\edef\pagesLTS@pnc{#1}% +% \end{macrocode} +% +% The new page numbering scheme is now started for real: +% +% \begin{macrocode} + \OrigPagenumbering{#1}% +% \end{macrocode} +% +% If a page numbering scheme not known by the original +% |\pagenumbering{...}| command is used, an error will +% arise here - but maybe without error message.\\ +% +% If page numbering schem |\alph|, |\Alph|, or |\fnsymbol| is used, +% \textsf{pagesLTS} extends the page numbers according to +% the given options, using the \textsf{AlphAlph} package. +% |\arabic| does not need any expansion. +% |\roman| and |\Roman| at least receive a definition for +% zero. +% +% \begin{macrocode} + \expandPagenumbering{#1} +% \end{macrocode} +% +% Counters like |pagesLTS.pnc.Roman| are introduced: +% +% \begin{macrocode} + \pagesLTS@ifcounter{pagesLTS.pnc.\pagesLTS@pnc}% +% \end{macrocode} +% +% The saved number of times this page numbering scheme was used +% is increased by one: +% +% \begin{macrocode} + \addtocounter{pagesLTS.pnc.\pagesLTS@pnc}{1}% +% \end{macrocode} +% +% \indent Now defining the counter |pagesLTS.double.\pagesLTS@pnc|, +% if it did not exist already, adding~1, because this is +% the first page of it (or another one, if the scheme is +% continued): +% +% \begin{macrocode} + \pagesLTS@ifcounter{pagesLTS.double.\pagesLTS@pnc}% + \addtocounter{pagesLTS.double.\pagesLTS@pnc}{1}% +% \end{macrocode} +% +% The page number is continued, if the option |pagecontinue=false| +% is \textbf{not} set, otherwise it is reset to one. Note that neither +% the local nor the current counter are reset, as they contain +% the real \textit{values} and not the \textit{names} of the pages. +% +% \begin{macrocode} + \ifpagesLTS@pagecontinue% + \setcounter{page}{\value{pagesLTS.double.\pagesLTS@pnc}}% + \else% + \setcounter{page}{1}% + \fi% +% \end{macrocode} +% +% If it does not exist already, the counter +% |pagesLTS.current.local.\pagesLTS@pnc| +% (e.\,g. |pagesLTS.current.local.Roman|) is created. +% +% \begin{macrocode} + \pagesLTS@ifcounter{pagesLTS.current.local.\pagesLTS@pnc}% +% \end{macrocode} +% +% If |pagesLTS.double.\pagesLTS@pnc| of the current page numbering +% scheme is equal to one, this is the first page of this page +% numbering scheme. Then |pagesLTS.current.local.\pagesLTS@pnc| +% (which was zero) is set to one. +% +% \begin{macrocode} + \ifnum \value{pagesLTS.double.\pagesLTS@pnc}=1% + \setcounter{pagesLTS.current.local.\pagesLTS@pnc}{1}% + \fi% +% \end{macrocode} +% +% Otherwise, i.\,e. if |\value{CurrentPage}| is not |>1|, +% i.\,e. before the first page has shiped out: +% +% \begin{macrocode} + \else% + %% before the first page has shiped out +% \end{macrocode} +% +% The current page numbering scheme is defined by the +% argument of |\pagenumbering{...}|, which the user gave: +% +% \begin{macrocode} + \global\edef\pagesLTS@pnc{#1}% +% \end{macrocode} +% +% \noindent and the page numbering scheme set by the original +% page numbering command +% (1994/05/19 v1.1a LaTeX Kernel File w ltpageno.dtx 52 Page Numbering), +% which resets the page number to one, +% but at the first page continuation does not make sense). +% Well, nearly the original page numbering command: +% |\OrigPagenumbering{\pagesLTS@pnc}| does not work, +% so we \textquotedblleft expand\textquotedblright\ the +% |\OrigPagenumbering| command: +% +% \begin{macrocode} + \countdef\c@page=0 \c@page=1 + \def\cl@page{} + \global\c@page \@ne + \global\def\thepage{\csname \expandafter @\pagesLTS@pnc \endcsname \c@page}% +% \end{macrocode} +% +% If a page numbering scheme is used, which is not known by +% \LaTeX, an error might arise here - but maybe without error message.\\ +% +% If page numbering scheme |\alph|, |\Alph|, or |\fnsymbol| is used, +% \textsf{pagesLTS} extends the page numbers according to +% the given options, using the \textsf{AlphAlph} package. +% |\arabic| does not need any expansion. +% |\roman| and |\Roman| at least receive a definition for +% zero. +% +% \begin{macrocode} + \expandPagenumbering{#1} +% \end{macrocode} +% +% We are at the first page, so the page counters are set to one: +% +% \begin{macrocode} + \pagesLTS@ifcounter{pagesLTS.pnc.\pagesLTS@pnc}% + \setcounter{pagesLTS.pnc.\pagesLTS@pnc}{1}% + \pagesLTS@ifcounter{pagesLTS.double.\pagesLTS@pnc}% + \setcounter{pagesLTS.double.\pagesLTS@pnc}{1}% + \pagesLTS@ifcounter{pagesLTS.current.local.\pagesLTS@pnc}% + \setcounter{pagesLTS.current.local.\pagesLTS@pnc}{1}% + \fi% +% \end{macrocode} +% +% Whether |\pagenumbering{...}| is called in the preamble, +% |\AtBeginDocument|, right after |\begin{document}|, +% or somewhere in the document, we want to remember +% \textit{whether} it was called at all: +% +% \begin{macrocode} + \gdef\pagesLTS@called{1}% + \fi% +% \end{macrocode} +% +% We do not need the temporary definitions any more. +% +% \begin{macrocode} + \let\pagesLTS@tmpA\undefined% + \let\pagesLTS@tmpB\undefined% + } + +% \end{macrocode} +% \end{macro} +% +% \phantomsection +% \begin{macro}{\lastpagereftxt} \label{lastpagereftxtlabel} +% \indent When |\lastpageref| is used somewhere inside the \texttt{txt} (text), +% i.\,e. not at the last page, it is defined as |\lastpagereftxt|. +% When the page numbering scheme is \textsf{fnsymbol}, and the \textsf{hyperref} +% package has been loaded, a hyperref instead of a label is used +% for the reference to\\ +% |pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.local}|.\\ +% +% \begin{macrocode} +\newcommand{\lastpagereftxt}[1]{% + \def\pagesLTS@tmpA{#1}% + \def\pagesLTS@tmpB{pagesLTS.fnsymbol.local}% + \ifx\pagesLTS@tmpA\pagesLTS@tmpB% + \ifx\pagesLTS@hyper\pagesLTS@one% + \href{\#pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.local}}% + {\arabic{pagesLTS.fnsymbol.local}}% +% \end{macrocode} +% +% When the page numbering scheme is \textsf{fnsymbol}, but the \textsf{hyperref} package +% has \textit{not} been loaded, just the arabic number of the +% \texttt{pagesLTS.fnsymbol.local} counter is given (because there will be +% no hyperlink anyway). +% +% \begin{macrocode} + \else \arabic{pagesLTS.fnsymbol.local}% + \fi% +% \end{macrocode} +% +% Otherwise just the common |\pageref| is applied: +% +% \begin{macrocode} + \else% + \pageref{#1}% + \fi% +% \end{macrocode} +% +% We do not need the temporary definitions any more. +% +% \begin{macrocode} + \let\pagesLTS@tmpA\undefined% + \let\pagesLTS@tmpB\undefined% + } + +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\lastpagerefend} +% \indent When the \textsf{hyperref} package is used and the page numbering scheme +% of the last page is \textsf{fnsymbol}, |\lastpageref| is defined as +% |\lastpagerefend|. +% Hyperrefs instead of labels are used for the reference to +% \textsf{fnsymbol} pages (including the last one). +% +% \begin{macrocode} +\newcommand{\lastpagerefend}[1]{% + \def\pagesLTS@tmpA{#1}% + \def\pagesLTS@tmpB{pagesLTS.fnsymbol.local}% + \ifx\pagesLTS@tmpA\pagesLTS@tmpB% + \ifx\pagesLTS@hyper\pagesLTS@one% + \href{\#pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.local}}% + {\arabic{pagesLTS.fnsymbol.local}}% + \else \arabic{pagesLTS.fnsymbol.local}% + \fi% + \else% + \def\pagesLTS@tmpB{pagesLTS.fnsymbol}% + \ifx\pagesLTS@tmpA\pagesLTS@tmpB% + \ifx\pagesLTS@hyper\pagesLTS@one% + \href{\#pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.local}}% + {\pagesLTS.lastpage}% + \else \pageref{pagesLTS.fnsymbol}% + \fi% + \else% + \def\pagesLTS@tmpB{LastPage}% + \ifx\pagesLTS@tmpA\pagesLTS@tmpB% + \ifx\pagesLTS@hyper\pagesLTS@one% + \href{\#pagesLTS.fnsymbol.local.\pagesLTS@eso}% + {\pagesLTS.lastpage}% + \else \pageref{LastPage}% + \fi% + \else% + \def\pagesLTS@tmpB{VeryLastPage}% + \ifx\pagesLTS@tmpA\pagesLTS@tmpB% + \ifx\pagesLTS@hyper\pagesLTS@one% + \href{\#pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.local}}% + {\pagesLTS.lastpage}% + \else \pageref{VeryLastPage}% + \fi% + \else% + \def\pagesLTS@tmpB{LastPages}% + \ifx\pagesLTS@tmpA\pagesLTS@tmpB% + \ifx\pagesLTS@hyper\pagesLTS@one% + \href{\#pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.local}}% + {\arabic{pagesLTS.pagenr}}% + \else \pageref{LastPages}% + \fi% + \else% + \pageref{#1}% + \fi% + \fi% + \fi% + \fi% + \fi% +% \end{macrocode} +% +% We do not need the temporary definitions any more. +% +% \begin{macrocode} + \let\pagesLTS@tmpA\undefined% + \let\pagesLTS@tmpB\undefined% + } + +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@pagesLTS@Prelim@EveryShipout} +% \indent Because we cannot make references to pages with \textsf{fnsymbol} +% page \textquotedblleft numbers\textquotedblright\ manually +% with \textsf{hyperref}, we use \nolinebreak{|\phantomsection|\,s} and +% refer to one of those. But because we do not know how many +% \nolinebreak{|\phantomsection|\,s} and \nolinebreak{|\section*|\,s} +% are introduced by the user (or other packages; +% cf.~\LaTeX~bug~2298: knowing level of |section*|, +% \ \url{http://www.latex-project.org/cgi-bin/ltxbugs2html?category=LaTeX&responsible=anyone&state=open&keyword=&pr=latex%2F2298&search=}), +% we cannot refer to the last one as we did with the pages. +% +% \begin{macrocode} +\newcommand{\@pagesLTS@Prelim@EveryShipout}{% +%% The following code is from the prelim2e package %% +%% [2009/05/29 v1.3] by Martin Schr\"{o}der (Thanks!): %% + \bgroup + \dimen\z@=\wd\@cclv + \dimen\@ne=\ht\@cclv + \dimen\tw@=\dp\@cclv + \dimen\thr@@=\dimen1 + \advance\dimen\thr@@ by \dimen\tw@ + \global\setbox\@cclv\vbox to \dimen\thr@@{% + \hb@xt@\dimen\z@{% + \box\@cclv% + \hss% + }% + \vbox to \z@{% + \hb@xt@\dimen\z@{% + \let\protect\relax +%% Code not from prelim2e package: %% +% \end{macrocode} +% +% \pagebreak +% +% Therefore each page with \textsf{fnsymbol} page +% \textquotedblleft number\textquotedblright\ receives a +% |\phantomsection| and a label, which includes a number increased +% by one for each page. This is done for +% |pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.cont}| +% as well as +% |pagesLTS.fnsymbol|, |pagesLTS.\pagesLTS@pnc|, and +% |pagesLTS.\pagesLTS@pnc.local|.\\ +% In case an older label already existed, it is overwritten by an +% |\overridelabel| command. +% +% \begin{macrocode} + \ifx\pagesLTS@pnc\pagesLTS@fns% + \addtocounter{pagesLTS.fnsymbol.cont}{1}% + \ifx\pagesLTS@hyper\pagesLTS@one% + \phantomsection% + \hypertarget{pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.cont}}{}% + \fi% + \ifnum \pagesLTS@esov=\pagesLTS@zero% + \label{pagesLTS.fnsymbol}% + \else% + \overridelabel{pagesLTS.fnsymbol}% + \fi% + \else% + \ifx\pagesLTS@hyper\pagesLTS@one% + \phantomsection% + \fi% + \if@filesw% + \overridelabel{pagesLTS.\pagesLTS@pnc}% + \immediate\write\@auxout{\string + \undonewlabel{pagesLTS.\pagesLTS@pnc.local}{\on@line}}% + \fi% + \addtocounter{page}{+1} + \pagesLTS@putlabel{pagesLTS.\pagesLTS@pnc.local}{\theCurrentPageLocal}% + \addtocounter{page}{-1} + \fi% +%% Code from prelim2e package again: %% + }% + \vss% + }% + \vss% + }% + \wd\@cclv=\dimen\z@ + \ht\@cclv=\dimen\@ne + \dp\@cclv=\dimen\tw@ + \egroup +%% End of code from the prelim2e package. %% + } + +% \end{macrocode} +% \end{macro} +% +% \pagebreak +% +% \begin{macro}{\EveryShipout} +% \indent At the end of each shipout, the following commands are executed: +% +% \begin{macrocode} +\EveryShipout{% + \ifnum\value{page}>0% + \relax% + \else + \ifnum\value{page}=0% + \PackageWarning{pagesLTS}{% + Counter `page' is zero!\MessageBreak% + If the page numbering scheme is not arabic\MessageBreak% + and further not extended\MessageBreak% + (see Page counter overflow in the pagesLTS\MessageBreak% + documentation), without other measures\MessageBreak% + this will lead to a counter overflow.\MessageBreak% + } + \else% + \ifnum\value{page}<0% + \PackageWarning{pagesLTS}{% + Counter `page' is negative: `\the\value{page}'!\MessageBreak% + If the page numbering scheme is not arabic\MessageBreak% + and further not extended\MessageBreak% + (see Page counter overflow in the pagesLTS\MessageBreak% + documentation), without other measures\MessageBreak% + this will lead to a counter overflow.\MessageBreak% + } + \else% + \PackageError{pagesLTS}{% + Counter `page' does not have a recognized value:\MessageBreak% + `\the\value{page}'\MessageBreak% + \@ehd \MessageBreak% + } + \fi% + \fi% + \fi% +% \end{macrocode} +% +% If the |CurrentPage| is equal to one, this is the first shipout. +% +% \begin{macrocode} + \ifnum \value{CurrentPage}=1% This is the first shipout! +% \end{macrocode} +% +% We check whether some page numbering scheme was defined by +% |\pagenumbering{...}| (\textbf{as it schould be!}): +% +% \begin{macrocode} + \ifx\pagesLTS@called\pagesLTS@zero +% \end{macrocode} +% +% If it was not defined (i.\,e. |\pagesLTS@called| is zero), +% the user is informed, that a |\pagenumbering{...}| +% is missing behind |\begin{document}|. +% Of course, it is possible that some package did some +% pages of output with |\AtBeginDocument|. In that case, +% one |\pagenumbering{...}| before |\begin{document}| and +% one |\pagenumbering{...}| (with the same argument, of course!) +% behind |\begin{document}| could help somewhat. +% +% \begin{macrocode} + \PackageError{pagesLTS}{pagenumbering missing}{\pagesLTS@messageNPN }% +% \end{macrocode} +% +% We save the current value of the page, +% +% \begin{macrocode} + \newcounter{pagesLTS@tmpD}% + \setcounter{pagesLTS@tmpD}{\value{page}}% +% \end{macrocode} +% +% determine the current page numbering scheme, +% +% \begin{macrocode} +%% Code from Andres L\"{o}h, Universiteit Utrecht (NL) %% + \def\extract#1{\expandafter\extract@ #1\END} + \def\extract@#1\csname @#2\endcsname#3\END{#2} + \edef\pagesLTS@tmpQ{\extract\thepage}% +%% End of code from Andres L\"{o}h %% + \let\pagesLTS@tmpP\pagesLTS@tmpQ% +% \end{macrocode} +% +% set the current page numbering scheme to~0 +% (because before the beginning of the document it should be~0), +% +% \begin{macrocode} + \def\pagesLTS@pnc{0}% +% \end{macrocode} +% +% and then issue a |\pagenumbering| command with the determined +% page numbering scheme as argument: +% +% \begin{macrocode} + \pagenumbering{\pagesLTS@tmpP}% +% \end{macrocode} +% +% This resets the page to one (if option |pagecontinue=false| +% was choosen), but because we do not start a new page numbering +% scheme here but manifest a page numbering scheme, which +% the user forgot to define, the page number should not have +% been reset to one. (This is the first page, but maybe the user +% wants it to have page number 2001?) Therefore we revert this here +% and set the page number to its value, which was saved before the +% |\pagenumbering| command. +% +% \begin{macrocode} + \setcounter{page}{\value{pagesLTS@tmpD}}% + \fi% +% \end{macrocode} +% +% We are at the first page, so we put the label here. +% +% \begin{macrocode} + \pagesLTS@writelabel{0}% + \fi% +% \end{macrocode} +% +% If the current page numbering scheme |\pagesLTS@pnc| is +% |\pagesLTS@fns| (which is defined as \texttt{fnsymbol}), +% the label is set by \linebreak +% |\@pagesLTS@Prelim@EveryShipout| (see just above), +% and |\pagesLTS@esov| is set to the (real) number (not the name) of +% this page numbering scheme, |\arabic{pagesLTS.fnsymbol.cont}|.\\ +% When no more pages with \textsf{fnsymbol} page +% \textquotedblleft number\textquotedblright\ are shiped out, +% the value remains fixed and we have our reference to the last page +% of the \textsf{fnsymbol} page numbering range. +% (At least we will have that reference after some more work, +% see below). +% +% \begin{macrocode} + \ifx\pagesLTS@pnc\pagesLTS@fns% + \@pagesLTS@Prelim@EveryShipout% + \gdef\pagesLTS@esov{\arabic{pagesLTS.fnsymbol.cont}}% +% \end{macrocode} +% +% When another page numbering scheme was reused (in the example file +% \textsf{Roman}), we also need to apply\\ +% |\@pagesLTS@Prelim@EveryShipout|, +% because otherwise we would get multiply definded labels. +% +% \begin{macrocode} + \else% + \ifnum \value{pagesLTS.pnc.\pagesLTS@pnc}>1% + \@pagesLTS@Prelim@EveryShipout% + \fi% + \fi% +% \end{macrocode} +% +% The |CurrentPage| as well as the |pagesLTS.current.local.\pagesLTS@pnc| +% are advanced by one (because one page was shiped out and the next is +% about to begin). +% +% \begin{macrocode} + \addtocounter{CurrentPage}{1}% + \addtocounter{pagesLTS.current.local.\pagesLTS@pnc}{1}% + } + +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\pagesLTS@putlabelhyper} +% \indent Here the labels are set, if the \textsf{hyperref} package +% was loaded. Simply using |\label| would not work, because labels +% wait for the output routines to work, and there may not be any +% more invocations of the output routines. To force the write out +% we need to do an |\immediate| write. +% +% \begin{macrocode} +\newcommand{\pagesLTS@putlabelhyper}[2]{% + \ifHy@pageanchor \relax% + \else% +% \end{macrocode} +% +% If the \textsf{hyperref} package is used, but pageanchors are disabled, +% the hyperlinking will not work. +% +% \begin{macrocode} + \PackageError{pagesLTS}{hyperref option pageanchor disabled}{% + The \string\lastpageref{#1} link doesn't work\MessageBreak% + using hyperref with disabled option `pageanchor'.\MessageBreak% + }% + \fi +% \end{macrocode} +% +% If use of the \xfile{.aux}-file is allowed, the label for +% \texttt{LastPage} is written into that file, the page +% reference depending on the options, which where set for +% the \textsf{hyperref} package. +% +% \begin{macrocode} +%% The following code is from the hyperref package %% +%% [2010/04/17 v6.80x] by Heiko Oberdiek (Thanks!). %% + \if@filesw + \begingroup + \let\@number\@firstofone + \ifHy@pageanchor + \ifHy@hypertexnames + \ifHy@plainpages + \def\Hy@temp{\arabic{page}}% + \else + \Hy@unicodefalse +%% Code not from hyperref package: %% +%% The following lines are modified from the hyperref package. %% +%% Without the modification, after the first shipout "PD1" is %% +%% inserted each time |\pdfstringdef\Hy@temp{\thepage}| is %% +%% executed (if |fnsymbol| is not used). %% + \ifnum \value{CurrentPage}=1% + \ifx\pagesLTS@pnc\pagesLTS@fns% + \pdfstringdef\Hy@temp{\thepage}% + \else% + \def\Hy@temp{\thepage}% + \fi% + \else% + \pdfstringdef\Hy@temp{\thepage}% + \fi% +%% Code from hyperref package again: %% + \fi + \else + \def\Hy@temp{\the\Hy@pagecounter}% + \fi + \fi +%% End of code from the hyperref package. %% +%% (The following four lines are modified %% +%% from the hyperref package.) %% + \immediate\write\@auxout{\string + \newlabel{#1}{{}{#2}{}{\ifHy@pageanchor page.\Hy@temp\fi}{}}}% + \endgroup% + \fi% + } + +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\pagesLTS@putlabel} +% \indent Since the page has been put out, we are on the page after +% that page. We therefore subtract one from the page counter. +% +% \begin{macrocode} +\newcommand{\pagesLTS@putlabel}[2]{% + \addtocounter{page}{-1}% +% \end{macrocode} +% +% If the \textsf{hyperref} package is used, +% the format of the labels is somewhat longer. +% +% \begin{macrocode} + \ifx\pagesLTS@hyper\pagesLTS@one% + \pagesLTS@putlabelhyper{#1}{#2}% + \else% +% \end{macrocode} +% +% If the \textsf{hyperref} package is not used, +% there will be no hyperlinks, +% and the label is written in the way of the +% old \textsf{lastpage} package. +% +% \begin{macrocode} + \if@filesw% + \immediate\write\@auxout{\string + \newlabel{#1}{{}{#2}}}% + \fi% + \fi% +% \end{macrocode} +% +% After the writeout we restore the page number again, +% since there might be other things still to be done. +% +% \begin{macrocode} + \addtocounter{page}{+1}% + } + +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\pagesLTS@putlabels} +% \indent |\pagesLTS@putlabels| is nearly identical to |\pagesLTS@putlabelV|: +% +% \begin{macrocode} +\newcommand{\pagesLTS@putlabels}{% + \addtocounter{page}{-1}% + \addtocounter{CurrentPage}{-1}% + \addtocounter{pagesLTS.current.local.\pagesLTS@pnc}{-1}% +% \end{macrocode} +% +% If |\pagenumbering{...}| has not been used, +% |\pagesLTS@pnc| is still zero ($0$, |\pagesLTS@zero|), +% and the according warning message is given. +% +% \begin{macrocode} + \ifx\pagesLTS@pnc\pagesLTS@zero% + \PackageWarning{pagesLTS}{No page numbering scheme found:\MessageBreak% + \pagesLTS@messageNPN }% +% \end{macrocode} +% +% \noindent otherwise the numbered label is written, +% and if the page numbering scheme was not used before, +% the unnumbered label is written, too. +% +% +% \begin{macrocode} + \else% + \pagesLTS@writelabel{\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}}% + \ifnum \value{pagesLTS.pnc.\pagesLTS@pnc}<2% + \ifx\pagesLTS@pnc\pagesLTS@fns% + \relax% + \else% + \pagesLTS@writelabel{\pagesLTS@pnc}% + \fi% + \fi% + \fi% +% \end{macrocode} +% +% \noindent Before the label for the \texttt{LastPages} can be put, +% we must advance one page again, because |\pagesLTS@putlabel| itself +% goes back one page (and at its end forward again). +% +% \begin{macrocode} + \addtocounter{page}{+1}% + \pagesLTS@putlabel{LastPages}{\theCurrentPage} +% \end{macrocode} +% +% \noindent Here should follow a\\ +% |\addtocounter{page}{-1}|,\\ +% but we have to remember to increase the page counters again, +% which were decreased at the start of this |\pagesLTS@putlabels| +% command, and that would include\\ +% |\addtocounter{page}{+1}|,\\ +% therefore this two lines cancel each other and +% therefore just can be skipped. But the other counters have to +% be increased: +% +% \begin{macrocode} + \addtocounter{CurrentPage}{1}% + \addtocounter{pagesLTS.current.local.\pagesLTS@pnc}{1}% + } + +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\AtBeginDocument} +% \indent |\AtBeginDocument| it is checked whether writing +% into an \xfile{.aux}-file is allowed. The \textsf{pagesLTS} +% package cannot be used without that! +% +% \begin{macrocode} +\AtBeginDocument{% + \if@filesw \relax% + \else% + \PackageError{pagesLTS}{No auxiliary file allowed.}% + {The pagesLTS package was not allowed to write to an .aux file.\MessageBreak% + This package does not work without access to an .aux file.\MessageBreak% + Press Ctrl+Z to exit.\MessageBreak% + }% +% \end{macrocode} +% +% Maybe abortion should be forced? +% +% \begin{macrocode} + % \endinput + \fi% +% \end{macrocode} +% +% It is checked whether the \texttt{endfloat} package is loaded, +% whether it is newer than March 1992 (i.\,e. at least +% April 1992 v2.0), in which case it is compatible with this +% \textsf{pagesLTS} package.\\ +% If it is even newer than 1995/10/10, it is the recent version +% (as of the time of last revision of this documentation: +% 1995/10/11 v2.4i). +% +% \begin{macrocode} + \@ifpackageloaded{endfloat}% + {\@ifpackagelater{endfloat}{1992/03/31}% April 1992 v2.0 + {\@ifpackagelater{endfloat}{1995/10/10}{% 1995/10/11 v2.4i + \relax}% +% \end{macrocode} +% +% If it is compatibel, but not the recent version, a warning is given: +% +% \begin{macrocode} + {\PackageWarningNoLine{pagesLTS}{Old endfloat package detected:\MessageBreak% + There is a newer version of the endfloat package available.\MessageBreak% + Please consider updating your version.\MessageBreak% + The pagesLTS package might be incompatible with\MessageBreak% + your current endfloat package.\MessageBreak% + }% + }% +% \end{macrocode} +% +% If it is so very old, that it is not compatible, +% an Error message is given: +% +% \begin{macrocode} + {\PackageError{pagesLTS}{Incompatible, very old endfloat package detected.}% + {The very old version 2.0 (and earlier) of the\MessageBreak% + endfloat package actually redefined the \ enddocument,\MessageBreak% + and so interferred drastically with the LaTeX2e commands\MessageBreak% + which make use of \ AtEndDocument.\MessageBreak% + Newer versions of the endfloat package exists\MessageBreak% + (at least: v2.4i as of 1995/10/11)\MessageBreak% + in modern documentation form,\MessageBreak% + which should be available from CTAN.\MessageBreak% + Please update your endfloat package\MessageBreak% + for use with the pagesLTS package.\MessageBreak % + }% + }% + }% + }{}% +% \end{macrocode} +% +% It is checked whether the old \textsf{lastpage} package was loaded.\\ +% (If it was loaded indeed, the |\lastpage@putlabel| is +% \textquotedblleft killed\textquotedblright , +% see subsection~\ref{ssec:lastpage}.) +% +% \begin{macrocode} + \@ifpackageloaded{lastpage}% + {\PackageWarning{pagesLTS}{Incompatible package lastpage detected:\MessageBreak% + Package pagesLTS was loaded, but also the old\MessageBreak% + lastpage package.\MessageBreak% + pagesLTS has all functionality of the lastpage\MessageBreak% + package (and more), so just remove the lastpage\MessageBreak% + package from your document.\MessageBreak% + pagesLTS will now ''kill'' the lastpage@putlabel\MessageBreak% + command of the lastpage package.\MessageBreak% + }% + \gdef\lastpage@putlabel{\relax}% + }{}% +% \end{macrocode} +% +% Further it is checked whether the \textsf{AlphAlph} package is loaded. +% +% \begin{macrocode} + \@ifpackageloaded{alphalph}% + {\PackageInfo{pagesLTS}{Package AlphAlph detected.\MessageBreak% + pagesLTS supports alphalph. Congratulations!\MessageBreak% + }% +% \end{macrocode} +% +% Unfortunately, |\@ifpackageloaded| cannot be used any later +% (cf.~\LaTeX\ bug~2335, Synopsis: Proposal for |\@ifpackageloaded|, \linebreak +% \url{http://www.latex-project.org/cgi-bin/ltxbugs2html?category=LaTeX&responsible=anyone&state=open&keyword=&pr=latex%2F2335&search=}), +% therefore the result must be saved: +% +% \begin{macrocode} + \global\def\pagesLTS@AlphAlph{1}% +% \end{macrocode} +% +% The commands are defined accordingly. +% +% \begin{macrocode} + \newalphalph{\AlphMult}[mult]{\@Alph}{26}% + \newalphalph{\alphMult}[mult]{\@alph}{26}% + \newalphalph{\fnsymbolmult}[mult]{\@fnsymbol}{5}% + }% +% \end{macrocode} +% +% If the \textsf{alphalph} package is not detected, it is checked +% whether no options are choosen, which would require that package. +% +% \begin{macrocode} + {\ifx\pagesLTS@alphMult\pagesLTS@zero% + \PackageWarning{pagesLTS}{\pagesLTS@messageaMz }% + \else% + \PackageError{pagesLTS}{Package AlphAlph not loaded}% + {Package AlphAlph was not loaded, but package pagesLTS\MessageBreak% + was called without option alphMult=0 (zero).\MessageBreak% + Either load package AlphAlph,\MessageBreak% + or give option alphMult=0 (zero) to the pagesLTS package.\MessageBreak% + }% + \fi% + \ifx\pagesLTS@AlphMulti\pagesLTS@zero% + \PackageWarning{pagesLTS}{\pagesLTS@messageAMiz }% + \relax% + \else% + \PackageError{pagesLTS}{Package AlphAlph not loaded}% + {Package AlphAlph was not loaded, but package pagesLTS\MessageBreak% + was called without option AlphMulti=0 (zero).\MessageBreak% + Either load package AlphAlph,\MessageBreak% + or give option AlphMulti=0 (zero) to the pagesLTS package.\MessageBreak% + }% + \fi% + \ifpagesLTS@fnsymbolmult% + \PackageError{pagesLTS}{Package AlphAlph not loaded}% + {Package AlphAlph was not loaded, but package pagesLTS\MessageBreak% + was called without option fnsymbolmult=false.\MessageBreak% + Either load package AlphAlph,\MessageBreak% + or give option fnsymbolmult=false to the pagesLTS package.\MessageBreak% + }% + \else% + \PackageWarning{pagesLTS}{\pagesLTS@messagefsmz }% + \fi% + }% +% \end{macrocode} +% +% Further it is checked whether the \textsf{hyperref} package is loaded. +% +% \begin{macrocode} + \@ifpackageloaded{hyperref}% + {\PackageInfo{pagesLTS}{Package hyperref detected.\MessageBreak% + pagesLTS supports hyperref. Congratulations!\MessageBreak% + }% + \global\def\pagesLTS@hyper{1}% +% \end{macrocode} +% +% Additionally a version check of the available \textsf{hyperref} +% package is performed and if need be a warning is issued: +% +% \begin{macrocode} + \@ifpackagelater{hyperref}{2010/04/16}{% 2010/04/17 v6.80x + \relax}{% + \PackageWarningNoLine{pagesLTS}{Old hyperref package detected:\MessageBreak% + There is a newer version of the\MessageBreak% + hyperref package available.\MessageBreak% + Please consider updating your version.\MessageBreak% + }% + }% + %% pagesLTS supports the use of the package hyperref by + %% Heiko Oberdiek (hyperref version 2010/04/17 v6.80x). + %% pagesLTS may work with earlier versions of this packages, + %% but this was not tested. + }% +% \end{macrocode} +% +% If no \textsf{hyperref} package in use is detected, a warning is issued, too: +% +% \begin{macrocode} + {\PackageWarning{pagesLTS}{Package hyperref NOT detected.\MessageBreak% + pagesLTS would support hyperref. The page references\MessageBreak% + will NOT be hyperlinked!\MessageBreak }% + }% + } + +% \end{macrocode} +% \end{macro} +% +% \pagebreak +% +% \begin{macro}{\AtEndDocument} +% \indent |\AtEndDocument| we put in a |\message| to show, +% in what order things (which were called) are done +% (see subsection~\ref{ssec:aed}). +% +% \begin{macrocode} +\AtEndDocument{% + \message{AED: pagesLTS setting LastPage}% +% \end{macrocode} +% +% After this we issue a |\clearpage| to put out all floats, +% which are still floatig, remember the page number (if |fnsymbol|), +% and after that we place the \texttt{LastPage} label. If the old +% \textsf{lastpage} package was detected, we override its +% |LastPage| label. +% +% \begin{macrocode} + \clearpage% + \ifx\pagesLTS@pnc\pagesLTS@fns% + \def\pagesLTS@tmpA{\arabic{pagesLTS.fnsymbol.local}}% + \ifnum \pagesLTS@eso=\pagesLTS@tmpA% + \gdef\pagesLTS@rerun{0}% + \else% + \gdef\pagesLTS@rerun{1}% + \fi% + \if@filesw% + \immediate\write\@auxout{\string + \gdef\string\pagesLTS@eso{\pagesLTS@tmpA}}% + \fi% + \fi% + \pagesLTS@putlabel{LastPage}{\thepage}% +% \end{macrocode} +% +% We do not need the temporary definition any more. +% +% \begin{macrocode} + \let\pagesLTS@tmpA\undefined% + } + +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\AfterLastShipout} +% \indent |\AfterLastShipout| is a command from Heiko Oberdiek's +% \texttt{atveryend} package (see above). +% +% \begin{macrocode} +\AfterLastShipout{% +% \end{macrocode} +% +% The number of pages with the \textsf{fnsymbol} page numbering scheme, +%|\pagesLTS@esov|, is saved via the \xfile{.aux} file: +% +% \begin{macrocode} + \if@filesw% + \immediate\write\@auxout{\string + \setcounter{pagesLTS.fnsymbol.local}{\pagesLTS@esov}}% + \fi% +% \end{macrocode} +% +% If the \textsf{hyperref} package is in use, and the page numbering scheme +% of the last page is \textsf{fnsymbol}, everything is quite more complicated. +% Therefore |\lastpageref| is switched from simple |\lastpagereftxt| +% to the more difficult |\lastpagerefend|. +% +% \begin{macrocode} + \ifx\pagesLTS@hyper\pagesLTS@one% + \ifx\pagesLTS@pnc\pagesLTS@fns% + \if@filesw% + \immediate\write\@auxout{\string + \gdef\string\lastpageref{\string\lastpagerefend}}% + \fi% + \fi% + \fi% +% \end{macrocode} +% +% At the call of a |\pagenumbering{...}| command, everything +% for a split page numbering scheme is organized. For the last +% page numbering scheme, there is no |\pagenumbering{...}| command +% at the end, so we need to handle this here: +% +% \begin{macrocode} + \pagesLTS@ifcounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}% + \setcounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}{% + \value{pagesLTS.current.local.\pagesLTS@pnc}}% +% \end{macrocode} +% +% And we are one page after the last one (|\AfterLastShipout|!), +% so we go back one page. +% +% \begin{macrocode} + \addtocounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}{-1} + \ifnum \value{pagesLTS.pnc.\pagesLTS@pnc}>1% + \pagesLTS@ifcounter{pagesLTS.tmpA}% + \setcounter{pagesLTS.tmpA}{\value{pagesLTS.pnc.\pagesLTS@pnc}}% + \addtocounter{pagesLTS.tmpA}{-1}% + \pagesLTS@ifcounter{pagesLTS.tmpB}% + \addtocounter{pagesLTS.tmpB}{\value{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.tmpA}.local.count}}% + \addtocounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}{% + -\value{pagesLTS.tmpB}}% + \fi% + \if@filesw% + \immediate\write\@auxout{\string + \pagesLTS@ifcounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.cnt}}% + \edef\pagesLTS@tmpA{\arabic{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}}% + \immediate\write\@auxout{\string + \setcounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.cnt}{\pagesLTS@tmpA}}% + \let\pagesLTS@tmpA\undefined% + \fi% +% \end{macrocode} +% +% We need to save (via the \xfile{.aux} file) the page name |\thepage| and +% the page number |\arabic{CurrentPage}| of the last page, +% in case the last page has \textsf{fnsymbol} page numbering scheme. +% +% \begin{macrocode} + \addtocounter{page}{-1}% + \edef\pagesLTS@tmpA{\thepage}% + \if@filesw% + \immediate\write\@auxout{\string + \gdef\string\pagesLTS.lastpage{\pagesLTS@tmpA}}% + \fi% + \addtocounter{page}{+1}% + \addtocounter{CurrentPage}{-1}% + \def\pagesLTS@tmpB{\arabic{CurrentPage}}% + \if@filesw% + \immediate\write\@auxout{\string + \setcounter{pagesLTS.pagenr}{\pagesLTS@tmpB}}% + \fi% + \addtocounter{CurrentPage}{+1}% +% \end{macrocode} +% +% \pagebreak +% +% The \texttt{VeryLastPage} label is set here, and when +% |\lastpageref{VeryLastPage}| instead of |\lastpageref{LastPage}| is used, +% it should really point to the last page. +% |LastPage| and |VeryLastPage| should be identical, +% unless a package was active with output |\AtEndDocument| +% \textit{after} the \textsf{pagesLTS} package. +% +% \begin{macrocode} + \message{AED: pagesLTS setting VeryLastPage via AfterLastShipout}% + \pagesLTS@putlabel{VeryLastPage}{\thepage}% +% \end{macrocode} +% +% The \texttt{LastPages} label is set here, and +% |\lastpageref{LastPages}| gives the total number of pages +% and points to the (very) last page. +% +% \begin{macrocode} + \message{AED: pagesLTS setting LastPages via AfterLastShipout}% + \pagesLTS@putlabels% +% \end{macrocode} +% +% We do not need the temporary definitions any more. +% +% \begin{macrocode} + \let\pagesLTS@tmpA\undefined% + \let\pagesLTS@tmpB\undefined% + } + +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\AtVeryEndDocument} +% \indent |\AtVeryEndDocument{...}| is even later: +% \begin{quote} +% \textquotedblleft The code is called after the \xext{aux} file +% is closed and read in again. It is the place for final checks, +% rerun hints, final messages.\textquotedblright +% \end{quote} +% (\textsf{atveryend} package of Heiko Oberdiek, v1.5 as of 2010/03/24)\\ +% Here it is used for a rerun hint. Unfortunately, this hint is presented +% to the user \textit{before} the list of used +% files/styles/classes/packages\ldots (of |\listfiles| command), +% so the user has a chance to miss it.\\ +% For example if the page numbering scheme of the last page +% of the \textsf{pagesLTS-example.tex} file is changed to |fnsymbol| and two runs +% of \pdfLaTeX\ are done, \pdfLaTeX\ will be happy and will not complain +% about changed labels. But indeed, a \textit{third} run is necessary +% and indicated by the warning message below. +% +% \begin{macrocode} +\AtVeryEndDocument{% + \ifx\pagesLTS@rerun\pagesLTS@one% + \PackageWarningNoLine{pagesLTS}{Label(s) may have changed.\MessageBreak% + Rerun to get cross-references right.\MessageBreak% + }% + \fi% + } + +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +%</package> +% \end{macrocode} +% +% \newpage +% +% \section{Installation} +% +% \subsection{Downloads\label{ss:Downloads}} +% +% Everything \textit{should} be available on \CTAN{}, \url{ftp://ftp.ctan.org/tex-archive/}, +% but may need additional packages themselves.\\ +% +% \DescribeMacro{pagesLTS.dtx} +% For unpacking the |pagesLTS.dtx| file and constructing the documentation it is required: +% \begin{description} +% \item[-] \TeX Format \LaTeXe, 1994/06/01, v2$\varepsilon $: \CTAN{} +% +% \item[-] document class \textsf{ltxdoc}, 2007/11/11, v2.0u, \CTAN{macros/latex/base/ltxdoc.dtx} +% +% \item[-] package \textsf{holtxdoc}, 2010/04/24, v0.19, \CTAN{macros/latex/contrib/oberdiek/holtxdoc.dtx} +% +% \item[-] package \textsf{hypdoc}, 2010/03/26, v1.9, \CTAN{macros/latex/contrib/oberdiek/hypdoc.dtx} +% +% \item[-] package \textsf{geometry}, 2010/03/13, v5.3, \CTAN{macros/latex/contrib/geometry/geometry.dtx} +% \end{description} +% +% \DescribeMacro{pagesLTS.sty} +% The |pagesLTS.sty| for \LaTeXe\ (i.\,e. all documents using +% the \textsf{pagesLTS} package) requires: +% \begin{description} +% \item[-] \TeX Format \LaTeXe, 1994/06/01, v2$\varepsilon $, \CTAN{} +% +% \item[-] package \textsf{atveryend}, 2010/03/24, v1.5, \CTAN{macros/latex/contrib/oberdiek/atveryend.dtx} +% +% \item[-] package \textsf{everyshi}, 2001/05/15, v3.00, \CTAN{macros/latex/contrib/ms/everyshi.dtx} +% +% \item[-] package \textsf{kvoptions}, 2010/02/22, v3.7, \CTAN{macros/latex/contrib/oberdiek/kvoptions.dtx} +% +% \item[-] package \textsf{undolabl}, 2010/06/03, v1.0b, \CTAN{macros/latex/contrib/muench/undolabl.dtx}\\ +% (submitted, should become available at that location soon) +% \end{description} +% +% \DescribeMacro{lastpage209.sty} +% The |lastpage209.sty| for \LaTeX209\ (i.\,e. all documents using +% the \textsf{lastpage209} package) requires: +% \begin{description} +% \item[-] \TeX Format \LaTeX, v2.09 +% \end{description} +% but only provides the |LastPage| Label - nothing else!\\ +% (You can get it also by un-commenting the\\ +% \texttt{ \%\% \textbackslash file\{lastpage209.sty\}\{\textbackslash from\{pagesLTS.dtx\}\{lastpage209\}\}\% }\\ +% line in the \xfile{pagesLTS.ins} file and running\\ +% |tex pagesLTS.ins|.)\\ +% +% \DescribeMacro{pagesLTS-example.tex} +% The |pagesLTS-example.tex| requires the same files as all +% documents using the \textsf{pagesLTS} package, and additionally: +% \begin{description} +% \item[-] class \textsf{article}, 2007/10/19, v1.4h, from \textsf{classes.dtx}:\\ +% \CTAN{macros/latex/base/classes.dtx} +% +% \item[-] package \textsf{alphalph}, 2010/04/18, v2.3, \CTAN{macros/latex/contrib/oberdiek/alphalph.dtx} +% +% \item[-] package \textsf{lipsum}, 2005/01/26, v1.0, \CTAN{macros/latex/contrib/lipsum/lipsum.dtx} +% +% \item[-] package \textsf{showkeys}, 2007/08/07, v3.15, \CTAN{macros/latex/required/tools/showkeys.dtx} +% +% \item[-] package \textsf{hyperref}, 2010/05/13, v6.81e, \CTAN{macros/latex/contrib/hyperref.zip} +% +% \item[-] package \textsf{pagesLTS}, 2010/06/03, v1.1b, \CTAN{macros/latex/contrib/muench/pagesLTS/pagesLTS.dtx}\\ +% (submitted, should become available at that location soon)\\ +% (Well, it is the example file for this package, and because you are reading the +% documentation for the \textsf{pagesLTS} package, it can be assumed that you already +% have some version of it -- is it the current one?) +% \end{description} +% +% \DescribeMacro{papermas} +% The \textsf{papermas} package is not required, but requires itself the +% the \textsf{pagesLTS} package and can be considered as kind of add-on. +% It should become available at CTAN soon: +% \begin{description} +% \item[-] package \textsf{papermas}, 2010/06/03, v1.0b, \CTAN{macros/latex/contrib/muench/papermas/papermas.dtx} +% \end{description} +% +% \DescribeMacro{endfloat} +% The \textsf{endfloat} package is not required, but because +% the \textsf{pagesLTS} package is incompatibel with very old versions +% of the \textsf{endfloat} package (see subsection~\ref{sec:endfloat}), +% here the recent one is listed: +% \begin{description} +% \item[-] package \textsf{endfloat}, 1995/10/11, v2.4i, \CTAN{macros/latex/contrib/endfloat/endfloat.dtx} +% \end{description} +% +% \DescribeMacro{prelim2e} +% The \textsf{prelim2e} package is not required either, but because +% |Prelim@EveryShipout| code was taken from that package, it is listed, too: +% \begin{description} +% \item[-] package \textsf{prelim2e}, 2009/05/29, v1.3, \CTAN{macros/latex/contrib/ms/prelim2e.dtx} +% \end{description} +% +% \DescribeMacro{fancyhdr} +% \DescribeMacro{nccfancyhdr} +% Neither \textsf{fancyhdr} nor \textsf{nccfancyhdr} package is required +% (the \textsf{lastpage} package used its precessor \textsf{fancyheadings}), +% but because they were mentioned, also they are listed here: +% \begin{description} +% \item[-] package \textsf{fancyhdr}, 2005/03/22, v3.2, \CTAN{macros/latex/contrib/fancyhdr.zip} +% +% \item[-] package \textsf{nccfancyhdr}, 2004/12/07, v1.1, \CTAN{macros/latex/contrib/ncctools/source/nccfancyhdr.dtx} +% \end{description} +% +% \DescribeMacro{count1to} +% \DescribeMacro{nofm} +% \DescribeMacro{totpages} +% \DescribeMacro{lastpage} +% \DescribeMacro{zref} +% As possible alternatives in section \ref{sec:Alternatives} there are listed +% \begin{description} +% \item[-] package \textsf{count1to}, 2009/05/24, v2.1, \CTAN{macros/latex/contrib/ms/count1to.dtx} +% +% \item[-] package \textsf{nofm}, 1991/02/25, v?.?, +% \url{ftp://tug.ctan.org/pub/tex-archive/obsolete/macros/latex209/contrib/misc/nofm.sty} +% does not work with e.\,g. \textsf{hyperref} +% +% \item[-] package \textsf{totpages}, 2005/09/19, v2.00, \CTAN{macros/latex/contrib/totpages/totpages.dtx} +% +% \item[-] package \textsf{lastpage}, 1994/07/20, v0.1b, \CTAN{macros/latex/contrib/lastpage/lastpage.dtx} +% +% \item[-] package \textsf{zref}, 2010/05/01, v2.17, \CTAN{macros/latex/contrib/oberdiek/zref.dtx} +% \end{description} +% +% \DescribeMacro{Oberdiek} +% \DescribeMacro{holtxdoc} +% \DescribeMacro{atveryend} +% \DescribeMacro{kvoptions} +% \DescribeMacro{alphalph} +% \DescribeMacro{zref} +% All packages of Heiko Oberdiek's bundle `oberdiek' +% (especially \textsf{holtxdoc}, \textsf{atveryend}, +% \textsf{kvoptions}, \textsf{alphalph}, \textsf{zref}) +% are also available in a TDS compliant ZIP archive:\\ +% \CTAN{install/macros/latex/contrib/oberdiek.tds.zip}.\\ +% \textbf{Warning}: holtxdoc, 2010/04/24 v0.19, requires the packages +% \begin{description} +% \item[-] hypdoc, 2010/03/26, v1.9 +% \item[-] hyperref, 2010/03/30, v6.80u (latest: 2010/05/13, v6.81e) +% \item[-] pdftexcmds, 2010/04/01, v0.9 +% \item[-] ltxcmds, 2010/03/09, v1.4 (latest: 2010/04/26, v1.7) +% \item[-] hologo, 2010/04/24, v1.2 +% \item[-] array (latest: 2008/09/09, v2.4c) +% \end{description} +% (or more recent versions) and does neither work with +% nor check for earlier versions!\\ +% (It is probably best to download\\ +% \CTAN{install/macros/latex/contrib/oberdiek.tds.zip} +% and use this, because the packages in there should be both +% recent and compatible.)\\ +% +% \pagebreak +% +% \subsection{Package, unpacking TDS} +% +% \paragraph{Package.} This package should become available soon on \CTAN{} +% \begin{description} +% \item[\CTAN{macros/latex/contrib/muench/pagesLTS/pagesLTS.dtx}]\hspace*{0.1cm} \\ +% The source file. +% \item[\CTAN{macros/latex/contrib/muench/pagesLTS/pagesLTS.ins}]\hspace*{0.1cm} \\ +% The installation file. +% \item[\CTAN{macros/latex/contrib/muench/pagesLTS/pagesLTS.drv}]\hspace*{0.1cm} \\ +% The driver to generate the documentation. +% \item[\CTAN{macros/latex/contrib/muench/pagesLTS/ltxdoc.cfg}]\hspace*{0.1cm} \\ +% The \LaTeX documentation configuration file, also for generating the documentation. +% \item[\CTAN{macros/latex/contrib/muench/pagesLTS/pagesLTS.pdf}]\hspace*{0.1cm} \\ +% The documentation. +% \item[\CTAN{macros/latex/contrib/muench/pagesLTS/pagesLTS.sty}]\hspace*{0.1cm} \\ +% The \xext{sty}le file. +% \item[\CTAN{macros/latex/contrib/muench/pagesLTS/pagesLTS-example.tex}]\hspace*{0.1cm} \\ +% The example file. +% \item[\CTAN{macros/latex/contrib/muench/pagesLTS/pagesLTS-example.pdf}]\hspace*{0.1cm} \\ +% The compiled example file, as it should look like. +% \item[\CTAN{install/macros/latex/contrib/muench/pagesLTS/pagesLTS.tds.zip}]\hspace*{0.1cm} \\ +% Everything in TDS compliant, compiled format. +% \end{description} +% +% For required other packages, see the preceding subsection. +% +% \paragraph{Unpacking.} The \xfile{.dtx} file is a self-extracting +% \docstrip\ archive. The files are extracted by running the +% \xfile{.dtx} through \plainTeX: +% \begin{quote} +% \verb|tex pagesLTS.dtx| +% \end{quote} +% +% About generating the documentation see paragraph~\ref{GenDoc} below.\\ +% +% \paragraph{TDS.} Now the different files must be moved into +% the different directories in your installation TDS tree +% (also known as \xfile{texmf} tree): +% \begin{quote} +% \def\t{^^A +% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}} +% pagesLTS.sty & tex/latex/muench/pagesLTS.sty\\ +% pagesLTS.pdf & doc/latex/muench/pagesLTS.pdf\\ +% pagesLTS-example.tex & doc/latex/muench/pagesLTS-example.tex\\ +% pagesLTS-example.pdf & doc/latex/muench/pagesLTS-example.pdf\\ +% pagesLTS.dtx & source/latex/muench/pagesLTS.dtx\\ +% (lastpage209.sty & tex/latex/lastpage209.sty for \LaTeX209)\\ +% \end{tabular}^^A +% }^^A +% \sbox0{\t}^^A +% \ifdim\wd0>\linewidth +% \begingroup +% \advance\linewidth by\leftmargin +% \advance\linewidth by\rightmargin +% \edef\x{\endgroup +% \def\noexpand\lw{\the\linewidth}^^A +% }\x +% \def\lwbox{^^A +% \leavevmode +% \hbox to \linewidth{^^A +% \kern-\leftmargin\relax +% \hss +% \usebox0 +% \hss +% \kern-\rightmargin\relax +% }^^A +% }^^A +% \ifdim\wd0>\lw +% \sbox0{\small\t}^^A +% \ifdim\wd0>\linewidth +% \ifdim\wd0>\lw +% \sbox0{\footnotesize\t}^^A +% \ifdim\wd0>\linewidth +% \ifdim\wd0>\lw +% \sbox0{\scriptsize\t}^^A +% \ifdim\wd0>\linewidth +% \ifdim\wd0>\lw +% \sbox0{\tiny\t}^^A +% \ifdim\wd0>\linewidth +% \lwbox +% \else +% \usebox0 +% \fi +% \else +% \lwbox +% \fi +% \else +% \usebox0 +% \fi +% \else +% \lwbox +% \fi +% \else +% \usebox0 +% \fi +% \else +% \lwbox +% \fi +% \else +% \usebox0 +% \fi +% \else +% \lwbox +% \fi +% \else +% \usebox0 +% \fi +% \end{quote} +% If you have a \xfile{docstrip.cfg} that configures and enables \docstrip's +% TDS installing feature, then some files can already be in the right +% place, see the documentation of \docstrip. +% +% \subsection{Refresh file name databases} +% +% If your \TeX~distribution (\teTeX, \mikTeX,\dots) relies on file name +% databases, you must refresh these. For example, \teTeX\ users run +% \verb|texhash| or \verb|mktexlsr|. +% +% \subsection{Some details for the interested} +% +% \paragraph{Unpacking with \LaTeX.} +% The \xfile{.dtx} chooses its action depending on the format: +% \begin{description} +% \item[\plainTeX:] Run \docstrip\ and extract the files. +% \item[\LaTeX:] Generate the documentation. +% \end{description} +% If you insist on using \LaTeX\ for \docstrip\ (really, +% \docstrip\ does not need \LaTeX), then inform the autodetect routine +% about your intention: +% \begin{quote} +% \verb|latex \let\install=y\input{pagesLTS.dtx}| +% \end{quote} +% Do not forget to quote the argument according to the demands +% of your shell. +% +% \paragraph{Generating the documentation.\label{GenDoc}} +% You can use both the \xfile{.dtx} or the \xfile{.drv} to generate +% the documentation. The process can be configured by the +% configuration file \xfile{ltxdoc.cfg}. For instance, put the following +% line into this file, if you want to have A4 as paper format: +% \begin{quote} +% \verb|\PassOptionsToClass{a4paper}{article}| +% \end{quote} +% +% \noindent An example follows how to generate the +% documentation with \pdfLaTeX : +% +% \begin{quote} +%\begin{verbatim} +%pdflatex pagesLTS.dtx +%makeindex -s gind.ist pagesLTS.idx +%pdflatex pagesLTS.dtx +%makeindex -s gind.ist pagesLTS.idx +%pdflatex pagesLTS.dtx +%\end{verbatim} +% \end{quote} +% +% \subsection{Compiling the example} +% +% The example file, \textsf{pagesLTS-example.tex}, can be compiled via\\ +% \indent |latex pagesLTS-example.tex|\\ +% or (recommended)\\ +% \indent |pdflatex pagesLTS-example.tex|\\ +% and will need \textit{at least} (!) three compiler runs to get +% all references right. +% +% \section{Things suggested to be done\label{sec:todo}} +% +% \begin{itemize} +% \item Include a correct checksum for \textsf{pagesLTS}. +% \item Insert the final references where to get the files at \CTAN{}. +% \end{itemize} +% +% \pagebreak +% +% \section{Acknowledgements} +% +% I (H.-Martin M\"{u}nch) would like to thank Jeffrey P. Goldberg +% (jeffrey+news at goldmark dot org) for inventing the +% \textsf{lastpage} package. This package first started as +% a revision of the \textsf{lastpage} package, but it became +% obviouse that a replacement was needed. +% Further I would like to thank Heiko Oberdiek +% (heiko dot oberdiek at googlemail dot com) for providing +% the |\erroralphalph| command as well as +% a~lot~(!) of usefull packages (from which I also got everything I +% know about creating a file in \xfile{dtx} format, ok, say it: copying), +% Martin Schr\"{o}der (martin at oneiros dot de) for his \textsf{prelim2e} package, +% from which I got the |Prelim@EveryShipout| code, +% Ulrich Diez (eu\_angelion at web dot de) for his code +% for my \textsf{undolabl} package, which allows overwriting of labels, +% Andres L\"{o}h (andres at cs dot uu dot nl) +% for the code to determine the current page numbering scheme, +% and the \Newsgroup{comp.text.tex} and \Newsgroup{de.comp.text.tex} +% newsgroups for their help in all things \TeX. +% +% \phantomsection +% \begin{History}\label{History} +% \begin{Version}{1994/06/17, \textsf{lastpage}} +% \item \textsf{lastpage} v0.99a: First shot by Jeffrey P. Goldberg. +% \end{Version} +% \begin{Version}{1994/06/25, \textsf{lastpage}} +% \item \textsf{lastpage} v0.1b: Last version number created by Jeffrey P. Goldberg. +% \end{Version} +% \begin{Version}{1994/07/20, \textsf{lastpage}} +% \item \textsf{lastpage} v0.1b (again): Documentation updated by Jeffrey P. Goldberg.\\ +% The main source code of the \textsf{lastpage} package 1994/07/20 v0.1b was:\\ +% \begin{verbatim} +% \NeedsTeXFormat{LaTeX2e}[1994/06/01] +% \ProvidesPackage{lastpage}[1994/07/20 v0.1b +% LaTeX2e package for refs to last page number (JPG)] +% \def\lastpage@putlabel{\addtocounter{page}{-1}% +% \immediate\write\@auxout{\string +% \newlabel{LastPage}{{}{\thepage}}}% +% \addtocounter{page}{1}} +% \AtEndDocument{% +% \message{AED: lastpage setting LastPage}% +% \clearpage\pagesLTS@putlabel}% +% \endinput +% \end{verbatim} +% and then \textsf{hyperref} even redefines |\lastpage@putlabel|. +% \end{Version} +% \begin{Version}{2010/02/18, \textsf{lastpage}} +% \item \textsf{lastpage} v1.1: Proposed |LastPages| label by H.-Martin M\"{u}nch +% on \Newsgroup{comp.text.tex} +% \end{Version} +% \begin{Version}{2010/05/15 v1.0} +% \item \textsf{pagesLTS} Complete rewriting of the package, so as to work with +% \textbf{more than one page numbering scheme}; using \texttt{\textbackslash AtVeryEnd} +% for \texttt{VeryLastPage}; upgrade from \textsf{fancyheadings} to +% \textsf{fancyhdr} package, then removed the need for a \textsf{fancyhdr} +% package at all. +% \item Rewriting of the package, so as to work with the \textsf{fnsymbol} +% page numbering scheme (even on the last page). +% \item Introduction of \textsf{kvoptions} into this package. +% \item Check for incompatible \textsf{endfloat} package. +% \item \textsf{lastpage209.sty} for \LaTeX209. +% \item Replacement of |\filedate|, |-version|, |-name|,\ldots\ because +% of \LaTeX~bug 2705:\\ +% Synopsis: Possible problem with |\fileversion| and |\filedate|\\ +% \url{http://www.latex-project.org/cgi-bin/ltxbugs2html?category=LaTeX&responsible=anyone&state=anything&keyword=lastpage&pr=latex%2F2705&search=} +% \item \textsf{alphalph} support included. +% \item Page numbering extension |\erroralph| of Heiko Oberdiek included. +% \item (Page-) Numbering extension for |roman| and |Roman| numbers included. +% \item Incompatible, old \textsf{lastpage} package \textquotedblleft killed\textquotedblright. +% \item Example |pagesLTS-example.tex|. +% \item Alternatives listing (section \ref{sec:Alternatives}). +% \item Listing of \TeX\ sources (subsection \ref{ss:Downloads}). +% \item A~lot~(!) of details. +% \item Complete rewriting of the documentation. +% \item Everything in DTX framework. +% \item New package name: \textsf{pagesLTS} for Last, Total, +% and page numbering Schemes pages. +% \end{Version} +% \begin{Version}{2010/06/01 v1.1} +% \item Abstract changed: Negative \texttt{roman} and \texttt{Roman} page +% numbers are now possible. +% \item Some references to other packages have been updated. +% \item Several typing mistakes have been corrected +% (and new ones have been included probably) - +% both in the \xfile{sty}le file as well as in this documentation. +% \end{Version} +% \begin{Version}{2010/06/03 v1.1b} +% \item Corrected a bug in |\XXRoman|, where |\roman| instead of |\Roman| had been used. +% \item New \textsf{papermas} package mentioned. +% \item Updated references to other packages. +% \item TDS locations updated. +% \item Several changes in the documentation and the Readme file. +% \end{Version} +% \end{History} +% +% % \PrintChanges +% +% \bigskip +% +% When you find a mistake or have a suggestion for an improvement of this package, +% please send an e-mail to the maintainer, thanks!\\ +% +% \bigskip +% +% Note: J and Y are not missing in the index, but no commands beginning +% with these letters have been used in this \textsf{pagesLTS} package. +% +% \newpage +% +% \PrintIndex +% +% \Finale +% +\endinput
\ No newline at end of file diff --git a/Master/texmf-dist/source/latex/pageslts/pagesLTS.ins b/Master/texmf-dist/source/latex/pageslts/pagesLTS.ins new file mode 100644 index 00000000000..c833937d01a --- /dev/null +++ b/Master/texmf-dist/source/latex/pageslts/pagesLTS.ins @@ -0,0 +1,161 @@ +%% +%% This is file `pagesLTS.ins', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% pagesLTS.dtx (with options: `install') +%% +%% This is a generated file. +%% +%% IMPORTANT NOTICE: +%% On the first page backslash pagenumbering should be called +%% (with the appropriate argument out of e.g. +%% * roman - Lowercase Roman numerals: i, ii, iii, iv,... +%% * Roman - Uppercase Roman numerals: I, II, III, IV,... +%% * arabic - Arabic numerals: 1, 2, 3, 4,... +%% * alph - Lowercase letters: a, b, c, d,... +%% * Alph - Uppercase letters: A, B, C, D,... +%% * fnsymbol - Footnote symbols: *, † (ddagger), ‡ (dddagger), +%% § (mathsection),... +%% ). The command backslash pagenumbering is renewed, but no change +%% should be visible to the output text, because only labels are added. +%% backslash OrigPagenumbering can be used to get the original meaning +%% of backslash pagenumbering, but in that case this package does not +%% see the change in the page numbering scheme and will make mistakes. +%% The package takes options. +%% +%% The usual disclaimers apply: +%% If it doesn't work right that's your problem. +%% (Nevertheless, send an e-mail to the maintainer +%% when you find an error in this package.) +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either +%% version 1.3c of this license or (at your option) any later +%% version. This version of this license is in +%% http://www.latex-project.org/lppl/lppl-1-3c.txt +%% and the latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of +%% LaTeX version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is H.-Martin Muench +%% (Martin dot Muench at Uni-Bonn dot de). +%% +%% This package first started as a revision of the lastpage +%% package of Jeffrey P. Goldberg (jeffrey+news at goldmark dot org), +%% but it became obviouse that a replacement was needed. +%% +%% This work consists of the main source file pagesLTS.dtx +%% and the derived files +%% pagesLTS.sty, pagesLTS.pdf, pagesLTS.ins, pagesLTS.drv, +%% pagesLTS-example.tex. +%% +\input docstrip.tex + +\obeyspaces +\Msg{*****************************************************} +\Msg{* Installation *} +\Msg{* Package: pagesLTS v1.1b 2010/06/03 LaTeX2e package *} +\Msg{* Refers to special pages' numbers/names (HMM) *} +\Msg{*****************************************************} + +\keepsilent +\askforoverwritefalse + +\let\MetaPrefix\relax +\preamble + +This is a generated file. + +IMPORTANT NOTICE: +On the first page backslash pagenumbering should be called +(with the appropriate argument out of e.g. + * roman - Lowercase Roman numerals: i, ii, iii, iv,... + * Roman - Uppercase Roman numerals: I, II, III, IV,... + * arabic - Arabic numerals: 1, 2, 3, 4,... + * alph - Lowercase letters: a, b, c, d,... + * Alph - Uppercase letters: A, B, C, D,... + * fnsymbol - Footnote symbols: *, † (ddagger), ‡ (dddagger), + § (mathsection),... +). The command backslash pagenumbering is renewed, but no change +should be visible to the output text, because only labels are added. +backslash OrigPagenumbering can be used to get the original meaning +of backslash pagenumbering, but in that case this package does not +see the change in the page numbering scheme and will make mistakes. +The package takes options. + +The usual disclaimers apply: +If it doesn't work right that's your problem. +(Nevertheless, send an e-mail to the maintainer + when you find an error in this package.) + +This work may be distributed and/or modified under the +conditions of the LaTeX Project Public License, either +version 1.3c of this license or (at your option) any later +version. This version of this license is in + http://www.latex-project.org/lppl/lppl-1-3c.txt +and the latest version of this license is in + http://www.latex-project.org/lppl.txt +and version 1.3c or later is part of all distributions of +LaTeX version 2005/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is H.-Martin Muench +(Martin dot Muench at Uni-Bonn dot de). + +This package first started as a revision of the lastpage +package of Jeffrey P. Goldberg (jeffrey+news at goldmark dot org), +but it became obviouse that a replacement was needed. + +This work consists of the main source file pagesLTS.dtx +and the derived files + pagesLTS.sty, pagesLTS.pdf, pagesLTS.ins, pagesLTS.drv, + pagesLTS-example.tex. + +\endpreamble +\let\MetaPrefix\DoubleperCent + +\generate{% + \file{pagesLTS.ins}{\from{pagesLTS.dtx}{install}}% + \file{pagesLTS.drv}{\from{pagesLTS.dtx}{driver}}% + \file{ltxdoc.cfg}{\from{pagesLTS.dtx}{ltxdoc}}% + %%\file{lastpage209.sty}{\from{pagesLTS.dtx}{lastpage209}}% + \usedir{tex/latex/muench/pagesLTS}% + \file{pagesLTS.sty}{\from{pagesLTS.dtx}{package}}% + \usedir{doc/latex/muench/pagesLTS}% + \file{pagesLTS-example.tex}{\from{pagesLTS.dtx}{example}}% +} + +\obeyspaces +\Msg{**************************************************************} +\Msg{* *} +\Msg{* To finish the installation you have to move the following *} +\Msg{* file into a directory searched by TeX: *} +\Msg{* *} +\Msg{* pagesLTS.sty *} +\Msg{* *} +\Msg{* To produce the documentation run the file `pagesLTS.drv' *} +\Msg{* through (pdf)LaTeX, e. g. *} +\Msg{* pdflatex pagesLTS.dtx *} +\Msg{* makeindex -s gind.ist pagesLTS.idx *} +\Msg{* pdflatex pagesLTS.dtx *} +\Msg{* makeindex -s gind.ist pagesLTS.idx *} +\Msg{* pdflatex pagesLTS.dtx *} +\Msg{* *} +\Msg{* At least three runs are necessary e. g. to get the *} +\Msg{* references right! *} +\Msg{* *} +\Msg{* Happy TeXing! *} +\Msg{* *} +\Msg{**************************************************************} + +\endbatchfile + +\endinput +%% +%% End of file `pagesLTS.ins'. diff --git a/Master/texmf-dist/tex/latex/pageslts/pagesLTS.sty b/Master/texmf-dist/tex/latex/pageslts/pagesLTS.sty new file mode 100644 index 00000000000..91f8acb8a0b --- /dev/null +++ b/Master/texmf-dist/tex/latex/pageslts/pagesLTS.sty @@ -0,0 +1,975 @@ +%% +%% This is file `pagesLTS.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% pagesLTS.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% IMPORTANT NOTICE: +%% On the first page backslash pagenumbering should be called +%% (with the appropriate argument out of e.g. +%% * roman - Lowercase Roman numerals: i, ii, iii, iv,... +%% * Roman - Uppercase Roman numerals: I, II, III, IV,... +%% * arabic - Arabic numerals: 1, 2, 3, 4,... +%% * alph - Lowercase letters: a, b, c, d,... +%% * Alph - Uppercase letters: A, B, C, D,... +%% * fnsymbol - Footnote symbols: *, † (ddagger), ‡ (dddagger), +%% § (mathsection),... +%% ). The command backslash pagenumbering is renewed, but no change +%% should be visible to the output text, because only labels are added. +%% backslash OrigPagenumbering can be used to get the original meaning +%% of backslash pagenumbering, but in that case this package does not +%% see the change in the page numbering scheme and will make mistakes. +%% The package takes options. +%% +%% The usual disclaimers apply: +%% If it doesn't work right that's your problem. +%% (Nevertheless, send an e-mail to the maintainer +%% when you find an error in this package.) +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either +%% version 1.3c of this license or (at your option) any later +%% version. This version of this license is in +%% http://www.latex-project.org/lppl/lppl-1-3c.txt +%% and the latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of +%% LaTeX version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is H.-Martin Muench +%% (Martin dot Muench at Uni-Bonn dot de). +%% +%% This package first started as a revision of the lastpage +%% package of Jeffrey P. Goldberg (jeffrey+news at goldmark dot org), +%% but it became obviouse that a replacement was needed. +%% +%% This work consists of the main source file pagesLTS.dtx +%% and the derived files +%% pagesLTS.sty, pagesLTS.pdf, pagesLTS.ins, pagesLTS.drv, +%% pagesLTS-example.tex. +%% +\NeedsTeXFormat{LaTeX2e}[1994/06/01] +\ProvidesPackage{pagesLTS}[2010/06/03 v1.1b + Refers to special pages' numbers/names (HMM)]% + +%% Allow for things like\\ +%% |Page \thepage\ (\theCurrentPage; local: \theCurrentPageLocal) of % +%% \lastpageref{pagesLTS.roman}(\lastpageref{pagesLTS.roman.local}) + % +%% \lastpageref{pagesLTS.Roman}(\lastpageref{pagesLTS.Roman.local}) + % +%% \lastpageref{pagesLTS.arabic}(\lastpageref{pagesLTS.arabic.local}) + % +%% \lastpageref{pagesLTS.fnsymbol}(\lastpageref{pagesLTS.fnsymbol.local}) + % +%% \lastpageref{pagesLTS.alph}(\lastpageref{pagesLTS.alph.local}) + % +%% \lastpageref{pagesLTS.Alph}(\lastpageref{pagesLTS.Alph.local}) = % +%% \lastpageref{LastPages} pages.|\\ +%% to get\\ +%% 'Page d (57; local: 4) of ii(2) + XX(20) + *(1) + 30(30) + e(5) + C(3) = 61 pages.'. + +\RequirePackage{atveryend}[2010/03/24]% v1.5 +\RequirePackage{everyshi}[2001/05/15]%v 3.00 +\RequirePackage{kvoptions}[2010/02/22]% v3.7 +\RequirePackage{undolabl}[2010/06/03]% v1.0b +%% pagesLTS package uses Prelim@EveryShipout code from the +%% prelim2e package [2009/05/29 v1.3] by Martin Schr\"{o}der, thanks! + +%% pagesLTS may work with earlier versions of those packages, +%% but this was not tested. Please consider updating your packages +%% to the most recent version (if they are not already the most +%% recent version). + +%% The recent version of the endfloat package is v2.4i as of 1995/10/11. +%% The pagesLTS package is not fully compatible with version 2.0 +%% (and earlier) of the endfloat package, because those versions +%% redefined the \enddocument command. + +\SetupKeyvalOptions{family = pagesLTS,prefix = pagesLTS@} +\DeclareBoolOption[true]{pagecontinue} % \pagesLTS@pagecontinue +\DeclareStringOption{alphMult}[ab] +\DeclareStringOption{AlphMulti}[AB] +\DeclareBoolOption[true]{romanMult} +\DeclareBoolOption[true]{RomanMulti} +\DeclareBoolOption[true]{fnsymbolmult} + +\ProcessKeyvalOptions* + +\def\pagesLTS@zero{0} +\def\pagesLTS@one{1} + +\ifpagesLTS@pagecontinue% +\PackageInfo{pagesLTS}{Option pagecontinue enabled\MessageBreak% + (maybe by default):\MessageBreak% + The pagesLTS package will continue the page numbering,\MessageBreak% + when the same page numbering scheme is used twice.\MessageBreak% + If you do not want this, call pagesLTS with option\MessageBreak% + pagecontinue=false\MessageBreak% + (or use \ setcounter{page}=1).\MessageBreak% +}% +\else% +\PackageWarningNoLine{pagesLTS}{Option pagecontinue is false:\MessageBreak% + The pagesLTS package was used, but the option\MessageBreak% + pagecontinue was set to false.\MessageBreak% + If you want the page numbers to be continued,\MessageBreak% + when the same page numbering scheme is used twice,\MessageBreak% + please call pagesLTS with option pagecontinue=true,\MessageBreak% + otherwise the page number is reset to one each time\MessageBreak% + the page numbering scheme is changed.\MessageBreak% + For details please see the documentation!\MessageBreak% +}% +\fi% + +\def\pagesLTS@ab{ab} +\def\pagesLTS@bb{bb} +\def\pagesLTS@ABi{AB} +\def\pagesLTS@BBi{BB} +\def\pagesLTS@messageaMz{Option alphMult=0 found:\MessageBreak% + The pagesLTS package was used, but the option\MessageBreak% + alphMult was set to 0 (zero).\MessageBreak% + If you want the page numbers to be extended\MessageBreak% + after z, you have to organize this yourself now.\MessageBreak% + For automatic continuation, please use the\MessageBreak% + alphalph package and call pagesLTS\MessageBreak% + with option alphMult=ab (for aa, ab, ac, ad,...) or\MessageBreak% + with option alphMult=bb (for aa, bb, cc, dd,...).\MessageBreak% + For details please see the documentation!\MessageBreak% +} +\def\pagesLTS@messageAMiz{Option AlphMulti=0 found:\MessageBreak% + The pagesLTS package was used, but the option\MessageBreak% + AlphMulti was set to 0 (zero).\MessageBreak% + If you want the page numbers to be extended\MessageBreak% + after Z, you have to organize this yourself now.\MessageBreak% + For automatic continuation, please use the\MessageBreak% + alphalph package and call pagesLTS\MessageBreak% + with option AlphMulti=AB (for AA, AB, AC, AD,...) or\MessageBreak% + with option AlphMulti=BB (for AA, BB, CC, DD,...).\MessageBreak% + For details please see the documentation!\MessageBreak% +} +\def\pagesLTS@messagefsmz{Option fnsymbolmult is set to false:\MessageBreak% + The pagesLTS package was used, but the option\MessageBreak% + fnsymbolmult was set to false.\MessageBreak% + If you want the page numbering of the footnotesymbol\MessageBreak% + scheme to be extended using the AlphAlph package,\MessageBreak% + please call pagesLTS with option fnsymbolmult=true,\MessageBreak% + otherwise page numbers of the footnotesymbol scheme\MessageBreak% + greater than nine will need to be defined otherwise.\MessageBreak% + For details please see the documentation!\MessageBreak% +} + +\ifx\pagesLTS@alphMult\pagesLTS@ab% + \relax% +\else% + \ifx\pagesLTS@alphMult\pagesLTS@bb% + \relax% + \else% + \ifx\pagesLTS@alphMult\pagesLTS@zero% + \PackageWarningNoLine{pagesLTS}{\pagesLTS@messageaMz }% + \else% + \PackageError{pagesLTS}{Unknown option value}% + {The pagesLTS package was used with option\MessageBreak% + alphMult= \pagesLTS@alphMult . Only values\MessageBreak% + ab, bb, and 0 (zero) are valid.\MessageBreak% + The default ab is set.\MessageBreak% + For details please see the documentation!\MessageBreak% + }% + \setkeys{pagesLTS}{alphMult=ab}% + \fi% + \fi% +\fi% + +\ifx\pagesLTS@AlphMulti\pagesLTS@ABi% + \relax% +\else% + \ifx\pagesLTS@AlphMulti\pagesLTS@BBi% + \relax% + \else% + \ifx\pagesLTS@AlphMulti\pagesLTS@zero% + \PackageWarningNoLine{pagesLTS}{\pagesLTS@messageAMiz }% + \else% + \PackageError{pagesLTS}{Unknown option value}% + {The pagesLTS package was used with option\MessageBreak% + AlphMulti= \pagesLTS@AlphMulti . Only values\MessageBreak% + AB, BB, and 0 (zero) are valid.\MessageBreak% + The default AB is set.\MessageBreak% + For details please see the documentation!\MessageBreak% + }% + \setkeys{pagesLTS}{AlphMulti=AB}% + \fi% + \fi% +\fi% + +\ifpagesLTS@romanMult% + \PackageInfo{pagesLTS}{Option romanMult enabled\MessageBreak% + (maybe by default):\MessageBreak% + The pagesLTS package will extend the page numbering\MessageBreak% + of the roman scheme below i with\MessageBreak% + 0, -i, -ii, -iii, -iv,...\MessageBreak% + If you do not want this, call pagesLTS with option\MessageBreak% + romanMult=false.\MessageBreak% + }% +\else% + \PackageWarningNoLine{pagesLTS}{Option romanMult is set to false:\MessageBreak% + The pagesLTS package was used, but the option\MessageBreak% + romanMult was set to false.\MessageBreak% + If you want the page numbering of the roman scheme\MessageBreak% + to be extended below i,\MessageBreak% + please call pagesLTS with option romanMult=true,\MessageBreak% + otherwise zero and negative page numbers of the\MessageBreak% + roman scheme will need to be defined otherwise.\MessageBreak% + For details please see the documentation!\MessageBreak% + }% +\fi% + +\ifpagesLTS@RomanMulti% + \PackageInfo{pagesLTS}{Option RomanMulti enabled\MessageBreak% + (maybe by default):\MessageBreak% + The pagesLTS package will extend the page numbering\MessageBreak% + of the Roman scheme below I with\MessageBreak% + 0, -I, -II, -III, -IV,...\MessageBreak% + If you do not want this, call pagesLTS with option\MessageBreak% + RomanMulti=false.\MessageBreak% + }% +\else% + \PackageWarningNoLine{pagesLTS}{Option RomanMulti is set to false:\MessageBreak% + The pagesLTS package was used, but the option\MessageBreak% + RomanMulti was set to false.\MessageBreak% + If you want the page numbering of the Roman scheme\MessageBreak% + to be extended below i,\MessageBreak% + please call pagesLTS with option RomanMulti=true,\MessageBreak% + otherwise zero and negative page numbers of the\MessageBreak% + Roman scheme will need to be defined otherwise.\MessageBreak% + For details please see the documentation!\MessageBreak% + }% +\fi% + +\ifpagesLTS@fnsymbolmult% + \PackageInfo{pagesLTS}{Option fnsymbolmult enabled\MessageBreak% + (maybe by default):\MessageBreak% + The pagesLTS package will extend the page numbering\MessageBreak% + of the footnotesymbol scheme using the AlphAlph\MessageBreak% + package.\MessageBreak% + If you do not want this, call pagesLTS with option\MessageBreak% + fnsymbolmult=false.\MessageBreak% + }% +\else% + \PackageWarningNoLine{pagesLTS}{\pagesLTS@messagefsmz }% +\fi% + +\def\pagesLTS@pnc{0} +\def\pagesLTS@called{0} +\def\pagesLTS@fns{fnsymbol} +\def\pagesLTS@alph{alph} +\def\pagesLTS@Alph{Alph} +\def\pagesLTS@AlphAlph{0} +\def\pagesLTS@hyper{0} +\def\pagesLTS@rerun{0} +\def\pagesLTS@eso{0} +\def\pagesLTS@esov{0} +\def\lastpageref{\lastpagereftxt} +\def\pagesLTS@messageNPN{% + The pagesLTS package was used, but\MessageBreak% + \textbackslash pagenumbering\MessageBreak% + was not called at the beginning of the document\MessageBreak% + (maybe earlier or later).\MessageBreak% + Please use \textbackslash pagenumbering\MessageBreak% + (with an argument like arabic, roman, Roman,\MessageBreak% + fnsymbol, alph, or Alph) at the beginning\MessageBreak% + of your document! Otherwise your document\MessageBreak% + will probably compile, but the pagesLTS\MessageBreak% + package might not be able to get all labels\MessageBreak% + for the references to the respective pages\MessageBreak% + right.\MessageBreak% + } + +\let\OrigPagenumbering\pagenumbering + +\newcounter{CurrentPage} +\setcounter{CurrentPage}{1} +\def\theCurrentPageLocal{\arabic{pagesLTS.current.local.\pagesLTS@pnc}} +\newcounter{pagesLTS.pagenr} +\newcounter{pagesLTS.fnsymbol} +\newcounter{pagesLTS.fnsymbol.local} +\newcounter{pagesLTS.fnsymbol.cont} +\newcounter{pagesLTS.double.0} +\newcounter{pagesLTS.current.local.0} +\setcounter{pagesLTS.current.local.0}{1} +\newcounter{pagesLTS.pnc.0} + +\newcommand{\xroman}[1]{% + \ifnum\value{#1}>0 % + \roman{#1}% + \else% + \ifnum\value{#1}<0 % + -\romannumeral\number-\arabic{#1} + \else% + 0% + \fi% + \fi% + } + +\newcommand{\XXRoman}[1]{% + \ifnum\value{#1}>0 % + \Roman{#1}% + \else% + \ifnum\value{#1}<0 % + -\expandafter\@slowromancap\romannumeral\number-\arabic{#1}@% + \else% + 0% + \fi% + \fi% + } + +\newcommand{\lastpages}[2]{% + \@ifundefined{c@pagesLTS.#1.#2.local.cnt}{% + \newcounter{pagesLTS.#1.#2.local.cnt}}{\relax}% + \arabic{pagesLTS.#1.#2.local.cnt}% + } + +\newcommand{\pagesLTS@ifcounter}[1]{% + \@ifundefined{c@#1}{\newcounter{#1}}{\relax}% + } + +\newcommand{\pagesLTS@writelabel}[1]{% + \addtocounter{page}{+1}% + \pagesLTS@putlabel{pagesLTS.#1}{\thepage} + \addtocounter{page}{-1}% + \ifx\pagesLTS@pnc\pagesLTS@zero% + \relax% + \else% + \addtocounter{page}{+1}% + \pagesLTS@putlabel{pagesLTS.#1.local}{\theCurrentPageLocal} + \addtocounter{page}{-1}% + \fi% + } + + +%% The following code is from Heiko Oberdiek [2010/04/18], %% +%% expanding his alphalph package [2010/04/18] v2.3. (Thanks!) %% +\newcommand*{\erroralphalph}[2]{% + \ifnum\value{#2}>0 % + #1{\value{#2}}% + \else + \ifnum\value{#2}<0 % + -#1{\expandafter\@gobble\the\value{#2}}% + \else + 0% + \fi + \fi + } +%% End of code from Heiko Oberdiek %% +%% Check and Error/Warning messages have been moved to %% +%% \EveryShipout, because messages inside e. g. the \pageref %% +%% command can cause trouble. %% + + +\newcommand{\expandPagenumbering}[1]{% + \let\Origthepage\thepage% + \def\pagesLTS@tmpC{arabic}% + \ifx\pagesLTS@pnc\pagesLTS@tmpC% + \relax% + \else% + \def\pagesLTS@tmpC{roman}% + \ifx\pagesLTS@pnc\pagesLTS@tmpC% + \ifpagesLTS@romanMult% + \renewcommand*{\thepage}{\xroman{page}}% + \fi% + \else% + \def\pagesLTS@tmpC{Roman}% + \ifx\pagesLTS@pnc\pagesLTS@tmpC% + \ifpagesLTS@RomanMulti% + \renewcommand*{\thepage}{\XXRoman{page}}% + \fi% + \else% + \ifx\pagesLTS@pnc\pagesLTS@alph% + \ifx\pagesLTS@alphMult\pagesLTS@ab% + \renewcommand*{\thepage}{\erroralphalph{\alphalph}{page}}% + \else \ifx\pagesLTS@alphMult\pagesLTS@bb% + \renewcommand*{\thepage}{\erroralphalph{\alphMult}{page}}% + \fi% + \fi% + \else% + \ifx\pagesLTS@pnc\pagesLTS@Alph% + \ifx\pagesLTS@AlphMulti\pagesLTS@ABi% + \renewcommand*{\thepage}{\erroralphalph{\AlphAlph}{page}}% + \else \ifx\pagesLTS@AlphMulti\pagesLTS@BBi% + \renewcommand*{\thepage}{\erroralphalph{\AlphMult}{page}}% + \fi% + \fi% + \else% + \ifx\pagesLTS@pnc\pagesLTS@fns% + \ifpagesLTS@fnsymbolmult% + \renewcommand*{\thepage}{\erroralphalph{\fnsymbolmult}{page}}% + \fi% + \else% + \PackageError{pagesLTS}{unknown page numbering scheme}{% + The pagesLTS package encountered the unknown\MessageBreak% + page numbering scheme\MessageBreak% + `#1'. \MessageBreak% + If this is no typing mistake, it might work\MessageBreak% + - or it might not work.\MessageBreak% + \@ehc% + } + \fi% + \fi% + \fi% + \fi% + \fi% + \fi% + \let\pagesLTS@tmpC\undefined% + } + +\renewcommand{\pagenumbering}[1]{% + \edef\pagesLTS@tmpA{#1}% + \ifx\pagesLTS@pnc\pagesLTS@tmpA% + \relax% + \else% + \ifnum \value{CurrentPage}>1% + \addtocounter{page}{-1}% + \addtocounter{pagesLTS.current.local.\pagesLTS@pnc}{-1}% + \newcounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}% + \setcounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}{% + \value{pagesLTS.current.local.\pagesLTS@pnc}}% + \ifx\pagesLTS@pnc\pagesLTS@fns% + \ifnum \value{pagesLTS.pnc.\pagesLTS@pnc}>1% + \pagesLTS@ifcounter{pagesLTS.tmpa}% + \setcounter{pagesLTS.tmpa}{\value{pagesLTS.pnc.\pagesLTS@pnc}}% + \addtocounter{pagesLTS.tmpa}{-1}% + \pagesLTS@ifcounter{pagesLTS.tmpb}% + \addtocounter{pagesLTS.tmpb}{\value{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.tmpa}.local.count}}% + \addtocounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}{% + -\value{pagesLTS.tmpb}}% + \fi% + \else% + \pagesLTS@writelabel{\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}}% + \ifnum \value{pagesLTS.pnc.\pagesLTS@pnc}<2% + \pagesLTS@writelabel{\pagesLTS@pnc}% + \else% + \pagesLTS@ifcounter{pagesLTS.tmpa}% + \setcounter{pagesLTS.tmpa}{\value{pagesLTS.pnc.\pagesLTS@pnc}}% + \addtocounter{pagesLTS.tmpa}{-1}% + \pagesLTS@ifcounter{pagesLTS.\pagesLTS@pnc.done}% + \addtocounter{pagesLTS.\pagesLTS@pnc.done}{% + \value{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.tmpa}.local.count}}% + \addtocounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}{% + -\value{pagesLTS.\pagesLTS@pnc.done}}% + \fi% + \if@filesw% + \immediate\write\@auxout{\string + \pagesLTS@ifcounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.cnt}}% + \fi% + \edef\pagesLTS@tmpB{\arabic{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}}% + \if@filesw% + \immediate\write\@auxout{\string + \setcounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.cnt}{\pagesLTS@tmpB}}% + \fi% + \fi% + \setcounter{pagesLTS.double.\pagesLTS@pnc}{\value{page}}% + \addtocounter{pagesLTS.current.local.\pagesLTS@pnc}{+1}% + \addtocounter{page}{+1}% + \global\edef\pagesLTS@pnc{#1}% + \OrigPagenumbering{#1}% + \expandPagenumbering{#1} + \pagesLTS@ifcounter{pagesLTS.pnc.\pagesLTS@pnc}% + \addtocounter{pagesLTS.pnc.\pagesLTS@pnc}{1}% + \pagesLTS@ifcounter{pagesLTS.double.\pagesLTS@pnc}% + \addtocounter{pagesLTS.double.\pagesLTS@pnc}{1}% + \ifpagesLTS@pagecontinue% + \setcounter{page}{\value{pagesLTS.double.\pagesLTS@pnc}}% + \else% + \setcounter{page}{1}% + \fi% + \pagesLTS@ifcounter{pagesLTS.current.local.\pagesLTS@pnc}% + \ifnum \value{pagesLTS.double.\pagesLTS@pnc}=1% + \setcounter{pagesLTS.current.local.\pagesLTS@pnc}{1}% + \fi% + \else% + %% before the first page has shiped out + \global\edef\pagesLTS@pnc{#1}% + \countdef\c@page=0 \c@page=1 + \def\cl@page{} + \global\c@page \@ne + \global\def\thepage{\csname \expandafter @\pagesLTS@pnc \endcsname \c@page}% + \expandPagenumbering{#1} + \pagesLTS@ifcounter{pagesLTS.pnc.\pagesLTS@pnc}% + \setcounter{pagesLTS.pnc.\pagesLTS@pnc}{1}% + \pagesLTS@ifcounter{pagesLTS.double.\pagesLTS@pnc}% + \setcounter{pagesLTS.double.\pagesLTS@pnc}{1}% + \pagesLTS@ifcounter{pagesLTS.current.local.\pagesLTS@pnc}% + \setcounter{pagesLTS.current.local.\pagesLTS@pnc}{1}% + \fi% + \gdef\pagesLTS@called{1}% + \fi% + \let\pagesLTS@tmpA\undefined% + \let\pagesLTS@tmpB\undefined% + } + +\newcommand{\lastpagereftxt}[1]{% + \def\pagesLTS@tmpA{#1}% + \def\pagesLTS@tmpB{pagesLTS.fnsymbol.local}% + \ifx\pagesLTS@tmpA\pagesLTS@tmpB% + \ifx\pagesLTS@hyper\pagesLTS@one% + \href{\#pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.local}}% + {\arabic{pagesLTS.fnsymbol.local}}% + \else \arabic{pagesLTS.fnsymbol.local}% + \fi% + \else% + \pageref{#1}% + \fi% + \let\pagesLTS@tmpA\undefined% + \let\pagesLTS@tmpB\undefined% + } + +\newcommand{\lastpagerefend}[1]{% + \def\pagesLTS@tmpA{#1}% + \def\pagesLTS@tmpB{pagesLTS.fnsymbol.local}% + \ifx\pagesLTS@tmpA\pagesLTS@tmpB% + \ifx\pagesLTS@hyper\pagesLTS@one% + \href{\#pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.local}}% + {\arabic{pagesLTS.fnsymbol.local}}% + \else \arabic{pagesLTS.fnsymbol.local}% + \fi% + \else% + \def\pagesLTS@tmpB{pagesLTS.fnsymbol}% + \ifx\pagesLTS@tmpA\pagesLTS@tmpB% + \ifx\pagesLTS@hyper\pagesLTS@one% + \href{\#pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.local}}% + {\pagesLTS.lastpage}% + \else \pageref{pagesLTS.fnsymbol}% + \fi% + \else% + \def\pagesLTS@tmpB{LastPage}% + \ifx\pagesLTS@tmpA\pagesLTS@tmpB% + \ifx\pagesLTS@hyper\pagesLTS@one% + \href{\#pagesLTS.fnsymbol.local.\pagesLTS@eso}% + {\pagesLTS.lastpage}% + \else \pageref{LastPage}% + \fi% + \else% + \def\pagesLTS@tmpB{VeryLastPage}% + \ifx\pagesLTS@tmpA\pagesLTS@tmpB% + \ifx\pagesLTS@hyper\pagesLTS@one% + \href{\#pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.local}}% + {\pagesLTS.lastpage}% + \else \pageref{VeryLastPage}% + \fi% + \else% + \def\pagesLTS@tmpB{LastPages}% + \ifx\pagesLTS@tmpA\pagesLTS@tmpB% + \ifx\pagesLTS@hyper\pagesLTS@one% + \href{\#pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.local}}% + {\arabic{pagesLTS.pagenr}}% + \else \pageref{LastPages}% + \fi% + \else% + \pageref{#1}% + \fi% + \fi% + \fi% + \fi% + \fi% + \let\pagesLTS@tmpA\undefined% + \let\pagesLTS@tmpB\undefined% + } + +\newcommand{\@pagesLTS@Prelim@EveryShipout}{% +%% The following code is from the prelim2e package %% +%% [2009/05/29 v1.3] by Martin Schr\"{o}der (Thanks!): %% + \bgroup + \dimen\z@=\wd\@cclv + \dimen\@ne=\ht\@cclv + \dimen\tw@=\dp\@cclv + \dimen\thr@@=\dimen1 + \advance\dimen\thr@@ by \dimen\tw@ + \global\setbox\@cclv\vbox to \dimen\thr@@{% + \hb@xt@\dimen\z@{% + \box\@cclv% + \hss% + }% + \vbox to \z@{% + \hb@xt@\dimen\z@{% + \let\protect\relax +%% Code not from prelim2e package: %% + \ifx\pagesLTS@pnc\pagesLTS@fns% + \addtocounter{pagesLTS.fnsymbol.cont}{1}% + \ifx\pagesLTS@hyper\pagesLTS@one% + \phantomsection% + \hypertarget{pagesLTS.fnsymbol.local.\arabic{pagesLTS.fnsymbol.cont}}{}% + \fi% + \ifnum \pagesLTS@esov=\pagesLTS@zero% + \label{pagesLTS.fnsymbol}% + \else% + \overridelabel{pagesLTS.fnsymbol}% + \fi% + \else% + \ifx\pagesLTS@hyper\pagesLTS@one% + \phantomsection% + \fi% + \if@filesw% + \overridelabel{pagesLTS.\pagesLTS@pnc}% + \immediate\write\@auxout{\string + \undonewlabel{pagesLTS.\pagesLTS@pnc.local}{\on@line}}% + \fi% + \addtocounter{page}{+1} + \pagesLTS@putlabel{pagesLTS.\pagesLTS@pnc.local}{\theCurrentPageLocal}% + \addtocounter{page}{-1} + \fi% +%% Code from prelim2e package again: %% + }% + \vss% + }% + \vss% + }% + \wd\@cclv=\dimen\z@ + \ht\@cclv=\dimen\@ne + \dp\@cclv=\dimen\tw@ + \egroup +%% End of code from the prelim2e package. %% + } + +\EveryShipout{% + \ifnum\value{page}>0% + \relax% + \else + \ifnum\value{page}=0% + \PackageWarning{pagesLTS}{% + Counter `page' is zero!\MessageBreak% + If the page numbering scheme is not arabic\MessageBreak% + and further not extended\MessageBreak% + (see Page counter overflow in the pagesLTS\MessageBreak% + documentation), without other measures\MessageBreak% + this will lead to a counter overflow.\MessageBreak% + } + \else% + \ifnum\value{page}<0% + \PackageWarning{pagesLTS}{% + Counter `page' is negative: `\the\value{page}'!\MessageBreak% + If the page numbering scheme is not arabic\MessageBreak% + and further not extended\MessageBreak% + (see Page counter overflow in the pagesLTS\MessageBreak% + documentation), without other measures\MessageBreak% + this will lead to a counter overflow.\MessageBreak% + } + \else% + \PackageError{pagesLTS}{% + Counter `page' does not have a recognized value:\MessageBreak% + `\the\value{page}'\MessageBreak% + \@ehd \MessageBreak% + } + \fi% + \fi% + \fi% + \ifnum \value{CurrentPage}=1% This is the first shipout! + \ifx\pagesLTS@called\pagesLTS@zero + \PackageError{pagesLTS}{pagenumbering missing}{\pagesLTS@messageNPN }% + \newcounter{pagesLTS@tmpD}% + \setcounter{pagesLTS@tmpD}{\value{page}}% +%% Code from Andres L\"{o}h, Universiteit Utrecht (NL) %% + \def\extract#1{\expandafter\extract@ #1\END} + \def\extract@#1\csname @#2\endcsname#3\END{#2} + \edef\pagesLTS@tmpQ{\extract\thepage}% +%% End of code from Andres L\"{o}h %% + \let\pagesLTS@tmpP\pagesLTS@tmpQ% + \def\pagesLTS@pnc{0}% + \pagenumbering{\pagesLTS@tmpP}% + \setcounter{page}{\value{pagesLTS@tmpD}}% + \fi% + \pagesLTS@writelabel{0}% + \fi% + \ifx\pagesLTS@pnc\pagesLTS@fns% + \@pagesLTS@Prelim@EveryShipout% + \gdef\pagesLTS@esov{\arabic{pagesLTS.fnsymbol.cont}}% + \else% + \ifnum \value{pagesLTS.pnc.\pagesLTS@pnc}>1% + \@pagesLTS@Prelim@EveryShipout% + \fi% + \fi% + \addtocounter{CurrentPage}{1}% + \addtocounter{pagesLTS.current.local.\pagesLTS@pnc}{1}% + } + +\newcommand{\pagesLTS@putlabelhyper}[2]{% + \ifHy@pageanchor \relax% + \else% + \PackageError{pagesLTS}{hyperref option pageanchor disabled}{% + The \string\lastpageref{#1} link doesn't work\MessageBreak% + using hyperref with disabled option `pageanchor'.\MessageBreak% + }% + \fi +%% The following code is from the hyperref package %% +%% [2010/04/17 v6.80x] by Heiko Oberdiek (Thanks!). %% + \if@filesw + \begingroup + \let\@number\@firstofone + \ifHy@pageanchor + \ifHy@hypertexnames + \ifHy@plainpages + \def\Hy@temp{\arabic{page}}% + \else + \Hy@unicodefalse +%% Code not from hyperref package: %% +%% The following lines are modified from the hyperref package. %% +%% Without the modification, after the first shipout "PD1" is %% +%% inserted each time |\pdfstringdef\Hy@temp{\thepage}| is %% +%% executed (if |fnsymbol| is not used). %% + \ifnum \value{CurrentPage}=1% + \ifx\pagesLTS@pnc\pagesLTS@fns% + \pdfstringdef\Hy@temp{\thepage}% + \else% + \def\Hy@temp{\thepage}% + \fi% + \else% + \pdfstringdef\Hy@temp{\thepage}% + \fi% +%% Code from hyperref package again: %% + \fi + \else + \def\Hy@temp{\the\Hy@pagecounter}% + \fi + \fi +%% End of code from the hyperref package. %% +%% (The following four lines are modified %% +%% from the hyperref package.) %% + \immediate\write\@auxout{\string + \newlabel{#1}{{}{#2}{}{\ifHy@pageanchor page.\Hy@temp\fi}{}}}% + \endgroup% + \fi% + } + +\newcommand{\pagesLTS@putlabel}[2]{% + \addtocounter{page}{-1}% + \ifx\pagesLTS@hyper\pagesLTS@one% + \pagesLTS@putlabelhyper{#1}{#2}% + \else% + \if@filesw% + \immediate\write\@auxout{\string + \newlabel{#1}{{}{#2}}}% + \fi% + \fi% + \addtocounter{page}{+1}% + } + +\newcommand{\pagesLTS@putlabels}{% + \addtocounter{page}{-1}% + \addtocounter{CurrentPage}{-1}% + \addtocounter{pagesLTS.current.local.\pagesLTS@pnc}{-1}% + \ifx\pagesLTS@pnc\pagesLTS@zero% + \PackageWarning{pagesLTS}{No page numbering scheme found:\MessageBreak% + \pagesLTS@messageNPN }% + \else% + \pagesLTS@writelabel{\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}}% + \ifnum \value{pagesLTS.pnc.\pagesLTS@pnc}<2% + \ifx\pagesLTS@pnc\pagesLTS@fns% + \relax% + \else% + \pagesLTS@writelabel{\pagesLTS@pnc}% + \fi% + \fi% + \fi% + \addtocounter{page}{+1}% + \pagesLTS@putlabel{LastPages}{\theCurrentPage} + \addtocounter{CurrentPage}{1}% + \addtocounter{pagesLTS.current.local.\pagesLTS@pnc}{1}% + } + +\AtBeginDocument{% + \if@filesw \relax% + \else% + \PackageError{pagesLTS}{No auxiliary file allowed.}% + {The pagesLTS package was not allowed to write to an .aux file.\MessageBreak% + This package does not work without access to an .aux file.\MessageBreak% + Press Ctrl+Z to exit.\MessageBreak% + }% + % \endinput + \fi% + \@ifpackageloaded{endfloat}% + {\@ifpackagelater{endfloat}{1992/03/31}% April 1992 v2.0 + {\@ifpackagelater{endfloat}{1995/10/10}{% 1995/10/11 v2.4i + \relax}% + {\PackageWarningNoLine{pagesLTS}{Old endfloat package detected:\MessageBreak% + There is a newer version of the endfloat package available.\MessageBreak% + Please consider updating your version.\MessageBreak% + The pagesLTS package might be incompatible with\MessageBreak% + your current endfloat package.\MessageBreak% + }% + }% + {\PackageError{pagesLTS}{Incompatible, very old endfloat package detected.}% + {The very old version 2.0 (and earlier) of the\MessageBreak% + endfloat package actually redefined the \ enddocument,\MessageBreak% + and so interferred drastically with the LaTeX2e commands\MessageBreak% + which make use of \ AtEndDocument.\MessageBreak% + Newer versions of the endfloat package exists\MessageBreak% + (at least: v2.4i as of 1995/10/11)\MessageBreak% + in modern documentation form,\MessageBreak% + which should be available from CTAN.\MessageBreak% + Please update your endfloat package\MessageBreak% + for use with the pagesLTS package.\MessageBreak % + }% + }% + }% + }{}% + \@ifpackageloaded{lastpage}% + {\PackageWarning{pagesLTS}{Incompatible package lastpage detected:\MessageBreak% + Package pagesLTS was loaded, but also the old\MessageBreak% + lastpage package.\MessageBreak% + pagesLTS has all functionality of the lastpage\MessageBreak% + package (and more), so just remove the lastpage\MessageBreak% + package from your document.\MessageBreak% + pagesLTS will now ''kill'' the lastpage@putlabel\MessageBreak% + command of the lastpage package.\MessageBreak% + }% + \gdef\lastpage@putlabel{\relax}% + }{}% + \@ifpackageloaded{alphalph}% + {\PackageInfo{pagesLTS}{Package AlphAlph detected.\MessageBreak% + pagesLTS supports alphalph. Congratulations!\MessageBreak% + }% + \global\def\pagesLTS@AlphAlph{1}% + \newalphalph{\AlphMult}[mult]{\@Alph}{26}% + \newalphalph{\alphMult}[mult]{\@alph}{26}% + \newalphalph{\fnsymbolmult}[mult]{\@fnsymbol}{5}% + }% + {\ifx\pagesLTS@alphMult\pagesLTS@zero% + \PackageWarning{pagesLTS}{\pagesLTS@messageaMz }% + \else% + \PackageError{pagesLTS}{Package AlphAlph not loaded}% + {Package AlphAlph was not loaded, but package pagesLTS\MessageBreak% + was called without option alphMult=0 (zero).\MessageBreak% + Either load package AlphAlph,\MessageBreak% + or give option alphMult=0 (zero) to the pagesLTS package.\MessageBreak% + }% + \fi% + \ifx\pagesLTS@AlphMulti\pagesLTS@zero% + \PackageWarning{pagesLTS}{\pagesLTS@messageAMiz }% + \relax% + \else% + \PackageError{pagesLTS}{Package AlphAlph not loaded}% + {Package AlphAlph was not loaded, but package pagesLTS\MessageBreak% + was called without option AlphMulti=0 (zero).\MessageBreak% + Either load package AlphAlph,\MessageBreak% + or give option AlphMulti=0 (zero) to the pagesLTS package.\MessageBreak% + }% + \fi% + \ifpagesLTS@fnsymbolmult% + \PackageError{pagesLTS}{Package AlphAlph not loaded}% + {Package AlphAlph was not loaded, but package pagesLTS\MessageBreak% + was called without option fnsymbolmult=false.\MessageBreak% + Either load package AlphAlph,\MessageBreak% + or give option fnsymbolmult=false to the pagesLTS package.\MessageBreak% + }% + \else% + \PackageWarning{pagesLTS}{\pagesLTS@messagefsmz }% + \fi% + }% + \@ifpackageloaded{hyperref}% + {\PackageInfo{pagesLTS}{Package hyperref detected.\MessageBreak% + pagesLTS supports hyperref. Congratulations!\MessageBreak% + }% + \global\def\pagesLTS@hyper{1}% + \@ifpackagelater{hyperref}{2010/04/16}{% 2010/04/17 v6.80x + \relax}{% + \PackageWarningNoLine{pagesLTS}{Old hyperref package detected:\MessageBreak% + There is a newer version of the\MessageBreak% + hyperref package available.\MessageBreak% + Please consider updating your version.\MessageBreak% + }% + }% + %% pagesLTS supports the use of the package hyperref by + %% Heiko Oberdiek (hyperref version 2010/04/17 v6.80x). + %% pagesLTS may work with earlier versions of this packages, + %% but this was not tested. + }% + {\PackageWarning{pagesLTS}{Package hyperref NOT detected.\MessageBreak% + pagesLTS would support hyperref. The page references\MessageBreak% + will NOT be hyperlinked!\MessageBreak }% + }% + } + +\AtEndDocument{% + \message{AED: pagesLTS setting LastPage}% + \clearpage% + \ifx\pagesLTS@pnc\pagesLTS@fns% + \def\pagesLTS@tmpA{\arabic{pagesLTS.fnsymbol.local}}% + \ifnum \pagesLTS@eso=\pagesLTS@tmpA% + \gdef\pagesLTS@rerun{0}% + \else% + \gdef\pagesLTS@rerun{1}% + \fi% + \if@filesw% + \immediate\write\@auxout{\string + \gdef\string\pagesLTS@eso{\pagesLTS@tmpA}}% + \fi% + \fi% + \pagesLTS@putlabel{LastPage}{\thepage}% + \let\pagesLTS@tmpA\undefined% + } + +\AfterLastShipout{% + \if@filesw% + \immediate\write\@auxout{\string + \setcounter{pagesLTS.fnsymbol.local}{\pagesLTS@esov}}% + \fi% + \ifx\pagesLTS@hyper\pagesLTS@one% + \ifx\pagesLTS@pnc\pagesLTS@fns% + \if@filesw% + \immediate\write\@auxout{\string + \gdef\string\lastpageref{\string\lastpagerefend}}% + \fi% + \fi% + \fi% + \pagesLTS@ifcounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}% + \setcounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}{% + \value{pagesLTS.current.local.\pagesLTS@pnc}}% + \addtocounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}{-1} + \ifnum \value{pagesLTS.pnc.\pagesLTS@pnc}>1% + \pagesLTS@ifcounter{pagesLTS.tmpA}% + \setcounter{pagesLTS.tmpA}{\value{pagesLTS.pnc.\pagesLTS@pnc}}% + \addtocounter{pagesLTS.tmpA}{-1}% + \pagesLTS@ifcounter{pagesLTS.tmpB}% + \addtocounter{pagesLTS.tmpB}{\value{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.tmpA}.local.count}}% + \addtocounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}{% + -\value{pagesLTS.tmpB}}% + \fi% + \if@filesw% + \immediate\write\@auxout{\string + \pagesLTS@ifcounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.cnt}}% + \edef\pagesLTS@tmpA{\arabic{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.count}}% + \immediate\write\@auxout{\string + \setcounter{pagesLTS.\pagesLTS@pnc.\arabic{pagesLTS.pnc.\pagesLTS@pnc}.local.cnt}{\pagesLTS@tmpA}}% + \let\pagesLTS@tmpA\undefined% + \fi% + \addtocounter{page}{-1}% + \edef\pagesLTS@tmpA{\thepage}% + \if@filesw% + \immediate\write\@auxout{\string + \gdef\string\pagesLTS.lastpage{\pagesLTS@tmpA}}% + \fi% + \addtocounter{page}{+1}% + \addtocounter{CurrentPage}{-1}% + \def\pagesLTS@tmpB{\arabic{CurrentPage}}% + \if@filesw% + \immediate\write\@auxout{\string + \setcounter{pagesLTS.pagenr}{\pagesLTS@tmpB}}% + \fi% + \addtocounter{CurrentPage}{+1}% + \message{AED: pagesLTS setting VeryLastPage via AfterLastShipout}% + \pagesLTS@putlabel{VeryLastPage}{\thepage}% + \message{AED: pagesLTS setting LastPages via AfterLastShipout}% + \pagesLTS@putlabels% + \let\pagesLTS@tmpA\undefined% + \let\pagesLTS@tmpB\undefined% + } + +\AtVeryEndDocument{% + \ifx\pagesLTS@rerun\pagesLTS@one% + \PackageWarningNoLine{pagesLTS}{Label(s) may have changed.\MessageBreak% + Rerun to get cross-references right.\MessageBreak% + }% + \fi% + } + +\endinput +%% +%% End of file `pagesLTS.sty'. diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index badfb962e19..1ab58d9e7c0 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -226,7 +226,7 @@ my @TLP_working = qw( oberdiek ocgtools ocr-latex octavo ofs ogham oldlatin oldstyle onlyamsmath onrannual opcit optional ordinalpt orkhun ot-tableau othello oubraces outline overpic - pagecont pagenote pagerange paper papercdcase papertex + pagecont pagenote pagerange pageslts paper papercdcase papertex parallel paresse parrun passivetex patch patchcmd patgen2-tutorial pauldoc pax pbox pb-diagram pdf14 pdf-forms-tutorial-de pdf-forms-tutorial-en diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds index b4788f4bc52..56db4143be5 100755 --- a/Master/tlpkg/libexec/ctan2tds +++ b/Master/tlpkg/libexec/ctan2tds @@ -933,6 +933,7 @@ $standardtex='\.(.bx|cfg|sty|clo|ldf|cls|def|fd|cmap|4ht)$'; 'notes', '[^s]\.(eps|pdf|png)|' . $standardtex, # not notes.pdf 'ntheorem', '\.sty|\.std', 'ofs', '^ofs\.tex|ofsdef\.tex|ofs-.*\.tex|\.sty|a.*\.tex|.*fn\.tex', + 'pageslts', '\.sty|[^c]\.cfg', # omit ltxdoc.cfg, would be system-wide 'patch', '\.tex', 'pdf-trans', 'pdf-trans.tex', 'pdfcprot', '\.cpa|\.sty', diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc index 29db7c5c9af..d76878a60a6 100644 --- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc @@ -437,6 +437,7 @@ depend overpic depend pagecont depend pagenote depend pagerange +depend pageslts depend paper depend papercdcase depend papertex diff --git a/Master/tlpkg/tlpsrc/pageslts.tlpsrc b/Master/tlpkg/tlpsrc/pageslts.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/Master/tlpkg/tlpsrc/pageslts.tlpsrc |