annotate vamp-plugins_abstract/cite.sty @ 86:01f69f1d5d3c tip

Add further archive versions
author Chris Cannam
date Thu, 01 Aug 2019 17:54:05 +0100
parents ad6701ca3456
children
rev   line source
luis@24 1 % C I T E . S T Y
luis@24 2 %
luis@24 3 % version 4.01 (Nov 2003)
luis@24 4 %
luis@24 5 % Compressed, sorted lists of on-line or superscript numerical citations.
luis@24 6 % see also drftcite.sty (And the stub overcite.sty)
luis@24 7 %
luis@24 8 % Copyright (C) 1989-2003 by Donald Arseneau
luis@24 9 % These macros may be freely transmitted, reproduced, or modified
luis@24 10 % provided that this notice is left intact.
luis@24 11 %
luis@24 12 % Instructions follow \endinput.
luis@24 13 % ------------------------------------
luis@24 14 % First, ensure that some catcodes have the expected values
luis@24 15 \edef\citenum{% to restore funny codes
luis@24 16 \catcode\string`\string ` \the\catcode\string`\`
luis@24 17 \catcode\string`\string ' \the\catcode\string`\'
luis@24 18 \catcode\string`\string = \the\catcode\string`\=
luis@24 19 \catcode\string`\string _ \the\catcode\string`\_
luis@24 20 \catcode\string`\string : \the\catcode\string`\:}
luis@24 21 \catcode\string`\` 12
luis@24 22 \catcode`\' 12
luis@24 23 \catcode`\= 12
luis@24 24 \catcode`\_ 8
luis@24 25 \catcode`\: 12
luis@24 26
luis@24 27 % Handle optional variations:
luis@24 28 % [ verbose, nospace, space, ref, nosort, noadjust, superscript, nomove ],
luis@24 29 % \citeform,\citeleft,\citeright,\citemid,\citepunct,\citedash
luis@24 30 %
luis@24 31 % Set defaults:
luis@24 32
luis@24 33 % [ on the left. Option [ref] does: [Ref. 12, note]
luis@24 34 \providecommand\citeleft{[}
luis@24 35
luis@24 36 % ] on the right:
luis@24 37 \providecommand\citeright{]}
luis@24 38
luis@24 39 % , (comma space) before note
luis@24 40 \providecommand\citemid{,\penalty\@medpenalty\ }
luis@24 41
luis@24 42 % , (comma thin-space) between entries; [nospace] eliminates the space
luis@24 43 \providecommand\citepunct{,\penalty\@m\hskip.13emplus.1emminus.1em}%
luis@24 44
luis@24 45 % -- (endash) designating range of numbers:
luis@24 46 % (using \hbox avoids easy \exhyphenpenalty breaks)
luis@24 47 \providecommand{\citedash}{\hbox{--}\penalty\@m}
luis@24 48
luis@24 49 % Each number left as-is:
luis@24 50 \providecommand\citeform{}
luis@24 51
luis@24 52 % punctuation characters to move for overcite
luis@24 53 \providecommand{\CiteMoveChars}{.,:;}
luis@24 54
luis@24 55 % font selection for superscript numbers
luis@24 56 \providecommand\OverciteFont{\fontsize\sf@size\baselineskip\selectfont}
luis@24 57
luis@24 58
luis@24 59 % Do not repeat warnings. [verbose] reverses
luis@24 60 \let\oc@verbo\relax
luis@24 61
luis@24 62 % Default is to move punctuation:
luis@24 63 \def\oc@movep#1{\futurelet\@tempb\@citey}
luis@24 64
luis@24 65 %----------------------
luis@24 66 % \citen uses \@nocite to ignore spaces after commas, and write the aux file
luis@24 67 % \citation. \citen then loops over the citation tags, using \@make@cite@list
luis@24 68 % to make a sorted list of numbers. Finally, \citen executes \@citelist to
luis@24 69 % compress ranges of numbers and print the list. \citen can be used by itself
luis@24 70 % to give citation numbers without the brackets and other formatting; e.g.,
luis@24 71 % "See also ref.~\citen{junk}."
luis@24 72 %
luis@24 73 \DeclareRobustCommand\citen[1]{%
luis@24 74 \begingroup
luis@24 75 \let\@safe@activesfalse\@empty
luis@24 76 \@nocite{#1}% ignores spaces, writes to .aux file, returns #1 in \@no@sparg
luis@24 77 \@tempcntb\m@ne % \@tempcntb tracks highest number
luis@24 78 \let\@h@ld\@empty % nothing held from list yet
luis@24 79 \let\@citea\@empty % no punctuation preceding first
luis@24 80 \let\@celt\delimiter % an unexpandable, but identifiable, token
luis@24 81 \def\@cite@list{}% % empty list to start
luis@24 82 \@for \@citeb:=\@no@sparg\do{\@make@cite@list}% make a sorted list of numbers
luis@24 83 % After sorted citelist is made, execute it to compress citation ranges.
luis@24 84 \@tempcnta\m@ne % no previous number
luis@24 85 \let\@celt\@compress@cite \@cite@list % output number list with compression
luis@24 86 \@h@ld % output anything held over
luis@24 87 \endgroup
luis@24 88 \@restore@auxhandle
luis@24 89 }
luis@24 90
luis@24 91 % For each citation, check if it is defined and if it is a number.
luis@24 92 % if a number: insert it in the sorted \@cite@list
luis@24 93 % otherwise: output it immediately.
luis@24 94 %
luis@24 95 \def\@make@cite@list{%
luis@24 96 \expandafter\let \expandafter\@B@citeB
luis@24 97 \csname b@\@citeb\@extra@b@citeb \endcsname
luis@24 98 \ifx\@B@citeB\relax % undefined: output ? and warning
luis@24 99 \@citea {\bfseries ?}\let\@citea\citepunct \G@refundefinedtrue
luis@24 100 \@warning {Citation `\@citeb' on page \thepage\space undefined}%
luis@24 101 \oc@verbo \global\@namedef{b@\@citeb\@extra@b@citeb}{?}%
luis@24 102 \else % defined % remove previous line to repeat warnings
luis@24 103 \ifcat _\ifnum\z@<0\@B@citeB _\else A\fi % a positive number, put in list
luis@24 104 \@addto@cite@list
luis@24 105 \else % citation is not a number, output immediately
luis@24 106 \@citea \citeform{\@B@citeB}\let\@citea\citepunct
luis@24 107 \fi\fi}
luis@24 108
luis@24 109 % Regular definition for adding entry to cite list, with sorting
luis@24 110
luis@24 111 \def\@addto@cite@list{\@tempcnta\@B@citeB \relax
luis@24 112 \ifnum \@tempcnta>\@tempcntb % new highest, add to end (efficiently)
luis@24 113 \edef\@cite@list{\@cite@list \@celt{\@B@citeB}}%
luis@24 114 \@tempcntb\@tempcnta
luis@24 115 \else % arbitrary number: insert appropriately
luis@24 116 \edef\@cite@list{\expandafter\@sort@celt \@cite@list \@gobble @}%
luis@24 117 \fi}
luis@24 118 %
luis@24 119 % \@sort@celt inserts number (\@tempcnta) into list of \@celt{num} (#1{#2})
luis@24 120 % \@celt must not be expandable; list should end with two vanishing tokens.
luis@24 121 %
luis@24 122 \def\@sort@celt#1#2{\ifx \@celt #1% parameters are \@celt {num}
luis@24 123 \ifnum #2<\@tempcnta % number goes later in list
luis@24 124 \@celt{#2}%
luis@24 125 \expandafter\expandafter\expandafter\@sort@celt % continue
luis@24 126 \else % number goes here
luis@24 127 \@celt{\number\@tempcnta}\@celt{#2}% stop comparing
luis@24 128 \fi\fi}
luis@24 129
luis@24 130 % Check if each number follows previous and can be put in a range
luis@24 131 %
luis@24 132 \def\@compress@cite#1{% % This is executed for each number
luis@24 133 \advance\@tempcnta\@ne % Now \@tempcnta is one more than the previous number
luis@24 134 \ifnum #1=\@tempcnta % Number follows previous--hold on to it
luis@24 135 \ifx\@h@ld\@empty % first pair of successives
luis@24 136 \expandafter\def\expandafter\@h@ld\expandafter{\@citea
luis@24 137 \citeform{#1}}%
luis@24 138 \else % compressible list of successives
luis@24 139 \def\@h@ld{\citedash \citeform{#1}}%
luis@24 140 \fi
luis@24 141 \else % non-successor -- dump what's held and do this one
luis@24 142 \@h@ld \@citea \citeform{#1}%
luis@24 143 \let\@h@ld\@empty
luis@24 144 \fi \@tempcnta#1\let\@citea\citepunct
luis@24 145 }
luis@24 146
luis@24 147 % Make \cite choose superscript or normal
luis@24 148
luis@24 149 \DeclareRobustCommand{\cite}{%
luis@24 150 \@ifnextchar[{\@tempswatrue\@citex}{\@tempswafalse\@citex[]}}
luis@24 151
luis@24 152 % Do \cite command on line.
luis@24 153 %
luis@24 154 \def\@citex[#1]#2{\@cite{\citen{#2}}{#1}}
luis@24 155
luis@24 156 \def\@cite#1#2{\leavevmode \cite@adjust
luis@24 157 \citeleft{#1\if@tempswa\@safe@activesfalse\citemid{#2}\fi
luis@24 158 \spacefactor\@m % punctuation in note doesn't affect outside
luis@24 159 }\citeright
luis@24 160 \@restore@auxhandle}
luis@24 161
luis@24 162 % Put a penalty before the citation, and adjust the spacing: if no space
luis@24 163 % already or if there is extra space due to some punctuation, then change
luis@24 164 % to one inter-word space.
luis@24 165 %
luis@24 166 \def\cite@adjust{\begingroup%
luis@24 167 \@tempskipa\lastskip \edef\@tempa{\the\@tempskipa}\unskip
luis@24 168 \ifnum\lastpenalty=\z@ \penalty\@highpenalty \fi
luis@24 169 \ifx\@tempa\@zero@skip \spacefactor1001 \fi % if no space before, set flag
luis@24 170 \ifnum\spacefactor>\@m \ \else \hskip\@tempskipa \fi
luis@24 171 \endgroup}
luis@24 172
luis@24 173
luis@24 174 \edef\@zero@skip{\the\z@skip}
luis@24 175
luis@24 176 % Superscript cite, with no optional note. Check for punctuation first.
luis@24 177 %
luis@24 178 \def\@citew#1{\begingroup \leavevmode
luis@24 179 \@if@fillglue \lastskip \relax \unskip
luis@24 180 \def\@tempa{\@tempcnta\spacefactor
luis@24 181 \/% this allows the last word to be hyphenated, and it looks better.
luis@24 182 \@citess{\citen{#1}}\spacefactor\@tempcnta
luis@24 183 \endgroup \@restore@auxhandle}%
luis@24 184 \oc@movep\relax}% check for following punctuation (depending on options)
luis@24 185
luis@24 186 % Move trailing punctuation before the citation:
luis@24 187 %
luis@24 188 \def\@citey{\let\@tempc\@tempa
luis@24 189 % Watch for double periods and suppress them
luis@24 190 \ifx\@tempb.\ifnum\spacefactor<\@bigSfactor\else
luis@24 191 \let\@tempb\relax \let\@tempc\oc@movep
luis@24 192 \fi\fi
luis@24 193 % Move other punctuation
luis@24 194 \expandafter\@citepc\CiteMoveChars\delimiter
luis@24 195 \@tempc}%
luis@24 196
luis@24 197 \def\@citepc#1{%
luis@24 198 \ifx\@tempb#1\@empty #1\let\@tempc\oc@movep \fi
luis@24 199 \ifx\delimiter#1\else \expandafter\@citepc\fi}
luis@24 200
luis@24 201 % Replacement for \@cite which defines the formatting normally done
luis@24 202 % around the citation list. This uses superscripts with no brackets.
luis@24 203 % HOWEVER, trailing punctuation has already been moved over. The
luis@24 204 % format for cites with note is given by \@cite. Redefine \@cite and/
luis@24 205 % or \@citex to get different appearance. I don't use \textsuperscript
luis@24 206 % because it is defined BADLY in compatibility mode.
luis@24 207
luis@24 208 \def\@citess#1{\mbox{$\m@th^{\hbox{\OverciteFont{#1}}}$}}
luis@24 209
luis@24 210 % \nocite: This is changed to ignore *ALL* spaces and be robust. The
luis@24 211 % parameter list, with spaces removed, is `returned' in \@no@sparg, which
luis@24 212 % is used by \citen.
luis@24 213 %
luis@24 214 \DeclareRobustCommand\nocite[1]{%
luis@24 215 \@bsphack \@nocite{#1}%
luis@24 216 \@for \@citeb:=\@no@sparg\do{\@ifundefined{b@\@citeb\@extra@b@citeb}%
luis@24 217 {\G@refundefinedtrue\@warning{Citation `\@citeb' undefined}%
luis@24 218 \oc@verbo \global\@namedef{b@\@citeb\@extra@b@citeb}{?}}{}}%
luis@24 219 \@esphack}
luis@24 220
luis@24 221 \def\@nocite#1{\begingroup\let\protect\string% normalize active chars
luis@24 222 \xdef\@no@sparg{\expandafter\@ignsp#1 \: }\endgroup% and remove ALL spaces
luis@24 223 \if@filesw \immediate\write\@newciteauxhandle % = \@auxout, except with multibib
luis@24 224 {\string\citation {\@no@sparg}}\fi
luis@24 225 }
luis@24 226
luis@24 227 % for ignoring *ALL* spaces in the input. This presumes there are no
luis@24 228 % \outer tokens and no \if-\fi constructs in the parameter. Spaces inside
luis@24 229 % braces are retained.
luis@24 230 %
luis@24 231 \def\@ignsp#1 {\ifx\:#1\@empty\else #1\expandafter\@ignsp\fi}
luis@24 232
luis@24 233 % \@if@fillglue{glue}{true}{false}
luis@24 234 \begingroup
luis@24 235 \catcode`F=12 \catcode`I=12\catcode`L=12
luis@24 236 \lowercase{\endgroup
luis@24 237 \def\@if@fillglue#1{%
luis@24 238 \begingroup \skip@#1\relax
luis@24 239 \expandafter\endgroup\expandafter
luis@24 240 \@is@fil@ \the\skip@ \relax\@firstoftwo FIL\relax\@secondoftwo\@nil}
luis@24 241 \def\@is@fil@ #1FIL#2\relax#3#4\@nil{#3}
luis@24 242 }
luis@24 243
luis@24 244 \let\nocitecount\relax % in case \nocitecount was used for drftcite
luis@24 245
luis@24 246 % For the time being, just prevent gross errors from using hyperref.
luis@24 247 % There are no hyper-links. (I will need to carry the cite tags through
luis@24 248 % the sorting process, and use \hyper@natlinkstart)
luis@24 249
luis@24 250 \providecommand\hyper@natlinkstart[1]{}
luis@24 251 \providecommand\hyper@natlinkend{}
luis@24 252 \providecommand\NAT@parse{\@firstofone}
luis@24 253
luis@24 254 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
luis@24 255 % option processing
luis@24 256
luis@24 257 \DeclareOption{verbose}{\def\oc@verbo#1#2#3#4{}}
luis@24 258 \DeclareOption{nospace}{\def\citepunct{,\penalty\@m}}
luis@24 259 \DeclareOption{space}{\def\citepunct{,\penalty\@highpenalty\ }}
luis@24 260 \DeclareOption{ref}{\def\citeleft{[Ref.\penalty\@M\ }}
luis@24 261 \DeclareOption{nosort}{\def\@addto@cite@list
luis@24 262 {\edef\@cite@list{\@cite@list \@celt{\@B@citeB}}}}
luis@24 263 \DeclareOption{sort}{}% default!
luis@24 264 \DeclareOption{nomove}{\def\oc@movep{\@tempa}\let\@citey\oc@movep}
luis@24 265 \DeclareOption{move}{}% default
luis@24 266 \DeclareOption{nocompress}{%
luis@24 267 \def\@compress@cite#1{% % This is executed for each number
luis@24 268 \@h@ld \@citea \hyper@natlinkstart\citeform{#1}\hyper@natlinkend
luis@24 269 \let\@h@ld\@empty \let\@citea\citepunct}
luis@24 270 }
luis@24 271 \DeclareOption{compress}{}% default
luis@24 272 \DeclareOption{super}{\ExecuteOptions{superscript}}
luis@24 273 \DeclareOption{superscript}{%
luis@24 274 \DeclareRobustCommand{\cite}{%
luis@24 275 \@ifnextchar[{\@tempswatrue\@citex}{\@tempswafalse\@citew}}
luis@24 276 }
luis@24 277 \DeclareOption{noadjust}{\let\cite@adjust\@empty}% Don't change spaces
luis@24 278 \DeclareOption{adjust}{}% adjust space before [ ]
luis@24 279 \DeclareOption{biblabel}{\def\@biblabel#1{\@citess{#1}\kern-\labelsep\,}}
luis@24 280 \ProvidesPackage{cite}[2003/11/04 \space v 4.01]
luis@24 281 \ProcessOptions
luis@24 282
luis@24 283 \ifx\@citey\oc@movep\else % we are moving punctuation; must ensure sfcodes
luis@24 284 \mathchardef\@bigSfactor3000
luis@24 285 \expandafter\def\expandafter\frenchspacing\expandafter{\frenchspacing
luis@24 286 \mathchardef\@bigSfactor1001
luis@24 287 \sfcode`\.\@bigSfactor \sfcode`\?\@bigSfactor \sfcode`\!\@bigSfactor }%
luis@24 288 \ifnum\sfcode`\.=\@m \frenchspacing \fi
luis@24 289 \fi
luis@24 290
luis@24 291 % Compatability with chapterbib (see use of \@extra@b@citeb)
luis@24 292 \@ifundefined{@extra@b@citeb}{\def\@extra@b@citeb{}}{}
luis@24 293
luis@24 294 % Compatability with multibib (see use of \@newciteauxhandle) (Yes, this is
luis@24 295 % overly messy, but I asked for it... I can't have multibib putting junk after
luis@24 296 % the cite command because it hides following punctuation, but then I have
luis@24 297 % to restore the ordinary meaning of \@newciteauxhandle = \@auxout.)
luis@24 298 \providecommand\@newciteauxhandle{\@auxout}
luis@24 299 \AtBeginDocument{\@ifundefined{newcites}{\global\let\@restore@auxhandle\relax}{}}
luis@24 300 \def\@restore@auxhandle{\def\@newciteauxhandle{\@auxout}}
luis@24 301
luis@24 302
luis@24 303 \@ifundefined{G@refundefinedtrue}{\let\G@refundefinedtrue\relax}{}
luis@24 304
luis@24 305 \@ifundefined{@safe@activesfalse}{}{}
luis@24 306 \@ifundefined{bbl@cite@choice}{}{\@ifundefined{org@@citex}{}%
luis@24 307 {\let\org@@citex\@citex}}% Prevent stomping by babel
luis@24 308
luis@24 309
luis@24 310 \citenum % execute restore-catcodes
luis@24 311
luis@24 312 % Aliases:
luis@24 313 \let\citenum\citen
luis@24 314 \let\citeonline\citen
luis@24 315
luis@24 316 \endinput
luis@24 317 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
luis@24 318
luis@24 319
luis@24 320 CITE.STY
luis@24 321
luis@24 322 Modify LaTeX's normal citation mechanism to:
luis@24 323
luis@24 324 o Put a comma and a small space between each citation number. The option
luis@24 325 [nospace] removes that space, and the option [space] replaces it with
luis@24 326 an ordinary inter-word space.
luis@24 327
luis@24 328 o Sort citation numbers into ascending order, printing non-numbers before
luis@24 329 numbers. All numbers should be greater than zero. The [nosort] package
luis@24 330 option turns off sorting.
luis@24 331
luis@24 332 o Compress lists of three or more consecutive numbers to one number range
luis@24 333 which can be split, with difficulty, after the dash. All numbers should
luis@24 334 be greater than zero. E.g., if you used to get the (nonsense) list
luis@24 335 [7,5,6,?,4,9,8,Einstein,6], then this style will give [?,Einstein,4-6,6-9].
luis@24 336 Compression of ranges is disabled by the [nocompress] package option.
luis@24 337
luis@24 338 o Allow, but strongly discourage, line breaks within a series of
luis@24 339 citations. Each number is separated by a comma and a small space.
luis@24 340 A break at the beginning of an optional note is discouraged also.
luis@24 341
luis@24 342 o Put a high-penalty breakpoint before the citation (unless you specifically
luis@24 343 forbid it with ~ ). Also, adjust the spacing: if there is no space or if
luis@24 344 there is extra space due to some punctuation, then change to one inter-word
luis@24 345 space. E.g., A space will be inserted here\cite{Larry,Curly,Moe}.
luis@24 346
luis@24 347 o With package option [superscript] (or [super] for short), display citation
luis@24 348 numbers as superscripts (unless they have optional notes, causing them to
luis@24 349 be treated as described above). Superscripted citations follow these
luis@24 350 additional rules:
luis@24 351
luis@24 352 - Superscript citations use THE SAME INPUT FORMAT as ordinary citations; this
luis@24 353 style will ignore spaces before the citation, and move trailing punctuation
luis@24 354 before the superscript citation. For example, "information \cite{source};"
luis@24 355 ignores the space before \cite and puts the semicolon before the number, just
luis@24 356 as if you had typed "information;$^{12}$". You may switch off movement with
luis@24 357 the [nomove] package option (only relevant with [superscript]).
luis@24 358
luis@24 359 - The punctuation characters that will migrate before the superscript are
luis@24 360 listed in the macro \CiteMoveChars, which you can redefine. The default is
luis@24 361 .,;:. Perhaps ! and ? should too, but they weren't listed in the APS style
luis@24 362 manual I looked at, and I agree with that rule to prevent too much visual
luis@24 363 separation. Quotes were listed, but they should never have to migrate
luis@24 364 because both on-line and superscript versions put quotes before the citation.
luis@24 365 This gives one difficulty --- punctuation following quotes won't migrate
luis@24 366 inside the quotation: e.g., "``Transition State Theory''\cite{Eyring}." gives
luis@24 367 "``Transition State Theory''.$^8$", but you may want the period inside the
luis@24 368 quotes, thus: ``Transition State Theory.''$^8$.
luis@24 369
luis@24 370 - Doubling of periods (.., ?., !.) is checked for and suppressed. The spacing
luis@24 371 after the citation is set according to the final punctuation mark moved.
luis@24 372 There is a problem with double periods after a capitalized abbreviation
luis@24 373 or directly after \@ : Both of "N.A.S.A. \cite{space}." and "et al.\@
luis@24 374 \cite{many}." will give doubled periods. These can be fixed as follows:
luis@24 375 "N.A.S.A\@. \cite{space}." and "et al.\ \cite{many}.". The NASA example
luis@24 376 gives the wrong spacing when there is no citation. Sorry. Use \ after
luis@24 377 abbreviations like et al. to get the right spacing within a sentence whether
luis@24 378 or not a citation follows.
luis@24 379
luis@24 380 - Remember, these rules regarding punctuation only apply when the [superscript]
luis@24 381 option was given (or overcite.sty used) and the [nomove] option was NOT
luis@24 382 given.
luis@24 383
luis@24 384 o Define \citen to get just the numbers without the brackets or superscript
luis@24 385 and extra formatting. Aliases are \citenum and \citeonline for easy
luis@24 386 conversion to other citation packages.
luis@24 387
luis@24 388 o `Citation...undefined' warnings are only given once per undefined citation
luis@24 389 tag. In the text, missing numbers are represented with a bold `?' at the
luis@24 390 first occurrence, and with a normal `?' thenceforth. The package option
luis@24 391 [verbose] restores the usual repeated warnings.
luis@24 392
luis@24 393 o Make \nocite, \cite, and \citen all ignore spaces in the input tags.
luis@24 394
luis@24 395 Although each \cite command sorts its numbers, better compression into
luis@24 396 ranges can usually be achieved by carefully selecting the order of the
luis@24 397 \bibitem entries or the order of initial citations when using BibTeX.
luis@24 398 Having the entries pre-sorted will also save processing time, especially
luis@24 399 for long lists of numbers.
luis@24 400
luis@24 401 Customization:
luis@24 402 ~~~~~~~~~~~~~~
luis@24 403 There are several options for \usepackage{cite}, some already mentioned.
luis@24 404
luis@24 405 [superscript] use superscrpts for cites without optional notes
luis@24 406 [super] alias for [superscript] (like natbib)
luis@24 407 [verbose] causes warnings for undefined cites to be repeated each time
luis@24 408 [ref] uses the format "[Ref.~12, optional note]" (useful with
luis@24 409 the superscript option)
luis@24 410 [nospace] eliminates the spaces after commas in the number list.
luis@24 411 [space] uses a full inter-word space after the commas
luis@24 412 [nosort] prevents sorting of the numbers (default is to sort, and a
luis@24 413 [sort] option is provided for completeness).
luis@24 414 [nomove] prevents moving the superscript cite after punctuation.
luis@24 415 [move] is the default
luis@24 416 [noadjust] disables `smart' handling of space before a cite
luis@24 417 [adjust] is the default
luis@24 418 [nocompress] inhibit compression of consecutive numbers into ranges
luis@24 419 [compress] is the default
luis@24 420 [biblabel] define the bibliography label as a superscript
luis@24 421
luis@24 422 There are several commands that you may redefine to change the formatting
luis@24 423 of citation lists:
luis@24 424
luis@24 425 command function default
luis@24 426 ---------- ----------------------- ----------------------------
luis@24 427 \citeform reformats each number nothing
luis@24 428 \citepunct printed between numbers comma + penalty + thin space
luis@24 429 \citeleft left delimiter of list [
luis@24 430 \citeright right delimeter of list ]
luis@24 431 \citemid printed before note comma + space
luis@24 432 \citedash used in a compressed range endash + penalty
luis@24 433 \CiteMoveChars charcters that move .,:;
luis@24 434 \OverciteFont font selection command for superscripts
luis@24 435
luis@24 436 The left/mid/right commands don't affect the formatting of superscript
luis@24 437 citations. You may use \renewcommand to change any of these. Remember,
luis@24 438 these commands are extensions made by this package; they are not regular
luis@24 439 LaTeX. Some examples of changes:
luis@24 440
luis@24 441 1: \renewcommand\citeform[1]{\romannumeral 0#1}} % roman numerals i,vi
luis@24 442 2: \renewcommand\citeform[1]{(#1)} % parenthesized numbers (1)-(5),(9)
luis@24 443 3: \renewcommand\citeform{\thechapter.} % by chapter: ^{2.18-2.21}
luis@24 444 4: \renewcommand\citepunct{,} % no space and no breaks at commas
luis@24 445 5: \renewcommand\citemid{; } % semicolon before optional note
luis@24 446 6: \renewcommand\citeleft{(} % parentheses around list with note
luis@24 447 \renewcommand\citeright{)} % parentheses around list with note
luis@24 448
luis@24 449 The appearance of the whole citation list is governed by \@cite, (for full-
luis@24 450 sized cites) and \@citess (for superscripts). For more extensive changes
luis@24 451 to the formatting, redefine these. For example, to get brackets around the
luis@24 452 list of superscript numbers you can do:
luis@24 453
luis@24 454 \def\@citess#1{\textsuperscript{[#1]}}
luis@24 455
luis@24 456 after \makeatletter.
luis@24 457
luis@24 458 Related Note: The superscript option does not affect the numbering format
luis@24 459 of the bibliography; the "[12]" style is still the default. To get
luis@24 460 superscripts in the bibliography (at any time) you can define
luis@24 461
luis@24 462 \renewcommand\@biblabel[1]{\textsuperscript{#1}}
luis@24 463
luis@24 464 Aw, OK, for your convenience, there is the [biblabel] package option that
luis@24 465 just performs this definition (sort of).
luis@24 466
luis@24 467 \@extra@b@citeb is a hook for other style files to further specify
luis@24 468 citations; for example, to number by chapter (see chapterbib.sty).
luis@24 469
luis@24 470 % Version 1991: Ignore spaces after commas in the parameter list. Move most of
luis@24 471 % \citen into \@cmpresscites for speed. Give the proper \spacefactor afterwards.
luis@24 472 % Version 1992: make \citepunct hold the punctuation between numbers (for ease
luis@24 473 % of changing). Add \/ to allow hyphenation of previous word, and look better
luis@24 474 % in italics.
luis@24 475 % 1992a: Make it work with NFSS. (Thank you C. Hamlin and Rainer Schoepf)
luis@24 476 %
luis@24 477 % Version 3.0 (1992): Rewrite, including sorting. Make entries like "4th"
luis@24 478 % be treated properly as text.
luis@24 479 % 3.1: Bug fixes (and Joerg-Martin Schwarz also convinced me to use \ifcat)
luis@24 480 % 3.2: NFSS support was wrong--added \reset@font. Suppress repetitions of
luis@24 481 % warnings. Include \@extra@b@citeb hook.
luis@24 482 % 3.3: Handle LaTeX2e options. Introduce various customization hooks.
luis@24 483 % 3.4: Heuristics to avoid removing \hspace glue before on-line \cite.
luis@24 484 % Make \nocite ignore spaces in list, simplify. Aliases for \citen.
luis@24 485 % Compatability with amsmath (which defines \over).
luis@24 486 % 3.5: Replace \reset@font with \selectfont so italics are preserved
luis@24 487 % Include \G@refundefinedtrue. Fix cite-with-note bug (Lars Engebretsen).
luis@24 488 % 3.6: Add nosort option.
luis@24 489 % 3.7: Add nomove option; catcode preservation and global \@no@sparg for
luis@24 490 % french.sty; warnings in \nocite.
luis@24 491 % 3.8: \citedash hook, fix token look-ahead (Heiko Selber), noadjust, babel.
luis@24 492 % 3.9: More babel-compatibility hacks. Punctuation move with \frencspacing.
luis@24 493 % 4.0: Combine overcite with cite: [superscript] option. Also add [nocompress]
luis@24 494 % option and \CiteMoveChars; multibib hooks.
luis@24 495 % 4.01 \bf -> \bfseries
luis@24 496 %
luis@24 497 % Send problem reports to asnd@triumf.ca
luis@24 498
luis@24 499 Test file integrity: ASCII 32-57, 58-126: !"#$%&'()*+,-./0123456789
luis@24 500 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~