summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/pagerange
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-11-19 18:33:38 +0000
committerKarl Berry <karl@freefriends.org>2009-11-19 18:33:38 +0000
commitd3cf783af3eef0576a9acb15fb345ac082f53d66 (patch)
tree3952733cf7217fce1512283b2673a5da17015e5a /Master/texmf-dist/doc/latex/pagerange
parent6f0fb49f5f8c48e2f746b8a6f622eb0d67f53dbf (diff)
new latex package pagerange (29oct09)
git-svn-id: svn://tug.org/texlive/trunk@16079 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/pagerange')
-rw-r--r--Master/texmf-dist/doc/latex/pagerange/README48
-rw-r--r--Master/texmf-dist/doc/latex/pagerange/pagerange-guide.pdfbin0 -> 52617 bytes
-rw-r--r--Master/texmf-dist/doc/latex/pagerange/pagerange-guide.tex109
3 files changed, 157 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/pagerange/README b/Master/texmf-dist/doc/latex/pagerange/README
new file mode 100644
index 00000000000..a13f231a81b
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pagerange/README
@@ -0,0 +1,48 @@
+% This is file 'pagerange.sty'. %
+% %
+% When a given page range xx-yy (simple/plain characters) or %
+% \pages (command token, eg, \def\pages{xx-yy}) is submitted to the macro %
+% \pagerange (eg, \pagerange{xx-yy} or \pagerange\pages), this package %
+% splits the range as xx in the macro \pagestart and yy in \pageend. %
+% The counter equivalents of these are \prg@cnta and \prg@cntb. %
+% The command token (eg, \pages) is fully expanded before the page %
+% range is split. %
+% %
+% If you specify a range consisting of a hyphen (or any tie) but with %
+% one or two empty page numbers, the following will happen: %
+% 1. a range of the form -34 is taken to mean pages 1 to 34; %
+% 2. a range of the form 12- is taken to mean page 12 to last page; %
+% 3. a range of the form - (only hyphen) is taken to mean page 1 to %
+% last page; %
+% %
+% An empty or blank page range (ie, containing no argument and no %
+% hyphen/tie) is taken to mean range 1-1 or it may prompt a fatal error, %
+% depending on whether the boolean 'acceptempty' is true or false %
+% (respectively). %
+% %
+% Page ranges containing more than one hyphen/tie cause fatal error. %
+% %
+% If the upper limit of the page range is smaller than the lower %
+% limit, a fatal error is flagged. %
+% %
+% The tie between the pages in the pagerange can be any single %
+% non-active character; its default is the hyphen '-'. It can be %
+% changed in the call to the package (eg, \usepackage[tie=+]{pagerange}) %
+% or at any moment through \pagerangeoptions{tie=+}. Of course, active %
+% characters can't be used as ties. %
+% %
+% Because of the need for the last page of the document, at leat 2 %
+% runs/passes are needed to obtain the correct last page. %
+% %
+% This package has been tested with the 'hyperref' package, which %
+% redefines the label used by the 'lastpage' package. %
+% %
+% Copyright (c) 2009 Ahmed Musa (a.musa@rocketmail.com). %
+% %
+% The LPPL maintenance status of this software is 'author-maintained'. %
+% %
+% This software is provided 'as it is', without warranty of any kind, %
+% either expressed or implied, including, but not limited to, the %
+% implied warranties of merchantability and fitness for a particular %
+% purpose. %
+%+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%
diff --git a/Master/texmf-dist/doc/latex/pagerange/pagerange-guide.pdf b/Master/texmf-dist/doc/latex/pagerange/pagerange-guide.pdf
new file mode 100644
index 00000000000..05d68998c73
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pagerange/pagerange-guide.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/pagerange/pagerange-guide.tex b/Master/texmf-dist/doc/latex/pagerange/pagerange-guide.tex
new file mode 100644
index 00000000000..866709ca404
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pagerange/pagerange-guide.tex
@@ -0,0 +1,109 @@
+\documentclass[10pt,a4paper]{article}
+\usepackage{lipsum}
+\usepackage{shortvrb}
+\usepackage{fancyvrb}
+\usepackage{parskip}
+\usepackage{paralist}
+\usepackage[acceptempty,hyperlink]{pagerange}
+\usepackage{hyperref}
+\hypersetup{colorlinks=true,linkcolor=red,pdfpagemode=UseThumbs,
+ implicit=true,breaklinks=true,citecolor=purple,pdfview=FitH,
+ pdfstartview=FitH}
+\begin{document}
+\MakeShortVerb{\+}
+\title{The {\tt pagerange} Package}
+\author{Ahmed Musa\\[.5ex]University of Central Lancashire\\
+ Preston, United Kingdom\\[1ex]\url{a.musa@rocketmail.com}
+}
+\maketitle
+
+\section{Introduction}
+This package emerged from my desire to resolve page ranges in the +draftmark+ package, but it may be useful to other \LaTeX{} enthusiasts.
+
+There is additional user guide in the comments within the package.
+
+\section{Examples}
+
+\pagerange{123-456}
+\par\medskip\noindent
+Pages~\pagestart\space to\space\pageend
+
+\pagerange{12345-67890}
+\par\medskip\noindent
+Pages~\pagestart\space to\space\pageend
+
+\pagerange{123-4567}
+\par\medskip\noindent
+Pages~\pagestart\space to\space\pageend
+
+\pagerange{600-601}
+\par\medskip\noindent
+Pages~\pagestart\space to\space\pageend
+
+\pagerange{-34}
+\par\medskip\noindent
+Pages~\pagestart\space to\space\pageend
+
+\bigskip\noindent
+Hyperlinking of last page:
+\pagerange{1-}
+\par\medskip\noindent
+Pages~\pagestart\space to\space\pageend
+
+\pagerange{-}
+\par\medskip\noindent
+Pages~\pagestart\space to\space\pageend
+
+\bigskip\noindent
+No hyperlinking of last page:
+\pagerangeoptions{hyperlink=false}
+\pagerange{1-}
+\par\medskip\noindent
+Pages~\pagestart\space to\space\pageend
+
+\pagerange{-}
+\par\medskip\noindent
+Pages~\pagestart\space to\space\pageend
+
+\pagerange{123-234}
+\par\medskip\noindent
+Pages~\pagestart\space to\space\pageend
+
+\pagerange{} % This logs a warning message or issues fatal error.
+\par\medskip\noindent
+Page~\pagestart\space to\space\pageend
+
+%\pagerange{123-456-789} % Uncomment this line to get fatal error.
+
+%\pagerange{34-12} % Uncomment this line to get fatal error.
+
+\par\medskip
+
+\pagerangeoptions{tie=*}
+\pagerange{123*234}
+\par\noindent
+Pages~\pagestart\space to\space\pageend
+
+\pagerangeoptions{tie=T}
+\pagerange{1234T1235}
+\par\medskip\noindent
+Pages~\pagestart\space to\space\pageend
+
+\pagerangeoptions{tie=X}
+\pagerange{2034X2135}
+\par\medskip\noindent
+Pages~\pagestart\space to\space\pageend
+
+\section{To-do}
+
+\begin{compactenum}[a)]
+\item To provide for calls such as in {\tt\string\pagerange\{\string\pageref\{page:label\}-200\}}.
+\item Documentation.
+\end{compactenum}
+
+\par\bigskip
+\centerline{\rule{.5\hsize}{.4pt}}
+\bigskip
+\lipsum[1-4]
+
+\end{document} \ No newline at end of file