From: heitkoet@lucky.informatik.uni-dortmund.de (Joerg Heitkoetter)
Newsgroups: comp.text.tex
Subject: Re: Chapterbib.sty has broken my cite.sty
Date: 12 Nov 1992 08:40:56 GMT
Organization: CS Department, Dortmund University, Germany
Distribution: world
NNTP-Posting-Host: lucky

In article <1992Nov11.235922.16759@sserve.cc.adfa.oz.au>,
eam@ccadfa.cc.adfa.oz.au (Eric A Magnusson) writes:
|> The beautification of references from [1,2,3,4]
|> to [1-4] has not worked since I included the
|> chapterbib.sty in my thesis.  Also I can't get
|> a bib of ALL the references in ALL the chpaters
|> at the end of my thesis.
|> 
|> Any help would be greatly appriciated.
Here it comes...plus an application of
bibunits, cite, harvard, etc. (Forget about Chapterbib ;-)

Using LaTeX styles is just like loading more and more TSR
routines into your PC. In the end: nothing goes, anymore...
simply because LaTeX is both: a BAD (Broken At Design) thingy,
and unfortunately the best one you can get...

	-joke

--
Joerg Heitkoetter
Systems Analysis Group
University of Dortmund, Germany
(joke@ls11.informatik.uni-dortmund.de).


--------- cut here -----------------------------------------
#!/bin/sh
# This is a shell archive (produced by shar 3.49)
# To extract the files from this archive, save it to a file, remove
# everything above the "!/bin/sh" line above, and type "sh file_name".
#
# made 11/12/1992 08:34 UTC by heitkoet@lucky
# Source directory /tmp_mnt/home/lumpi/ls11d/heitkoet/jobs/delphi/docs
#
# existing files will NOT be overwritten unless -c is specified
#
# This shar contains:
# length  mode       name
# ------ ---------- ------------------------------------------
#    264 -rw-r----- units/Makefile
#   1272 -rw-r----- units/foo.tex
#   2201 -rw-r----- units/foo.bib
#   5945 -rw-r----- units/bibunits.sty
#   4173 -rw------- units/harvard.sty
#  24436 -rw------- units/kluwer.bst
#   7127 -rw-r----- units/cite.sty
#
# ============= units/Makefile ==============
if test ! -d 'units'; then
    echo 'x - creating directory units'
    mkdir 'units'
fi
if test -f 'units/Makefile' -a X"$1" != X"-c"; then
	echo 'x - skipping units/Makefile (File already exists)'
else
echo 'x - extracting units/Makefile (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'units/Makefile' &&
# $Id: Makefile,v 1.1 1992/11/12 08:29:12 joke Exp $
foo:	clean
X	latex foo.tex
X	bibtex foo
X	bibtex foo.1
X	bibtex foo.2
X	latex foo.tex
X	latex foo.tex
X
bar:	clean
X	latex foo.tex
X	bibtex foo
X	latex foo.tex
X	latex foo.tex
X
X
clean:
X	$(RM) *.log *.dvi *.aux *.blg *.bbl
SHAR_EOF
chmod 0640 units/Makefile ||
echo 'restore of units/Makefile failed'
Wc_c="`wc -c < 'units/Makefile'`"
test 264 -eq "$Wc_c" ||
	echo 'units/Makefile: original size 264, current size' "$Wc_c"
fi
# ============= units/foo.tex ==============
if test -f 'units/foo.tex' -a X"$1" != X"-c"; then
	echo 'x - skipping units/foo.tex (File already exists)'
