🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text.tex
Article #69

Announcing new versions of cite.sty and overcite.sty

#69
From: Donald Arseneau
Date: Thu, 29 Oct 1992 00:57
105 lines
4570 bytes
I sent this announcement a while ago to the info-tex mailing list,
but it hasn't made its way to comp.text.tex yet.  Sorry if it
reappears in the next few days.

Announcing new versions of cite.sty and overcite.sty.  They give
compressed, *sorted* lists of citations for \cite commands, like
[1-5] (cite.sty) or $^{1-5}$ (overcite.sty) instead of [2,3,4,1,5].
I've sent the updates to the SHSU style archive (fileserv@shsu.bitnet;
niord.shsu.edu) and they should be available soon (I just checked, and
they are not available there yet).  I've also put copies at
at ymir.claremont.edu and sun.soe.clarkson.edu.  In the latter case,
the new versions may _Never_ migrate to the latex-style directory, so
check in /submit first.  I can send directly to people too.

Cite.sty modifies LaTeX's normal citation mechanism to:
%
%   o Sort citation numbers into ascending order; print non-numbers before
%     numbers.  Compress lists of three or more consecutive numbers to one
%     number range which can be split, with difficulty, after the dash.
%     All numbers should be greater than zero.
%     E.g., if you used to get [7,5,6,?,4,9,8,Einstein,6], then this style
%     will give you [?,Einstein,4-6,6-9].
%
%   o Allow, but strongly discourage, line breaks within a series of
%     citations.  Each number is separated by a comma and a small space.
%     A break at the beginning of an optional note is discouraged also.
%
%   o Always put an interword space before the citation and allow a
%     highpenalty break there (unless you specifically forbid it with ~).
%     E.g.,   Something really stupid \cite{Larry,Curly,Moe}.
%                                    ^-- This space doesn't matter.
%
%   o Ignore spaces after the commas in the parameter list.
%
%   o define \citen to get just the numbers (and write to the aux file)
%     without the brackets and extra formatting.

Overcite.sty does these, plus:

%   o Display citations as superscript numbers, a comma and a small space
%     between each number.
%
%   o Use THE SAME INPUT FORMAT as for ordinary citations; this style will
%     ignore spaces before the citation, and move trailing punctuation to
%     before the citation.  

-----

Some history on these versions:  

There has been a style to sort citation numbers for quite some time:
citesort.sty by Ian Green, based on the first version of cite.sty
I submitted to TeXhax.  We corresponded in the spring about updating
citesort, and merging it with the other cite styles.  This we did, but 
there were still problems.  I wasn't keen on proliferating option files, 
yet the sorting had trouble with non-numbers and was slow so I didn't 
want to make it the default behavior.  So I dropped it for a while.

Just recently, I set about making a version that would run fast if the
numbers were already sorted, but sort them if necessary.  Note that 
the new sorting and Ian's are both of order n^2; sorting can't be done
any faster in TeX because there is no direct access to arrays.  All lists
are scanned sequentially.

Here are some benchmarks for the versions: (times in seconds)


citations extracted from an actual paper

style            pre-sorted        unsorted

------------------------------------------

none                 36.00           30.51

(old) cite           28.81           31.71

citesort            180.39          183.67

modified citesort   120.36          122.14

(new) cite           33.85           38.58


lists of 65 citations

style            sorted          random         worst-case*

-----------------------------------------------------------

none               5.77            5.67            5.78

old cite           5.38            6.17            5.37

mod. citesort    251.04          247.22          265.23

new cite           7.46           16.32           25.23

* worst-case order for sorting with new cite.sty.  That is, nearly
sorted, but with the highest number first.


\bye

Donald Arseneau       asnd@reg.triumf.ca
Technical Details
Message-ID: <28OCT199217570750@msr.triumf.ca>
Path: arc1-ca.pugleaf.net!sparky!uunet!destroyer!cs.ubc.ca!unixg.ubc.ca!msr.triumf.ca!asnd

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!destroyer!cs.ubc.ca!unixg.ubc.ca!msr.triumf.ca!asnd
From: asnd@msr.triumf.ca (Donald Arseneau)
Newsgroups: comp.text.tex
Subject: Announcing new versions of cite.sty and overcite.sty
Date: 28 Oct 1992 17:57 -0700
Organization: TRIUMF: Tri-University Meson Facility
Lines: 105
Distribution: world
Message-ID: <28OCT199217570750@msr.triumf.ca>
NNTP-Posting-Host: msr.triumf.ca
Keywords: citations LaTeX sort
News-Software: VAX/VMS VNEWS 1.41