diff options
author | Karl Berry <karl@freefriends.org> | 2009-05-06 15:08:05 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-05-06 15:08:05 +0000 |
commit | 8a45832a96d8562f82aa5da25278261e34bdf056 (patch) | |
tree | 9ff065606ecec195dee4d0d202da1c053aee0ad8 /Master/texmf-dist | |
parent | 93dcd99c934b8d5a7db067c6f1197b8111994d65 (diff) |
cite 5.1
git-svn-id: svn://tug.org/texlive/trunk@12952 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/cite/README | 26 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/cite/cite.sty | 39 |
2 files changed, 43 insertions, 22 deletions
diff --git a/Master/texmf-dist/doc/latex/cite/README b/Master/texmf-dist/doc/latex/cite/README index 37093226543..698a2c1b236 100644 --- a/Master/texmf-dist/doc/latex/cite/README +++ b/Master/texmf-dist/doc/latex/cite/README @@ -1,24 +1,24 @@ This directory contains four .sty files that are mutually compatible, -but actually independent: +but (mostly) independent: cite.sty Compressed, sorted lists of numerical citations: [8,11-16] + with many options for controlling the formatting. -overcite.sty Compressed, sorted lists of superscript numerical citations: - "word [12,16,11,13,14,15]." --> "word.$^{11-16}$" +overcite.sty like \usepackage[superscript]{cite} drftcite.sty Print the tags instead of the numbers for \cite and \bibitem. chapterbib.sty Do multiple bibliographies--one for each \include file. -Each package works with LaTeX2e and LaTeX2.09. (These versions are the -last that will support 2.09!) The documentation is included as plain -text after the definitions in each file (below \endinput). It can be -read online or printed directly, but don't try to typeset it with LaTeX! +The documentation is included as plain text after the definitions in +each file (below \endinput). It can be read online or printed directly, +but don't try to typeset it with LaTeX! -Since the instructions follow \endinput, they are not read by TeX and -should not slow down the file loading. If, however, you see that the -instructions slow down the loading on your system, you may split the -file into, for example, cite.sty and cite.doc. Just do not redistribute -these split files. +They are all released under a very simple permissive license in +the MIT/BSD style: They may be freely used, transmitted, reproduced, +or modified provided that [the copyright and permission] notice is +left intact. -Donald Arseneau asnd@reg.triumf.ca + + +Donald Arseneau asnd@triumf.ca 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 |