summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/eskdx/eskdtotal.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/eskdx/eskdtotal.sty')
-rw-r--r--Master/texmf-dist/tex/latex/eskdx/eskdtotal.sty59
1 files changed, 59 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/eskdx/eskdtotal.sty b/Master/texmf-dist/tex/latex/eskdx/eskdtotal.sty
new file mode 100644
index 00000000000..2bc12352eda
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/eskdx/eskdtotal.sty
@@ -0,0 +1,59 @@
+% Copyright 2006 Konstantin Korikov <lostclus@ua.fm>
+%
+% 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
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2003/12/01 or later.
+%
+% This work has the LPPL maintenance status "maintained".
+%
+% This Current Maintainer of this work is Konstantin Korikov.
+%
+% This work consists of all files listed in manifest.txt.
+%
+
+%
+% This is automaticaly generated file, do not edit it.
+%
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{eskdtotal}[2006/12/17 v0.97 Total number of tables, figures, etc]
+
+\RequirePackage{eskdsect}
+
+\let\ESKD@old@caption\@caption
+\let\ESKD@old@bibitem\bibitem
+
+\newcounter{ESKD@figure}
+\newcounter{ESKD@table}
+\newcounter{ESKD@bibitem}
+
+\long\def\@caption#1[#2]#3{%
+ \stepcounter{ESKD@#1}%
+ \ESKD@old@caption{#1}[#2]{#3}}
+
+\long\def\bibitem{%
+ \stepcounter{ESKD@bibitem}%
+ \ESKD@old@bibitem}
+
+\def\ESKD@total@save#1#2{%
+ \immediate\write\@auxout{%
+ \string\gdef\string\ESKD@total@saved@\string#1{\arabic{#2}}}}
+
+\AtEndDocument{%
+ \ESKD@total@save{figure}{ESKD@figure}
+ \ESKD@total@save{table}{ESKD@table}
+ \ESKD@total@save{bibitem}{ESKD@bibitem}
+ \ESKD@total@save{appendix}{appendix}
+ \clearpage
+ \addtocounter{page}{-1}
+ \ESKD@total@save{page}{page}
+ \addtocounter{page}{1}}
+
+\newcommand{\ESKDtotal}[1]{%
+ \@ifundefined{ESKD@total@saved@#1}{?}{%
+ \@nameuse{ESKD@total@saved@#1}}}
+