summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/ms/count1to.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/ms/count1to.dtx')
-rw-r--r--Master/texmf-dist/source/latex/ms/count1to.dtx206
1 files changed, 103 insertions, 103 deletions
diff --git a/Master/texmf-dist/source/latex/ms/count1to.dtx b/Master/texmf-dist/source/latex/ms/count1to.dtx
index 077d92f13bd..35918bce608 100644
--- a/Master/texmf-dist/source/latex/ms/count1to.dtx
+++ b/Master/texmf-dist/source/latex/ms/count1to.dtx
@@ -1,46 +1,68 @@
% \iffalse
\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{count1to}
-%<package> [1999/06/08 v1.22 Count1to9 Package (MS)]
+%<package> [2009/05/24 v2.1 Count1to9 Package (MS)]
%
%<*driver>
\ProvidesFile{count1to.drv}
- [1999/06/08 v1.22 Driver for Count1to9 Package (MS)]
-\documentclass{ltxdoc}
+ [2009/05/24 v2.1 Driver for Count1to9 Package (MS)]
+\documentclass[a4paper]{ltxdoc}
+\usepackage[T1]{fontenc}
+\usepackage{lmodern}
+\usepackage{microtype}
\usepackage{booktabs}
\usepackage{url}
\usepackage{count1to}
\usepackage[toc]{multitoc}
+\usepackage{svn}
+\usepackage{hypdoc}
+\usepackage{geometry}
\GetFileInfo{count1to.sty}
\setcounter{IndexColumns}{2}
+% onecolumn glossary
+\makeatletter
+ \renewenvironment{theglossary}{%
+ \glossary@prologue
+ \setlength\emergencystretch{5em}
+ \GlossaryParms \let\item\@idxitem \ignorespaces}{}
+\makeatother
\EnableCrossrefs
+\RecordChanges
%%\DisableCrossrefs% Say \DisableCrossrefs if index is ready
\CodelineIndex % Index code by line number
-\OnlyDescription % comment out for implementation details
+%\OnlyDescription % comment out for implementation details
%%\OldMakeIndex % use if your MakeIndex is pre-v2.9
\setcounter{IndexColumns}{2}
\setlength{\IndexMin}{30ex}
\setlength{\premulticols}{\IndexMin}
+\addtolength{\oddsidemargin}{1cm}
+\addtolength{\textwidth}{-1cm}
\begin{document}
\DocInput{count1to.dtx}
\end{document}
%</driver>
+%^^A $Id: count1to.dtx 1368 2009-05-24 16:02:57Z oneiros $
%
-% Copyright (c) [1994..1999] by Martin Schr\"oder. All rights reserved.
+% Copyright (c) 1994..2009 by Martin Schr\"oder. All rights reserved.
%
-% This program may be redistributed and/or modified under the terms
-% of the LaTeX Project Public License, either version 1.0 of this
-% license, or (at your option) any later version.
+% This work 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
-% CTAN:macros/latex/base/lppl.txt.
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
%
-% Happy users are requested to send me a postcard. :-)
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Martin Schr\"oder.
%
-% For error reports in case of UNCHANGED versions see count1to.ins
+% This work consists of the files count1to.dtx and count1to.ins
+% and the derived file count1to.sty.
%
% \fi
%
-% \CheckSum{121}
+% \CheckSum{112}
%
%% \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
@@ -62,17 +84,15 @@
%% ===================================================================
%% @LaTeX-style-file{
%% author = {Martin Schr\"oder},
-%% version = "1.22",
-%% date = "8 June 1999",
+%% version = "2.1",
+%% date = "24 May 2009",
%% filename = "count1to.sty",
%% address = {Martin Schr\"oder
-%% Cr\"usemannallee 3
-%% D-28213 Bremen
-%% telephone = "+49-421-2239425",
-%% email = "Martin.Schroeder@ACM.org",
-%% pgp-Key = "2048 bit / KeyID 292814E5",
-%% pgp-fingerprint = "7E86 6EC8 97FA 2995 82C3 FEA5 2719 090E",
-% checksum = "17059 511 2330 19695",
+%% Barmer Stra\"se 14
+%% 44137 Dortmund
+%% Germany}
+%% telephone = "+49-231-1206574",
+%% email = "martin@oneiros.de",
% codetable = "ISO/ASCII",
% keywords = "LaTeX, pages",
% supported = "yes",
@@ -81,23 +101,21 @@
%% with a driver.
%% Also provides access to the number of pages
%% of the document.
-%% Uses the everyshi package.
-%
-% The checksum field above contains a CRC-16
-% checksum as the first value, followed by
-% the equivalent of the standard UNIX wc
-% (word count) utility output of lines,
-% words, and characters. This is produced
-% by Robert Solovay's checksum utility."
+%% Uses the everyshi package."
%% }
%% ===================================================================
%% \fi
%
+% \SVN $Rev: 1368 $
+% \SVN $Date: 2009-05-24 18:02:57 +0200 (So, 24. Mai 2009) $
+%
% \changes{v1.00}{1994/12/07}{New}
% \changes{v1.01}{1994/12/09}{Documentation improved}
% \changes{v1.02}{1996/12/29}{Documentation improved}
% \changes{v1.20}{1998/08/09}{Documentation improved}
% \changes{v1.22}{1999/06/08}{Moved to LPPL}
+% \changes{v2.00}{2002/08/31}{Removed \texttt{TotalPages}}
+% \changes{v2.1}{2009/05/24}{New address}
%
% \newcommand*{\Count}[1]{\texttt{\symbol{92}count#1}}
% \newcommand*{\package}[1]{\textnormal{\sffamily#1}}
@@ -105,42 +123,25 @@
% \hskip 1sp \marginpar{\small\sffamily\raggedright
% New feature\\#1}}
%
-% ^^A We need to document a label -- we do this by using the macros for
-% ^^A environments and changing the macros for the index entries.
-% \makeatletter
-% \renewcommand*{\SpecialEnvIndex}[1]{^^A
-% \@bsphack\index{\string#1^^A
-% \actualchar\string\verb\quotechar*\verbatimchar
-% \string#1\verbatimchar
-% \encapchar usage}\@esphack}
-% \renewcommand*{\SpecialMainEnvIndex}[1]{^^A
-% \@bsphack\special@index{\string#1\actualchar
-% \string\verb\quotechar*\verbatimchar
-% \string#1\verbatimchar\encapchar main}%
-% \@esphack}
-% \makeatother
-%
% ^^A -----------------------------
%
% \changes{v1.03}{1997-03-09}{Fixed use of \cs{newline} in title.}
% \title{\unskip
% The \package{count1to} package^^A
% \thanks{^^A
-% The version umber of this file is \fileversion,
-% last revised \filedate.\protect\newline
-% The name \textsf{count1to} is a tribute to the $8+3$
-% file-naming convention of certain ``operating
-% systems''; strictly speaking it should be
-% \textsf{count1to9}.}
-% \thanks{^^A
-% This document has \ref{TotalPages} pages.}^^A
+% The version number of this file is \fileversion, subversion
+% revision~\#\SVNRev, last revised
+% \protect\SVNDate.\protect\newline
+% The name \textsf{count1to} is a tribute to the $8+3$ file-naming
+% convention of certain ancient ``operating systems''; strictly
+% speaking it should be \textsf{count1to9}.}
% }
+% \changes{v2.00}{2002/08/31}{Changed e-mail}
% \author{Martin Schr\"oder\\[0.5ex]
-% \normalsize Cr\"usemannallee 3\\
-% \normalsize D-28213 Bremen\\
-% \normalsize Martin.Schroeder@ACM.org\\
-% \scriptsize \texttt{PGP-Key: 2048 bit / KeyID 292814E5}\\[-0.5em]
-% \scriptsize \texttt{7E86 6EC8 97FA 2995~~82C3 FEA5 2719 090E}}
+% \normalsize Barmer Stra\ss{}e 14\\
+% \normalsize 44137 Dortmund\\
+% \normalsize Germany\\
+% \normalsize martin@oneiros.de}
% \date{\filedate}
% \maketitle
%
@@ -155,9 +156,6 @@
% \textsf{.dvi} file by \TeX{} and can later be used to select
% the pages of certain parts of the document for printing if the
% device driver supports this.
-%
-% It also gives access to the total number of pages of the
-% document via the label \texttt{TotalPages}.
% \end{abstract}
%
% \pagestyle{headings}
@@ -168,6 +166,22 @@
%
% ^^A -----------------------------
%
+% \section{Introduction to version 2}
+% ^^A
+% The main change of this new version is the removal of the code for
+% the \texttt{TotalPages} label.
+% This code didn't work with the \package{hyperref}
+% package\cite{package:hyperref} and better code to achieve the
+% effect of it is contained in the \package{totpages}
+% package\cite{package:totpages}.
+% So old documents using this package will not work when they try to
+% use the \texttt{TotalPages} label; these documents must be changed
+% by inserting a \cs{usepackage\{totpages\}} in the preamble and
+% replacing all occurences of \texttt{TotalPages} by
+% \texttt{TotPages}.
+%
+% ^^A -----------------------------
+%
% \section{Introduction}
% ^^A
% Most of the time users want to print only certain parts of a
@@ -257,21 +271,6 @@
% pages with $\Count{4}\mapsto\mathrm{section}=2$ plus the first
% page of section~3).
%
-% \DescribeEnv{TotalPages}
-% \NEWfeature{1997/11/01}
-% The setting of \Count{1} with the absolute page number makes it
-% possible to provide the \emph{total} number of pages of the
-% document (as opposed to the ``number'' on the last page provided
-% by the \textsf{lastpage} package\cite{package:lastpage}).
-% By referencing the label |TotalPages| (e.\,g. by |\ref{TotalPages}|)
-% you get the total number of pages the document had at the last run
-% of \LaTeX.
-% If you want to use this feature, you should load \textsf{count1to}
-% as the \emph{last} package in your document because \textsf{count1to}
-% executes some code at |\end{document}| and has to be sure that its
-% code is the \emph{last} code executed there.
-%
-%
% ^^A -----------------------------
%
% \section{Options}
@@ -296,8 +295,6 @@
% \section{Acknowledgements}
% ^^A
% As usual Rebecca Stiels improved the quality of this documentation.
-% Rolf Niepraschk (\texttt{niepraschk@ptb.de}) provided the idea and
-% the first implementation of the \texttt{TotalPages} label.
%
%
% ^^A -----------------------------
@@ -315,6 +312,15 @@
% and Typesetting}.
% \newblock Addison-Wes\-ley, 1986.
% \newblock Eleventh printing, revised, May 1991.
+% \bibitem{package:totpages}
+% Wilhelm M\"uller.
+% \newblock The \package{totpages} package.
+% \newblock \url{CTAN: tex-archive/macros/latex/contrib/supported/totpages/}.
+% \newblock \LaTeXe{} package.
+% \bibitem{package:hyperref}
+% Sebastian Rahtz.
+% \newblock Hypertext marks in \LaTeX.
+% \newblock \url{CTAN: tex-archive/macros/latex/contrib/supported/hyperref/}.
% \bibitem{package:everyshi}
% Martin Schr\"oder.
% \newblock The \package{everyshi} package.
@@ -359,6 +365,8 @@
% \cs{@countItoIX@ifs} is used to set all these \cs{if}s at
% |\begin{document}|.
% It is undefined after use to save some space.
+% \changes{v2.00}{2002/08/31}{moved code for \cs{AtBeginDocument} to
+% \cs{@countItoIX@init}}
% \changes{v1.20}{1998/04/10}{don't use \textsf{ifthen}}
% \changes{v1.10}{1997/11/01}{\cs{setboolean}}
% \changes{v1.02}{1996/12/29}{destruct after usage}
@@ -372,7 +380,6 @@
\@ifundefined{c@paragraph} {}{\@have@paragraphtrue}
\@ifundefined{c@subparagraph} {}{\@have@subparagraphtrue}
}
-\AtBeginDocument{\@countItoIX@ifs\let\@countItoIX@ifs\undefined}
% \end{macrocode}
% \end{macro}
%
@@ -392,6 +399,8 @@
% with the higher levels.
% This is done via \cs{@addtoreset} at \cs{begin\{document\}}.
% \cs{@countItoIX@bugfix} is undefined after use to save some space.
+% \changes{v2.00}{2002/08/31}{moved code for \cs{AtBeginDocument} to
+% \cs{@countItoIX@init}}
% \changes{v1.20}{1998/04/10}{don't use \textsf{ifthen}}
% \changes{v1.10}{1997/11/01}{\cs{ifthenelse}}
% \changes{v1.02}{1996/12/29}{destruct after usage}
@@ -423,10 +432,25 @@
\@addtoreset{subparagraph} {subsubsection}
\fi
}
-\AtBeginDocument{\@countItoIX@bugfix\let\@countItoIX@bugfix\undefined}
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\@countItoIX@init}
+% \changes{v2.00}{2002/08/31}{new}
+% \cs{@countItoIX@init} calls \cs{\@countItoIX@ifs} and
+% \cs{@countItoIX@bugfix} and then frees their memory.
+% This is done at \cs{begin\{document\}} via \cs{AtBeginDocument}.
+% \begin{macrocode}
+\newcommand*{\@countItoIX@init}{%
+ \message{ABD: Count1to9 initializing macros}%
+ \@countItoIX@ifs\let\@countItoIX@ifs\undefined
+ \@countItoIX@bugfix\let\@countItoIX@bugfix\undefined
+ }
+\AtBeginDocument{\@countItoIX@init}
+% \end{macrocode}
+% \end{macro}
+%
+%
% \begin{macro}{\@countItoIX@shipout}
% \cs{@countItoIX@shipout} is used for setting \Count{1} to
% \Count{9} at each \cs{shipout}.
@@ -461,30 +485,6 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{environment}{TotalPages}
-% The label \texttt{TotalPages} is set on the \emph{absolut} last page
-% of the document and holds the \emph{total} number of pages of the
-% document, i.\,e. the value of \Count{1}.
-% But before we write the value to the auxfile we call a \cs{clearpage}
-% to force all pending floats to be output.
-% To do this we have to be sure to be the \emph{last} macro called by
-% \cs{AtEndDocument}---but this is nearly impossible to assure (see
-% the troubles the \package{lastpage} package\cite{package:lastpage} goes
-% through to achieve this), so we try to do our very best and set our
-% entry for \cs{AtEndDocument} at |\begin{document}| by using
-% \cs{AtBeginDocument}.
-% \changes{v1.10}{1997/11/01}{new}
-% \changes{v1.21}{1998/10/24}{write to \cs{@mainaux} instead of \cs{@auxout}}
-% \begin{macrocode}
-\AtBeginDocument{%
- \AtEndDocument{%
- \clearpage
- \immediate\write\@mainaux{\string\newlabel{TotalPages}{{\the\count1}{\the\count1}}}
- }%
- }
-% \end{macrocode}
-% \end{environment}
-%
% \begin{macrocode}
%</package>
% \end{macrocode}