diff options
author | Karl Berry <karl@freefriends.org> | 2006-08-14 00:00:58 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-08-14 00:00:58 +0000 |
commit | f68c66c2fd38fcd1146a01bbe28f58ed0efc6f79 (patch) | |
tree | 6c52bf9ca94926efe01ce319c811ec0379eef72f /Master/texmf-dist/tex/latex/oberdiek/refcount.sty | |
parent | 42bc6d37351f5002d650f9a782eeb7972c7a1703 (diff) |
oberdiek update to get kvoptions 2.2 (2aug06)
git-svn-id: svn://tug.org/texlive/trunk@1948 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/oberdiek/refcount.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/oberdiek/refcount.sty | 124 |
1 files changed, 0 insertions, 124 deletions
diff --git a/Master/texmf-dist/tex/latex/oberdiek/refcount.sty b/Master/texmf-dist/tex/latex/oberdiek/refcount.sty deleted file mode 100644 index 12baec3f1c1..00000000000 --- a/Master/texmf-dist/tex/latex/oberdiek/refcount.sty +++ /dev/null @@ -1,124 +0,0 @@ -% File: refcount.sty -% Version: 2000/09/07 v2.0 -% Author: Heiko Oberdiek <oberdiek@ruf.uni-freiburg.de> -% -% Function: Converting references to numbers. -% -% Copyright: Copyright (C) 1998, 2000 Heiko Oberdiek. -% -% This program may be distributed and/or modified under -% the conditions of the LaTeX Project Public License, -% either version 1.2 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.2 or later is part of all distributions -% of LaTeX version 1999/12/01 or later. -% -% Use: -% * Commands similar to LaTeX's \setcounter and \addtocounter, -% but that extracts the number value from a reference: -% \setcounterref, \addtocounterref -% \setcounterpageref, \addtocounterpageref -% They take two arguments: -% \...counter...ref{<LaTeX counter>}{<reference>} -% An undefined references produces the usual LaTeX warning -% and its value is assumed to be zero. -% Example: -% \newcounter{ctrA} -% \newcounter{ctrB} -% \refstepcounter{ctrA}\label{ref:A} -% \setcounterref{ctrB}{ref:A} -% \addtocounterpageref{ctrB}{ref:A} -% * Commands that can be used in expandible contexts: -% \getrefnumber, \getpagerefnumber -% They take one argument, the reference: -% \get...refnumber{<reference>} -% Because warnings and assignments cannot be used in -% expandible contexts, undefined references do not -% produce a warning, their values are assumed to be zero. -% Example: -% \label{ref:here}% somewhere -% \ifodd\getpagerefnumber{ref:here}% -% reference is on an odd page -% \else -% reference is on an even page -% \fi -% * The default for undefined references can be changed -% with macro \setrefcountdefault, for example this -% package calls: -% \setrefcountdefault{0} -% * This method of extracting the number is more safe -% than the use of the reference directly, because -% there are packages such as hyperref, that add -% additional stuff, so that the reference cannot -% be used as number any more. -% * If the reference does not contain a number, -% assignments to a counter will fail of course. -% * Tested with packages hyperref and calc. -% -% History: -% 1998/04/08 v1.0: -% * First public release, written as answer in the -% newsgroup `comp.text.tex' in the thread -% `Re: Adding a \ref to a counter?', date: 1998/08/04. -% 2000/09/07 v2.0: -% * Documentation added. -% * LPPL 1.2 -% * Package rewritten, new commands added. -% -\NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{refcount} - [2000/09/07 v2.0 Converting references to numbers (HO)] - -\def\setrefcountdefault#1{% - \def\rc@default{#1}% -} -\setrefcountdefault{0} - -% \def\@car#1#2\@nil{#1} % defined in LaTeX kernel -\def\rc@cartwo#1#2#3\@nil{#2} - -% Generic command for "\{set,addto}counter{page,}ref": -% #1: \setcounter, \addtocounter -% #2: \@car (for \ref), \@cartwo (for \pageref) -% #3: LaTeX counter -% #4: reference -\def\rc@set#1#2#3#4{% - \expandafter\ifx\csname r@#4\endcsname\relax - \protect\G@refundefinedtrue % LaTeX: rerun warning - \@latex@warning{Reference `#4' on page \thepage\space - undefined}% - #1{#3}{\rc@default}% - \else - #1{#3}{% - \expandafter\expandafter\expandafter#2% - \csname r@#4\endcsname\rc@default\rc@default\@nil - }% - \fi -} - -% user commands: - -\newcommand*{\setcounterref}{\rc@set\setcounter\@car} -\newcommand*{\addtocounterref}{\rc@set\addtocounter\@car} -\newcommand*{\setcounterpageref}{\rc@set\setcounter\rc@cartwo} -\newcommand*{\addtocounterpageref}{\rc@set\addtocounter\rc@cartwo} - -\newcommand*{\getrefnumber}[1]{% - \expandafter\ifx\csname r@#1\endcsname\relax - \rc@default - \else - \expandafter\expandafter\expandafter\@car - \csname r@#1\endcsname\@nil - \fi -} -\newcommand*{\getpagerefnumber}[1]{% - \expandafter\ifx\csname r@#1\endcsname\relax - \rc@default - \else - \expandafter\expandafter\expandafter\rc@cartwo - \csname r@#1\endcsname\rc@default\rc@default\@nil - \fi -} -\endinput |