summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/cite
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-05-06 15:08:05 +0000
committerKarl Berry <karl@freefriends.org>2009-05-06 15:08:05 +0000
commit8a45832a96d8562f82aa5da25278261e34bdf056 (patch)
tree9ff065606ecec195dee4d0d202da1c053aee0ad8 /Master/texmf-dist/tex/latex/cite
parent93dcd99c934b8d5a7db067c6f1197b8111994d65 (diff)
cite 5.1
git-svn-id: svn://tug.org/texlive/trunk@12952 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/cite')
-rw-r--r--Master/texmf-dist/tex/latex/cite/cite.sty39
1 files changed, 30 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/cite/cite.sty b/Master/texmf-dist/tex/latex/cite/cite.sty
index 70ea664909a..866acb07f4c 100644
--- a/Master/texmf-dist/tex/latex/cite/cite.sty
+++ b/Master/texmf-dist/tex/latex/cite/cite.sty
@@ -1,6 +1,6 @@
% C I T E . S T Y
%
-% version 5.0 (Mar 2009)
+% version 5.1 (Apr 2009)
%
% Compressed, sorted lists of on-line or superscript numerical citations.
% see also drftcite.sty (And the stub overcite.sty)
@@ -113,19 +113,28 @@
\begingroup \let\hyper@@link\@nonhyper@@link
\protected@xdef\@B@citeB{\csname b@\@citeb\@extra@b@citeb \endcsname}%
\endgroup
+ \@addto@cite@list
+ \fi}
+
+\def\@nonhyper@@link [#1]#2#3#4{#4}
+
+% Add entry to the list of citations. This default definition sorts
+% numbers and numbers with other character tags. There is presently
+% no other definition than this default, but features may be added later.
+%
+\def\@addto@cite@list{%
\ifcat _\ifnum\z@<0\@B@citeB _\else A\fi % a positive number, put in list
\@addnumto@cite@list\@B@citeB
\else %citation is not a simple number, try letter-number or number-letter
\expandafter \@cite@add@letnum \@B@citeB\delimitershortfall\delimiter
- \fi\fi}
-
-\def\@nonhyper@@link [#1]#2#3#4{#4}
+ \fi
+}
\def\@cite@out#1{\citeform{\csname #1\endcsname}}
% first stage for sorting values with prefix/suffix characters. #1 is the
% first character: a digit or a prefix.
-% The numeric sort value (\@tempcnta) is ((prefix*16384+number)*256+suffix.
+% The numeric sort value (\@tempcnta) is (prefix*16384+number)*256+suffix.
%
\def\@cite@add@letnum#1#2\delimiter{%
\ifcat _\ifnum\z@<0#1_\else A\fi % test the first character for a digit
@@ -155,7 +164,7 @@
\advance\@tempcnta`#1\relax
\@citeaddcnta
\else % else, can't be sorted, so output immediately
- \@citea \@cite@out{\@citeb\@extra@b@citeb}\let\@citea\citepunct
+ \@citea \@cite@out{b@\@citeb\@extra@b@citeb}\let\@citea\citepunct
\fi
\fi
\fi}
@@ -346,8 +355,14 @@
\mathchardef\citepunctpenalty=\@M
}
\DeclareOption{ref}{\def\citeleft{[Ref.\penalty\@M\ }}
-\DeclareOption{nosort}{\def\@addto@cite@list
- {\edef\@cite@list{\@cite@list \@celt{\@B@citeB}}}}
+% For no sorting, always add to end of list, but still calculate
+% sort-order number (\@tempcnta) because it may be used for
+% collapsing consecutive numbers.
+\DeclareOption{nosort}{%
+ \def\@citeaddcnta{%
+ \edef\@cite@list{\@cite@list
+ \@celt{\number\@tempcnta}{\@B@citeB}{b@\@citeb\@extra@b@citeb}}%
+ }}
\DeclareOption{sort}{}% default!
\DeclareOption{nomove}{\def\oc@movep{\@tempa}\let\@citey\oc@movep}
\DeclareOption{move}{}% default
@@ -365,7 +380,7 @@
\DeclareOption{noadjust}{\let\cite@adjust\@empty}% Don't change spaces
\DeclareOption{adjust}{}% adjust space before [ ]
\DeclareOption{biblabel}{\def\@biblabel#1{\@citess{#1}\kern-\labelsep\,}}
-\ProvidesPackage{cite}[2009/03/20 \space v 5.0x]
+\ProvidesPackage{cite}[2009/04/29 \space v 5.1]
\ProcessOptions
\ifx\@citey\oc@movep\else % we are moving punctuation; must ensure sfcodes
@@ -617,6 +632,12 @@ citations; for example, to number by chapter (see chapterbib.sty).
% 4.02 Bury undouble action in a separate macro to avoid extra \fi error.
% 5.0 hyperref and backref compatability! Penalty parameters and [nobreak].
% Letter prefix and suffix sorting. Stop suppressing multiple warnings.
+% 5.1 Fix a missing "b@" (disappearing named cites), fix nosort
+%
+% TODO: prevent "xy" from being sorted as "x0y"
+% TODO: other sorting, like dictionary or roman numeral
+% TODO: create special "final punct" that could be ", and " and likewise
+% a "single punct" that could be " and "
%
% Send problem reports to asnd@triumf.ca