1 | % BibTeX bibliography style `splncs_srt' |
---|
2 | |
---|
3 | % An attempt to match the bibliography style required for use with |
---|
4 | % numbered references in Springer Verlag's "Lecture Notes in Computer |
---|
5 | % Science" series. (See Springer's documentation for llncs.sty for |
---|
6 | % more details of the suggested reference format.) Note that this |
---|
7 | % file will not work for author-year style citations. |
---|
8 | |
---|
9 | % Use \documentclass{llncs} and \bibliographystyle{splncs_srt}, and cite |
---|
10 | % a reference with (e.g.) \cite{smith77} to get a "[1]" in the text. |
---|
11 | |
---|
12 | % Copyright (C) 1999 Jason Noble. |
---|
13 | % Last updated: Friday 07 March 2006, 08:04:42 Frank Holzwarth, Springer |
---|
14 | % Last modification: added sorting feature from plain.bst |
---|
15 | % done by Tobias Heindel, FMI Uni-Stuttgart, June 13th, 2006 |
---|
16 | % |
---|
17 | % Originally based on the BibTeX standard bibliography style `unsrt' |
---|
18 | % |
---|
19 | |
---|
20 | ENTRY |
---|
21 | { address |
---|
22 | author |
---|
23 | booktitle |
---|
24 | chapter |
---|
25 | edition |
---|
26 | editor |
---|
27 | howpublished |
---|
28 | institution |
---|
29 | journal |
---|
30 | key |
---|
31 | month |
---|
32 | note |
---|
33 | number |
---|
34 | organization |
---|
35 | pages |
---|
36 | publisher |
---|
37 | school |
---|
38 | series |
---|
39 | title |
---|
40 | type |
---|
41 | volume |
---|
42 | year |
---|
43 | } |
---|
44 | {} |
---|
45 | { label } |
---|
46 | |
---|
47 | INTEGERS { output.state before.all mid.sentence after.sentence |
---|
48 | after.block after.authors between.elements} |
---|
49 | |
---|
50 | FUNCTION {init.state.consts} |
---|
51 | { #0 'before.all := |
---|
52 | #1 'mid.sentence := |
---|
53 | #2 'after.sentence := |
---|
54 | #3 'after.block := |
---|
55 | #4 'after.authors := |
---|
56 | #5 'between.elements := |
---|
57 | } |
---|
58 | |
---|
59 | STRINGS { s t } |
---|
60 | |
---|
61 | FUNCTION {output.nonnull} |
---|
62 | { 's := |
---|
63 | output.state mid.sentence = |
---|
64 | { " " * write$ } |
---|
65 | { output.state after.block = |
---|
66 | { add.period$ write$ |
---|
67 | newline$ |
---|
68 | "\newblock " write$ |
---|
69 | } |
---|
70 | { |
---|
71 | output.state after.authors = |
---|
72 | { ": " * write$ |
---|
73 | newline$ |
---|
74 | "\newblock " write$ |
---|
75 | } |
---|
76 | { output.state between.elements = |
---|
77 | { ", " * write$ } |
---|
78 | { output.state before.all = |
---|
79 | 'write$ |
---|
80 | { add.period$ " " * write$ } |
---|
81 | if$ |
---|
82 | } |
---|
83 | if$ |
---|
84 | } |
---|
85 | if$ |
---|
86 | } |
---|
87 | if$ |
---|
88 | mid.sentence 'output.state := |
---|
89 | } |
---|
90 | if$ |
---|
91 | s |
---|
92 | } |
---|
93 | |
---|
94 | FUNCTION {output} |
---|
95 | { duplicate$ empty$ |
---|
96 | 'pop$ |
---|
97 | 'output.nonnull |
---|
98 | if$ |
---|
99 | } |
---|
100 | |
---|
101 | FUNCTION {output.check} |
---|
102 | { 't := |
---|
103 | duplicate$ empty$ |
---|
104 | { pop$ "empty " t * " in " * cite$ * warning$ } |
---|
105 | 'output.nonnull |
---|
106 | if$ |
---|
107 | } |
---|
108 | |
---|
109 | FUNCTION {output.bibitem} |
---|
110 | { newline$ |
---|
111 | "\bibitem{" write$ |
---|
112 | cite$ write$ |
---|
113 | "}" write$ |
---|
114 | newline$ |
---|
115 | "" |
---|
116 | before.all 'output.state := |
---|
117 | } |
---|
118 | |
---|
119 | FUNCTION {fin.entry} |
---|
120 | { write$ |
---|
121 | newline$ |
---|
122 | } |
---|
123 | |
---|
124 | FUNCTION {new.block} |
---|
125 | { output.state before.all = |
---|
126 | 'skip$ |
---|
127 | { after.block 'output.state := } |
---|
128 | if$ |
---|
129 | } |
---|
130 | |
---|
131 | FUNCTION {stupid.colon} |
---|
132 | { after.authors 'output.state := } |
---|
133 | |
---|
134 | FUNCTION {insert.comma} |
---|
135 | { output.state before.all = |
---|
136 | 'skip$ |
---|
137 | { between.elements 'output.state := } |
---|
138 | if$ |
---|
139 | } |
---|
140 | |
---|
141 | FUNCTION {new.sentence} |
---|
142 | { output.state after.block = |
---|
143 | 'skip$ |
---|
144 | { output.state before.all = |
---|
145 | 'skip$ |
---|
146 | { after.sentence 'output.state := } |
---|
147 | if$ |
---|
148 | } |
---|
149 | if$ |
---|
150 | } |
---|
151 | |
---|
152 | FUNCTION {not} |
---|
153 | { { #0 } |
---|
154 | { #1 } |
---|
155 | if$ |
---|
156 | } |
---|
157 | |
---|
158 | FUNCTION {and} |
---|
159 | { 'skip$ |
---|
160 | { pop$ #0 } |
---|
161 | if$ |
---|
162 | } |
---|
163 | |
---|
164 | FUNCTION {or} |
---|
165 | { { pop$ #1 } |
---|
166 | 'skip$ |
---|
167 | if$ |
---|
168 | } |
---|
169 | |
---|
170 | FUNCTION {new.block.checka} |
---|
171 | { empty$ |
---|
172 | 'skip$ |
---|
173 | 'new.block |
---|
174 | if$ |
---|
175 | } |
---|
176 | |
---|
177 | FUNCTION {new.block.checkb} |
---|
178 | { empty$ |
---|
179 | swap$ empty$ |
---|
180 | and |
---|
181 | 'skip$ |
---|
182 | 'new.block |
---|
183 | if$ |
---|
184 | } |
---|
185 | |
---|
186 | FUNCTION {new.sentence.checka} |
---|
187 | { empty$ |
---|
188 | 'skip$ |
---|
189 | 'new.sentence |
---|
190 | if$ |
---|
191 | } |
---|
192 | |
---|
193 | FUNCTION {new.sentence.checkb} |
---|
194 | { empty$ |
---|
195 | swap$ empty$ |
---|
196 | and |
---|
197 | 'skip$ |
---|
198 | 'new.sentence |
---|
199 | if$ |
---|
200 | } |
---|
201 | |
---|
202 | FUNCTION {field.or.null} |
---|
203 | { duplicate$ empty$ |
---|
204 | { pop$ "" } |
---|
205 | 'skip$ |
---|
206 | if$ |
---|
207 | } |
---|
208 | |
---|
209 | FUNCTION {emphasize} |
---|
210 | { duplicate$ empty$ |
---|
211 | { pop$ "" } |
---|
212 | { "" swap$ * "" * } |
---|
213 | if$ |
---|
214 | } |
---|
215 | |
---|
216 | FUNCTION {bold} |
---|
217 | { duplicate$ empty$ |
---|
218 | { pop$ "" } |
---|
219 | { "\textbf{" swap$ * "}" * } |
---|
220 | if$ |
---|
221 | } |
---|
222 | |
---|
223 | FUNCTION {parens} |
---|
224 | { duplicate$ empty$ |
---|
225 | { pop$ "" } |
---|
226 | { "(" swap$ * ")" * } |
---|
227 | if$ |
---|
228 | } |
---|
229 | |
---|
230 | INTEGERS { nameptr namesleft numnames } |
---|
231 | |
---|
232 | FUNCTION {format.springer.names} |
---|
233 | { 's := |
---|
234 | #1 'nameptr := |
---|
235 | s num.names$ 'numnames := |
---|
236 | numnames 'namesleft := |
---|
237 | { namesleft #0 > } |
---|
238 | { s nameptr "{vv~}{ll}{, jj}{, f{.}.}" format.name$ 't := |
---|
239 | nameptr #1 > |
---|
240 | { namesleft #1 > |
---|
241 | { ", " * t * } |
---|
242 | { numnames #1 > |
---|
243 | { ", " * } |
---|
244 | 'skip$ |
---|
245 | if$ |
---|
246 | t "others" = |
---|
247 | { " et~al." * } |
---|
248 | { "" * t * } |
---|
249 | if$ |
---|
250 | } |
---|
251 | if$ |
---|
252 | } |
---|
253 | 't |
---|
254 | if$ |
---|
255 | nameptr #1 + 'nameptr := |
---|
256 | namesleft #1 - 'namesleft := |
---|
257 | } |
---|
258 | while$ |
---|
259 | } |
---|
260 | |
---|
261 | FUNCTION {format.names} |
---|
262 | { 's := |
---|
263 | #1 'nameptr := |
---|
264 | s num.names$ 'numnames := |
---|
265 | numnames 'namesleft := |
---|
266 | { namesleft #0 > } |
---|
267 | { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := |
---|
268 | nameptr #1 > |
---|
269 | { namesleft #1 > |
---|
270 | { ", " * t * } |
---|
271 | { numnames #2 > |
---|
272 | { "," * } |
---|
273 | 'skip$ |
---|
274 | if$ |
---|
275 | t "others" = |
---|
276 | { " et~al." * } |
---|
277 | { " \& " * t * } |
---|
278 | if$ |
---|
279 | } |
---|
280 | if$ |
---|
281 | } |
---|
282 | 't |
---|
283 | if$ |
---|
284 | nameptr #1 + 'nameptr := |
---|
285 | namesleft #1 - 'namesleft := |
---|
286 | } |
---|
287 | while$ |
---|
288 | } |
---|
289 | |
---|
290 | FUNCTION {format.authors} |
---|
291 | { author empty$ |
---|
292 | { "" } |
---|
293 | { author format.springer.names } |
---|
294 | if$ |
---|
295 | } |
---|
296 | |
---|
297 | FUNCTION {format.editors} |
---|
298 | { editor empty$ |
---|
299 | { "" } |
---|
300 | { editor format.springer.names |
---|
301 | editor num.names$ #1 > |
---|
302 | { ", eds." * } |
---|
303 | { ", ed." * } |
---|
304 | if$ |
---|
305 | } |
---|
306 | if$ |
---|
307 | } |
---|
308 | |
---|
309 | FUNCTION {format.title} |
---|
310 | { title empty$ |
---|
311 | { "" } |
---|
312 | { title "t" change.case$ } |
---|
313 | if$ |
---|
314 | } |
---|
315 | |
---|
316 | FUNCTION {n.dashify} |
---|
317 | { 't := |
---|
318 | "" |
---|
319 | { t empty$ not } |
---|
320 | { t #1 #1 substring$ "-" = |
---|
321 | { t #1 #2 substring$ "--" = not |
---|
322 | { "--" * |
---|
323 | t #2 global.max$ substring$ 't := |
---|
324 | } |
---|
325 | { { t #1 #1 substring$ "-" = } |
---|
326 | { "-" * |
---|
327 | t #2 global.max$ substring$ 't := |
---|
328 | } |
---|
329 | while$ |
---|
330 | } |
---|
331 | if$ |
---|
332 | } |
---|
333 | { t #1 #1 substring$ * |
---|
334 | t #2 global.max$ substring$ 't := |
---|
335 | } |
---|
336 | if$ |
---|
337 | } |
---|
338 | while$ |
---|
339 | } |
---|
340 | |
---|
341 | FUNCTION {format.date} |
---|
342 | { year empty$ |
---|
343 | { month empty$ |
---|
344 | { "" } |
---|
345 | { "there's a month but no year in " cite$ * warning$ |
---|
346 | month |
---|
347 | } |
---|
348 | if$ |
---|
349 | } |
---|
350 | { month empty$ |
---|
351 | 'year |
---|
352 | { month " " * year * } |
---|
353 | if$ |
---|
354 | } |
---|
355 | if$ |
---|
356 | } |
---|
357 | |
---|
358 | FUNCTION {format.btitle} |
---|
359 | { title emphasize |
---|
360 | } |
---|
361 | |
---|
362 | FUNCTION {tie.or.space.connect} |
---|
363 | { duplicate$ text.length$ #3 < |
---|
364 | { "~" } |
---|
365 | { " " } |
---|
366 | if$ |
---|
367 | swap$ * * |
---|
368 | } |
---|
369 | |
---|
370 | FUNCTION {either.or.check} |
---|
371 | { empty$ |
---|
372 | 'pop$ |
---|
373 | { "can't use both " swap$ * " fields in " * cite$ * warning$ } |
---|
374 | if$ |
---|
375 | } |
---|
376 | |
---|
377 | FUNCTION {format.bvolume} |
---|
378 | { volume empty$ |
---|
379 | { "" } |
---|
380 | { "Volume" volume tie.or.space.connect |
---|
381 | series empty$ |
---|
382 | 'skip$ |
---|
383 | { " of " * series emphasize * } |
---|
384 | if$ |
---|
385 | add.period$ |
---|
386 | "volume and number" number either.or.check |
---|
387 | } |
---|
388 | if$ |
---|
389 | } |
---|
390 | |
---|
391 | FUNCTION {format.number.series} |
---|
392 | { volume empty$ |
---|
393 | { number empty$ |
---|
394 | { series field.or.null } |
---|
395 | { output.state mid.sentence = |
---|
396 | { "number" } |
---|
397 | { "Number" } |
---|
398 | if$ |
---|
399 | number tie.or.space.connect |
---|
400 | series empty$ |
---|
401 | { "there's a number but no series in " cite$ * warning$ } |
---|
402 | { " in " * series * } |
---|
403 | if$ |
---|
404 | } |
---|
405 | if$ |
---|
406 | } |
---|
407 | { "" } |
---|
408 | if$ |
---|
409 | } |
---|
410 | |
---|
411 | FUNCTION {format.edition} |
---|
412 | { edition empty$ |
---|
413 | { "" } |
---|
414 | { output.state mid.sentence = |
---|
415 | { edition "l" change.case$ " edn." * } |
---|
416 | { edition "t" change.case$ " edn." * } |
---|
417 | if$ |
---|
418 | } |
---|
419 | if$ |
---|
420 | } |
---|
421 | |
---|
422 | INTEGERS { multiresult } |
---|
423 | |
---|
424 | FUNCTION {multi.page.check} |
---|
425 | { 't := |
---|
426 | #0 'multiresult := |
---|
427 | { multiresult not |
---|
428 | t empty$ not |
---|
429 | and |
---|
430 | } |
---|
431 | { t #1 #1 substring$ |
---|
432 | duplicate$ "-" = |
---|
433 | swap$ duplicate$ "," = |
---|
434 | swap$ "+" = |
---|
435 | or or |
---|
436 | { #1 'multiresult := } |
---|
437 | { t #2 global.max$ substring$ 't := } |
---|
438 | if$ |
---|
439 | } |
---|
440 | while$ |
---|
441 | multiresult |
---|
442 | } |
---|
443 | |
---|
444 | FUNCTION {format.pages} |
---|
445 | { pages empty$ |
---|
446 | { "" } |
---|
447 | { pages multi.page.check |
---|
448 | { "" pages n.dashify tie.or.space.connect } |
---|
449 | { "" pages tie.or.space.connect } |
---|
450 | if$ |
---|
451 | } |
---|
452 | if$ |
---|
453 | } |
---|
454 | |
---|
455 | FUNCTION {format.vol} |
---|
456 | { volume bold |
---|
457 | } |
---|
458 | |
---|
459 | FUNCTION {format.vol.num} |
---|
460 | { volume bold |
---|
461 | number empty$ |
---|
462 | { } |
---|
463 | { number "(" swap$ * * ")" * } |
---|
464 | if$ |
---|
465 | } |
---|
466 | |
---|
467 | FUNCTION {pre.format.pages} |
---|
468 | { pages empty$ |
---|
469 | 'skip$ |
---|
470 | { duplicate$ empty$ |
---|
471 | { pop$ format.pages } |
---|
472 | { " " * pages n.dashify * } |
---|
473 | if$ |
---|
474 | } |
---|
475 | if$ |
---|
476 | } |
---|
477 | |
---|
478 | FUNCTION {format.chapter.pages} |
---|
479 | { chapter empty$ |
---|
480 | 'format.pages |
---|
481 | { type empty$ |
---|
482 | { "chapter" } |
---|
483 | { type "l" change.case$ } |
---|
484 | if$ |
---|
485 | chapter tie.or.space.connect |
---|
486 | pages empty$ |
---|
487 | 'skip$ |
---|
488 | { " " * format.pages * } |
---|
489 | if$ |
---|
490 | } |
---|
491 | if$ |
---|
492 | } |
---|
493 | |
---|
494 | FUNCTION {format.in.ed.booktitle} |
---|
495 | { booktitle empty$ |
---|
496 | { "" } |
---|
497 | { editor empty$ |
---|
498 | { "In: " booktitle emphasize * } |
---|
499 | { "In " format.editors * ": " * booktitle emphasize * } |
---|
500 | if$ |
---|
501 | } |
---|
502 | if$ |
---|
503 | } |
---|
504 | |
---|
505 | FUNCTION {empty.misc.check} |
---|
506 | { author empty$ title empty$ howpublished empty$ |
---|
507 | month empty$ year empty$ note empty$ |
---|
508 | and and and and and |
---|
509 | { "all relevant fields are empty in " cite$ * warning$ } |
---|
510 | 'skip$ |
---|
511 | if$ |
---|
512 | } |
---|
513 | |
---|
514 | FUNCTION {format.thesis.type} |
---|
515 | { type empty$ |
---|
516 | 'skip$ |
---|
517 | { pop$ |
---|
518 | type "t" change.case$ |
---|
519 | } |
---|
520 | if$ |
---|
521 | } |
---|
522 | |
---|
523 | FUNCTION {format.tr.number} |
---|
524 | { type empty$ |
---|
525 | { "Technical Report" } |
---|
526 | 'type |
---|
527 | if$ |
---|
528 | number empty$ |
---|
529 | { "t" change.case$ } |
---|
530 | { number tie.or.space.connect } |
---|
531 | if$ |
---|
532 | } |
---|
533 | |
---|
534 | FUNCTION {format.article.crossref} |
---|
535 | { key empty$ |
---|
536 | { journal empty$ |
---|
537 | { "need key or journal for " cite$ * " to crossref " * crossref * |
---|
538 | warning$ |
---|
539 | "" |
---|
540 | } |
---|
541 | { "In {\em " journal * "\/}" * } |
---|
542 | if$ |
---|
543 | } |
---|
544 | { "In " key * } |
---|
545 | if$ |
---|
546 | " \cite{" * crossref * "}" * |
---|
547 | } |
---|
548 | |
---|
549 | FUNCTION {format.crossref.editor} |
---|
550 | { editor #1 "{vv~}{ll}" format.name$ |
---|
551 | editor num.names$ duplicate$ |
---|
552 | #2 > |
---|
553 | { pop$ " et~al." * } |
---|
554 | { #2 < |
---|
555 | 'skip$ |
---|
556 | { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = |
---|
557 | { " et~al." * } |
---|
558 | { " and " * editor #2 "{vv~}{ll}" format.name$ * } |
---|
559 | if$ |
---|
560 | } |
---|
561 | if$ |
---|
562 | } |
---|
563 | if$ |
---|
564 | } |
---|
565 | |
---|
566 | FUNCTION {format.book.crossref} |
---|
567 | { volume empty$ |
---|
568 | { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ |
---|
569 | "In " |
---|
570 | } |
---|
571 | { "Volume" volume tie.or.space.connect |
---|
572 | " of " * |
---|
573 | } |
---|
574 | if$ |
---|
575 | " \cite{" * crossref * "}" * |
---|
576 | } |
---|
577 | |
---|
578 | FUNCTION {format.incoll.inproc.crossref} |
---|
579 | { editor empty$ |
---|
580 | editor field.or.null author field.or.null = |
---|
581 | or |
---|
582 | { key empty$ |
---|
583 | { booktitle empty$ |
---|
584 | { "need editor, key, or booktitle for " cite$ * " to crossref " * |
---|
585 | crossref * warning$ |
---|
586 | "" |
---|
587 | } |
---|
588 | { "" } |
---|
589 | if$ |
---|
590 | } |
---|
591 | { "" } |
---|
592 | if$ |
---|
593 | } |
---|
594 | { "" } |
---|
595 | if$ |
---|
596 | " \cite{" * crossref * "}" * |
---|
597 | } |
---|
598 | |
---|
599 | FUNCTION {and.the.note} |
---|
600 | { note output |
---|
601 | note empty$ |
---|
602 | 'skip$ |
---|
603 | { add.period$ } |
---|
604 | if$ |
---|
605 | } |
---|
606 | |
---|
607 | FUNCTION {article} |
---|
608 | { output.bibitem |
---|
609 | format.authors "author" output.check |
---|
610 | stupid.colon |
---|
611 | format.title "title" output.check |
---|
612 | new.block |
---|
613 | crossref missing$ |
---|
614 | { journal emphasize "journal" output.check |
---|
615 | format.vol.num output |
---|
616 | format.date parens output |
---|
617 | format.pages output |
---|
618 | } |
---|
619 | { format.article.crossref output.nonnull |
---|
620 | format.pages output |
---|
621 | } |
---|
622 | if$ |
---|
623 | and.the.note |
---|
624 | fin.entry |
---|
625 | } |
---|
626 | |
---|
627 | FUNCTION {book} |
---|
628 | { output.bibitem |
---|
629 | author empty$ |
---|
630 | { format.editors "author and editor" output.check } |
---|
631 | { format.authors output.nonnull |
---|
632 | crossref missing$ |
---|
633 | { "author and editor" editor either.or.check } |
---|
634 | 'skip$ |
---|
635 | if$ |
---|
636 | } |
---|
637 | if$ |
---|
638 | stupid.colon |
---|
639 | format.btitle "title" output.check |
---|
640 | new.sentence |
---|
641 | crossref missing$ |
---|
642 | { format.edition output |
---|
643 | format.bvolume output |
---|
644 | new.block |
---|
645 | format.number.series output |
---|
646 | new.sentence |
---|
647 | publisher "publisher" output.check |
---|
648 | address empty$ |
---|
649 | 'skip$ |
---|
650 | { insert.comma } |
---|
651 | if$ |
---|
652 | address output |
---|
653 | format.date parens output |
---|
654 | } |
---|
655 | { format.book.crossref output.nonnull |
---|
656 | } |
---|
657 | if$ |
---|
658 | and.the.note |
---|
659 | fin.entry |
---|
660 | } |
---|
661 | |
---|
662 | FUNCTION {booklet} |
---|
663 | { output.bibitem |
---|
664 | format.authors output |
---|
665 | stupid.colon |
---|
666 | format.title "title" output.check |
---|
667 | howpublished address new.block.checkb |
---|
668 | howpublished output |
---|
669 | address empty$ |
---|
670 | 'skip$ |
---|
671 | { insert.comma } |
---|
672 | if$ |
---|
673 | address output |
---|
674 | format.date parens output |
---|
675 | and.the.note |
---|
676 | fin.entry |
---|
677 | } |
---|
678 | |
---|
679 | FUNCTION {inbook} |
---|
680 | { output.bibitem |
---|
681 | author empty$ |
---|
682 | { format.editors "author and editor" output.check } |
---|
683 | { format.authors output.nonnull |
---|
684 | crossref missing$ |
---|
685 | { "author and editor" editor either.or.check } |
---|
686 | 'skip$ |
---|
687 | if$ |
---|
688 | } |
---|
689 | if$ |
---|
690 | stupid.colon |
---|
691 | crossref missing$ |
---|
692 | { chapter output |
---|
693 | new.block |
---|
694 | format.number.series output |
---|
695 | new.sentence |
---|
696 | "In:" output |
---|
697 | format.btitle "title" output.check |
---|
698 | new.sentence |
---|
699 | format.edition output |
---|
700 | format.bvolume output |
---|
701 | publisher "publisher" output.check |
---|
702 | address empty$ |
---|
703 | 'skip$ |
---|
704 | { insert.comma } |
---|
705 | if$ |
---|
706 | address output |
---|
707 | format.date parens output |
---|
708 | } |
---|
709 | { chapter output |
---|
710 | new.block |
---|
711 | format.incoll.inproc.crossref output.nonnull |
---|
712 | } |
---|
713 | if$ |
---|
714 | format.pages output |
---|
715 | and.the.note |
---|
716 | fin.entry |
---|
717 | } |
---|
718 | |
---|
719 | FUNCTION {incollection} |
---|
720 | { output.bibitem |
---|
721 | format.authors "author" output.check |
---|
722 | stupid.colon |
---|
723 | format.title "title" output.check |
---|
724 | new.block |
---|
725 | crossref missing$ |
---|
726 | { format.in.ed.booktitle "booktitle" output.check |
---|
727 | new.sentence |
---|
728 | format.bvolume output |
---|
729 | format.number.series output |
---|
730 | new.block |
---|
731 | format.edition output |
---|
732 | publisher "publisher" output.check |
---|
733 | address empty$ |
---|
734 | 'skip$ |
---|
735 | { insert.comma } |
---|
736 | if$ |
---|
737 | address output |
---|
738 | format.date parens output |
---|
739 | format.pages output |
---|
740 | } |
---|
741 | { format.incoll.inproc.crossref output.nonnull |
---|
742 | format.chapter.pages output |
---|
743 | } |
---|
744 | if$ |
---|
745 | and.the.note |
---|
746 | fin.entry |
---|
747 | } |
---|
748 | |
---|
749 | FUNCTION {inproceedings} |
---|
750 | { output.bibitem |
---|
751 | format.authors "author" output.check |
---|
752 | stupid.colon |
---|
753 | format.title "title" output.check |
---|
754 | new.block |
---|
755 | crossref missing$ |
---|
756 | { format.in.ed.booktitle "booktitle" output.check |
---|
757 | new.sentence |
---|
758 | format.bvolume output |
---|
759 | format.number.series output |
---|
760 | address empty$ |
---|
761 | { organization publisher new.sentence.checkb |
---|
762 | organization empty$ |
---|
763 | 'skip$ |
---|
764 | { insert.comma } |
---|
765 | if$ |
---|
766 | organization output |
---|
767 | publisher empty$ |
---|
768 | 'skip$ |
---|
769 | { insert.comma } |
---|
770 | if$ |
---|
771 | publisher output |
---|
772 | format.date parens output |
---|
773 | } |
---|
774 | { insert.comma |
---|
775 | address output.nonnull |
---|
776 | organization empty$ |
---|
777 | 'skip$ |
---|
778 | { insert.comma } |
---|
779 | if$ |
---|
780 | organization output |
---|
781 | publisher empty$ |
---|
782 | 'skip$ |
---|
783 | { insert.comma } |
---|
784 | if$ |
---|
785 | publisher output |
---|
786 | format.date parens output |
---|
787 | } |
---|
788 | if$ |
---|
789 | } |
---|
790 | { format.incoll.inproc.crossref output.nonnull |
---|
791 | } |
---|
792 | if$ |
---|
793 | format.pages output |
---|
794 | and.the.note |
---|
795 | fin.entry |
---|
796 | } |
---|
797 | |
---|
798 | FUNCTION {conference} { inproceedings } |
---|
799 | |
---|
800 | FUNCTION {manual} |
---|
801 | { output.bibitem |
---|
802 | author empty$ |
---|
803 | { organization empty$ |
---|
804 | 'skip$ |
---|
805 | { organization output.nonnull |
---|
806 | address output |
---|
807 | } |
---|
808 | if$ |
---|
809 | } |
---|
810 | { format.authors output.nonnull } |
---|
811 | if$ |
---|
812 | stupid.colon |
---|
813 | format.btitle "title" output.check |
---|
814 | author empty$ |
---|
815 | { organization empty$ |
---|
816 | { address new.block.checka |
---|
817 | address output |
---|
818 | } |
---|
819 | 'skip$ |
---|
820 | if$ |
---|
821 | } |
---|
822 | { organization address new.block.checkb |
---|
823 | organization output |
---|
824 | address empty$ |
---|
825 | 'skip$ |
---|
826 | { insert.comma } |
---|
827 | if$ |
---|
828 | address output |
---|
829 | } |
---|
830 | if$ |
---|
831 | new.sentence |
---|
832 | format.edition output |
---|
833 | format.date parens output |
---|
834 | and.the.note |
---|
835 | fin.entry |
---|
836 | } |
---|
837 | |
---|
838 | FUNCTION {mastersthesis} |
---|
839 | { output.bibitem |
---|
840 | format.authors "author" output.check |
---|
841 | stupid.colon |
---|
842 | format.title "title" output.check |
---|
843 | new.block |
---|
844 | "Master's thesis" format.thesis.type output.nonnull |
---|
845 | school empty$ |
---|
846 | 'skip$ |
---|
847 | { insert.comma } |
---|
848 | if$ |
---|
849 | school "school" output.check |
---|
850 | address empty$ |
---|
851 | 'skip$ |
---|
852 | { insert.comma } |
---|
853 | if$ |
---|
854 | address output |
---|
855 | format.date parens output |
---|
856 | and.the.note |
---|
857 | fin.entry |
---|
858 | } |
---|
859 | |
---|
860 | FUNCTION {misc} |
---|
861 | { output.bibitem |
---|
862 | format.authors "author" output.check |
---|
863 | stupid.colon |
---|
864 | format.title "title" output.check |
---|
865 | howpublished new.block.checka |
---|
866 | howpublished output |
---|
867 | format.date parens output |
---|
868 | and.the.note |
---|
869 | fin.entry |
---|
870 | empty.misc.check |
---|
871 | } |
---|
872 | |
---|
873 | FUNCTION {phdthesis} |
---|
874 | { output.bibitem |
---|
875 | format.authors "author" output.check |
---|
876 | stupid.colon |
---|
877 | format.btitle "title" output.check |
---|
878 | new.block |
---|
879 | "PhD thesis" format.thesis.type output.nonnull |
---|
880 | school empty$ |
---|
881 | 'skip$ |
---|
882 | { insert.comma } |
---|
883 | if$ |
---|
884 | school "school" output.check |
---|
885 | address empty$ |
---|
886 | 'skip$ |
---|
887 | { insert.comma } |
---|
888 | if$ |
---|
889 | address output |
---|
890 | format.date parens output |
---|
891 | and.the.note |
---|
892 | fin.entry |
---|
893 | } |
---|
894 | |
---|
895 | FUNCTION {proceedings} |
---|
896 | { output.bibitem |
---|
897 | editor empty$ |
---|
898 | { organization empty$ |
---|
899 | { "" } |
---|
900 | { organization output |
---|
901 | stupid.colon } |
---|
902 | if$ |
---|
903 | } |
---|
904 | { format.editors output.nonnull |
---|
905 | stupid.colon |
---|
906 | } |
---|
907 | if$ |
---|
908 | format.btitle "title" output.check |
---|
909 | new.block |
---|
910 | crossref missing$ |
---|
911 | { format.in.ed.booktitle "booktitle" output.check |
---|
912 | new.sentence |
---|
913 | format.bvolume output |
---|
914 | format.number.series output |
---|
915 | address empty$ |
---|
916 | { organization publisher new.sentence.checkb |
---|
917 | organization empty$ |
---|
918 | 'skip$ |
---|
919 | { insert.comma } |
---|
920 | if$ |
---|
921 | organization output |
---|
922 | publisher empty$ |
---|
923 | 'skip$ |
---|
924 | { insert.comma } |
---|
925 | if$ |
---|
926 | publisher output |
---|
927 | format.date parens output |
---|
928 | } |
---|
929 | { insert.comma |
---|
930 | address output.nonnull |
---|
931 | organization empty$ |
---|
932 | 'skip$ |
---|
933 | { insert.comma } |
---|
934 | if$ |
---|
935 | organization output |
---|
936 | publisher empty$ |
---|
937 | 'skip$ |
---|
938 | { insert.comma } |
---|
939 | if$ |
---|
940 | publisher output |
---|
941 | format.date parens output |
---|
942 | } |
---|
943 | if$ |
---|
944 | } |
---|
945 | { format.incoll.inproc.crossref output.nonnull |
---|
946 | } |
---|
947 | if$ |
---|
948 | and.the.note |
---|
949 | fin.entry |
---|
950 | } |
---|
951 | |
---|
952 | FUNCTION {techreport} |
---|
953 | { output.bibitem |
---|
954 | format.authors "author" output.check |
---|
955 | stupid.colon |
---|
956 | format.title "title" output.check |
---|
957 | new.block |
---|
958 | format.tr.number output.nonnull |
---|
959 | institution empty$ |
---|
960 | 'skip$ |
---|
961 | { insert.comma } |
---|
962 | if$ |
---|
963 | institution "institution" output.check |
---|
964 | address empty$ |
---|
965 | 'skip$ |
---|
966 | { insert.comma } |
---|
967 | if$ |
---|
968 | address output |
---|
969 | format.date parens output |
---|
970 | and.the.note |
---|
971 | fin.entry |
---|
972 | } |
---|
973 | |
---|
974 | FUNCTION {unpublished} |
---|
975 | { output.bibitem |
---|
976 | format.authors "author" output.check |
---|
977 | stupid.colon |
---|
978 | format.title "title" output.check |
---|
979 | new.block |
---|
980 | note "note" output.check |
---|
981 | format.date parens output |
---|
982 | fin.entry |
---|
983 | } |
---|
984 | |
---|
985 | FUNCTION {default.type} { misc } |
---|
986 | |
---|
987 | MACRO {jan} {"January"} |
---|
988 | |
---|
989 | MACRO {feb} {"February"} |
---|
990 | |
---|
991 | MACRO {mar} {"March"} |
---|
992 | |
---|
993 | MACRO {apr} {"April"} |
---|
994 | |
---|
995 | MACRO {may} {"May"} |
---|
996 | |
---|
997 | MACRO {jun} {"June"} |
---|
998 | |
---|
999 | MACRO {jul} {"July"} |
---|
1000 | |
---|
1001 | MACRO {aug} {"August"} |
---|
1002 | |
---|
1003 | MACRO {sep} {"September"} |
---|
1004 | |
---|
1005 | MACRO {oct} {"October"} |
---|
1006 | |
---|
1007 | MACRO {nov} {"November"} |
---|
1008 | |
---|
1009 | MACRO {dec} {"December"} |
---|
1010 | |
---|
1011 | MACRO {acmcs} {"ACM Computing Surveys"} |
---|
1012 | |
---|
1013 | MACRO {acta} {"Acta Informatica"} |
---|
1014 | |
---|
1015 | MACRO {cacm} {"Communications of the ACM"} |
---|
1016 | |
---|
1017 | MACRO {ibmjrd} {"IBM Journal of Research and Development"} |
---|
1018 | |
---|
1019 | MACRO {ibmsj} {"IBM Systems Journal"} |
---|
1020 | |
---|
1021 | MACRO {ieeese} {"IEEE Transactions on Software Engineering"} |
---|
1022 | |
---|
1023 | MACRO {ieeetc} {"IEEE Transactions on Computers"} |
---|
1024 | |
---|
1025 | MACRO {ieeetcad} |
---|
1026 | {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"} |
---|
1027 | |
---|
1028 | MACRO {ipl} {"Information Processing Letters"} |
---|
1029 | |
---|
1030 | MACRO {jacm} {"Journal of the ACM"} |
---|
1031 | |
---|
1032 | MACRO {jcss} {"Journal of Computer and System Sciences"} |
---|
1033 | |
---|
1034 | MACRO {scp} {"Science of Computer Programming"} |
---|
1035 | |
---|
1036 | MACRO {sicomp} {"SIAM Journal on Computing"} |
---|
1037 | |
---|
1038 | MACRO {tocs} {"ACM Transactions on Computer Systems"} |
---|
1039 | |
---|
1040 | MACRO {tods} {"ACM Transactions on Database Systems"} |
---|
1041 | |
---|
1042 | MACRO {tog} {"ACM Transactions on Graphics"} |
---|
1043 | |
---|
1044 | MACRO {toms} {"ACM Transactions on Mathematical Software"} |
---|
1045 | |
---|
1046 | MACRO {toois} {"ACM Transactions on Office Information Systems"} |
---|
1047 | |
---|
1048 | MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"} |
---|
1049 | |
---|
1050 | MACRO {tcs} {"Theoretical Computer Science"} |
---|
1051 | |
---|
1052 | READ |
---|
1053 | |
---|
1054 | %% Begin of addition of sorting (taken from CTAN plain.bst) |
---|
1055 | %% Tobias Heindel June 13th, 2006 |
---|
1056 | |
---|
1057 | FUNCTION {sortify} |
---|
1058 | { purify$ |
---|
1059 | "l" change.case$ |
---|
1060 | } |
---|
1061 | |
---|
1062 | INTEGERS { len } |
---|
1063 | |
---|
1064 | FUNCTION {chop.word} |
---|
1065 | { 's := |
---|
1066 | 'len := |
---|
1067 | s #1 len substring$ = |
---|
1068 | { s len #1 + global.max$ substring$ } |
---|
1069 | 's |
---|
1070 | if$ |
---|
1071 | } |
---|
1072 | |
---|
1073 | FUNCTION {sort.format.names} |
---|
1074 | { 's := |
---|
1075 | #1 'nameptr := |
---|
1076 | "" |
---|
1077 | s num.names$ 'numnames := |
---|
1078 | numnames 'namesleft := |
---|
1079 | { namesleft #0 > } |
---|
1080 | { nameptr #1 > |
---|
1081 | { " " * } |
---|
1082 | 'skip$ |
---|
1083 | if$ |
---|
1084 | s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't := |
---|
1085 | nameptr numnames = t "others" = and |
---|
1086 | { "et al" * } |
---|
1087 | { t sortify * } |
---|
1088 | if$ |
---|
1089 | nameptr #1 + 'nameptr := |
---|
1090 | namesleft #1 - 'namesleft := |
---|
1091 | } |
---|
1092 | while$ |
---|
1093 | } |
---|
1094 | |
---|
1095 | FUNCTION {sort.format.title} |
---|
1096 | { 't := |
---|
1097 | "A " #2 |
---|
1098 | "An " #3 |
---|
1099 | "The " #4 t chop.word |
---|
1100 | chop.word |
---|
1101 | chop.word |
---|
1102 | sortify |
---|
1103 | #1 global.max$ substring$ |
---|
1104 | } |
---|
1105 | |
---|
1106 | FUNCTION {author.sort} |
---|
1107 | { author empty$ |
---|
1108 | { key empty$ |
---|
1109 | { "to sort, need author or key in " cite$ * warning$ |
---|
1110 | "" |
---|
1111 | } |
---|
1112 | { key sortify } |
---|
1113 | if$ |
---|
1114 | } |
---|
1115 | { author sort.format.names } |
---|
1116 | if$ |
---|
1117 | } |
---|
1118 | |
---|
1119 | FUNCTION {author.editor.sort} |
---|
1120 | { author empty$ |
---|
1121 | { editor empty$ |
---|
1122 | { key empty$ |
---|
1123 | { "to sort, need author, editor, or key in " cite$ * warning$ |
---|
1124 | "" |
---|
1125 | } |
---|
1126 | { key sortify } |
---|
1127 | if$ |
---|
1128 | } |
---|
1129 | { editor sort.format.names } |
---|
1130 | if$ |
---|
1131 | } |
---|
1132 | { author sort.format.names } |
---|
1133 | if$ |
---|
1134 | } |
---|
1135 | |
---|
1136 | FUNCTION {author.organization.sort} |
---|
1137 | { author empty$ |
---|
1138 | { organization empty$ |
---|
1139 | { key empty$ |
---|
1140 | { "to sort, need author, organization, or key in " cite$ * warning$ |
---|
1141 | "" |
---|
1142 | } |
---|
1143 | { key sortify } |
---|
1144 | if$ |
---|
1145 | } |
---|
1146 | { "The " #4 organization chop.word sortify } |
---|
1147 | if$ |
---|
1148 | } |
---|
1149 | { author sort.format.names } |
---|
1150 | if$ |
---|
1151 | } |
---|
1152 | |
---|
1153 | FUNCTION {editor.organization.sort} |
---|
1154 | { editor empty$ |
---|
1155 | { organization empty$ |
---|
1156 | { key empty$ |
---|
1157 | { "to sort, need editor, organization, or key in " cite$ * warning$ |
---|
1158 | "" |
---|
1159 | } |
---|
1160 | { key sortify } |
---|
1161 | if$ |
---|
1162 | } |
---|
1163 | { "The " #4 organization chop.word sortify } |
---|
1164 | if$ |
---|
1165 | } |
---|
1166 | { editor sort.format.names } |
---|
1167 | if$ |
---|
1168 | } |
---|
1169 | |
---|
1170 | FUNCTION {presort} |
---|
1171 | { type$ "book" = |
---|
1172 | type$ "inbook" = |
---|
1173 | or |
---|
1174 | 'author.editor.sort |
---|
1175 | { type$ "proceedings" = |
---|
1176 | 'editor.organization.sort |
---|
1177 | { type$ "manual" = |
---|
1178 | 'author.organization.sort |
---|
1179 | 'author.sort |
---|
1180 | if$ |
---|
1181 | } |
---|
1182 | if$ |
---|
1183 | } |
---|
1184 | if$ |
---|
1185 | " " |
---|
1186 | * |
---|
1187 | year field.or.null sortify |
---|
1188 | * |
---|
1189 | " " |
---|
1190 | * |
---|
1191 | title field.or.null |
---|
1192 | sort.format.title |
---|
1193 | * |
---|
1194 | #1 entry.max$ substring$ |
---|
1195 | 'sort.key$ := |
---|
1196 | } |
---|
1197 | |
---|
1198 | ITERATE {presort} |
---|
1199 | |
---|
1200 | SORT |
---|
1201 | |
---|
1202 | %% End of addition for sorting |
---|
1203 | |
---|
1204 | STRINGS { longest.label } |
---|
1205 | |
---|
1206 | INTEGERS { number.label longest.label.width } |
---|
1207 | |
---|
1208 | FUNCTION {initialize.longest.label} |
---|
1209 | { "" 'longest.label := |
---|
1210 | #1 'number.label := |
---|
1211 | #0 'longest.label.width := |
---|
1212 | } |
---|
1213 | |
---|
1214 | FUNCTION {longest.label.pass} |
---|
1215 | { number.label int.to.str$ 'label := |
---|
1216 | number.label #1 + 'number.label := |
---|
1217 | label width$ longest.label.width > |
---|
1218 | { label 'longest.label := |
---|
1219 | label width$ 'longest.label.width := |
---|
1220 | } |
---|
1221 | 'skip$ |
---|
1222 | if$ |
---|
1223 | } |
---|
1224 | |
---|
1225 | EXECUTE {initialize.longest.label} |
---|
1226 | |
---|
1227 | ITERATE {longest.label.pass} |
---|
1228 | |
---|
1229 | FUNCTION {begin.bib} |
---|
1230 | { preamble$ empty$ |
---|
1231 | 'skip$ |
---|
1232 | { preamble$ write$ newline$ } |
---|
1233 | if$ |
---|
1234 | "\begin{thebibliography}{" longest.label * "}" * write$ newline$ |
---|
1235 | } |
---|
1236 | |
---|
1237 | EXECUTE {begin.bib} |
---|
1238 | |
---|
1239 | EXECUTE {init.state.consts} |
---|
1240 | |
---|
1241 | ITERATE {call.type$} |
---|
1242 | |
---|
1243 | FUNCTION {end.bib} |
---|
1244 | { newline$ |
---|
1245 | "\end{thebibliography}" write$ newline$ |
---|
1246 | } |
---|
1247 | |
---|
1248 | EXECUTE {end.bib} |
---|
1249 | |
---|
1250 | |
---|
1251 | |
---|