%%%%%%%%%%%%%%%%%%%%%%%% % % hubble.cls - Version 1 % %%%%%%%%%%%%%%%%%%%%%%%% % Usage: % \documentclass[]{hubble} % \cite{re1,ref2,ref3} NO SPACES AFTER COMMAS % ------------------------------------------------------------ \LoadClassWithOptions{article} % build on standard article class %%%%% references %%%% \def\thebibliography#1{ %\begin{center}{\bf References}\end{center} \subsection*{References} \list {\arabic{enumi}.} {\settowidth\labelwidth{[#1]}\leftmargin\labelwidth\advance\leftmargin\labelsep \usecounter{enumi}} \def\newblock{\hskip .11em plus .33em minus .07em} %% reduce vspace between items \parskip -0.7ex plus 0.5ex minus 0ex \scriptsize \sloppy\clubpenalty4000\widowpenalty4000 \sfcode`\.=1000\relax} \let\endthebibliography=\endlist %%%% Citations are superscripts (from aip.sty) %%%% \def\@cite#1#2{\unskip\nobreak\relax \def\@tempa{$\m@th^{\hbox{\the\scriptfont0 #1}}$}% \futurelet\@tempc\@citexx} \def\@citexx{\ifx.\@tempc\let\@tempd=\@citepunct\else \ifx,\@tempc\let\@tempd=\@citepunct\else \let\@tempd=\@tempa\fi\fi\@tempd} \def\@citepunct{\@tempc\edef\@sf{ \spacefactor=\the\spacefactor\relax}\@tempa \@sf\@gobble} % \citenum emits the plain citation number without ornament % \citea puts its argument into the ornamentation for citations % thus \cite{foo} is equivalent to \citea{\citenum{foo}} \def\citenum#1{{\def\@cite##1##2{##1}\cite{#1}}} \def\citea#1{\@cite{#1}{}} % Collapse citation numbers to ranges. Non-numeric and undefined labels % are handled. No sorting is done. E.g., 1,3,2,3,4,5,foo,1,2,3,?,4,5 % gives 1,3,2-5,foo,1-3,?,4,5 \newcount\@tempcntc \def\@citexzzz[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi \@tempcnta\z@\@tempcntb\m@ne\def\@citea{}\@cite{\@for\@citeb:=#2\do {\@ifundefined {b@\@citeb}{\@citeo\@tempcntb\m@ne\@citea\def\@citea{,}{\bf ?}\@warning {Citation `\@citeb' on page \thepage \space undefined}}% {\setbox\z@\hbox{\global\@tempcntc0\csname b@\@citeb\endcsname\relax}% \ifnum\@tempcntc=\z@ \@citeo\@tempcntb\m@ne \@citea\def\@citea{,}\hbox{\csname b@\@citeb\endcsname}% \else \advance\@tempcntb\@ne \ifnum\@tempcntb=\@tempcntc \else\advance\@tempcntb\m@ne\@citeo \@tempcnta\@tempcntc\@tempcntb\@tempcntc\fi\fi}}\@citeo}{#1}} \def\@citeozzz{\ifnum\@tempcnta>\@tempcntb\else\@citea\def\@citea{,}% \ifnum\@tempcnta=\@tempcntb\the\@tempcnta\else {\advance\@tempcnta\@ne\ifnum\@tempcnta=\@tempcntb \else \def\@citea{--}\fi \advance\@tempcnta\m@ne\the\@tempcnta\@citea\the\@tempcntb}\fi\fi} % begin citesort.sty % A replacement for \@citex which sorts citation numbers as well as % compressing and allowing breaks. Based on cite.sty by Donald % Arseneau. % % for use in LaTeX say, \documentstyle[...,citesort,...]{...} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Allow, but strongly discourage, line breaks within a long % series of citations. Compress lists of successive numbers % to one number range, e.g., 5,6,7,8,9 --> 5--9. Compatible % with versions of \@cite that use exponents. % -- Donald Arseneau 1989 % % Modified to sort the numbers so they come out in increasing order, % regardless of the way they appear in the source. O(N^2) sort! % Ian Green, CUED, 10-Dec-1991. Improvements to img@eng.cam.ac.uk % please. Version 1 \newcount\@minsofar \newcount\@min \newcount\@cite@temp \def\@citex[#1]#2{% \if@filesw \immediate \write \@auxout {\string \citation {#2}}\fi \@tempcntb\m@ne \let\@h@ld\relax \def\@citea{}% \@min\m@ne% \@cite{% \@for \@citeb:=#2\do {\@ifundefined {b@\@citeb}% {\@h@ld\@citea\@tempcntb\m@ne{\bf ?}% \@warning {Citation `\@citeb ' on page \thepage \space undefined}}% {\@minsofar\z@ \@for \@scan@cites:=#2\do {% \@ifundefined{b@\@scan@cites}% {\@cite@temp\m@ne} {\@cite@temp\number\csname b@\@scan@cites \endcsname \relax}% \ifnum\@cite@temp > \@min% select the next one to list \ifnum\@minsofar = \z@ \@minsofar\number\@cite@temp \edef\@scan@copy{\@scan@cites}\else \ifnum\@cite@temp < \@minsofar \@minsofar\number\@cite@temp \edef\@scan@copy{\@scan@cites}\fi\fi\fi}\@tempcnta\@min \ifnum\@minsofar > \z@ % some more \advance\@tempcnta\@ne \@min\@minsofar \ifnum\@tempcnta=\@minsofar % Number follows previous--hold on to it \ifx\@h@ld\relax \edef \@h@ld{\@citea\csname b@\@scan@copy\endcsname}% \else \edef\@h@ld{\ifmmode{-}\else--\fi\csname b@\@scan@copy\endcsname}% \fi \else \@h@ld\@citea\csname b@\@scan@copy\endcsname \let\@h@ld\relax \fi % no more \fi}% \def\@citea{,\penalty\@highpenalty\,}}\@h@ld}{#1}} % end of citesort.sty %% end of hubble.cls