summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/totcount
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-04-15 18:36:55 +0000
committerKarl Berry <karl@freefriends.org>2009-04-15 18:36:55 +0000
commit3617ef0fc28f0485785df18efeccd6bbd6b33bf1 (patch)
tree9d3430109e013d92405f713460a70d305c4b1a8a /Master/texmf-dist/doc/latex/totcount
parente802015081c281d89ccb87b4e29bd063d3ea427f (diff)
new latex package totcount (14apr09)
git-svn-id: svn://tug.org/texlive/trunk@12727 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/totcount')
-rw-r--r--Master/texmf-dist/doc/latex/totcount/README51
-rw-r--r--Master/texmf-dist/doc/latex/totcount/totcount-ex.tex82
-rw-r--r--Master/texmf-dist/doc/latex/totcount/totcount.pdfbin0 -> 198991 bytes
3 files changed, 133 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/totcount/README b/Master/texmf-dist/doc/latex/totcount/README
new file mode 100644
index 00000000000..60d483a44c3
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/totcount/README
@@ -0,0 +1,51 @@
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+The TotCount package, version 1.0, 2009/04/14
+
+Copyright (c) [2009] Vasileios Koutavas (Vasileios.Koutavas@cs.tcd.ie)
+
+This program may be re-distributed and/or modified under the terms of the
+LaTeX Project Public License version 1.3c, or any later version.
+The latest version of this license is in
+ CTAN:macros/latex/base/lppl.txt
+
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+The TotCount package computes and displays the last value of counters
+inside a document. With this package one may count the total number of
+elements (e.g. sections, pages, citations, etc.) in a LaTeX document by
+simply using standard LaTeX counters.
+
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+ FILES:
+
+ - README This file
+ - totcount.ins Installation file
+ - totcount.dtx Source file
+ - totcount.pdf Documentation
+
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+ INSTALLATION:
+
+ 1. To get the package file run
+
+ latex totcount.ins
+
+ then copy the totcount.sty in a directory accessible by (pdf)latex
+ and re-hash the latex tree.
+
+ 2. To compile the documentation run
+
+ pdflatex totcount.drv
+ makeindex -s gind.ist totcount
+ makeindex -s gglo.ist -o totcount.gls totcount.glo
+ pdflatex totcount.drv
+
+ 3. To run the example run
+
+ pdflatex totcount-ex.tex
+ pdflatex totcount-ex.tex
+
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
diff --git a/Master/texmf-dist/doc/latex/totcount/totcount-ex.tex b/Master/texmf-dist/doc/latex/totcount/totcount-ex.tex
new file mode 100644
index 00000000000..7a8abdee4b2
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/totcount/totcount-ex.tex
@@ -0,0 +1,82 @@
+%%
+%% This is file `totcount-ex.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% totcount.dtx (with options: `ex')
+%%
+%% The TotCount package, version 1.0, 2009/04/14
+%%
+%% Copyright (c) [2009] Vasileios Koutavas (Vasileios.Koutavas@cs.tcd.ie)
+%%
+%% This program may be re-distributed and/or modified under the terms of the
+%% LaTeX Project Public License version 1.3c, or any later version.
+%% The latest version of this license is in
+%% CTAN:macros/latex/base/lppl.txt
+%%
+\def\fileversion{1.0}
+\def\filedate{2009/04/14}
+\def\docdate{14 April 2009}
+\NeedsTeXFormat{LaTeX2e}
+ \date{\docdate}
+\ProvidesFile{totcount-ex.tex}
+ [\filedate \space v\fileversion \space%
+ test file for the TotCount package]
+\documentclass{article}
+%%
+%% Import the package
+\RequirePackage{totcount}
+%%
+%% Comment out the following line to use the previously stored total counts in
+%% 'mycount.aux' (make sure it exists!) instead of computing them again:
+\def\computemycount{}
+\expandafter\ifx\csname computemycount\endcsname\relax
+ \usetotcountfile{mycount.aux}
+ \newcounter{mycount} % so that increments of this counter don't break
+\else
+ \newtotcounter[auxfile=mycount.aux]{mycount}
+\fi
+%%
+%% Register the section and page counters as a total counters:
+\regtotcounter{section}
+\regtotcounter{page}
+
+\begin{document}
+%%
+%% A total counter can be declared/registered anywhere:
+\newtotcounter{yourcount}
+
+\section{Total Counts}
+%%
+%% Increment counters as usual:
+\addtocounter{mycount}{5}
+\addtocounter{yourcount}{5}
+%%
+%% Print the value of a total counter by using |\total|:
+The total value of the counter {\tt mycount} is \total{mycount} (should
+be 10), and the total value of the counter {\tt yourcount} is
+\total{yourcount} (should be 17).
+
+%%
+%% Get the numeric value of a total counter by using |\totvalue|:
+This document has \total{section}
+\ifnum\totvalue{section}=1 section \else sections \fi
+and \total{page}
+\ifnum\totvalue{page}=1 page. \else pages. \fi
+
+%%
+%% The effect of incrementing the counters will be visible the second
+%% time LaTeX runs:
+\addtocounter{yourcount}{5}
+\addtocounter{mycount}{5}
+\addtocounter{yourcount}{7}
+
+\section{A Section}
+\section{Another Section}
+\section{Yet Another Section}
+
+\end{document}
+\endinput
+%%
+%% End of file `totcount-ex.tex'.
diff --git a/Master/texmf-dist/doc/latex/totcount/totcount.pdf b/Master/texmf-dist/doc/latex/totcount/totcount.pdf
new file mode 100644
index 00000000000..dede1a6d47f
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/totcount/totcount.pdf
Binary files differ