| 1 |
%% ===================================================================== |
| 2 |
%% WARNING: Do NOT edit this file. It was produced automatically by |
| 3 |
%% Nelson H. F. Beebe <[email protected]> |
| 4 |
%% from file://plot79.math.utah.edu/u/sy/beebe/tex/bib/merge/xbtxbst.doc |
| 5 |
%% on Wed May 15 10:36:03 MDT 1996. |
| 6 |
%% ===================================================================== |
| 7 |
%%%===================================================================== |
| 8 |
%%% @BibTeX-style-file{ |
| 9 |
%%% author = "Nelson H. F. Beebe", |
| 10 |
%%% version = "2.03", |
| 11 |
%%% date = "15 May 1996", |
| 12 |
%%% time = "10:35:51 MDT", |
| 13 |
%%% filename = "is-abbrv.bst", |
| 14 |
%%% address = "Center for Scientific Computing |
| 15 |
%%% Department of Mathematics |
| 16 |
%%% University of Utah |
| 17 |
%%% Salt Lake City, UT 84112 |
| 18 |
%%% USA", |
| 19 |
%%% telephone = "+1 801 581 5254", |
| 20 |
%%% FAX = "+1 801 581 4148", |
| 21 |
%%% URL = "http://www.math.utah.edu/~beebe", |
| 22 |
%%% checksum = "47504 1833 4630 37425", |
| 23 |
%%% email = "[email protected] (Internet)", |
| 24 |
%%% codetable = "ISO/ASCII", |
| 25 |
%%% keywords = "BibTeX, style, bibliography", |
| 26 |
%%% supported = "yes", |
| 27 |
%%% docstring = "This file is a modification of the standard |
| 28 |
%%% BibTeX btxbst.doc file, or is a .bst file |
| 29 |
%%% derived from that modification. It contains |
| 30 |
%%% optional added support for CODEN, ISBN, ISSN, |
| 31 |
%%% LCCN, and PRICE fields, extended PAGES |
| 32 |
%%% fields, the PERIODICAL entry, and extended |
| 33 |
%%% citation label suffixing. |
| 34 |
%%% |
| 35 |
%%% In addition, date formatting supports a day |
| 36 |
%%% keyword, so that bibliography entries can be |
| 37 |
%%% written with |
| 38 |
%%% |
| 39 |
%%% day = {23}, |
| 40 |
%%% month = aug, |
| 41 |
%%% |
| 42 |
%%% instead of the language-dependent awkward |
| 43 |
%%% forms required by the standard styles |
| 44 |
%%% |
| 45 |
%%% month = {23~} # aug, |
| 46 |
%%% month = aug # {~23}, |
| 47 |
%%% |
| 48 |
%%% These older forms are, of course, still |
| 49 |
%%% handled correctly. |
| 50 |
%%% |
| 51 |
%%% The UNIX C preprocessor can be used to |
| 52 |
%%% extract the standard styles, as follows: |
| 53 |
%%% |
| 54 |
%%% cpp -P -DPLAIN xbtxbst.doc >plain.bst |
| 55 |
%%% cpp -P -DUNSRT xbtxbst.doc >unsrt.bst |
| 56 |
%%% cpp -P -DALPHA xbtxbst.doc >alpha.bst |
| 57 |
%%% cpp -P -DABBRV xbtxbst.doc >abbrv.bst |
| 58 |
%%% |
| 59 |
%%% To obtain correct file header checksums, pipe |
| 60 |
%%% the output through the checksum program, e.g. |
| 61 |
%%% |
| 62 |
%%% cpp -P -DPLAIN xbtxbst.doc | checksum >plain.bst |
| 63 |
%%% |
| 64 |
%%% The accompanying UNIX Makefile automates this |
| 65 |
%%% job, and provides some extra leading comments |
| 66 |
%%% in the generated style files warning the user |
| 67 |
%%% not to modify them. |
| 68 |
%%% |
| 69 |
%%% Additional optional definitions are recognized |
| 70 |
%%% to provide extensions to the standard styles: |
| 71 |
%%% |
| 72 |
%%% -D_CODEN for CODEN output |
| 73 |
%%% |
| 74 |
%%% -D_ISBN for ISBN output |
| 75 |
%%% |
| 76 |
%%% -D_ISSN for ISSN output |
| 77 |
%%% |
| 78 |
%%% -D_LCCN for LCCN output |
| 79 |
%%% |
| 80 |
%%% -D_PRICE for price output, |
| 81 |
%%% |
| 82 |
%%% -D_BOOKPAGES for book, techreport, manual, |
| 83 |
%%% and thesis pages output. |
| 84 |
%%% |
| 85 |
%%% -D_URL to get World-Wide Web Uniform |
| 86 |
%%% Resource Locator (URL) output. |
| 87 |
%%% |
| 88 |
%%% -D_NUMERIC_SUFFIXES to get numeric |
| 89 |
%%% label suffixes -1, -2, ..., -26, instead of |
| 90 |
%%% letters a, b, ..., z, so as to correctly |
| 91 |
%%% handle alpha-style bibliographies with more |
| 92 |
%%% than 26 entries for a single author in one |
| 93 |
%%% year. Change letter suffix code to switch |
| 94 |
%%% to numeric suffixes if more than 26 letters |
| 95 |
%%% are used, so that no matter which scheme is |
| 96 |
%%% selected, correct output will always be |
| 97 |
%%% obtained. |
| 98 |
%%% |
| 99 |
%%% The CODEN, ISBN, ISSN, LCCN, PRICE, and URL |
| 100 |
%%% values are wrapped inside macros \showCODEN{} |
| 101 |
%%% etc. that the user can provide alternate |
| 102 |
%%% definitions of to change the formatting, or |
| 103 |
%%% to suppress their output altogether. That |
| 104 |
%%% way, output identical to that of the four |
| 105 |
%%% standard BibTeX style files can be obtained |
| 106 |
%%% with these extended files, if these macros |
| 107 |
%%% are defined to expand to empty strings. |
| 108 |
%%% |
| 109 |
%%% URL handling is slightly more complex, |
| 110 |
%%% because URLs can contain characters which TeX |
| 111 |
%%% must handle in verbatim mode in a typewriter |
| 112 |
%%% font, and such text cannot readily appear |
| 113 |
%%% inside nested macro arguments. Consequently, |
| 114 |
%%% URLs are formatted in the .bbl file like |
| 115 |
%%% this: |
| 116 |
%%% \ifshowURL {\showURL \path|...|} \fi |
| 117 |
%%% where \showURL takes no argument, and |
| 118 |
%%% normally expands to the 4-character string |
| 119 |
%%% URL<space>. The grouping braces ensure that |
| 120 |
%%% any font changes made by \showURL remain |
| 121 |
%%% localized. Vertical bar is chosen as the |
| 122 |
%%% verbatim path delimiter, because it cannot |
| 123 |
%%% appear in URLs. The other prohibited ISO |
| 124 |
%%% Latin 1 characters are the non-printing |
| 125 |
%%% control characters 0..31, plus those in the |
| 126 |
%%% range 128..255, plus the ten special |
| 127 |
%%% characters |
| 128 |
%%% |
| 129 |
%%% { } [ ] \ ^ ~ < > ` |
| 130 |
%%% |
| 131 |
%%% See Internet RFC 1630 (June 1994) for more |
| 132 |
%%% details. (Backquote is not even mentioned |
| 133 |
%%% there.) |
| 134 |
%%% |
| 135 |
%%% As an example of font changes, in LaTeX 2e |
| 136 |
%%% you might define |
| 137 |
%%% \newcommand{\showURL}{URL |
| 138 |
%%% \let \oldtt = \tt |
| 139 |
%%% \renewcommand{\tt}{\oldtt \itshape}} |
| 140 |
%%% to get URLs set in a typewriter italic font. |
| 141 |
%%% |
| 142 |
%%% If desired, a sed script can be used to |
| 143 |
%%% eliminate non-essential comments (this |
| 144 |
%%% reduces the file size by 2/3); a command |
| 145 |
%%% filter step like |
| 146 |
%%% sed -e '/^%$/d' -e '/^%[^%].*$/d' |
| 147 |
%%% will accomplish that job. |
| 148 |
%%% |
| 149 |
%%% The checksum field above contains a CRC-16 |
| 150 |
%%% checksum as the first value, followed by the |
| 151 |
%%% equivalent of the standard UNIX wc (word |
| 152 |
%%% count) utility output of lines, words, and |
| 153 |
%%% characters. This is produced by Robert |
| 154 |
%%% Solovay's checksum utility." |
| 155 |
%%% } |
| 156 |
%%% ==================================================================== |
| 157 |
%%% Revision history (reverse time order): |
| 158 |
%%% |
| 159 |
%%% 2.03 [15-May-1996] |
| 160 |
%%% Add CODEN support, ISBN and ISSN output for Article entries, |
| 161 |
%%% and ISBN output for TechReport entries (yes, these sometimes |
| 162 |
%%% do have ISBNs). |
| 163 |
%%% |
| 164 |
%%% Add wrapper macros \showXYZ{} (XYZ = CODEN, ISBN, ISSN, LCCN, |
| 165 |
%%% PRICE, and URL) defined inside the thebibliography environment |
| 166 |
%%% to expand to XYZ (except for PRICE) and their arguments, |
| 167 |
%%% PROVIDED they are not already defined. That way, the user can |
| 168 |
%%% provide alternate definitions outside the thebibliography |
| 169 |
%%% environment, for example, to suppress particular ones, or |
| 170 |
%%% to alter the font used. |
| 171 |
%%% |
| 172 |
%%% Substantially revise leading comments to better document the |
| 173 |
%%% extensions. |
| 174 |
%%% |
| 175 |
%%% 2.02 [01-Apr-1996] |
| 176 |
%%% Add day keyword support with new code in format.date function. |
| 177 |
%%% Oren Patashnik will include this new keyword in standard styles |
| 178 |
%%% in BibTeX 1.0. |
| 179 |
%%% |
| 180 |
%%% Add new function collapse.pagerange, and use it to collapse |
| 181 |
%%% page ranges with identical initial and final numbers to a |
| 182 |
%%% single number, so that bibliography files can distinguish |
| 183 |
%%% between one-page documents, and documents missing final page |
| 184 |
%%% numbers. |
| 185 |
%%% |
| 186 |
%%% 2.01 [25-Oct-1994] |
| 187 |
%%% Add URL output support. |
| 188 |
%%% |
| 189 |
%%% 2.00 [12-Oct-1994] |
| 190 |
%%% Add support for pages in theses and manuals, treating them |
| 191 |
%%% like Book and InBook pages. |
| 192 |
%%% |
| 193 |
%%% Correct ISSN support: a typo caused output of ISBN instead of |
| 194 |
%%% ISSN. |
| 195 |
%%% |
| 196 |
%%% Wherever ISBNs are output, also output an ISSN, if one |
| 197 |
%%% exists, and vice versa. The reason is that some periodicals |
| 198 |
%%% (e.g. The X Resource, published by O'Reilly and Associates) |
| 199 |
%%% have both ISSN and ISBN numbers, and can be purchased either |
| 200 |
%%% as journal subscriptions, or as single volumes. |
| 201 |
%%% |
| 202 |
%%% For InProceedings and Proceedings output, issue a warning for |
| 203 |
%%% a missing publisher: even though that field is optional, a |
| 204 |
%%% bibliographic reference without it is incomplete. |
| 205 |
%%% |
| 206 |
%%% Remove harmless, but unneeded, single horizontal space before |
| 207 |
%%% price output added with version 1.03. |
| 208 |
%%% |
| 209 |
%%% Change Proceedings and InProceedings to treat address values |
| 210 |
%%% as publisher addresses, as they are with every other document |
| 211 |
%%% type, rather than as conference addresses, which belong in |
| 212 |
%%% the title field (that is how major libraries, including OCLC |
| 213 |
%%% and Library of Congress, with nearly 60M holdings, represent |
| 214 |
%%% them). The need for this change has been discussed with |
| 215 |
%%% BibTeX's author, Oren Patashnik, and there is a good |
| 216 |
%%% possibility that BibTeX 1.0 will contain the change |
| 217 |
%%% implemented here. This is an INCOMPATIBLE change that will |
| 218 |
%%% produce different .bbl file formatting. However, the TUG and |
| 219 |
%%% BibNet bibliography projects have consistently used address |
| 220 |
%%% to me publisher/organization/institution address, and so |
| 221 |
%%% already conform to the new practice. |
| 222 |
%%% |
| 223 |
%%% 1.05 [30-May-1994] |
| 224 |
%%% Add NUMERIC_SUFFIXES support. |
| 225 |
%%% |
| 226 |
%%% Change all preprocessor statements to put else and endif |
| 227 |
%%% labels inside C-style comments to conform to 1989 ISO/ANSI C |
| 228 |
%%% Standard. |
| 229 |
%%% |
| 230 |
%%% 1.04 [11-Nov-1993] |
| 231 |
%%% Add underscore prefix to new processor symbols to prevent |
| 232 |
%%% substitution in comments |
| 233 |
%%% |
| 234 |
%%% 1.03 [11-Oct-1993] |
| 235 |
%%% Add support for LCCN (Library of Congress Catalog Number) |
| 236 |
%%% and price fields, and make ISBN, ISSN, LCCN, and price |
| 237 |
%%% selectable by preprocessor conditionals. |
| 238 |
%%% |
| 239 |
%%% 1.02 [12-Sep-1991] |
| 240 |
%%% Merge in Barbara N. Beeton's suggestion for hyphen-less |
| 241 |
%%% line breaks around volume(number):page. |
| 242 |
%%% |
| 243 |
%%% 1.01 [10-Sep-1991] |
| 244 |
%%% Update file comment header and use Solovay checksum program. |
| 245 |
%%% |
| 246 |
%%% 1.00 [17-Oct-1990] |
| 247 |
%%% Original version merging hand-edits of is-xxx.bst files into |
| 248 |
%%% this master file, xbtxbst.doc. |
| 249 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 250 |
|
| 251 |
%% BibTeX `plain' family |
| 252 |
%% version 0.99b for BibTeX versions 0.99a or later, LaTeX version 2.09. |
| 253 |
%% Copyright (C) 1985, all rights reserved. |
| 254 |
%% Copying of this file is authorized only if either |
| 255 |
%% (1) you make absolutely no changes to your copy, including name, or |
| 256 |
%% (2) if you do make changes, you name it something other than |
| 257 |
%% btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst. |
| 258 |
%% This restriction helps ensure that all standard styles are identical. |
| 259 |
%% The file btxbst.doc has the documentation for this style. |
| 260 |
|
| 261 |
|
| 262 |
|
| 263 |
|
| 264 |
|
| 265 |
|
| 266 |
|
| 267 |
|
| 268 |
|
| 269 |
|
| 270 |
|
| 271 |
|
| 272 |
|
| 273 |
|
| 274 |
|
| 275 |
|
| 276 |
|
| 277 |
ENTRY |
| 278 |
{ address |
| 279 |
author |
| 280 |
booktitle |
| 281 |
chapter |
| 282 |
|
| 283 |
coden |
| 284 |
|
| 285 |
day |
| 286 |
edition |
| 287 |
editor |
| 288 |
howpublished |
| 289 |
institution |
| 290 |
|
| 291 |
isbn |
| 292 |
|
| 293 |
|
| 294 |
issn |
| 295 |
|
| 296 |
journal |
| 297 |
key |
| 298 |
|
| 299 |
lccn |
| 300 |
|
| 301 |
month |
| 302 |
note |
| 303 |
number |
| 304 |
organization |
| 305 |
pages |
| 306 |
|
| 307 |
price |
| 308 |
|
| 309 |
publisher |
| 310 |
school |
| 311 |
series |
| 312 |
title |
| 313 |
type |
| 314 |
|
| 315 |
URL |
| 316 |
|
| 317 |
volume |
| 318 |
year |
| 319 |
} |
| 320 |
{} |
| 321 |
|
| 322 |
{ label } |
| 323 |
|
| 324 |
|
| 325 |
|
| 326 |
INTEGERS { output.state before.all mid.sentence after.sentence after.block } |
| 327 |
|
| 328 |
FUNCTION {init.state.consts} |
| 329 |
{ #0 'before.all := |
| 330 |
#1 'mid.sentence := |
| 331 |
#2 'after.sentence := |
| 332 |
#3 'after.block := |
| 333 |
} |
| 334 |
|
| 335 |
|
| 336 |
STRINGS { b e new.pages original.t s t } |
| 337 |
|
| 338 |
FUNCTION {output.nonnull} |
| 339 |
{ 's := |
| 340 |
output.state mid.sentence = |
| 341 |
{ ", " * write$ } |
| 342 |
{ output.state after.block = |
| 343 |
{ add.period$ write$ |
| 344 |
newline$ |
| 345 |
"\newblock " write$ |
| 346 |
} |
| 347 |
{ output.state before.all = |
| 348 |
'write$ |
| 349 |
{ add.period$ " " * write$ } |
| 350 |
if$ |
| 351 |
} |
| 352 |
if$ |
| 353 |
mid.sentence 'output.state := |
| 354 |
} |
| 355 |
if$ |
| 356 |
s |
| 357 |
} |
| 358 |
|
| 359 |
FUNCTION {output} |
| 360 |
{ duplicate$ empty$ |
| 361 |
'pop$ |
| 362 |
'output.nonnull |
| 363 |
if$ |
| 364 |
} |
| 365 |
|
| 366 |
FUNCTION {output.check} |
| 367 |
{ 't := |
| 368 |
duplicate$ empty$ |
| 369 |
{ pop$ "empty " t * " in " * cite$ * warning$ } |
| 370 |
'output.nonnull |
| 371 |
if$ |
| 372 |
} |
| 373 |
|
| 374 |
FUNCTION {output.bibitem} |
| 375 |
{ newline$ |
| 376 |
|
| 377 |
"\bibitem{" write$ |
| 378 |
|
| 379 |
cite$ write$ |
| 380 |
"}" write$ |
| 381 |
newline$ |
| 382 |
"" |
| 383 |
before.all 'output.state := |
| 384 |
} |
| 385 |
|
| 386 |
|
| 387 |
FUNCTION {fin.entry} |
| 388 |
{ add.period$ |
| 389 |
write$ |
| 390 |
newline$ |
| 391 |
} |
| 392 |
|
| 393 |
FUNCTION {new.block} |
| 394 |
{ output.state before.all = |
| 395 |
'skip$ |
| 396 |
{ after.block 'output.state := } |
| 397 |
if$ |
| 398 |
} |
| 399 |
|
| 400 |
FUNCTION {new.sentence} |
| 401 |
{ output.state after.block = |
| 402 |
'skip$ |
| 403 |
{ output.state before.all = |
| 404 |
'skip$ |
| 405 |
{ after.sentence 'output.state := } |
| 406 |
if$ |
| 407 |
} |
| 408 |
if$ |
| 409 |
} |
| 410 |
|
| 411 |
|
| 412 |
FUNCTION {not} |
| 413 |
{ { #0 } |
| 414 |
{ #1 } |
| 415 |
if$ |
| 416 |
} |
| 417 |
|
| 418 |
FUNCTION {and} |
| 419 |
{ 'skip$ |
| 420 |
{ pop$ #0 } |
| 421 |
if$ |
| 422 |
} |
| 423 |
|
| 424 |
FUNCTION {or} |
| 425 |
{ { pop$ #1 } |
| 426 |
'skip$ |
| 427 |
if$ |
| 428 |
} |
| 429 |
|
| 430 |
|
| 431 |
FUNCTION {new.block.checka} |
| 432 |
{ empty$ |
| 433 |
'skip$ |
| 434 |
'new.block |
| 435 |
if$ |
| 436 |
} |
| 437 |
|
| 438 |
FUNCTION {new.block.checkb} |
| 439 |
{ empty$ |
| 440 |
swap$ empty$ |
| 441 |
and |
| 442 |
'skip$ |
| 443 |
'new.block |
| 444 |
if$ |
| 445 |
} |
| 446 |
|
| 447 |
|
| 448 |
FUNCTION {new.sentence.checka} |
| 449 |
{ empty$ |
| 450 |
'skip$ |
| 451 |
'new.sentence |
| 452 |
if$ |
| 453 |
} |
| 454 |
|
| 455 |
FUNCTION {new.sentence.checkb} |
| 456 |
{ empty$ |
| 457 |
swap$ empty$ |
| 458 |
and |
| 459 |
'skip$ |
| 460 |
'new.sentence |
| 461 |
if$ |
| 462 |
} |
| 463 |
|
| 464 |
|
| 465 |
FUNCTION {field.or.null} |
| 466 |
{ duplicate$ empty$ |
| 467 |
{ pop$ "" } |
| 468 |
'skip$ |
| 469 |
if$ |
| 470 |
} |
| 471 |
|
| 472 |
FUNCTION {emphasize} |
| 473 |
{ duplicate$ empty$ |
| 474 |
{ pop$ "" } |
| 475 |
{ "{\em " swap$ * "}" * } |
| 476 |
if$ |
| 477 |
} |
| 478 |
|
| 479 |
INTEGERS { nameptr namesleft numnames } |
| 480 |
|
| 481 |
FUNCTION {format.names} |
| 482 |
{ 's := |
| 483 |
#1 'nameptr := |
| 484 |
s num.names$ 'numnames := |
| 485 |
numnames 'namesleft := |
| 486 |
{ namesleft #0 > } |
| 487 |
|
| 488 |
{ s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := |
| 489 |
|
| 490 |
nameptr #1 > |
| 491 |
{ namesleft #1 > |
| 492 |
{ ", " * t * } |
| 493 |
{ numnames #2 > |
| 494 |
{ "," * } |
| 495 |
'skip$ |
| 496 |
if$ |
| 497 |
t "others" = |
| 498 |
{ " et~al." * } |
| 499 |
{ " and " * t * } |
| 500 |
if$ |
| 501 |
} |
| 502 |
if$ |
| 503 |
} |
| 504 |
't |
| 505 |
if$ |
| 506 |
nameptr #1 + 'nameptr := |
| 507 |
namesleft #1 - 'namesleft := |
| 508 |
} |
| 509 |
while$ |
| 510 |
} |
| 511 |
|
| 512 |
FUNCTION {format.authors} |
| 513 |
{ author empty$ |
| 514 |
{ "" } |
| 515 |
{ author format.names } |
| 516 |
if$ |
| 517 |
} |
| 518 |
|
| 519 |
|
| 520 |
FUNCTION {format.coden} |
| 521 |
{ coden empty$ |
| 522 |
{ "" } |
| 523 |
{ new.block "\showCODEN{" coden * "}" *} |
| 524 |
if$ |
| 525 |
} |
| 526 |
|
| 527 |
|
| 528 |
FUNCTION {format.editors} |
| 529 |
{ editor empty$ |
| 530 |
{ "" } |
| 531 |
{ editor format.names |
| 532 |
editor num.names$ #1 > |
| 533 |
{ ", editors" * } |
| 534 |
{ ", editor" * } |
| 535 |
if$ |
| 536 |
} |
| 537 |
if$ |
| 538 |
} |
| 539 |
|
| 540 |
|
| 541 |
FUNCTION {format.isbn} |
| 542 |
{ isbn empty$ |
| 543 |
{ "" } |
| 544 |
{ new.block "\showISBN{" isbn * "}" *} |
| 545 |
if$ |
| 546 |
} |
| 547 |
|
| 548 |
|
| 549 |
|
| 550 |
FUNCTION {format.issn} |
| 551 |
{ issn empty$ |
| 552 |
{ "" } |
| 553 |
{ new.block "\showISSN{" issn * "}" *} |
| 554 |
if$ |
| 555 |
} |
| 556 |
|
| 557 |
|
| 558 |
|
| 559 |
FUNCTION {format.lccn} |
| 560 |
{ lccn empty$ |
| 561 |
{ "" } |
| 562 |
{ new.block "\showLCCN{" lccn * "}" *} |
| 563 |
if$ |
| 564 |
} |
| 565 |
|
| 566 |
|
| 567 |
|
| 568 |
FUNCTION {format.price} |
| 569 |
{ price empty$ |
| 570 |
{ "" } |
| 571 |
{ new.block "\showPRICE{" price * "}" *} |
| 572 |
if$ |
| 573 |
} |
| 574 |
|
| 575 |
|
| 576 |
|
| 577 |
FUNCTION {format.url} |
| 578 |
{ url empty$ |
| 579 |
{ "" } |
| 580 |
{ new.block "\ifshowURL {\showURL \path|" url * "|}\fi" *} |
| 581 |
if$ |
| 582 |
} |
| 583 |
|
| 584 |
|
| 585 |
|
| 586 |
|
| 587 |
FUNCTION {format.title} |
| 588 |
{ title empty$ |
| 589 |
{ "" } |
| 590 |
|
| 591 |
{ title "t" change.case$ } |
| 592 |
|
| 593 |
if$ |
| 594 |
} |
| 595 |
|
| 596 |
|
| 597 |
|
| 598 |
FUNCTION {collapse.pagerange} |
| 599 |
{ 't := % save input page range string |
| 600 |
t 'original.t := % save original page range |
| 601 |
"" 'b := % beginning page number |
| 602 |
"" 'e := % ending page number |
| 603 |
{ t empty$ not } % while-loop Boolean condition |
| 604 |
{ % while-loop body |
| 605 |
t #1 #2 substring$ "--" = % have we found the en-dash? |
| 606 |
{ |
| 607 |
t #3 global.max$ substring$ 'e := % yes, save ending page number |
| 608 |
"" 't := % and set t to empty string to terminate loop |
| 609 |
} |
| 610 |
{ |
| 611 |
b t #1 #1 substring$ * 'b := % no, just accumulate this character |
| 612 |
t #2 global.max$ substring$ 't := % and set t to the remaining string |
| 613 |
} |
| 614 |
if$ |
| 615 |
} |
| 616 |
while$ % on exit, t has ending page number string |
| 617 |
e b = % are beginning and ending numbers the same? |
| 618 |
{ b } % yes, return the beginning page number string |
| 619 |
{ original.t } % no, return the original page number string |
| 620 |
if$ |
| 621 |
} |
| 622 |
|
| 623 |
|
| 624 |
FUNCTION {n.dashify} |
| 625 |
{ 't := |
| 626 |
"" |
| 627 |
{ t empty$ not } |
| 628 |
{ t #1 #1 substring$ "-" = |
| 629 |
{ t #1 #2 substring$ "--" = not |
| 630 |
{ "--" * |
| 631 |
t #2 global.max$ substring$ 't := |
| 632 |
} |
| 633 |
{ { t #1 #1 substring$ "-" = } |
| 634 |
{ "-" * |
| 635 |
t #2 global.max$ substring$ 't := |
| 636 |
} |
| 637 |
while$ |
| 638 |
} |
| 639 |
if$ |
| 640 |
} |
| 641 |
{ t #1 #1 substring$ * |
| 642 |
t #2 global.max$ substring$ 't := |
| 643 |
} |
| 644 |
if$ |
| 645 |
} |
| 646 |
while$ |
| 647 |
} |
| 648 |
|
| 649 |
|
| 650 |
FUNCTION {format.date} |
| 651 |
{ year empty$ |
| 652 |
{ month empty$ |
| 653 |
{ |
| 654 |
day empty$ |
| 655 |
{ "" } |
| 656 |
{ "there's a day but no month or year in " cite$ * warning$ } |
| 657 |
if$ |
| 658 |
} |
| 659 |
{ "there's a month but no year in " cite$ * warning$ |
| 660 |
month |
| 661 |
day empty$ |
| 662 |
{ } |
| 663 |
{ " " * day * } |
| 664 |
if$ |
| 665 |
} |
| 666 |
if$ |
| 667 |
} |
| 668 |
{ month empty$ |
| 669 |
{ |
| 670 |
day empty$ |
| 671 |
{ year } |
| 672 |
{ "there's a day and year but no month in " cite$ * warning$ } |
| 673 |
if$ |
| 674 |
} |
| 675 |
{ |
| 676 |
month " " * |
| 677 |
day empty$ |
| 678 |
{ } |
| 679 |
{ day * ", " * } |
| 680 |
if$ |
| 681 |
year * |
| 682 |
} |
| 683 |
if$ |
| 684 |
} |
| 685 |
if$ |
| 686 |
} |
| 687 |
|
| 688 |
|
| 689 |
FUNCTION {format.btitle} |
| 690 |
{ title emphasize |
| 691 |
} |
| 692 |
|
| 693 |
|
| 694 |
FUNCTION {tie.or.space.connect} |
| 695 |
{ duplicate$ text.length$ #3 < |
| 696 |
{ "~" } |
| 697 |
{ " " } |
| 698 |
if$ |
| 699 |
swap$ * * |
| 700 |
} |
| 701 |
|
| 702 |
|
| 703 |
FUNCTION {either.or.check} |
| 704 |
{ empty$ |
| 705 |
'pop$ |
| 706 |
{ "can't use both " swap$ * " fields in " * cite$ * warning$ } |
| 707 |
if$ |
| 708 |
} |
| 709 |
|
| 710 |
|
| 711 |
FUNCTION {format.bvolume} |
| 712 |
{ volume empty$ |
| 713 |
{ "" } |
| 714 |
{ "volume" volume tie.or.space.connect |
| 715 |
series empty$ |
| 716 |
'skip$ |
| 717 |
{ " of " * series emphasize * } |
| 718 |
if$ |
| 719 |
"volume and number" number either.or.check |
| 720 |
} |
| 721 |
if$ |
| 722 |
} |
| 723 |
|
| 724 |
|
| 725 |
FUNCTION {format.number.series} |
| 726 |
{ volume empty$ |
| 727 |
{ number empty$ |
| 728 |
{ series field.or.null } |
| 729 |
{ output.state mid.sentence = |
| 730 |
{ "number" } |
| 731 |
{ "Number" } |
| 732 |
if$ |
| 733 |
number tie.or.space.connect |
| 734 |
series empty$ |
| 735 |
{ "there's a number but no series in " cite$ * warning$ } |
| 736 |
{ " in " * series * } |
| 737 |
if$ |
| 738 |
} |
| 739 |
if$ |
| 740 |
} |
| 741 |
{ "" } |
| 742 |
if$ |
| 743 |
} |
| 744 |
|
| 745 |
|
| 746 |
FUNCTION {format.edition} |
| 747 |
{ edition empty$ |
| 748 |
{ "" } |
| 749 |
{ output.state mid.sentence = |
| 750 |
{ edition "l" change.case$ " edition" * } |
| 751 |
{ edition "t" change.case$ " edition" * } |
| 752 |
if$ |
| 753 |
} |
| 754 |
if$ |
| 755 |
} |
| 756 |
|
| 757 |
|
| 758 |
INTEGERS { multiresult } |
| 759 |
|
| 760 |
FUNCTION {multi.page.check} |
| 761 |
{ 't := |
| 762 |
#0 'multiresult := |
| 763 |
{ multiresult not |
| 764 |
t empty$ not |
| 765 |
and |
| 766 |
} |
| 767 |
{ t #1 #1 substring$ |
| 768 |
duplicate$ "-" = |
| 769 |
swap$ duplicate$ "," = |
| 770 |
swap$ "+" = |
| 771 |
or or |
| 772 |
{ #1 'multiresult := } |
| 773 |
{ t #2 global.max$ substring$ 't := } |
| 774 |
if$ |
| 775 |
} |
| 776 |
while$ |
| 777 |
multiresult |
| 778 |
} |
| 779 |
|
| 780 |
|
| 781 |
FUNCTION {format.book.pages} |
| 782 |
{ pages empty$ |
| 783 |
{ "" } |
| 784 |
{ new.block pages " pp." * } |
| 785 |
if$ |
| 786 |
} |
| 787 |
|
| 788 |
|
| 789 |
|
| 790 |
FUNCTION {format.pages} |
| 791 |
{ pages empty$ |
| 792 |
{ "" } |
| 793 |
{ |
| 794 |
pages multi.page.check |
| 795 |
{ pages collapse.pagerange 'new.pages := } |
| 796 |
{ pages 'new.pages := } |
| 797 |
if$ |
| 798 |
new.pages multi.page.check |
| 799 |
{ "pages" new.pages n.dashify tie.or.space.connect } |
| 800 |
{ "page" new.pages tie.or.space.connect } |
| 801 |
if$ |
| 802 |
} |
| 803 |
if$ |
| 804 |
} |
| 805 |
|
| 806 |
|
| 807 |
FUNCTION {format.vol.num.pages} |
| 808 |
{ volume field.or.null |
| 809 |
number empty$ |
| 810 |
'skip$ |
| 811 |
{ "\penalty0 (" number * ")" * * |
| 812 |
volume empty$ |
| 813 |
{ "there's a number but no volume in " cite$ * warning$ } |
| 814 |
'skip$ |
| 815 |
if$ |
| 816 |
} |
| 817 |
if$ |
| 818 |
pages empty$ |
| 819 |
'skip$ |
| 820 |
{ duplicate$ empty$ |
| 821 |
{ pop$ format.pages } |
| 822 |
{ ":\penalty0 " * pages collapse.pagerange n.dashify * } |
| 823 |
if$ |
| 824 |
} |
| 825 |
if$ |
| 826 |
} |
| 827 |
|
| 828 |
|
| 829 |
|
| 830 |
FUNCTION {format.chapter.pages} |
| 831 |
{ chapter empty$ |
| 832 |
'format.pages |
| 833 |
{ type empty$ |
| 834 |
{ "chapter" } |
| 835 |
{ type "l" change.case$ } |
| 836 |
if$ |
| 837 |
chapter tie.or.space.connect |
| 838 |
pages empty$ |
| 839 |
'skip$ |
| 840 |
{ ", " * format.pages * } |
| 841 |
if$ |
| 842 |
} |
| 843 |
if$ |
| 844 |
} |
| 845 |
|
| 846 |
|
| 847 |
FUNCTION {format.in.ed.booktitle} |
| 848 |
{ booktitle empty$ |
| 849 |
{ "" } |
| 850 |
{ editor empty$ |
| 851 |
{ "In " booktitle emphasize * } |
| 852 |
{ "In " format.editors * ", " * booktitle emphasize * } |
| 853 |
if$ |
| 854 |
} |
| 855 |
if$ |
| 856 |
} |
| 857 |
|
| 858 |
|
| 859 |
FUNCTION {empty.misc.check} |
| 860 |
{ author empty$ title empty$ howpublished empty$ |
| 861 |
month empty$ year empty$ note empty$ |
| 862 |
and and and and and |
| 863 |
|
| 864 |
key empty$ not and |
| 865 |
|
| 866 |
{ "all relevant fields are empty in " cite$ * warning$ } |
| 867 |
'skip$ |
| 868 |
if$ |
| 869 |
} |
| 870 |
|
| 871 |
|
| 872 |
FUNCTION {format.thesis.type} |
| 873 |
{ type empty$ |
| 874 |
'skip$ |
| 875 |
{ pop$ |
| 876 |
type "t" change.case$ |
| 877 |
} |
| 878 |
if$ |
| 879 |
} |
| 880 |
|
| 881 |
|
| 882 |
FUNCTION {format.tr.number} |
| 883 |
{ type empty$ |
| 884 |
{ "Technical Report" } |
| 885 |
'type |
| 886 |
if$ |
| 887 |
number empty$ |
| 888 |
{ "t" change.case$ } |
| 889 |
{ number tie.or.space.connect } |
| 890 |
if$ |
| 891 |
} |
| 892 |
|
| 893 |
|
| 894 |
FUNCTION {format.article.crossref} |
| 895 |
{ key empty$ |
| 896 |
{ journal empty$ |
| 897 |
{ "need key or journal for " cite$ * " to crossref " * crossref * |
| 898 |
warning$ |
| 899 |
"" |
| 900 |
} |
| 901 |
{ "In {\em " journal * "\/}" * } |
| 902 |
if$ |
| 903 |
} |
| 904 |
{ "In " key * } |
| 905 |
if$ |
| 906 |
" \cite{" * crossref * "}" * |
| 907 |
} |
| 908 |
|
| 909 |
|
| 910 |
FUNCTION {format.crossref.editor} |
| 911 |
{ editor #1 "{vv~}{ll}" format.name$ |
| 912 |
editor num.names$ duplicate$ |
| 913 |
#2 > |
| 914 |
{ pop$ " et~al." * } |
| 915 |
{ #2 < |
| 916 |
'skip$ |
| 917 |
{ editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = |
| 918 |
{ " et~al." * } |
| 919 |
{ " and " * editor #2 "{vv~}{ll}" format.name$ * } |
| 920 |
if$ |
| 921 |
} |
| 922 |
if$ |
| 923 |
} |
| 924 |
if$ |
| 925 |
} |
| 926 |
|
| 927 |
|
| 928 |
FUNCTION {format.book.crossref} |
| 929 |
{ volume empty$ |
| 930 |
{ "empty volume in " cite$ * "'s crossref of " * crossref * warning$ |
| 931 |
"In " |
| 932 |
} |
| 933 |
{ "Volume" volume tie.or.space.connect |
| 934 |
" of " * |
| 935 |
} |
| 936 |
if$ |
| 937 |
editor empty$ |
| 938 |
editor field.or.null author field.or.null = |
| 939 |
or |
| 940 |
{ key empty$ |
| 941 |
{ series empty$ |
| 942 |
{ "need editor, key, or series for " cite$ * " to crossref " * |
| 943 |
crossref * warning$ |
| 944 |
"" * |
| 945 |
} |
| 946 |
{ "{\em " * series * "\/}" * } |
| 947 |
if$ |
| 948 |
} |
| 949 |
{ key * } |
| 950 |
if$ |
| 951 |
} |
| 952 |
{ format.crossref.editor * } |
| 953 |
if$ |
| 954 |
" \cite{" * crossref * "}" * |
| 955 |
} |
| 956 |
|
| 957 |
|
| 958 |
FUNCTION {format.incoll.inproc.crossref} |
| 959 |
{ editor empty$ |
| 960 |
editor field.or.null author field.or.null = |
| 961 |
or |
| 962 |
{ key empty$ |
| 963 |
{ booktitle empty$ |
| 964 |
{ "need editor, key, or booktitle for " cite$ * " to crossref " * |
| 965 |
crossref * warning$ |
| 966 |
"" |
| 967 |
} |
| 968 |
{ "In {\em " booktitle * "\/}" * } |
| 969 |
if$ |
| 970 |
} |
| 971 |
{ "In " key * } |
| 972 |
if$ |
| 973 |
} |
| 974 |
{ "In " format.crossref.editor * } |
| 975 |
if$ |
| 976 |
" \cite{" * crossref * "}" * |
| 977 |
} |
| 978 |
|
| 979 |
|
| 980 |
FUNCTION {article} |
| 981 |
{ output.bibitem |
| 982 |
format.authors "author" output.check |
| 983 |
new.block |
| 984 |
format.title "title" output.check |
| 985 |
new.block |
| 986 |
crossref missing$ |
| 987 |
{ journal emphasize "journal" output.check |
| 988 |
format.vol.num.pages output |
| 989 |
format.date "year" output.check |
| 990 |
} |
| 991 |
{ format.article.crossref output.nonnull |
| 992 |
format.pages output |
| 993 |
} |
| 994 |
if$ |
| 995 |
|
| 996 |
format.coden output |
| 997 |
|
| 998 |
|
| 999 |
format.isbn output |
| 1000 |
|
| 1001 |
|
| 1002 |
format.issn output |
| 1003 |
|
| 1004 |
|
| 1005 |
format.url output |
| 1006 |
|
| 1007 |
new.block |
| 1008 |
note output |
| 1009 |
fin.entry |
| 1010 |
} |
| 1011 |
|
| 1012 |
FUNCTION {book} |
| 1013 |
{ output.bibitem |
| 1014 |
author empty$ |
| 1015 |
{ format.editors "author and editor" output.check } |
| 1016 |
{ format.authors output.nonnull |
| 1017 |
crossref missing$ |
| 1018 |
{ "author and editor" editor either.or.check } |
| 1019 |
'skip$ |
| 1020 |
if$ |
| 1021 |
} |
| 1022 |
if$ |
| 1023 |
new.block |
| 1024 |
format.btitle "title" output.check |
| 1025 |
crossref missing$ |
| 1026 |
{ format.bvolume output |
| 1027 |
new.block |
| 1028 |
format.number.series output |
| 1029 |
new.sentence |
| 1030 |
publisher "publisher" output.check |
| 1031 |
address output |
| 1032 |
} |
| 1033 |
{ new.block |
| 1034 |
format.book.crossref output.nonnull |
| 1035 |
} |
| 1036 |
if$ |
| 1037 |
format.edition output |
| 1038 |
format.date "year" output.check |
| 1039 |
|
| 1040 |
format.coden output |
| 1041 |
|
| 1042 |
|
| 1043 |
format.isbn output |
| 1044 |
|
| 1045 |
|
| 1046 |
format.issn output |
| 1047 |
|
| 1048 |
|
| 1049 |
format.book.pages output |
| 1050 |
|
| 1051 |
|
| 1052 |
format.lccn output |
| 1053 |
|
| 1054 |
|
| 1055 |
format.price output |
| 1056 |
|
| 1057 |
|
| 1058 |
format.url output |
| 1059 |
|
| 1060 |
new.block |
| 1061 |
note output |
| 1062 |
fin.entry |
| 1063 |
} |
| 1064 |
|
| 1065 |
|
| 1066 |
FUNCTION {booklet} |
| 1067 |
{ output.bibitem |
| 1068 |
format.authors output |
| 1069 |
new.block |
| 1070 |
format.title "title" output.check |
| 1071 |
howpublished address new.block.checkb |
| 1072 |
howpublished output |
| 1073 |
address output |
| 1074 |
format.date output |
| 1075 |
|
| 1076 |
format.coden output |
| 1077 |
|
| 1078 |
|
| 1079 |
format.isbn output |
| 1080 |
|
| 1081 |
|
| 1082 |
format.issn output |
| 1083 |
|
| 1084 |
|
| 1085 |
format.book.pages output |
| 1086 |
|
| 1087 |
|
| 1088 |
format.lccn output |
| 1089 |
|
| 1090 |
|
| 1091 |
format.price output |
| 1092 |
|
| 1093 |
|
| 1094 |
format.url output |
| 1095 |
|
| 1096 |
new.block |
| 1097 |
note output |
| 1098 |
fin.entry |
| 1099 |
} |
| 1100 |
|
| 1101 |
|
| 1102 |
|
| 1103 |
FUNCTION {inbook} |
| 1104 |
{ output.bibitem |
| 1105 |
author empty$ |
| 1106 |
{ format.editors "author and editor" output.check } |
| 1107 |
{ format.authors output.nonnull |
| 1108 |
crossref missing$ |
| 1109 |
{ "author and editor" editor either.or.check } |
| 1110 |
'skip$ |
| 1111 |
if$ |
| 1112 |
} |
| 1113 |
if$ |
| 1114 |
new.block |
| 1115 |
format.btitle "title" output.check |
| 1116 |
crossref missing$ |
| 1117 |
{ format.bvolume output |
| 1118 |
format.chapter.pages "chapter and pages" output.check |
| 1119 |
new.block |
| 1120 |
format.number.series output |
| 1121 |
new.sentence |
| 1122 |
publisher "publisher" output.check |
| 1123 |
address output |
| 1124 |
} |
| 1125 |
{ format.chapter.pages "chapter and pages" output.check |
| 1126 |
new.block |
| 1127 |
format.book.crossref output.nonnull |
| 1128 |
} |
| 1129 |
if$ |
| 1130 |
format.edition output |
| 1131 |
format.date "year" output.check |
| 1132 |
|
| 1133 |
format.coden output |
| 1134 |
|
| 1135 |
|
| 1136 |
format.isbn output |
| 1137 |
|
| 1138 |
|
| 1139 |
format.issn output |
| 1140 |
|
| 1141 |
|
| 1142 |
format.lccn output |
| 1143 |
|
| 1144 |
|
| 1145 |
format.price output |
| 1146 |
|
| 1147 |
|
| 1148 |
format.url output |
| 1149 |
|
| 1150 |
new.block |
| 1151 |
note output |
| 1152 |
fin.entry |
| 1153 |
} |
| 1154 |
|
| 1155 |
|
| 1156 |
FUNCTION {incollection} |
| 1157 |
{ output.bibitem |
| 1158 |
format.authors "author" output.check |
| 1159 |
new.block |
| 1160 |
format.title "title" output.check |
| 1161 |
new.block |
| 1162 |
crossref missing$ |
| 1163 |
{ format.in.ed.booktitle "booktitle" output.check |
| 1164 |
format.bvolume output |
| 1165 |
format.number.series output |
| 1166 |
format.chapter.pages output |
| 1167 |
new.sentence |
| 1168 |
publisher "publisher" output.check |
| 1169 |
address output |
| 1170 |
format.edition output |
| 1171 |
format.date "year" output.check |
| 1172 |
} |
| 1173 |
{ format.incoll.inproc.crossref output.nonnull |
| 1174 |
format.chapter.pages output |
| 1175 |
} |
| 1176 |
if$ |
| 1177 |
|
| 1178 |
format.coden output |
| 1179 |
|
| 1180 |
|
| 1181 |
format.isbn output |
| 1182 |
|
| 1183 |
|
| 1184 |
format.issn output |
| 1185 |
|
| 1186 |
|
| 1187 |
format.lccn output |
| 1188 |
|
| 1189 |
|
| 1190 |
format.price output |
| 1191 |
|
| 1192 |
|
| 1193 |
format.url output |
| 1194 |
|
| 1195 |
new.block |
| 1196 |
note output |
| 1197 |
fin.entry |
| 1198 |
} |
| 1199 |
|
| 1200 |
|
| 1201 |
FUNCTION {inproceedings} |
| 1202 |
{ output.bibitem |
| 1203 |
format.authors "author" output.check |
| 1204 |
new.block |
| 1205 |
format.title "title" output.check |
| 1206 |
new.block |
| 1207 |
crossref missing$ |
| 1208 |
{ format.in.ed.booktitle "booktitle" output.check |
| 1209 |
format.bvolume output |
| 1210 |
format.number.series output |
| 1211 |
format.pages output |
| 1212 |
address empty$ |
| 1213 |
{ organization publisher new.sentence.checkb |
| 1214 |
organization output |
| 1215 |
publisher "publisher" output.check |
| 1216 |
format.date "year" output.check |
| 1217 |
} |
| 1218 |
{ new.sentence |
| 1219 |
organization output |
| 1220 |
publisher "publisher" output.check |
| 1221 |
address output.nonnull |
| 1222 |
format.date "year" output.check |
| 1223 |
} |
| 1224 |
if$ |
| 1225 |
} |
| 1226 |
{ format.incoll.inproc.crossref output.nonnull |
| 1227 |
format.pages output |
| 1228 |
} |
| 1229 |
if$ |
| 1230 |
|
| 1231 |
format.coden output |
| 1232 |
|
| 1233 |
|
| 1234 |
format.isbn output |
| 1235 |
|
| 1236 |
|
| 1237 |
format.issn output |
| 1238 |
|
| 1239 |
|
| 1240 |
format.lccn output |
| 1241 |
|
| 1242 |
|
| 1243 |
format.price output |
| 1244 |
|
| 1245 |
|
| 1246 |
format.url output |
| 1247 |
|
| 1248 |
new.block |
| 1249 |
note output |
| 1250 |
fin.entry |
| 1251 |
} |
| 1252 |
|
| 1253 |
|
| 1254 |
FUNCTION {conference} { inproceedings } |
| 1255 |
|
| 1256 |
|
| 1257 |
FUNCTION {manual} |
| 1258 |
{ output.bibitem |
| 1259 |
author empty$ |
| 1260 |
{ organization empty$ |
| 1261 |
'skip$ |
| 1262 |
{ organization output.nonnull |
| 1263 |
address output |
| 1264 |
} |
| 1265 |
if$ |
| 1266 |
} |
| 1267 |
{ format.authors output.nonnull } |
| 1268 |
if$ |
| 1269 |
new.block |
| 1270 |
format.btitle "title" output.check |
| 1271 |
author empty$ |
| 1272 |
{ organization empty$ |
| 1273 |
{ address new.block.checka |
| 1274 |
address output |
| 1275 |
} |
| 1276 |
'skip$ |
| 1277 |
if$ |
| 1278 |
} |
| 1279 |
{ organization address new.block.checkb |
| 1280 |
organization output |
| 1281 |
address output |
| 1282 |
} |
| 1283 |
if$ |
| 1284 |
format.edition output |
| 1285 |
format.date output |
| 1286 |
|
| 1287 |
format.book.pages output |
| 1288 |
|
| 1289 |
|
| 1290 |
format.price output |
| 1291 |
|
| 1292 |
|
| 1293 |
format.url output |
| 1294 |
|
| 1295 |
new.block |
| 1296 |
note output |
| 1297 |
fin.entry |
| 1298 |
} |
| 1299 |
|
| 1300 |
|
| 1301 |
FUNCTION {mastersthesis} |
| 1302 |
{ output.bibitem |
| 1303 |
format.authors "author" output.check |
| 1304 |
new.block |
| 1305 |
format.title "title" output.check |
| 1306 |
new.block |
| 1307 |
"Master's thesis" format.thesis.type output.nonnull |
| 1308 |
school "school" output.check |
| 1309 |
address output |
| 1310 |
format.date "year" output.check |
| 1311 |
|
| 1312 |
format.book.pages output |
| 1313 |
|
| 1314 |
|
| 1315 |
format.url output |
| 1316 |
|
| 1317 |
new.block |
| 1318 |
note output |
| 1319 |
fin.entry |
| 1320 |
} |
| 1321 |
|
| 1322 |
|
| 1323 |
FUNCTION {misc} |
| 1324 |
{ output.bibitem |
| 1325 |
format.authors output |
| 1326 |
title howpublished new.block.checkb |
| 1327 |
format.title output |
| 1328 |
howpublished new.block.checka |
| 1329 |
howpublished output |
| 1330 |
format.date output |
| 1331 |
|
| 1332 |
format.coden output |
| 1333 |
|
| 1334 |
|
| 1335 |
format.isbn output |
| 1336 |
|
| 1337 |
|
| 1338 |
format.issn output |
| 1339 |
|
| 1340 |
|
| 1341 |
format.price output |
| 1342 |
|
| 1343 |
|
| 1344 |
format.url output |
| 1345 |
|
| 1346 |
new.block |
| 1347 |
note output |
| 1348 |
fin.entry |
| 1349 |
empty.misc.check |
| 1350 |
} |
| 1351 |
|
| 1352 |
|
| 1353 |
FUNCTION {phdthesis} |
| 1354 |
{ output.bibitem |
| 1355 |
format.authors "author" output.check |
| 1356 |
new.block |
| 1357 |
format.btitle "title" output.check |
| 1358 |
new.block |
| 1359 |
"PhD thesis" format.thesis.type output.nonnull |
| 1360 |
school "school" output.check |
| 1361 |
address output |
| 1362 |
format.date "year" output.check |
| 1363 |
|
| 1364 |
format.book.pages output |
| 1365 |
|
| 1366 |
|
| 1367 |
format.url output |
| 1368 |
|
| 1369 |
new.block |
| 1370 |
note output |
| 1371 |
fin.entry |
| 1372 |
} |
| 1373 |
|
| 1374 |
|
| 1375 |
FUNCTION {periodical} |
| 1376 |
{ output.bibitem |
| 1377 |
editor empty$ |
| 1378 |
{ organization output } |
| 1379 |
{ format.editors output.nonnull } |
| 1380 |
if$ |
| 1381 |
new.block |
| 1382 |
title emphasize "title" output.check |
| 1383 |
format.vol.num.pages output |
| 1384 |
format.date output |
| 1385 |
|
| 1386 |
format.coden output |
| 1387 |
|
| 1388 |
|
| 1389 |
format.isbn output |
| 1390 |
|
| 1391 |
|
| 1392 |
format.issn output |
| 1393 |
|
| 1394 |
|
| 1395 |
format.price output |
| 1396 |
|
| 1397 |
|
| 1398 |
format.url output |
| 1399 |
|
| 1400 |
new.sentence |
| 1401 |
publisher output |
| 1402 |
address output |
| 1403 |
howpublished new.block.checka |
| 1404 |
howpublished output |
| 1405 |
new.block |
| 1406 |
note output |
| 1407 |
fin.entry |
| 1408 |
} |
| 1409 |
|
| 1410 |
|
| 1411 |
FUNCTION {proceedings} |
| 1412 |
{ output.bibitem |
| 1413 |
editor empty$ |
| 1414 |
{ organization output } |
| 1415 |
{ format.editors output.nonnull } |
| 1416 |
if$ |
| 1417 |
new.block |
| 1418 |
format.btitle "title" output.check |
| 1419 |
format.bvolume output |
| 1420 |
format.number.series output |
| 1421 |
address empty$ |
| 1422 |
{ editor empty$ |
| 1423 |
{ publisher new.sentence.checka } |
| 1424 |
{ organization publisher new.sentence.checkb |
| 1425 |
organization output |
| 1426 |
} |
| 1427 |
if$ |
| 1428 |
publisher "publisher" output.check %%% <- new check for missing |
| 1429 |
format.date "year" output.check |
| 1430 |
} |
| 1431 |
{ new.sentence |
| 1432 |
editor empty$ |
| 1433 |
'skip$ |
| 1434 |
{ organization output } |
| 1435 |
if$ |
| 1436 |
publisher "publisher" output.check |
| 1437 |
address output.nonnull |
| 1438 |
format.date "year" output.check |
| 1439 |
} |
| 1440 |
if$ |
| 1441 |
|
| 1442 |
format.coden output |
| 1443 |
|
| 1444 |
|
| 1445 |
format.isbn output |
| 1446 |
|
| 1447 |
|
| 1448 |
format.issn output |
| 1449 |
|
| 1450 |
|
| 1451 |
format.lccn output |
| 1452 |
|
| 1453 |
|
| 1454 |
format.price output |
| 1455 |
|
| 1456 |
|
| 1457 |
format.url output |
| 1458 |
|
| 1459 |
new.block |
| 1460 |
note output |
| 1461 |
fin.entry |
| 1462 |
} |
| 1463 |
|
| 1464 |
|
| 1465 |
FUNCTION {techreport} |
| 1466 |
{ output.bibitem |
| 1467 |
format.authors "author" output.check |
| 1468 |
new.block |
| 1469 |
format.title "title" output.check |
| 1470 |
new.block |
| 1471 |
format.tr.number output.nonnull |
| 1472 |
institution "institution" output.check |
| 1473 |
address output |
| 1474 |
format.date "year" output.check |
| 1475 |
|
| 1476 |
format.isbn output % NB: TechReports occasionally have ISBNs |
| 1477 |
|
| 1478 |
|
| 1479 |
format.book.pages output |
| 1480 |
|
| 1481 |
|
| 1482 |
format.price output |
| 1483 |
|
| 1484 |
|
| 1485 |
format.url output |
| 1486 |
|
| 1487 |
new.block |
| 1488 |
note output |
| 1489 |
fin.entry |
| 1490 |
} |
| 1491 |
|
| 1492 |
|
| 1493 |
FUNCTION {unpublished} |
| 1494 |
{ output.bibitem |
| 1495 |
format.authors "author" output.check |
| 1496 |
new.block |
| 1497 |
format.title "title" output.check |
| 1498 |
new.block |
| 1499 |
note "note" output.check |
| 1500 |
format.date output |
| 1501 |
|
| 1502 |
format.url output |
| 1503 |
|
| 1504 |
fin.entry |
| 1505 |
} |
| 1506 |
|
| 1507 |
|
| 1508 |
FUNCTION {default.type} { misc } |
| 1509 |
|
| 1510 |
|
| 1511 |
|
| 1512 |
|
| 1513 |
MACRO {jan} {"Jan."} |
| 1514 |
|
| 1515 |
MACRO {feb} {"Feb."} |
| 1516 |
|
| 1517 |
MACRO {mar} {"Mar."} |
| 1518 |
|
| 1519 |
MACRO {apr} {"Apr."} |
| 1520 |
|
| 1521 |
MACRO {may} {"May"} |
| 1522 |
|
| 1523 |
MACRO {jun} {"June"} |
| 1524 |
|
| 1525 |
MACRO {jul} {"July"} |
| 1526 |
|
| 1527 |
MACRO {aug} {"Aug."} |
| 1528 |
|
| 1529 |
MACRO {sep} {"Sept."} |
| 1530 |
|
| 1531 |
MACRO {oct} {"Oct."} |
| 1532 |
|
| 1533 |
MACRO {nov} {"Nov."} |
| 1534 |
|
| 1535 |
MACRO {dec} {"Dec."} |
| 1536 |
|
| 1537 |
|
| 1538 |
|
| 1539 |
|
| 1540 |
|
| 1541 |
|
| 1542 |
MACRO {acmcs} {"ACM Comput. Surv."} |
| 1543 |
|
| 1544 |
MACRO {acta} {"Acta Inf."} |
| 1545 |
|
| 1546 |
MACRO {cacm} {"Commun. ACM"} |
| 1547 |
|
| 1548 |
MACRO {ibmjrd} {"IBM J. Res. Dev."} |
| 1549 |
|
| 1550 |
MACRO {ibmsj} {"IBM Syst.~J."} |
| 1551 |
|
| 1552 |
MACRO {ieeese} {"IEEE Trans. Softw. Eng."} |
| 1553 |
|
| 1554 |
MACRO {ieeetc} {"IEEE Trans. Comput."} |
| 1555 |
|
| 1556 |
MACRO {ieeetcad} |
| 1557 |
{"IEEE Trans. Comput.-Aided Design Integrated Circuits"} |
| 1558 |
|
| 1559 |
MACRO {ipl} {"Inf. Process. Lett."} |
| 1560 |
|
| 1561 |
MACRO {jacm} {"J.~ACM"} |
| 1562 |
|
| 1563 |
MACRO {jcss} {"J.~Comput. Syst. Sci."} |
| 1564 |
|
| 1565 |
MACRO {scp} {"Sci. Comput. Programming"} |
| 1566 |
|
| 1567 |
MACRO {sicomp} {"SIAM J. Comput."} |
| 1568 |
|
| 1569 |
MACRO {tocs} {"ACM Trans. Comput. Syst."} |
| 1570 |
|
| 1571 |
MACRO {tods} {"ACM Trans. Database Syst."} |
| 1572 |
|
| 1573 |
MACRO {tog} {"ACM Trans. Gr."} |
| 1574 |
|
| 1575 |
MACRO {toms} {"ACM Trans. Math. Softw."} |
| 1576 |
|
| 1577 |
MACRO {toois} {"ACM Trans. Office Inf. Syst."} |
| 1578 |
|
| 1579 |
MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."} |
| 1580 |
|
| 1581 |
MACRO {tcs} {"Theoretical Comput. Sci."} |
| 1582 |
|
| 1583 |
|
| 1584 |
|
| 1585 |
|
| 1586 |
READ |
| 1587 |
|
| 1588 |
|
| 1589 |
|
| 1590 |
|
| 1591 |
FUNCTION {sortify} |
| 1592 |
{ purify$ |
| 1593 |
"l" change.case$ |
| 1594 |
} |
| 1595 |
|
| 1596 |
INTEGERS { len } |
| 1597 |
|
| 1598 |
FUNCTION {chop.word} |
| 1599 |
{ 's := |
| 1600 |
'len := |
| 1601 |
s #1 len substring$ = |
| 1602 |
{ s len #1 + global.max$ substring$ } |
| 1603 |
's |
| 1604 |
if$ |
| 1605 |
} |
| 1606 |
|
| 1607 |
|
| 1608 |
|
| 1609 |
|
| 1610 |
|
| 1611 |
|
| 1612 |
|
| 1613 |
|
| 1614 |
|
| 1615 |
FUNCTION {sort.format.names} |
| 1616 |
{ 's := |
| 1617 |
#1 'nameptr := |
| 1618 |
"" |
| 1619 |
s num.names$ 'numnames := |
| 1620 |
numnames 'namesleft := |
| 1621 |
{ namesleft #0 > } |
| 1622 |
{ nameptr #1 > |
| 1623 |
{ " " * } |
| 1624 |
'skip$ |
| 1625 |
if$ |
| 1626 |
|
| 1627 |
s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't := |
| 1628 |
|
| 1629 |
nameptr numnames = t "others" = and |
| 1630 |
{ "et al" * } |
| 1631 |
{ t sortify * } |
| 1632 |
if$ |
| 1633 |
nameptr #1 + 'nameptr := |
| 1634 |
namesleft #1 - 'namesleft := |
| 1635 |
} |
| 1636 |
while$ |
| 1637 |
} |
| 1638 |
|
| 1639 |
|
| 1640 |
FUNCTION {sort.format.title} |
| 1641 |
{ 't := |
| 1642 |
"A " #2 |
| 1643 |
"An " #3 |
| 1644 |
"The " #4 t chop.word |
| 1645 |
chop.word |
| 1646 |
chop.word |
| 1647 |
sortify |
| 1648 |
#1 global.max$ substring$ |
| 1649 |
} |
| 1650 |
|
| 1651 |
|
| 1652 |
FUNCTION {author.sort} |
| 1653 |
{ author empty$ |
| 1654 |
{ key empty$ |
| 1655 |
{ "to sort, need author or key in " cite$ * warning$ |
| 1656 |
"" |
| 1657 |
} |
| 1658 |
{ key sortify } |
| 1659 |
if$ |
| 1660 |
} |
| 1661 |
{ author sort.format.names } |
| 1662 |
if$ |
| 1663 |
} |
| 1664 |
|
| 1665 |
FUNCTION {author.editor.sort} |
| 1666 |
{ author empty$ |
| 1667 |
{ editor empty$ |
| 1668 |
{ key empty$ |
| 1669 |
{ "to sort, need author, editor, or key in " cite$ * warning$ |
| 1670 |
"" |
| 1671 |
} |
| 1672 |
{ key sortify } |
| 1673 |
if$ |
| 1674 |
} |
| 1675 |
{ editor sort.format.names } |
| 1676 |
if$ |
| 1677 |
} |
| 1678 |
{ author sort.format.names } |
| 1679 |
if$ |
| 1680 |
} |
| 1681 |
|
| 1682 |
FUNCTION {author.organization.sort} |
| 1683 |
{ author empty$ |
| 1684 |
{ organization empty$ |
| 1685 |
{ key empty$ |
| 1686 |
{ "to sort, need author, organization, or key in " cite$ * warning$ |
| 1687 |
"" |
| 1688 |
} |
| 1689 |
{ key sortify } |
| 1690 |
if$ |
| 1691 |
} |
| 1692 |
{ "The " #4 organization chop.word sortify } |
| 1693 |
if$ |
| 1694 |
} |
| 1695 |
{ author sort.format.names } |
| 1696 |
if$ |
| 1697 |
} |
| 1698 |
|
| 1699 |
FUNCTION {editor.organization.sort} |
| 1700 |
{ editor empty$ |
| 1701 |
{ organization empty$ |
| 1702 |
{ key empty$ |
| 1703 |
{ "to sort, need editor, organization, or key in " cite$ * warning$ |
| 1704 |
"" |
| 1705 |
} |
| 1706 |
{ key sortify } |
| 1707 |
if$ |
| 1708 |
} |
| 1709 |
{ "The " #4 organization chop.word sortify } |
| 1710 |
if$ |
| 1711 |
} |
| 1712 |
{ editor sort.format.names } |
| 1713 |
if$ |
| 1714 |
} |
| 1715 |
|
| 1716 |
|
| 1717 |
FUNCTION {presort} |
| 1718 |
|
| 1719 |
{ type$ "book" = |
| 1720 |
|
| 1721 |
type$ "inbook" = |
| 1722 |
or |
| 1723 |
'author.editor.sort |
| 1724 |
{ type$ "proceedings" = |
| 1725 |
'editor.organization.sort |
| 1726 |
{ type$ "manual" = |
| 1727 |
'author.organization.sort |
| 1728 |
'author.sort |
| 1729 |
if$ |
| 1730 |
} |
| 1731 |
if$ |
| 1732 |
} |
| 1733 |
if$ |
| 1734 |
|
| 1735 |
" " |
| 1736 |
* |
| 1737 |
year field.or.null sortify |
| 1738 |
* |
| 1739 |
" " |
| 1740 |
* |
| 1741 |
title field.or.null |
| 1742 |
sort.format.title |
| 1743 |
* |
| 1744 |
#1 entry.max$ substring$ |
| 1745 |
'sort.key$ := |
| 1746 |
} |
| 1747 |
|
| 1748 |
ITERATE {presort} |
| 1749 |
|
| 1750 |
|
| 1751 |
SORT |
| 1752 |
|
| 1753 |
|
| 1754 |
|
| 1755 |
|
| 1756 |
|
| 1757 |
|
| 1758 |
|
| 1759 |
STRINGS { longest.label } |
| 1760 |
|
| 1761 |
INTEGERS { number.label longest.label.width } |
| 1762 |
|
| 1763 |
FUNCTION {initialize.longest.label} |
| 1764 |
{ "" 'longest.label := |
| 1765 |
#1 'number.label := |
| 1766 |
#0 'longest.label.width := |
| 1767 |
} |
| 1768 |
|
| 1769 |
FUNCTION {longest.label.pass} |
| 1770 |
{ number.label int.to.str$ 'label := |
| 1771 |
number.label #1 + 'number.label := |
| 1772 |
label width$ longest.label.width > |
| 1773 |
{ label 'longest.label := |
| 1774 |
label width$ 'longest.label.width := |
| 1775 |
} |
| 1776 |
'skip$ |
| 1777 |
if$ |
| 1778 |
} |
| 1779 |
|
| 1780 |
EXECUTE {initialize.longest.label} |
| 1781 |
|
| 1782 |
ITERATE {longest.label.pass} |
| 1783 |
|
| 1784 |
|
| 1785 |
|
| 1786 |
|
| 1787 |
FUNCTION {begin.bib} |
| 1788 |
|
| 1789 |
{ preamble$ empty$ |
| 1790 |
|
| 1791 |
'skip$ |
| 1792 |
{ preamble$ write$ newline$ } |
| 1793 |
if$ |
| 1794 |
"\begin{thebibliography}{" longest.label * "}" * write$ newline$ |
| 1795 |
|
| 1796 |
"\ifx \showCODEN \undefined \def \showCODEN #1{CODEN #1} \fi" write$ newline$ |
| 1797 |
|
| 1798 |
|
| 1799 |
"\ifx \showISBN \undefined \def \showISBN #1{ISBN #1} \fi" write$ newline$ |
| 1800 |
|
| 1801 |
|
| 1802 |
"\ifx \showISSN \undefined \def \showISSN #1{ISSN #1} \fi" write$ newline$ |
| 1803 |
|
| 1804 |
|
| 1805 |
"\ifx \showLCCN \undefined \def \showLCCN #1{LCCN #1} \fi" write$ newline$ |
| 1806 |
|
| 1807 |
|
| 1808 |
"\ifx \showPRICE \undefined \def \showPRICE #1{#1} \fi" write$ newline$ |
| 1809 |
|
| 1810 |
|
| 1811 |
"\ifx \showURL \undefined \def \showURL {URL } \fi" write$ newline$ |
| 1812 |
"\ifx \path \undefined \input path.sty \fi" write$ newline$ |
| 1813 |
"\ifx \ifshowURL \undefined" write$ newline$ |
| 1814 |
" \newif \ifshowURL" write$ newline$ |
| 1815 |
" \showURLtrue" write$ newline$ |
| 1816 |
"\fi" write$ newline$ |
| 1817 |
|
| 1818 |
} |
| 1819 |
|
| 1820 |
EXECUTE {begin.bib} |
| 1821 |
|
| 1822 |
EXECUTE {init.state.consts} |
| 1823 |
|
| 1824 |
|
| 1825 |
ITERATE {call.type$} |
| 1826 |
|
| 1827 |
|
| 1828 |
FUNCTION {end.bib} |
| 1829 |
{ newline$ |
| 1830 |
"\end{thebibliography}" write$ newline$ |
| 1831 |
} |
| 1832 |
|
| 1833 |
EXECUTE {end.bib} |