else
echo 'x - extracting units/foo.tex (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'units/foo.tex' &&
% $Id: foo.tex,v 1.1 1992/11/12 08:29:12 joke Exp $
\documentstyle[11pt,bibunits,cite,harvard]{article}
\def\BibTeX{{\sc Bib}\TeX}
\begin{document}
X
%%% BIBUNITS DEFAULTS (this doesn't work with the current LaTeX version)
%%\bibliographyunit
%%\bibliography*{foo}
%%\bibliographystyle*{plain}
X
%%% BIBUNIT #1
\section{Welcome to Bibliography Units...}
\begin{bibunit}[alpha]
This document demonstrates the principal usage of \verb+bibunits.sty+.
You thus will see the {\em references\/} section of this unit
[Section~\thesection]
coming out in `alpha' style.~\cite{Hei92}
\putbib[foo]
\end{bibunit}
X
%%% BIBUNIT #2
\section{...this is Unit Number 2...}
\begin{bibunit}[plain]
But this may be changed as shown in the following section's
{\em references\/} section.~\cite{Hei92}
X
\section{...and ends after this!}
This {\em references\/} section comes out in {\tt plain} bib--style, as
defined by Oren Patashnik, in his {\tt btxbst.dox}.
The global {\em references\/} section, following this \verb+bibunit+'s
{\em references\/} section is shows the {\tt kluwer} bib--style,
that is part of the {\em harvard\/} family of \BibTeX\ styles.~\cite{HP92}
\putbib[foo]
\end{bibunit}
X
%%% BIBUNIT #3
\newpage
\bibliographystyle{kluwer}
\bibliography{foo}
\nocite{*}
X
\end{document}
SHAR_EOF
chmod 0640 units/foo.tex ||
echo 'restore of units/foo.tex failed'
Wc_c="`wc -c < 'units/foo.tex'`"
test 1272 -eq "$Wc_c" ||
	echo 'units/foo.tex: original size 1272, current size' "$Wc_c"
fi
# ============= units/foo.bib ==============
if test -f 'units/foo.bib' -a X"$1" != X"-c"; then
	echo 'x - skipping units/foo.bib (File already exists)'
else
echo 'x - extracting units/foo.bib (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'units/foo.bib' &&
$Id: foo.bib,v 1.1 1992/11/12 08:29:12 joke Exp $
X
@article{Hei92,
X	AUTHOR		= {Heitk{\"o}tter, J{\"o}rg},
X	TITLE		= {{The Dungeons of {\sc Bib}\TeX}},
X	JOURNAL		= {Newsgroup comp.text.tex},
X	VOLUME		= {},
X	NUMBER		= {},
X	YEAR		= {1992},
X	PAGES		= {},
X	MONTH		= {November},
X	NOTE		= {},
X
X	Signature	= {},
X	KeyWords	= {},
X	Attr		= {toRead},
X
X	Abstract	= {
}}
X
@article{Hei92b,
X	AUTHOR		= {Heitk{\"o}tter, J{\"o}rg},
X	TITLE		= {{{\sc Bib}\TeX, {\tt WEB} and everything...}},
X	JOURNAL		= {Personnel communications with Oren Patashnik},
X	VOLUME		= {},
X	NUMBER		= {},
X	YEAR		= {1992},
X	PAGES		= {},
X	MONTH		= {November},
X	NOTE		= {},
X
X	Signature	= {},
X	KeyWords	= {},
X	Attr		= {toRead},
X
X	Abstract	= {
}}
X
@article{HP92,
X	AUTHOR		= {Heitk{\"o}tter, J{\"o}rg and Patashnik, Oren},
X	TITLE		= {{The Dungeons of {\sc Bib}\TeX\ revisited}},
X	JOURNAL		= {Newsgroup comp.text.tex},
X	VOLUME		= {},
X	NUMBER		= {},
X	YEAR		= {1992},
X	PAGES		= {},
X	MONTH		= {November},
X	NOTE		= {},
X
X	Signature	= {},
X	KeyWords	= {},
X	Attr		= {toRead},
X
X	Abstract	= {
}}
X
@inbook{chicago,
X	TITLE		= "The Chicago Manual of Style",
X	EDITOR		= "Unknown",
X	PUBLISHER	= "University of Chicago Press",
X	EDITION		= "Thirteenth",
X	YEAR		= 1982,
X	PAGES		= "400--401"
}
X
@book{texbook,
X	AUTHOR		= "Donald E. Knuth",
X	TITLE		= "The {{\TeX}book}",
X	PUBLISHER	= "Addison-Wesley",
X	ADDRESS		= "Reading MA",
X	YEAR		= 1984
}
X
@book{latex,
X	AUTHOR		= "Leslie Lamport",
X	TITLE		= "{\LaTeX \rm:} {A} Document Preparation System",
X	PUBLISHER	= "Addison-Wesley",
X	YEAR		= 1986
}
X
@unpublished{btxdoc,
X	AUTHOR		= "Oren Patashnik",
X	TITLE		= "{{\BibTeX ing}}",
X	NOTE		= "Documentation for general {\BibTeX} users",
X	MONTH		= jan,
X	YEAR		= 1988
}
X
@unpublished{btxhak,
X	AUTHOR		= "Oren Patashnik",
X	TITLE		= "Designing {\BibTeX} Styles",
X	NOTE		= "The part of \BibTeX's documentation
X			that's not meant for general users",
X	MONTH		= jan,
X	YEAR		= 1988
}
X
@book{strunk-and-white,
X	AUTHOR		= "Strunk, Jr., William and E. B. White",
X	TITLE		= "The Elements of Style",
X	PUBLISHER	= "Macmillan",
X	EDITION		= "Third",
X	YEAR		= 1979
}
X
@book{van-leunen,
X	TITLE		= "A Handbook for Scholars",
X	AUTHOR		= "Mary-Claire van Leunen",
X	PUBLISHER	= "Knopf",
X	YEAR		= 1979
}
SHAR_EOF
chmod 0640 units/foo.bib ||
echo 'restore of units/foo.bib failed'
Wc_c="`wc -c < 'units/foo.bib'`"
test 2201 -eq "$Wc_c" ||
	echo 'units/foo.bib: original size 2201, current size' "$Wc_c"
fi
# ============= units/bibunits.sty ==============
if test -f 'units/bibunits.sty' -a X"$1" != X"-c"; then
	echo 'x - skipping units/bibunits.sty (File already exists)'
else
echo 'x - extracting units/bibunits.sty (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'units/bibunits.sty' &&
%% BIBUNITS.STY     by Jose Alberto Fernandez (alberto@cs.umd.edu)
%% 
%% BIBUNITS is a style to generate separate bibliographies for
%% different units (parts) of the text (currently only one of
%% chapters, sections or bibunit-environments). 
%% The style will separate the citations of each unit of text into a
%% separate file to be processed by bibtex. The global bibliography
%% section produced by LATEX also can appear in the document and
%% citations can be placed in both at the same time.
%% 
%% Use the \bibliographyunit[<unit>] (<unit> = \chapter, \section) to
%% select how the references will be generated. (For every chapter or
%% for every section). Use \bibliographyunit with no arguments to
%% deactivate bibliographyunits. By default citations will only appear
%% in the local bibliography. WARNING: By default \bibliographyunit is
%% in a deactivated state.
%% 
%% If \bibliographyunit is active the \bibliography{bibtex-files} and
%% \bibliographystyle{style} commands also specify the bibtex-files
%% and style to be used by default in the local units. The commands
%% \bibliography*{<bibtex-files>} and \bibliographystyle*{<style>}
%% specify the defaults for BIBUNITS and not generate any information
%% for the global bibliography. WARNING: This values are taken as
%% defaults only when executed after activate \bibliographyunit
%% 
%% The environment \begin{bibunit}[<style>] .. \end{bibunit} allows
%% the creation of a unit while \bibliographyunit is not active. The
%% optional parameter <style> specifies a style for the biblography
%% different from the default if any. WARNING: The use of this
%% environment while \bibliographyunit is active can produce extrange
%% results. Note that default style and bibtex-files only exist if
%% specified while \bibliographyunit was active.
%% 
%% Use \cite and \nocite to generate citations. \cite* and \nocite*
%% can be use to generate citations to be added in both the local and
%% global bibliography while inside a unit.
%%
%% You must insert the command \putbib[<bibtex-files>] before the end
%% of each <unit> in the location where you want the bibliography to
%% be inserted. If the optional argument is ommited, \putbib uses the
%% default bibtex-files if any.
%% 
%% BIBTEX processing:
%% For each <unit>, in sequence, there is now a corresponding file 
%% \jobname.\the\@bibunitauxcnt.aux that need to be compiled though
%% BIBTEX as well as the \jobname.aux that generates the global
%% database. 
%% 
%% Suppose your document is foo.tex, you must now invoke bibtex not only
%% on foo, but also on foo.1, ..., foo.n given that there are n
%% different <units> with separate bibliography.
X
\newwrite\@bibunitaux                                %File desc.
\newcount\@bibunitauxcnt \@bibunitauxcnt = 0         %Units cnt.
\newif\if@localcite                                  %Local/Global cite
\def\@localcitedflt{\@localcitetrue} \@localcitedflt
% 
% \cite definition
%
\let\REALcite\cite
\def\NEWcite{
X  \@ifstar{\@localcitefalse\REALcite}
X    {\@localcitetrue\REALcite}}
%
% \@cite new definition
\let\REAL@citex\@citex
\def\NEW@citex[#1]#2{\if@filesw
X  \immediate\write\@bibunitaux{\string\citation{#2}}\fi
X  \if@localcite
X    \if@filesw
X      \@fileswfalse\REAL@citex[#1]{#2}\@fileswtrue
X    \else\REAL@citex[#1]{#2}\fi 
X  \else\REAL@citex[#1]{#2}\fi
X  \@localcitedflt}
%
% \nocite definition
% 
\let\REALnocite\nocite
\def\NEWnocite{
X  \@ifstar{\@localcitefalse\@NEWnocite}
X    {\@localcitetrue\@NEWnocite}}
\def\@NEWnocite#1{\@bsphack
X  \if@filesw
X    \immediate\write\@bibunitaux{\string\citation{#1}}\fi
X  \@esphack
X  \if@localcite\else\REALnocite{#1}\fi\@localcitedflt}
%
% \bibliography definition
% 
\def\@bibdata{}                              %Data files store
\let\REALbibliography\bibliography
\def\NEWbibliography{
X  \@ifstar{\@localcitetrue\@NEWbibliography}
X    {\@localcitefalse\@NEWbibliography}}
\def\@NEWbibliography#1{
X  \if@filesw
X    \immediate\write\@auxout{\string\gdef\string\@bibdata{#1}}\fi
X  \if@localcite\else\REALbibliography{#1}\fi\@localcitedflt}
%
% \bibliographystyle definition
%
\def\@bibstyle{}                              %Style store
\let\REALbibliographystyle\bibliographystyle
\def\NEWbibliographystyle{
X  \@ifstar{\@localcitetrue\@NEWbibliographystyle}
X    {\@localcitefalse\@NEWbibliographystyle}}
\def\@NEWbibliographystyle#1{
X  \if@filesw
X    \immediate\write\@auxout{\string\gdef\string\@bibstyle{#1}}\fi
X  \if@localcite\else\REALbibliographystyle{#1}\fi\@localcitedflt}
%
% \begin{bibunit} .. \end{bibunit} definition
% 
\def\bibunit{\global\advance\@bibunitauxcnt 1
X  \global\let\cite\NEWcite
X  \global\let\@citex\NEW@citex
X  \global\let\nocite\NEWnocite
X  \if@filesw
X    \immediate\openout\@bibunitaux \jobname.\the\@bibunitauxcnt.aux
X  \fi\@ifnextchar[{\@bibunitx}{\@bibunitx[\@bibstyle]}
}
\def\@bibunitx[#1]{\if@filesw
X  \immediate\write\@bibunitaux{\string\bibstyle{#1}}\fi}
\def\endbibunit{
X  \global\let\cite\REALcite
X  \global\let\@citex\REAL@citex
X  \global\let\nocite\REALnocite
X  \if@filesw
X    \immediate\closeout\@bibunitaux\fi}
%
% \chapter or \section substituting definition
%
\let\OLD@bibunit\@gobble
\def\@bibunit{\endbibunit\bibunit\OLD@bibunit}
\def\@endbibunit{}
%
% \bibliographyunit definition
% 
\def\bibliographyunit{\@endbibunit
X  \@ifnextchar[{\@bibliographyunit}{
X    \global\let\OLD@bibunit\@gobble
X    \global\let\bibliography\REALbibliography
X    \global\let\bibliographystyle\REALbibliographystyle
X    \endbibunit
X    \gdef\@endbibunit{}}}
\def\@bibliographyunit[#1]{
X  \global\let\bibliography\NEWbibliography
X  \global\let\bibliographystyle\NEWbibliographystyle
X  \global\let\OLD@bibunit#1
X  \global\let#1\@bibunit
X  \gdef\@endbibunit{\global\let#1\OLD@bibunit}}
%
% \putbib definition
% 
\def\putbib{\@ifnextchar[{\@putbib}{\@putbib[\@bibdata]}}
\def\@putbib[#1]{\if@filesw
X  \immediate\write\@bibunitaux{\string\bibdata{#1}}\fi
X  \@input{\jobname.\the\@bibunitauxcnt.bbl}}
SHAR_EOF
chmod 0640 units/bibunits.sty ||
echo 'restore of units/bibunits.sty failed'
Wc_c="`wc -c < 'units/bibunits.sty'`"
test 5945 -eq "$Wc_c" ||
	echo 'units/bibunits.sty: original size 5945, current size' "$Wc_c"
fi
# ============= units/harvard.sty ==============
if test -f 'units/harvard.sty' -a X"$1" != X"-c"; then
	echo 'x - skipping units/harvard.sty (File already exists)'
else
echo 'x - extracting units/harvard.sty (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'units/harvard.sty' &&
%%% Save file as: harvard.sty                 Source: FILESERV@SHSU.BITNET
%%% This is a file from the September 7, 1992 release of Peter Williams'
%%% <peterw@archsci.arch.su.oz.au> Harvard family of bibliographic styles
%%% for BibTeX.  Original file date September 7, 1992 05:50.
%%% The following checksum includes all SHSU-generated topmatter.
%%% checksum = "46615 111 254 4173"
\message{harvard bibliography,}
X
\def\@hiteml[#1]#2#3#4{\item[]\if@filesw%
X      { \def\protect##1{\string ##1\space}\immediate%
\write\@auxout{\string\harvardcite{#4}{#2}{#1}{#3}}}\fi%
\protect\hspace*{-\labelwidth}\protect\hspace*{-\labelsep}\ignorespaces}
X
\def\@hitem#1#2#3{\item[]\if@filesw%
X      { \def\protect##1{\string ##1\space}\immediate%
\write\@auxout{\string\harvardcite{#3}{#1}{#1}{#2}}}\fi%
\protect\hspace*{-\labelwidth}\protect\hspace*{-\labelsep}\ignorespaces}
X
\def\harvarditem{\@ifnextchar [{\@hiteml}{\@hitem}}
X
\def\harvardcite#1#2#3#4{
X  \global\@namedef{bhf@#1}{#2}
X  \global\@namedef{bha@#1}{#3}
X  \global\@namedef{bhy@#1}{#4}\global\@namedef{b@#1}{\csname
bhf@#1\endcsname}
}
X
\def\cite{\@ifnextchar [{\@tempswatrue\@citex}{\@tempswafalse\@citex[]}}
\def\citeasnoun{\@ifnextchar [{\@tempswatrue\@citexasnoun}
X                           {\@tempswafalse\@citexasnoun[]}
}
\def\citeyear{\@ifnextchar [{\@tempswatrue\@citexyear}
X                           {\@tempswafalse\@citexyear[]}
}
\def\citename{\@ifnextchar [{\@tempswatrue\@citexname}
X                           {\@tempswafalse\@citexname[]}
}
X
% \def\@enamedef#1{\expandafter\edef\csname #1\endcsname}
% Previous line should be replaced by the following to prevent
% problems with the NFSS. Solution by Bernd Raichle.
\def\@enamedef#1{\expandafter\def\csname
#1\expandafter\endcsname\expandafter}
X
\def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\
\fi
X  \def\@citea{}\@cite{\@for\@citeb:=#2\do
X    {\@citea\def\@citea{\@hisep\penalty\@m\ }\@ifundefined
X       {b@\@citeb}{{\bf ?}\@warning
X       {Citation `\@citeb' on page \thepage \space undefined}}%
{{\csname b@\@citeb\endcsname\@hysep\csname bhy@\@citeb\endcsname}%
\global\@enamedef{b@\@citeb}{\csname bha@\@citeb\endcsname}}%
}}{#1}}
X
\def\@citexasnoun[#1]#2{%
\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi%
\@citeasnoun{{\@ifundefined%
{b@#2}%
{{\bf ?}\@warning{Citation `#2' on page \thepage \space undefined}}%
{{\csname b@#2\endcsname\ (\csname bhy@#2\endcsname}%
\global\@namedef{b@#2}{\csname bha@#2\endcsname}}%
}}{#1}}
X
\def\@citexname[#1]#2{%
\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi%
\@citename{{\@ifundefined%
{b@#2}%
{{\bf ?}\@warning{Citation `#2' on page \thepage \space undefined}}%
{{\csname bhf@#2\endcsname}}%
}}{#1}}
X
\def\@citexyear[#1]#2{%
\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
X  \def\@citeayear{}\@cite{\@for\@citebyear:=#2\do
X    {\@citeayear\def\@citeayear{\@hisep\penalty\@m\ }\@ifundefined
X       {b@\@citebyear}{{\bf ?}\@warning
X       {Citation `\@citebyear' on page \thepage \space undefined}}%
{{\csname bhy@\@citebyear\endcsname}%
}%
}}{#1}}
X
\gdef\hysep@agsm{\ }\gdef\hisep@agsm{,}%
\gdef\hysep@dcu{, }\gdef\hisep@dcu{;}%
\let\@hysep\hysep@agsm \let\@hisep\hisep@agsm
\def\citationstyle#1{%
\global\@namedef{@hysep}{\csname hysep@#1\endcsname}%
\global\@namedef{@hisep}{\csname hisep@#1\endcsname}}
X 
%DEFAULT DEFINITIONS
\def\@cite#1#2{({#1\if@tempswa , #2\fi})}
\def\@citeasnoun#1#2{{#1\if@tempswa , #2\fi)}}
\def\@citename#1#2{{#1\if@tempswa \ (#2)\fi}}
X
% CHANGE \end{document} - to handle double definitions
\def\enddocument{\@checkend{document}\clearpage\begingroup
\if@filesw \immediate\closeout\@mainaux
\def\global\@namedef##1##2{}\def\newlabel{\@testdef r}%
\def\bibcite{\@testdef b}%
\def\harvardcite{\@testbibh}\@tempswafalse \makeatletter\input
\jobname.aux
\if@tempswa \@warning{Label(s) may have changed.  Rerun to get
cross-references right}\fi\fi\endgroup\deadcycles\z@\@@end}
X 
\def\@testbibh #1#2#3{
X  \def\@tempa{#2}\expandafter
X  \ifx \csname bhf@#1\endcsname \@tempa 
X     \def\@tempa{#3}\expandafter
X     \ifx \csname bha@#1\endcsname \@tempa
X     \else \@tempswatrue
X     \fi
X  \else
X     \@tempswatrue
X  \fi
}
X 
SHAR_EOF
chmod 0600 units/harvard.sty ||
echo 'restore of units/harvard.sty failed'
Wc_c="`wc -c < 'units/harvard.sty'`"
test 4173 -eq "$Wc_c" ||
	echo 'units/harvard.sty: original size 4173, current size' "$Wc_c"
fi
# ============= units/kluwer.bst ==============
if test -f 'units/kluwer.bst' -a X"$1" != X"-c"; then
	echo 'x - skipping units/kluwer.bst (File already exists)'
else
echo 'x - extracting units/kluwer.bst (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'units/kluwer.bst' &&
%%% Save file as: kluwer.bst                  Source: FILESERV@SHSU.BITNET
%%% This is a file from the September 7, 1992 release of Peter Williams'
%%% <peterw@archsci.arch.su.oz.au> Harvard family of bibliographic styles
%%% for BibTeX.  Original file date September 7, 1992 05:50.
%%% The following checksum includes all SHSU-generated topmatter.
%%% checksum = "47628 1313 3270 24436"
% BibTeX standard bibliography style `kluwer' (one of the harvard family)
X	% version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
X	% Copyright (C) 1991, all rights reserved.
X	% Copying of this file is authorized only if either
X	% (1) you make absolutely no changes to your copy, including name, or
X	% (2) if you do make changes, you name it something other than
X	% btxbst.doc, plain.bst, unsrt.bst, alpha.bst, abbrv.bst, agsm.bst,
X        % dcu.bst or kluwer.bst.
X	% This restriction helps ensure that all standard styles are identical.
X	% The file harvard.tex has the documentation for this style.
X
% ACKNOWLEDGEMENT:
%   This document is a modified version of alpha.bst to which it owes much
of
%   its functionality.
X
% AUTHOR
%   Peter Williams, Key Centre for Design Quality, Sydney University
%   e-mail: peterw@archsci.arch.su.oz.au
X
ENTRY
X  { address
X    author
X    booktitle
X    chapter
X    edition
X    editor
X    howpublished
X    institution
X    journal
X    key
X    month
X    note
X    number
X    organization
X    pages
X    publisher
X    school
X    series
X    title
X    type
X    volume
X    year
X  }
X  { field.used etal.allowed etal.required }
X  { extra.label sort.label list.year }
X
INTEGERS { output.state before.all mid.sentence after.sentence after.block
}
X
FUNCTION {init.state.consts}
{ #0 'before.all :=
X  #1 'mid.sentence :=
X  #2 'after.sentence :=
X  #3 'after.block :=
}
X
STRINGS { s t f }
X
FUNCTION {output.nonnull}
{ 's :=
X  output.state mid.sentence =
X    { ", " * write$ }
X    { output.state after.block =
X	{ add.period$ write$
X	  newline$
X	  "\newblock " write$
X	}
X	{ output.state before.all =
X	    'write$
X	    { add.period$ " " * write$ }
X	  if$
X	}
X      if$
X      mid.sentence 'output.state :=
X    }
X  if$
X  s
}
X
FUNCTION {output}
{ duplicate$ empty$
X    'pop$
X    'output.nonnull
X  if$
}
X
FUNCTION {output.check}
{ 't :=
X  duplicate$ empty$
X    { pop$ "empty " t * " in " * cite$ * warning$ }
X    'output.nonnull
X  if$
}
X
FUNCTION {item.check}
{ 't :=
X  empty$
X    { "empty " t * " in " * cite$ * warning$ }
X    { skip$ }
X  if$
}
X
FUNCTION {fin.entry}
{ add.period$
X  write$
X  newline$
}
X
FUNCTION {new.block}
{ output.state before.all =
X    'skip$
X    { after.block 'output.state := }
X  if$
}
X
FUNCTION {not}
{   { #0 }
X    { #1 }
X  if$
}
X
FUNCTION {and}
{   'skip$
X    { pop$ #0 }
X  if$
}
X
FUNCTION {or}
{   { pop$ #1 }
X    'skip$
X  if$
}
X
FUNCTION {field.or.null}
{ duplicate$ empty$
X    { pop$ "" }
X    'skip$
X  if$
}
X
FUNCTION {emphasize}
{ duplicate$ empty$
X    { pop$ "" }
X    { "{\em " swap$ * "}" * }
X  if$
}
X
FUNCTION {embolden}
{ duplicate$ empty$
X    { pop$ "" }
X    { "{\bf " swap$ * "}" * }
X  if$
}
X
FUNCTION {quote}
{ duplicate$ empty$
X    { pop$ "" }
X    { "`" swap$ * "'" * }
X  if$
}
X
INTEGERS { nameptr namesleft numnames }
X
FUNCTION {format.names}
{ 's :=
X  'f :=
X  #1 'nameptr :=
X  s num.names$ 'numnames :=
X  numnames 'namesleft :=
X    { namesleft #0 > }
X    { s nameptr f format.name$ 't :=
X      nameptr #1 >
X	{ namesleft #1 >
X	    { ", " * t * }
X	    { t "others" =
X		{ " et~al." * }
X		{ " and " * t * }
X	      if$
X	    }
X	  if$
X	}
X	't
X      if$
X      nameptr #1 + 'nameptr :=
X      namesleft #1 - 'namesleft :=
X    }
X  while$
}
X
FUNCTION {format.authors}
{ author empty$
X    { "" }
X    { "{vv~}{ll}{, jj}{, f.}" author format.names }
X  if$
}
X
FUNCTION {format.editors}
{ editor empty$
X    { "" }
X    { "{vv~}{ll}{, jj}{, f.}" editor format.names
X      editor num.names$ #1 >
X	{ " (eds)" * }
X	{ " (ed.)" * }
X      if$
X    }
X  if$
}
X
FUNCTION {format.editors.reverse}
{ editor empty$
X    { "" }
X    { "{f.~}{vv~}{ll}{, jj}" editor format.names
X      editor num.names$ #1 >
X	{ " (eds)" * }
X	{ " (ed.)" * }
X      if$
X    }
X  if$
}
X
FUNCTION {format.title}
{ title empty$
X    { "" }
X    { title "t" change.case$ }
X  if$
}
X
FUNCTION {n.dashify}
{ 't :=
X  ""
X    { t empty$ not }
X    { t #1 #1 substring$ "-" =
X	{ t #1 #2 substring$ "--" = not
X	    { "--" *
X	      t #2 global.max$ substring$ 't :=
X	    }
X	    {   { t #1 #1 substring$ "-" = }
X		{ "-" *
X		  t #2 global.max$ substring$ 't :=
X		}
X	      while$
X	    }
X	  if$
X	}
X	{ t #1 #1 substring$ *
X	  t #2 global.max$ substring$ 't :=
X	}
X      if$
X    }
X  while$
}
X
FUNCTION {format.btitle}
{ title emphasize
}
X
FUNCTION {tie.or.space.connect}
{ duplicate$ text.length$ #3 <
X    { "~" }
X    { " " }
X  if$
X  swap$ * *
}
X
FUNCTION {either.or.check}
{ empty$
X    'pop$
X    { "can't use both " swap$ * " fields in " * cite$ * warning$ }
X  if$
}
X
FUNCTION {format.bvolume}
{ volume empty$
X    { "" }
X    { "Vol." volume tie.or.space.connect
X      series empty$
X	'skip$
X	{ " of " * series emphasize * }
X      if$
X      "volume and number" number either.or.check
X    }
X  if$
}
X
FUNCTION {format.number.series}
{ volume empty$
X    { number empty$
X	{ series field.or.null }
X	{ output.state mid.sentence =
X	    { "number" }
X	    { "Number" }
X	  if$
X	  number tie.or.space.connect
X	  series empty$
X	    { "there's a number but no series in " cite$ * warning$ }
X	    { " in " * series emphasize * }
X	  if$
X	}
X      if$
X    }
X    { "" }
X  if$
}
X
FUNCTION {format.edition}
{ edition empty$
X    { "" }
X    { output.state mid.sentence =
X	{ edition "l" change.case$ " edn" * }
X	{ edition "t" change.case$ " edn" * }
X      if$
X    }
X  if$
}
X
INTEGERS { multiresult }
X
FUNCTION {multi.page.check}
{ 't :=
X  #0 'multiresult :=
X    { multiresult not
X      t empty$ not
X      and
X    }
X    { t #1 #1 substring$
X      duplicate$ "-" =
X      swap$ duplicate$ "," =
X      swap$ "+" =
X      or or
X	{ #1 'multiresult := }
X	{ t #2 global.max$ substring$ 't := }
X      if$
X    }
X  while$
X  multiresult
}
X
FUNCTION {format.pages}
{ pages empty$
X    { "" }
X    { pages multi.page.check
X	{ "pp.~" pages n.dashify * }
X	{ "p.~" pages * }
X      if$
X    }
X  if$
}
X
FUNCTION {format.vol.num.pages}
{ volume embolden field.or.null
X  number empty$
X    'skip$
X    { "(" number * ")" * *
X      volume empty$
X	{ "there's a number but no volume in " cite$ * warning$ }
X	'skip$
X      if$
X    }
X  if$
X  pages empty$
X    'skip$
X    { duplicate$ empty$
X	{ pop$ format.pages }
X	{ ",~" * pages n.dashify * }
X      if$
X    }
X  if$
}
X
FUNCTION {format.chapter.pages}
{ chapter empty$
X    'format.pages
X    { type empty$
X	{ "chapter" }
X	{ type "l" change.case$ }
X      if$
X      chapter tie.or.space.connect
X      pages empty$
X	'skip$
X	{ ", " * format.pages * }
X      if$
X    }
X  if$
}
X
FUNCTION {format.in.ed.booktitle}
{ booktitle empty$
X    { "" }
X    { editor empty$
X	{ booktitle emphasize }
X	{ "{\em in} " format.editors.reverse * ", " * booktitle emphasize * }
X      if$
X    }
X  if$
}
X
FUNCTION {empty.misc.check}
{ author empty$ title empty$ howpublished empty$
X  month empty$ year empty$ note empty$
X  and and and and and
X  key empty$ not and
X    { "all relevant fields are empty in " cite$ * warning$ }
X    'skip$
X  if$
}
X
FUNCTION {format.thesis.type}
{ type empty$
X    'skip$
X    { pop$
X      type "t" change.case$
X    }
X  if$
}
X
FUNCTION {format.tr.number}
{ type empty$
X    { "Technical Report" }
X    'type
X  if$
X  number empty$
X    { "t" change.case$ }
X    { number tie.or.space.connect }
X  if$
}
X
FUNCTION {format.article.crossref}
{ key empty$
X    { journal empty$
X	{ "need key or journal for " cite$ * " to crossref " * crossref *
X	  warning$
X	  ""
X	}
X	{ "in {\em " journal * "\/}" * " \cite{" * crossref * "}" *
X        }
X      if$
X    }
X    { " {\em in} \citeasnoun{" crossref * "}" * }
X  if$
}
X
FUNCTION {format.book.crossref}
{ volume empty$
X    { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
X      "in "
X    }
X    { "Vol." volume tie.or.space.connect
X      " of " *
X    }
X  if$
X  editor empty$
X  editor field.or.null author field.or.null =
X  or
X    { key empty$
X	{ series empty$
X	    { "need editor, key, or series for " cite$ * " to crossref " *
X	      crossref * warning$
X	      "" *
X	    }
X	    { "{\em " * series * "\/}" * " \cite{" * crossref * "}" *}
X	  if$
X	}
X	{ " \citeasnoun{" * crossref * "}" * }
X      if$
X    }
X    { " \citeasnoun{" * crossref * "}" * }
X  if$
}
X
FUNCTION {format.incoll.inproc.crossref}
{ editor empty$
X  editor field.or.null author field.or.null =
X  or
X    {
X      key empty$
X	{ booktitle empty$
X	    { "need editor, key, or booktitle for " cite$ * " to crossref " *
X	      crossref * warning$
X	      ""
X	    }
X	    { "in {\em " booktitle * "\/}" * " \cite{" * crossref * "}" *}
X	  if$
X	}
X	{ " {\em in} \citeasnoun{" crossref * "}" * }
X      if$
X    }
X    {  " {\em in} \citeasnoun{" crossref * "}" * }
X  if$
X 
}
X
INTEGERS { len }
X
FUNCTION {chop.word}
{ 's :=
X  'len :=
X  s #1 len substring$ =
X    { s len #1 + global.max$ substring$ }
X    's
X  if$
}
X
FUNCTION {format.lab.names.abbr}
{ 's :=
X  s num.names$ 'numnames :=
X  numnames #1 >
X    { numnames #2 >
X	{ s #1 "{vv~}{ll}" format.name$ " et al." * }
X	{ s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
X            { s #1 "{vv~}{ll}" format.name$ " et al." * }
X	    { s #1 "{vv~}{ll}" format.name$ " and " *
X              s #2 "{vv~}{ll}" format.name$ * 
X            }
X          if$
X        }
X      if$
X    }
X    { s #1 "{vv~}{ll}" format.name$ }
X  if$
}
X
FUNCTION {format.lab.names.full}
{ 's :=
X  #1 'nameptr :=
X  s num.names$ 'numnames :=
X  numnames 'namesleft :=
X    { namesleft #0 > }
X    { s nameptr "{vv~}{ll}" format.name$ 't :=
X      nameptr #1 >
X	{ namesleft #1 >
X	    { ", " * t * }
X	    { t "others" =
X		{ " et~al." * }
X		{ " and " * t * }
X	      if$
X	    }
X	  if$
X	}
X	't
X      if$
X      nameptr #1 + 'nameptr :=
X      namesleft #1 - 'namesleft :=
X    }
X  while$
}
X
INTEGERS { author.field editor.field organization.field title.field
key.field }
X
FUNCTION {init.field.constants}
{ #0 'author.field :=
X  #1 'editor.field :=
X  #2 'organization.field :=
X  #3 'title.field :=
X  #4 'key.field :=
}
X
FUNCTION {make.list.label}
{ author.field field.used =
X    { format.authors }
X    { editor.field field.used =
X        { format.editors }
X        { organization.field field.used =
X            { "The " #4 organization chop.word #3 text.prefix$ }
X            { title.field field.used =
X                { format.btitle }
X                { key.field field.used =
X                    { key #3 text.prefix$ }
X                    { "Internal error :001 on " cite$ * " label" *
warning$ }
X                  if$
X                }
X              if$
X            }
X          if$
X        }
X      if$
X    }
X  if$
}
X
FUNCTION {make.full.label}
{ author.field field.used =
X    { author format.lab.names.full }
X    { editor.field field.used =
X        { editor format.lab.names.full }
X        { organization.field field.used =
X            { "The " #4 organization chop.word #3 text.prefix$ }
X            { title.field field.used =
X                { format.btitle }
X                { key.field field.used =
X                    { key #3 text.prefix$ }
X                    { "Internal error :001 on " cite$ * " label" *
warning$ }
X                  if$
X                }
X              if$
X            }
X          if$
X        }
X      if$
X    }
X  if$
}
X
FUNCTION {make.abbr.label}
{ etal.allowed
X    { author.field field.used =
X        { author format.lab.names.abbr }
X        { editor.field field.used =
X            { editor format.lab.names.abbr }
X            { organization.field field.used =
X                { "The " #4 organization chop.word #3 text.prefix$ }
X                { title.field field.used =
X                    { format.btitle }
X                    { key.field field.used =
X                        { key #3 text.prefix$ }
X                        {"Internal error :001 on " cite$ * " label" *
warning$ }
X                      if$
X                    }
X                  if$
X                }
X              if$
X            }
X          if$
X        }
X      if$
X    }
X    { make.full.label }
X  if$
}
X
FUNCTION {output.bibitem}
{ newline$
X  etal.allowed        %%%XXX change
X  etal.required
X  and
X    {
X      "\harvarditem[" write$
X      make.abbr.label write$
X      "]{" write$
X    }
X    {
X      "\harvarditem{" write$
X    }
X  if$
X  make.full.label write$
X  "}{" write$
X  list.year write$
X  "}{" write$
X  cite$ write$
X  "}" write$
X  newline$
X  ""
X  before.all 'output.state :=
}
X
X
FUNCTION {list.label.output}
{ make.list.label write$
}
X
FUNCTION {article}
{ output.bibitem
X  list.label.output
X  ": " list.year * output.nonnull
X  author "author" item.check
X  title.field field.used =
X    { skip$ }
X    { format.title "title" output.check }
X  if$
X  crossref missing$
X    { journal emphasize "journal" duplicate$ item.check
X      pages empty$
X        {
X          output
X        }
X        {
X          " " *
X          format.vol.num.pages * output
X        }
X      if$
X    }
X    { format.article.crossref output.nonnull
X      format.pages output
X    }
X  if$
X  new.block
X  note output
X  fin.entry
}
X
FUNCTION {book}
{ output.bibitem
X  list.label.output
X  ": " list.year * output.nonnull
X  author empty$
X    { editor "author and editor" item.check }
X    { crossref missing$
X	{ "author and editor" editor either.or.check }
X	'skip$
X      if$
X    }
X  if$
X  title.field field.used =
X    { skip$ }
X    { format.btitle "title" output.check }
X  if$
X  crossref missing$
X    { format.bvolume output
X      format.number.series output
X      format.edition output
X      publisher "publisher" output.check
X      address output
X    }
X    { format.book.crossref output.nonnull
X      format.edition output
X    }
X  if$
X  new.block
X  note output
X  fin.entry
}
X
FUNCTION {booklet}
{ output.bibitem
X  list.label.output
X  ": " list.year * output.nonnull
X  title.field field.used =
X    { skip$ }
X    { format.title "title" output.check }
X  if$
X  howpublished output
X  address output
X  new.block
X  note output
X  fin.entry
}
X
FUNCTION {inbook}
{ output.bibitem
X  list.label.output
X  ": " list.year * output.nonnull
X  author empty$
X    { editor "author and editor" item.check }
X    { crossref missing$
X	{ "author and editor" editor either.or.check }
X	'skip$
X      if$
X    }
X  if$
X  title.field field.used =
X    { skip$ }
X    { format.btitle "title" output.check }
X  if$
X  crossref missing$
X    { format.bvolume output
X      format.number.series output
X      format.edition output
X      publisher "publisher" output.check
X      address output
X    }
X    { format.book.crossref output.nonnull
X      format.edition output
X    }
X  if$
X  format.chapter.pages "chapter and pages" output.check
X  new.block
X  note output
X  fin.entry
}
X
FUNCTION {incollection}
{ output.bibitem
X  list.label.output
X  ": " list.year * output.nonnull
X  title.field field.used =
X    { skip$ }
X    { format.title "title" output.check }
X  if$
X  author "author" item.check
X  crossref missing$
X    { format.in.ed.booktitle "booktitle" output.check
X      format.edition output
X      format.bvolume output
X      format.number.series output
X      publisher "publisher" output.check
X      address output
X    }
X    { format.incoll.inproc.crossref output.nonnull
X    }
X  if$
X  format.chapter.pages output
X  new.block
X  note output
X  fin.entry
}
X
FUNCTION {inproceedings}
{ output.bibitem
X  list.label.output
X  ": " list.year * output.nonnull
X  title.field field.used =
X    { skip$ }
X    { format.title "title" output.check }
X  if$
X  author "author" item.check
X  crossref missing$
X    { format.in.ed.booktitle "booktitle" output.check
X      format.bvolume output
X      format.number.series output
X      address empty$
X	{ organization output
X	  publisher output
X	}
X	{ organization output
X	  publisher output
X	  address output.nonnull
X	}
X      if$
X    }
X    { format.incoll.inproc.crossref output.nonnull
X    }
X  if$
X  format.pages output
X  new.block
X  note output
X  fin.entry
}
X
FUNCTION {conference} { inproceedings }
X
FUNCTION {manual}
{ output.bibitem
X  list.label.output
X  ": " list.year * output.nonnull
X  title.field field.used =
X    { skip$ }
X    { format.btitle "title" output.check }
X  if$
X  format.edition output
X  author empty$
X    { organization empty$
X	{ address output
X	}
X	'skip$
X      if$
X    }
X    { organization output
X      address output
X    }
X  if$
X  new.block
X  note output
X  fin.entry
}
X
FUNCTION {mastersthesis}
{ output.bibitem
X  list.label.output
X  ": " list.year * output.nonnull
X  author "author" item.check
X  title.field field.used =
X    { skip$ }
X    { format.title emphasize "title" output.check }
X  if$
X  "Master's thesis" format.thesis.type output.nonnull
X  school "school" output.check
X  address output
X  new.block
X  note output
X  fin.entry
}
X
FUNCTION {misc}
{ output.bibitem
X  list.label.output
X  ": " list.year * output.nonnull
X  title.field field.used =
X    { skip$ }
X    { format.title output }
X  if$
X  howpublished output
X  new.block
X  note output
X  fin.entry
X  empty.misc.check
}
X
FUNCTION {phdthesis}
{ output.bibitem
X  list.label.output
X  ": " list.year * output.nonnull
X  author "author" item.check
X  title.field field.used =
X    { skip$ }
X    { format.btitle "title" output.check }
X  if$
X  "PhD thesis" format.thesis.type output.nonnull
X  school "school" output.check
X  address output
X  new.block
X  note output
X  fin.entry
}
X
FUNCTION {proceedings}
{ output.bibitem
X  list.label.output
X  ": " list.year * output.nonnull
X  title.field field.used =
X    { skip$ }
X    { format.btitle "title" output.check }
X  if$
X  format.bvolume output
X  format.number.series output
X  address empty$
X    { editor empty$
X	{ skip$ }
X	{ organization output
X	}
X      if$
X      publisher output
X    }
X    { editor empty$
X	'skip$
X	{ organization output }
X      if$
X      publisher output
X      address output.nonnull
X    }
X  if$
X  new.block
X  note output
X  fin.entry
}
X
FUNCTION {techreport}
{ output.bibitem
X  list.label.output
X  ": " list.year * output.nonnull
X  author "author" item.check
X  title.field field.used =
X    { skip$ }
X    { format.title "title" output.check }
X  if$
X  format.tr.number emphasize output.nonnull
X  institution "institution" output.check
X  address output
X  new.block
X  note output
X  fin.entry
}
X
FUNCTION {unpublished}
{ output.bibitem
X  list.label.output
X  ": " list.year * output.nonnull
X  author "author" item.check
X  title.field field.used =
X    { skip$ }
X    { format.title "title" output.check }
X  if$
X  note "note" output.check
X  fin.entry
}
X
FUNCTION {default.type} { misc }
X
MACRO {jan} {"January"}
X
MACRO {feb} {"February"}
X
MACRO {mar} {"March"}
X
MACRO {apr} {"April"}
X
MACRO {may} {"May"}
X
MACRO {jun} {"June"}
X
MACRO {jul} {"July"}
X
MACRO {aug} {"August"}
X
MACRO {sep} {"September"}
X
MACRO {oct} {"October"}
X
MACRO {nov} {"November"}
X
MACRO {dec} {"December"}
X
MACRO {acmcs} {"ACM Computing Surveys"}
X
MACRO {acta} {"Acta Informatica"}
X
MACRO {cacm} {"Communications of the ACM"}
X
MACRO {ibmjrd} {"IBM Journal of Research and Development"}
X
MACRO {ibmsj} {"IBM Systems Journal"}
X
MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
X
MACRO {ieeetc} {"IEEE Transactions on Computers"}
X
MACRO {ieeetcad}
X {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
X
MACRO {ipl} {"Information Processing Letters"}
X
MACRO {jacm} {"Journal of the ACM"}
X
MACRO {jcss} {"Journal of Computer and System Sciences"}
X
MACRO {scp} {"Science of Computer Programming"}
X
MACRO {sicomp} {"SIAM Journal on Computing"}
X
MACRO {tocs} {"ACM Transactions on Computer Systems"}
X
MACRO {tods} {"ACM Transactions on Database Systems"}
X
MACRO {tog} {"ACM Transactions on Graphics"}
X
MACRO {toms} {"ACM Transactions on Mathematical Software"}
X
MACRO {toois} {"ACM Transactions on Office Information Systems"}
X
MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
X
MACRO {tcs} {"Theoretical Computer Science"}
X
READ
X
EXECUTE {init.field.constants}
X
FUNCTION {sortify}
{ purify$
X  "l" change.case$
}
X
FUNCTION {author.key.label}
{ author empty$
X    { key empty$
X	{ title.field 'field.used := }
X	{ key.field 'field.used := }
X      if$
X    }
X    { author.field 'field.used := }
X  if$
}
X
FUNCTION {author.editor.key.label}
{ author empty$
X    { editor empty$
X	{ key empty$
X	    { title.field 'field.used := }
X	    { key.field 'field.used := }
X	  if$
X  	}
X	{ editor.field 'field.used := }
X      if$
X    }
X    { author.field 'field.used := }
X  if$
}
X
FUNCTION {author.key.organization.label}
{ author empty$
X    { key empty$
X	{ organization empty$
X	    { title.field 'field.used := }
X	    { organization.field 'field.used := }
X	  if$
X	}
X	{ key.field 'field.used := }
X      if$
X    }
X    { author.field 'field.used := }
X  if$
}
X
FUNCTION {editor.key.organization.label}
{ editor empty$
X    { key empty$
X	{ organization empty$
X	    { title.field 'field.used := }
X	    { organization.field 'field.used := }
X	  if$
X	}
X	{ key.field 'field.used := }
X      if$
X    }
X    { editor.field 'field.used := }
X  if$
}
X
FUNCTION {sort.format.title}
{ 't :=
X  "A " #2
X    "An " #3
X      "The " #4 t chop.word
X    chop.word
X  chop.word
X  sortify
X  #1 global.max$ substring$
}
X
FUNCTION {calc.label}
{ make.abbr.label
X  title.field field.used =
X    { sort.format.title }
X    { sortify }
X  if$
X  year field.or.null purify$ #-1 #4 substring$ sortify
X  *
X  'sort.label :=
}
X
FUNCTION {preliminaries} %%%XXX change
{ type$ "book" =
X  type$ "inbook" =
X  or
X    'author.editor.key.label
X    { type$ "proceedings" =
X	'editor.key.organization.label
X	{ type$ "manual" =
X	    'author.key.organization.label
X	    'author.key.label
X	  if$
X	}
X      if$
X    }
X  if$
X  author.field field.used = %%%XXX change
X    {
X      author num.names$ #2 >
X        { #1 }
X        { #0 }
X      if$
X      'etal.required :=
X    }
X    {
X      editor.field field.used = 
X        {
X          editor num.names$ #2 >
X            { #1 }
X            { #0 }
X          if$
X        }
X        { #0 }
X      if$
X      'etal.required :=
X    }
X  if$
X  #1 'etal.allowed :=
}
X
FUNCTION {first.presort}
{ calc.label
X  sort.label
X  title.field field.used =
X    { skip$ }
X    { "    "
X      *
X      make.list.label sortify
X      *
X      "    "
X      *
X      title field.or.null
X      sort.format.title
X      *
X    }
X  if$
X  #1 entry.max$ substring$
X  'sort.key$ :=
}
X
ITERATE {preliminaries}
X
ITERATE {first.presort}
X
SORT
X
STRINGS { last.sort.label next.extra last.full.label }
X
INTEGERS { last.extra.num last.etal.allowed }
X
FUNCTION {initialize.confusion}
{ #0 int.to.chr$ 'last.sort.label :=
X  #0 int.to.chr$ 'last.full.label :=
X  #1 'last.etal.allowed :=
}
X
FUNCTION {confusion.pass}
{ last.sort.label sort.label =
X    { last.etal.allowed 
X        { last.full.label make.full.label sortify =
X            { skip$ }
X            { #0 'etal.allowed :=
X              #0 'last.etal.allowed :=
X            }
X          if$
X        }
X        { #0 'etal.allowed := }
X      if$
X    }
X    { sort.label 'last.sort.label :=
X      make.full.label sortify 'last.full.label :=
X      #1 'last.etal.allowed :=
X    }
X  if$
}
X
EXECUTE {initialize.confusion}
X
ITERATE {confusion.pass}
X
EXECUTE {initialize.confusion}
X
REVERSE {confusion.pass}
X
FUNCTION {initialize.last.extra.num}
{ #0 int.to.chr$ 'last.sort.label :=
X  "" 'next.extra :=
X  #0 'last.extra.num :=
}
X
FUNCTION {forward.pass}
{ last.sort.label sort.label =
X    { last.extra.num #1 + 'last.extra.num :=
X      last.extra.num int.to.chr$ 'extra.label :=
X    }
X    { "a" chr.to.int$ 'last.extra.num :=
X      "" 'extra.label :=
X      sort.label 'last.sort.label :=
X    }
X  if$
}
X
FUNCTION {reverse.pass}
{ next.extra "b" =
X    { "a" 'extra.label := }
X    'skip$
X  if$
X  year empty$
X    { "n.d." extra.label * 'list.year := }
X    { year extra.label * 'list.year := }
X  if$
X  extra.label 'next.extra :=
}
X
ITERATE {first.presort}
X
SORT
X
EXECUTE {initialize.last.extra.num}
X
ITERATE {forward.pass}
X
REVERSE {reverse.pass}
X
FUNCTION {second.presort}
{ make.list.label
X  title.field field.used =
X    { sort.format.title }
X    { sortify }
X  if$
X  "    "
X  *
X  list.year field.or.null sortify
X  *
X  "    "
X  *
X  title.field field.used =
X    { skip$ }
X    { title field.or.null
X      sort.format.title
X      *
X    }
X  if$
X  #1 entry.max$ substring$
X  'sort.key$ :=
}
X
ITERATE {second.presort}
X
SORT
X
FUNCTION {begin.bib}
{ preamble$ empty$
X    'skip$
X    { preamble$ write$ newline$ }
X  if$
X  "\begin{thebibliography}{xx}" write$ newline$
}
X
EXECUTE {begin.bib}
X
EXECUTE {init.state.consts}
X
ITERATE {call.type$}
X
FUNCTION {end.bib}
{ newline$
X  "\end{thebibliography}" write$ newline$
}
X
EXECUTE {end.bib}
SHAR_EOF
chmod 0600 units/kluwer.bst ||
echo 'restore of units/kluwer.bst failed'
Wc_c="`wc -c < 'units/kluwer.bst'`"
test 24436 -eq "$Wc_c" ||
	echo 'units/kluwer.bst: original size 24436, current size' "$Wc_c"
fi
# ============= units/cite.sty ==============
if test -f 'units/cite.sty' -a X"$1" != X"-c"; then
	echo 'x - skipping units/cite.sty (File already exists)'
else
echo 'x - extracting units/cite.sty (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'units/cite.sty' &&
%     C I T E . S T Y
%
%     version 3.0  (Oct 1992)
%
%     Compressed, sorted lists of numerical citations: [11-16]
%     see also OVERCITE.STY and DRFTCITE.STY
%
%     Copyright (C) 1989-1992 by Donald Arseneau
%     These macros may be freely transmitted, reproduced, or modified for
%     non-commercial purposes provided that this notice is left intact.
%
%     Instructions follow \endinput.
%  ------------------------------------
%
%  \citen contains the code that parses the list of names, ignoring
%  spaces after commas, writes the aux file \citation, and formats the
%  number list.  \citen can be used by itself to give citation numbers
%  without the other formatting; e.g., "See also ref.~\citen{junk}."
%
\def\citen{\protect\p@citen}
X
\def\p@citen#1{%
\edef\@tempa{\@ignspaftercomma,#1, \@end, }% ignore spaces in parameter
list
\edef\@tempa{\expandafter\@ignendcommas\@tempa\@end}%
\if@filesw \immediate \write \@auxout {\string \citation {\@tempa}}\fi
\@tempcntb\m@ne    % \@tempcntb tracks higest number
\let\@h@ld\relax   % nothing held from list yet
\let\@citea\@empty % no punctuation preceding first
\let\@celt\over    % not expandable, but identifiable
\def\@cite@list{}% % empty list to start
\@for \@citeb:=\@tempa \do{\@make@cite@list}% make a sorted list of
numbers
% After sorted citelist is made, execute it to compress citation ranges.
\@tempcnta\m@ne    % no previous number
\let\@celt\@compress@cite \@cite@list % output number list with
compression
\@h@ld}% output anything held over
X
% For each citation, check if it is defined and if it is a number.
% if a number: insert it in the sorted \@cite@list
% otherwise: output it immediately.
%
\begingroup \catcode`\*=7 % funny catcode for comparisons
\gdef\@make@cite@list{%
X \expandafter\let \expandafter\@B@citeB \csname b@\@citeb \endcsname
X \ifx\@B@citeB\relax % undefined: output ? and warning
X    \@citea {\bf ?}\let\@citea\citepunct
X    \@warning {Citation `\@citeb' on page \thepage\space undefined}%
X \else %  defined
X    \if *\ifnum\z@<0\@B@citeB *\else @\fi % a positive number, put in
list
X       \@tempcnta\@B@citeB \relax
X       \ifnum \@tempcnta>\@tempcntb % new highest, add to end
(efficiently)
X          \edef\@cite@list{\@cite@list \@celt{\@B@citeB}}%
X          \@tempcntb\@tempcnta
X       \else % arbitrary number: insert appropriately
X          \edef\@cite@list{\expandafter\@sort@celt \@cite@list \@gobble
@}%
X       \fi
X    \else % citation is not a number, output immediately
X       \@citea \@B@citeB \let\@citea\citepunct
X \fi\fi}
\endgroup % restore * catcode
X
% Check if each number follows previous and can be put in a range
%
\def\@compress@cite#1{%  % This is executed for each number
X  \advance\@tempcnta\@ne % Now \@tempcnta is one more than the previous
number
X  \ifnum #1=\@tempcnta   % Number follows previous--hold on to it
X     \ifx\@h@ld\relax    % first pair of successives
X        \edef \@h@ld{\@citea #1}%
X     \else               % compressible list of successives
X        \edef \@h@ld{\hbox{--}\penalty\@highpenalty #1}%
%        use \hbox to avoid easy \exhyphenpenalty breaks
X     \fi
X  \else   %  non-successor -- dump what's held and do this one
X     \@h@ld \@citea #1\let\@h@ld\relax
X  \fi \@tempcnta#1\let\@citea\citepunct
}
X
% \@sort@celt inserts number (\@tempcnta) into list of \@celt{num}
(#1{#2})
% \@celt must not be expandable; list should end with two vanishing
tokens.
%
\def\@sort@celt#1#2{\ifx \@celt #1% parameters are \@celt{num}
X     \ifnum #2<\@tempcnta % number goes later in list
X        \@celt{#2}%
X        \expandafter\expandafter\expandafter\@sort@celt % continue
X     \else % number goes here
X        \@celt{\number\@tempcnta}\@celt{#2}% stop comparing
X  \fi\fi}
X
%%    To put space after the comma, use:
\def\citepunct{,\penalty\@highpenalty\hskip.13emplus.1emminus.1em}%
%%    For no space after comma, use:
%% \def\citepunct{,\penalty\@highpenalty}%
%%
X
% Make \cite robust. \p@cite is the default \cite.
%
\def\cite{\protect\p@cite}
X
\def\p@cite{\@ifnextchar [{\@tempswatrue\@citex}{\@tempswafalse\@citex[]}}
X
%  Make \@citex refer to \citen:
%
\def\@citex[#1]#2{\@cite{\p@citen{#2}}{#1}}%
X
%  Replacement for \@cite.  Give one normal space before the citation,
%  set high penalties for linebreaks,
%
\def\@cite#1#2{\leavevmode\unskip
X  \ifnum\lastpenalty=\z@ \penalty\@highpenalty \fi % highpenalty before
X  \ [{\multiply\@highpenalty 3 #1% % triple-highpenalties within list
X      \if@tempswa,\penalty\@highpenalty\ #2\fi % and before note.
X    }]\spacefactor\@m}
X
% for ignoring spaces in the input:
\def\@ignspaftercomma#1, {\ifx\@end#1\@empty\else
X   #1,\expandafter\@ignspaftercomma\fi}
\def\@ignendcommas,#1,\@end{#1}
X
\let\nocitecount\relax  % in case \nocitecount was used for drftcite
X
\endinput
%
%
%                        CITE.STY
%
%   Modify 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.
%
%   Linebreaks are allowed with triple-highpenalties after dashes
%   and commas; these may have to be taken if TeX sees no other
%   viable breakpoints.  If you think citations are being split
%   unnecessarily, try using \sloppy or a sloppypar environment.
%
%   Although each \cite command sorts its numbers, better compression
%   into ranges can usually be achieved by carefully selecting the order
%   of the \bibitem entries, or the order of initial citations when using
%   bibtex.  Having the entries presorted will also save processing time,
%   especially for long lists of numbers.
%
%   See also overcite.sty and drftcite.sty for superscript and draft
%   (draught) mode citations.
%
%   ROBUST!
%
% Version 1991: Ignore spaces after commas in the parameter list. Move most
of
% \citen into \@cmpresscites for speed.
% Version 1992: Use \citepunct for commas so it is easier to change.
%
% Version 3.0 (1992):  Rewrite, including sorting.  Make entries like
"4th"
% be treated properly as text.
%
% Send problem reports to asnd@triumfcl.bitnet or asnd@Reg.triumf.ca
%
% test integrity:
% brackets: round, square, curly, angle:   () [] {} <>
% backslash, slash, vertical, hat, tilde:   \ / | ^ ~
SHAR_EOF
chmod 0640 units/cite.sty ||
echo 'restore of units/cite.sty failed'
Wc_c="`wc -c < 'units/cite.sty'`"
test 7127 -eq "$Wc_c" ||
	echo 'units/cite.sty: original size 7127, current size' "$Wc_c"
fi
exit 0
From: lhb@hplb.hpl.hp.com (Leon Bouwmeester)
Date: Mon, 9 Nov 1992 15:31:36 GMT
Subject: where bigpiclatex??
Organization: Hewlett-Packard Company