1 | %% |
---|
2 | %% This is file `model2-names.bst', |
---|
3 | %% |
---|
4 | %% Copyright 2009 Elsevier Ltd |
---|
5 | %% |
---|
6 | %% This file is part of the 'Elsarticle Bundle'. |
---|
7 | %% --------------------------------------------- |
---|
8 | %% |
---|
9 | %% It may be distributed under the conditions of the LaTeX Project Public |
---|
10 | %% License, either version 1.2 of this license or (at your option) any |
---|
11 | %% later version. The latest version of this license is in |
---|
12 | %% http://www.latex-project.org/lppl.txt |
---|
13 | %% and version 1.2 or later is part of all distributions of LaTeX |
---|
14 | %% version 1999/12/01 or later. |
---|
15 | %% |
---|
16 | %% $Id: model2-names.bst 140 2009-10-07 12:24:29Z rishi $ |
---|
17 | %% |
---|
18 | %% $URL: http://lenova.river-valley.com/svn/elsbst/trunk/New-Model-2/model2-names.bst $ |
---|
19 | %% |
---|
20 | |
---|
21 | ENTRY |
---|
22 | { address |
---|
23 | archive |
---|
24 | author |
---|
25 | booktitle |
---|
26 | chapter |
---|
27 | edition |
---|
28 | editor |
---|
29 | eprint |
---|
30 | howpublished |
---|
31 | institution |
---|
32 | journal |
---|
33 | key |
---|
34 | month |
---|
35 | note |
---|
36 | number |
---|
37 | organization |
---|
38 | pages |
---|
39 | publisher |
---|
40 | school |
---|
41 | series |
---|
42 | title |
---|
43 | type |
---|
44 | volume |
---|
45 | year |
---|
46 | } |
---|
47 | {} |
---|
48 | { label extra.label sort.label short.list } |
---|
49 | INTEGERS { output.state before.all mid.sentence after.sentence after.block } |
---|
50 | FUNCTION {init.state.consts} |
---|
51 | { #0 'before.all := |
---|
52 | #1 'mid.sentence := |
---|
53 | #2 'after.sentence := |
---|
54 | #3 'after.block := |
---|
55 | } |
---|
56 | STRINGS { s t} |
---|
57 | FUNCTION {output.comma} |
---|
58 | { ", " * write$} |
---|
59 | |
---|
60 | FUNCTION {output.nonnull} |
---|
61 | { 's := |
---|
62 | output.state mid.sentence = |
---|
63 | { ". " * write$ } |
---|
64 | { output.state after.block = |
---|
65 | { add.period$ write$ |
---|
66 | newline$ |
---|
67 | "\newblock " write$ |
---|
68 | } |
---|
69 | { output.state before.all = |
---|
70 | 'write$ |
---|
71 | { ", " * write$ } |
---|
72 | if$ |
---|
73 | } |
---|
74 | if$ |
---|
75 | mid.sentence 'output.state := |
---|
76 | } |
---|
77 | if$ |
---|
78 | s |
---|
79 | } |
---|
80 | FUNCTION {output.commanull} |
---|
81 | { 's := |
---|
82 | output.state mid.sentence = |
---|
83 | { ", " * write$ } |
---|
84 | { output.state after.block = |
---|
85 | { ", " * write$ |
---|
86 | newline$ |
---|
87 | "\newblock " write$ |
---|
88 | } |
---|
89 | { output.state before.all = |
---|
90 | 'write$ |
---|
91 | { add.period$ " " * write$ } |
---|
92 | if$ |
---|
93 | } |
---|
94 | if$ |
---|
95 | mid.sentence 'output.state := |
---|
96 | } |
---|
97 | if$ |
---|
98 | s |
---|
99 | } |
---|
100 | FUNCTION {output} |
---|
101 | { duplicate$ empty$ |
---|
102 | 'pop$ |
---|
103 | 'output.nonnull |
---|
104 | if$ |
---|
105 | } |
---|
106 | FUNCTION {output.check} |
---|
107 | { 't := |
---|
108 | duplicate$ empty$ |
---|
109 | { pop$ "empty " t * " in " * cite$ * warning$ } |
---|
110 | 'output.nonnull |
---|
111 | if$ |
---|
112 | } |
---|
113 | FUNCTION {output.book.check} |
---|
114 | { 't := |
---|
115 | duplicate$ empty$ |
---|
116 | { pop$ "empty " t * " in " * cite$ * warning$ } |
---|
117 | 'output.nonnull |
---|
118 | if$ |
---|
119 | } |
---|
120 | FUNCTION {fin.entry} |
---|
121 | { add.period$ |
---|
122 | write$ |
---|
123 | newline$ |
---|
124 | } |
---|
125 | |
---|
126 | FUNCTION {new.block} |
---|
127 | { output.state before.all = |
---|
128 | 'skip$ |
---|
129 | { after.block 'output.state := } |
---|
130 | if$ |
---|
131 | } |
---|
132 | FUNCTION {new.sentence} |
---|
133 | { output.state after.block = |
---|
134 | 'skip$ |
---|
135 | { output.state before.all = |
---|
136 | 'skip$ |
---|
137 | { after.sentence 'output.state := } |
---|
138 | if$ |
---|
139 | } |
---|
140 | if$ |
---|
141 | } |
---|
142 | FUNCTION {add.blank} |
---|
143 | { " " * before.all 'output.state := |
---|
144 | } |
---|
145 | |
---|
146 | FUNCTION {date.block} |
---|
147 | { |
---|
148 | new.block |
---|
149 | } |
---|
150 | |
---|
151 | FUNCTION {not} |
---|
152 | { { #0 } |
---|
153 | { #1 } |
---|
154 | if$ |
---|
155 | } |
---|
156 | FUNCTION {and} |
---|
157 | { 'skip$ |
---|
158 | { pop$ #0 } |
---|
159 | if$ |
---|
160 | } |
---|
161 | FUNCTION {or} |
---|
162 | { { pop$ #1 } |
---|
163 | 'skip$ |
---|
164 | if$ |
---|
165 | } |
---|
166 | FUNCTION {new.block.checkb} |
---|
167 | { empty$ |
---|
168 | swap$ empty$ |
---|
169 | and |
---|
170 | 'skip$ |
---|
171 | 'new.block |
---|
172 | if$ |
---|
173 | } |
---|
174 | FUNCTION {field.or.null} |
---|
175 | { duplicate$ empty$ |
---|
176 | { pop$ "" } |
---|
177 | 'skip$ |
---|
178 | if$ |
---|
179 | } |
---|
180 | FUNCTION {emphasize} |
---|
181 | { duplicate$ empty$ |
---|
182 | { pop$ "" } |
---|
183 | { "\textit{" swap$ * "}" * } |
---|
184 | if$ |
---|
185 | } |
---|
186 | FUNCTION {tie.or.space.prefix} |
---|
187 | { duplicate$ text.length$ #3 < |
---|
188 | { "~" } |
---|
189 | { " " } |
---|
190 | if$ |
---|
191 | swap$ |
---|
192 | } |
---|
193 | |
---|
194 | FUNCTION {capitalize} |
---|
195 | { "u" change.case$ "t" change.case$ } |
---|
196 | |
---|
197 | FUNCTION {space.word} |
---|
198 | { " " swap$ * " " * } |
---|
199 | % Here are the language-specific definitions for explicit words. |
---|
200 | % Each function has a name bbl.xxx where xxx is the English word. |
---|
201 | % The language selected here is ENGLISH |
---|
202 | FUNCTION {bbl.and} |
---|
203 | { "and"} |
---|
204 | |
---|
205 | FUNCTION {bbl.etal} |
---|
206 | { "et~al." } |
---|
207 | |
---|
208 | FUNCTION {bbl.editors} |
---|
209 | { "Eds." } |
---|
210 | |
---|
211 | FUNCTION {bbl.editor} |
---|
212 | { "Ed." } |
---|
213 | |
---|
214 | FUNCTION {bbl.edby} |
---|
215 | { "edited by" } |
---|
216 | |
---|
217 | FUNCTION {bbl.edition} |
---|
218 | { "edition" } |
---|
219 | |
---|
220 | FUNCTION {bbl.volume} |
---|
221 | { "volume" } |
---|
222 | |
---|
223 | FUNCTION {bbl.of} |
---|
224 | { "of" } |
---|
225 | |
---|
226 | FUNCTION {bbl.number} |
---|
227 | { "number" } |
---|
228 | |
---|
229 | FUNCTION {bbl.nr} |
---|
230 | { "no." } |
---|
231 | |
---|
232 | FUNCTION {bbl.in} |
---|
233 | { "in" } |
---|
234 | |
---|
235 | FUNCTION {bbl.pages} |
---|
236 | { "pp." } |
---|
237 | |
---|
238 | FUNCTION {bbl.page} |
---|
239 | { "p." } |
---|
240 | |
---|
241 | FUNCTION {bbl.chapter} |
---|
242 | { "chapter" } |
---|
243 | |
---|
244 | FUNCTION {bbl.techrep} |
---|
245 | { "Technical Report" } |
---|
246 | |
---|
247 | FUNCTION {bbl.mthesis} |
---|
248 | { "Master's thesis" } |
---|
249 | |
---|
250 | FUNCTION {bbl.phdthesis} |
---|
251 | { "Ph.D. thesis" } |
---|
252 | |
---|
253 | MACRO {jan} {"January"} |
---|
254 | |
---|
255 | MACRO {feb} {"February"} |
---|
256 | |
---|
257 | MACRO {mar} {"March"} |
---|
258 | |
---|
259 | MACRO {apr} {"April"} |
---|
260 | |
---|
261 | MACRO {may} {"May"} |
---|
262 | |
---|
263 | MACRO {jun} {"June"} |
---|
264 | |
---|
265 | MACRO {jul} {"July"} |
---|
266 | |
---|
267 | MACRO {aug} {"August"} |
---|
268 | |
---|
269 | MACRO {sep} {"September"} |
---|
270 | |
---|
271 | MACRO {oct} {"October"} |
---|
272 | |
---|
273 | MACRO {nov} {"November"} |
---|
274 | |
---|
275 | MACRO {dec} {"December"} |
---|
276 | |
---|
277 | MACRO {acmcs} {"ACM Comput. Surv."} |
---|
278 | |
---|
279 | MACRO {acta} {"Acta Inf."} |
---|
280 | |
---|
281 | MACRO {cacm} {"Commun. ACM"} |
---|
282 | |
---|
283 | MACRO {ibmjrd} {"IBM J. Res. Dev."} |
---|
284 | |
---|
285 | MACRO {ibmsj} {"IBM Syst.~J."} |
---|
286 | |
---|
287 | MACRO {ieeese} {"IEEE Trans. Software Eng."} |
---|
288 | |
---|
289 | MACRO {ieeetc} {"IEEE Trans. Comput."} |
---|
290 | |
---|
291 | MACRO {ieeetcad} |
---|
292 | {"IEEE Trans. Comput. Aid. Des."} |
---|
293 | |
---|
294 | MACRO {ipl} {"Inf. Process. Lett."} |
---|
295 | |
---|
296 | MACRO {jacm} {"J.~ACM"} |
---|
297 | |
---|
298 | MACRO {jcss} {"J.~Comput. Syst. Sci."} |
---|
299 | |
---|
300 | MACRO {scp} {"Sci. Comput. Program."} |
---|
301 | |
---|
302 | MACRO {sicomp} {"SIAM J. Comput."} |
---|
303 | |
---|
304 | MACRO {tocs} {"ACM Trans. Comput. Syst."} |
---|
305 | |
---|
306 | MACRO {tods} {"ACM Trans. Database Syst."} |
---|
307 | |
---|
308 | MACRO {tog} {"ACM Trans. Graphic."} |
---|
309 | |
---|
310 | MACRO {toms} {"ACM Trans. Math. Software"} |
---|
311 | |
---|
312 | MACRO {toois} {"ACM Trans. Office Inf. Syst."} |
---|
313 | |
---|
314 | MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."} |
---|
315 | |
---|
316 | MACRO {tcs} {"Theor. Comput. Sci."} |
---|
317 | |
---|
318 | FUNCTION {bibinfo.check} |
---|
319 | { swap$ |
---|
320 | duplicate$ missing$ |
---|
321 | { |
---|
322 | pop$ pop$ |
---|
323 | "" |
---|
324 | } |
---|
325 | { duplicate$ empty$ |
---|
326 | { |
---|
327 | swap$ pop$ |
---|
328 | } |
---|
329 | { swap$ |
---|
330 | "\bibinfo{" swap$ * "}{" * swap$ * "}" * |
---|
331 | } |
---|
332 | if$ |
---|
333 | } |
---|
334 | if$ |
---|
335 | } |
---|
336 | FUNCTION {bibinfo.warn} |
---|
337 | { swap$ |
---|
338 | duplicate$ missing$ |
---|
339 | { |
---|
340 | swap$ "missing " swap$ * " in " * cite$ * warning$ pop$ |
---|
341 | "" |
---|
342 | } |
---|
343 | { duplicate$ empty$ |
---|
344 | { |
---|
345 | swap$ "empty " swap$ * " in " * cite$ * warning$ |
---|
346 | } |
---|
347 | { swap$ |
---|
348 | pop$ |
---|
349 | } |
---|
350 | if$ |
---|
351 | } |
---|
352 | if$ |
---|
353 | } |
---|
354 | FUNCTION {format.eprint} |
---|
355 | { eprint duplicate$ empty$ |
---|
356 | 'skip$ |
---|
357 | { "\eprint" |
---|
358 | archive empty$ |
---|
359 | 'skip$ |
---|
360 | { "[" * archive * "]" * } |
---|
361 | if$ |
---|
362 | "{" * swap$ * "}" * |
---|
363 | } |
---|
364 | if$ |
---|
365 | } |
---|
366 | STRINGS { bibinfo} |
---|
367 | INTEGERS { nameptr namesleft numnames } |
---|
368 | |
---|
369 | FUNCTION {format.names} |
---|
370 | { 'bibinfo := |
---|
371 | duplicate$ empty$ 'skip$ { |
---|
372 | 's := |
---|
373 | "" 't := |
---|
374 | #1 'nameptr := |
---|
375 | s num.names$ 'numnames := |
---|
376 | numnames 'namesleft := |
---|
377 | { namesleft #0 > } |
---|
378 | { s nameptr |
---|
379 | "{vv~}{ll}{, jj}{, f{.}.}" |
---|
380 | format.name$ |
---|
381 | bibinfo bibinfo.check |
---|
382 | 't := |
---|
383 | nameptr #1 > |
---|
384 | { |
---|
385 | namesleft #1 > |
---|
386 | { ", " * t * } |
---|
387 | { |
---|
388 | "," * |
---|
389 | s nameptr "{ll}" format.name$ duplicate$ "others" = |
---|
390 | { 't := } |
---|
391 | { pop$ } |
---|
392 | if$ |
---|
393 | t "others" = |
---|
394 | { |
---|
395 | " " * bbl.etal * |
---|
396 | } |
---|
397 | { " " * t * } |
---|
398 | if$ |
---|
399 | } |
---|
400 | if$ |
---|
401 | } |
---|
402 | 't |
---|
403 | if$ |
---|
404 | nameptr #1 + 'nameptr := |
---|
405 | namesleft #1 - 'namesleft := |
---|
406 | } |
---|
407 | while$ |
---|
408 | } if$ |
---|
409 | } |
---|
410 | FUNCTION {format.names.ed} |
---|
411 | { |
---|
412 | format.names |
---|
413 | } |
---|
414 | FUNCTION {format.key} |
---|
415 | { empty$ |
---|
416 | { key field.or.null } |
---|
417 | { "" } |
---|
418 | if$ |
---|
419 | } |
---|
420 | |
---|
421 | FUNCTION {format.authors} |
---|
422 | { author "author" format.names |
---|
423 | } |
---|
424 | FUNCTION {get.bbl.editor} |
---|
425 | { editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ } |
---|
426 | |
---|
427 | FUNCTION {format.editors} |
---|
428 | { editor "editor" format.names duplicate$ empty$ 'skip$ |
---|
429 | { |
---|
430 | " " * |
---|
431 | get.bbl.editor |
---|
432 | capitalize |
---|
433 | "(" swap$ * ")" * |
---|
434 | * |
---|
435 | } |
---|
436 | if$ |
---|
437 | } |
---|
438 | FUNCTION {format.note} |
---|
439 | { |
---|
440 | note empty$ |
---|
441 | { "" } |
---|
442 | { note #1 #1 substring$ |
---|
443 | duplicate$ "{" = |
---|
444 | 'skip$ |
---|
445 | { output.state mid.sentence = |
---|
446 | { "l" } |
---|
447 | { "u" } |
---|
448 | if$ |
---|
449 | change.case$ |
---|
450 | } |
---|
451 | if$ |
---|
452 | note #2 global.max$ substring$ * "note" bibinfo.check |
---|
453 | } |
---|
454 | if$ |
---|
455 | } |
---|
456 | |
---|
457 | FUNCTION {format.title} |
---|
458 | { title |
---|
459 | duplicate$ empty$ 'skip$ |
---|
460 | { "t" change.case$ } |
---|
461 | if$ |
---|
462 | "title" bibinfo.check |
---|
463 | } |
---|
464 | FUNCTION {format.full.names} |
---|
465 | {'s := |
---|
466 | "" 't := |
---|
467 | #1 'nameptr := |
---|
468 | s num.names$ 'numnames := |
---|
469 | numnames 'namesleft := |
---|
470 | { namesleft #0 > } |
---|
471 | { s nameptr |
---|
472 | "{vv~}{ll}" format.name$ |
---|
473 | 't := |
---|
474 | nameptr #1 > |
---|
475 | { |
---|
476 | namesleft #1 > |
---|
477 | { ", " * t * } |
---|
478 | { |
---|
479 | s nameptr "{ll}" format.name$ duplicate$ "others" = |
---|
480 | { 't := } |
---|
481 | { pop$ } |
---|
482 | if$ |
---|
483 | t "others" = |
---|
484 | { |
---|
485 | " " * bbl.etal * |
---|
486 | } |
---|
487 | { |
---|
488 | bbl.and |
---|
489 | space.word * t * |
---|
490 | } |
---|
491 | if$ |
---|
492 | } |
---|
493 | if$ |
---|
494 | } |
---|
495 | 't |
---|
496 | if$ |
---|
497 | nameptr #1 + 'nameptr := |
---|
498 | namesleft #1 - 'namesleft := |
---|
499 | } |
---|
500 | while$ |
---|
501 | } |
---|
502 | |
---|
503 | FUNCTION {author.editor.key.full} |
---|
504 | { author empty$ |
---|
505 | { editor empty$ |
---|
506 | { key empty$ |
---|
507 | { cite$ #1 #3 substring$ } |
---|
508 | 'key |
---|
509 | if$ |
---|
510 | } |
---|
511 | { editor format.full.names } |
---|
512 | if$ |
---|
513 | } |
---|
514 | { author format.full.names } |
---|
515 | if$ |
---|
516 | } |
---|
517 | |
---|
518 | FUNCTION {author.key.full} |
---|
519 | { author empty$ |
---|
520 | { key empty$ |
---|
521 | { cite$ #1 #3 substring$ } |
---|
522 | 'key |
---|
523 | if$ |
---|
524 | } |
---|
525 | { author format.full.names } |
---|
526 | if$ |
---|
527 | } |
---|
528 | |
---|
529 | FUNCTION {editor.key.full} |
---|
530 | { editor empty$ |
---|
531 | { key empty$ |
---|
532 | { cite$ #1 #3 substring$ } |
---|
533 | 'key |
---|
534 | if$ |
---|
535 | } |
---|
536 | { editor format.full.names } |
---|
537 | if$ |
---|
538 | } |
---|
539 | |
---|
540 | FUNCTION {make.full.names} |
---|
541 | { type$ "book" = |
---|
542 | type$ "inbook" = |
---|
543 | or |
---|
544 | 'author.editor.key.full |
---|
545 | { type$ "proceedings" = |
---|
546 | 'editor.key.full |
---|
547 | 'author.key.full |
---|
548 | if$ |
---|
549 | } |
---|
550 | if$ |
---|
551 | } |
---|
552 | |
---|
553 | FUNCTION {output.bibitem} |
---|
554 | { newline$ |
---|
555 | "\bibitem[{" write$ |
---|
556 | label write$ |
---|
557 | ")" make.full.names duplicate$ short.list = |
---|
558 | { pop$ } |
---|
559 | { * } |
---|
560 | if$ |
---|
561 | "}]{" * write$ |
---|
562 | cite$ write$ |
---|
563 | "}" write$ |
---|
564 | newline$ |
---|
565 | "" |
---|
566 | before.all 'output.state := |
---|
567 | } |
---|
568 | |
---|
569 | FUNCTION {n.dashify} |
---|
570 | { |
---|
571 | 't := |
---|
572 | "" |
---|
573 | { t empty$ not } |
---|
574 | { t #1 #1 substring$ "-" = |
---|
575 | { t #1 #2 substring$ "--" = not |
---|
576 | { "--" * |
---|
577 | t #2 global.max$ substring$ 't := |
---|
578 | } |
---|
579 | { { t #1 #1 substring$ "-" = } |
---|
580 | { "-" * |
---|
581 | t #2 global.max$ substring$ 't := |
---|
582 | } |
---|
583 | while$ |
---|
584 | } |
---|
585 | if$ |
---|
586 | } |
---|
587 | { t #1 #1 substring$ * |
---|
588 | t #2 global.max$ substring$ 't := |
---|
589 | } |
---|
590 | if$ |
---|
591 | } |
---|
592 | while$ |
---|
593 | } |
---|
594 | |
---|
595 | FUNCTION {word.in} |
---|
596 | { bbl.in %capitalize |
---|
597 | ":" * |
---|
598 | " " * } |
---|
599 | |
---|
600 | FUNCTION {format.date} |
---|
601 | { year "year" bibinfo.check duplicate$ empty$ |
---|
602 | { |
---|
603 | } |
---|
604 | 'skip$ |
---|
605 | if$ |
---|
606 | extra.label * |
---|
607 | before.all 'output.state := |
---|
608 | ", " swap$ * |
---|
609 | } |
---|
610 | FUNCTION {format.btitle} |
---|
611 | { title "title" bibinfo.check |
---|
612 | duplicate$ empty$ 'skip$ |
---|
613 | { |
---|
614 | } |
---|
615 | if$ |
---|
616 | } |
---|
617 | FUNCTION {either.or.check} |
---|
618 | { empty$ |
---|
619 | 'pop$ |
---|
620 | { "can't use both " swap$ * " fields in " * cite$ * warning$ } |
---|
621 | if$ |
---|
622 | } |
---|
623 | FUNCTION {format.bvolume} |
---|
624 | { volume empty$ |
---|
625 | { "" } |
---|
626 | { bbl.volume volume tie.or.space.prefix |
---|
627 | "volume" bibinfo.check * * |
---|
628 | series "series" bibinfo.check |
---|
629 | duplicate$ empty$ 'pop$ |
---|
630 | { swap$ bbl.of space.word * swap$ |
---|
631 | emphasize * } |
---|
632 | if$ |
---|
633 | "volume and number" number either.or.check |
---|
634 | } |
---|
635 | if$ |
---|
636 | } |
---|
637 | FUNCTION {format.number.series} |
---|
638 | { volume empty$ |
---|
639 | { number empty$ |
---|
640 | { series field.or.null } |
---|
641 | { series empty$ |
---|
642 | { number "number" bibinfo.check } |
---|
643 | { output.state mid.sentence = |
---|
644 | { bbl.number } |
---|
645 | { bbl.number capitalize } |
---|
646 | if$ |
---|
647 | number tie.or.space.prefix "number" bibinfo.check * * |
---|
648 | bbl.in space.word * |
---|
649 | series "series" bibinfo.check * |
---|
650 | } |
---|
651 | if$ |
---|
652 | } |
---|
653 | if$ |
---|
654 | } |
---|
655 | { "" } |
---|
656 | if$ |
---|
657 | } |
---|
658 | |
---|
659 | FUNCTION {format.edition} |
---|
660 | { edition duplicate$ empty$ 'skip$ |
---|
661 | { |
---|
662 | output.state mid.sentence = |
---|
663 | { "l" } |
---|
664 | { "t" } |
---|
665 | if$ change.case$ |
---|
666 | "edition" bibinfo.check |
---|
667 | " " * bbl.edition * |
---|
668 | } |
---|
669 | if$ |
---|
670 | } |
---|
671 | INTEGERS { multiresult } |
---|
672 | FUNCTION {multi.page.check} |
---|
673 | { 't := |
---|
674 | #0 'multiresult := |
---|
675 | { multiresult not |
---|
676 | t empty$ not |
---|
677 | and |
---|
678 | } |
---|
679 | { t #1 #1 substring$ |
---|
680 | duplicate$ "-" = |
---|
681 | swap$ duplicate$ "," = |
---|
682 | swap$ "+" = |
---|
683 | or or |
---|
684 | { #1 'multiresult := } |
---|
685 | { t #2 global.max$ substring$ 't := } |
---|
686 | if$ |
---|
687 | } |
---|
688 | while$ |
---|
689 | multiresult |
---|
690 | } |
---|
691 | %FUNCTION {format.pages} |
---|
692 | %{ pages duplicate$ empty$ 'skip$ |
---|
693 | % { duplicate$ multi.page.check |
---|
694 | % { |
---|
695 | % n.dashify |
---|
696 | % } |
---|
697 | % { |
---|
698 | % } |
---|
699 | % if$ |
---|
700 | % "pages" bibinfo.check |
---|
701 | % } |
---|
702 | % if$ |
---|
703 | %} |
---|
704 | |
---|
705 | FUNCTION {format.pages} |
---|
706 | { pages duplicate$ empty$ 'skip$ |
---|
707 | { duplicate$ multi.page.check |
---|
708 | { |
---|
709 | bbl.pages swap$ |
---|
710 | n.dashify |
---|
711 | } |
---|
712 | { |
---|
713 | bbl.page swap$ |
---|
714 | } |
---|
715 | if$ |
---|
716 | tie.or.space.prefix |
---|
717 | "pages" bibinfo.check |
---|
718 | * * |
---|
719 | } |
---|
720 | if$ |
---|
721 | } |
---|
722 | |
---|
723 | FUNCTION {format.journal.pages} |
---|
724 | { pages duplicate$ empty$ 'pop$ |
---|
725 | { swap$ duplicate$ empty$ |
---|
726 | { pop$ pop$ format.pages } |
---|
727 | { |
---|
728 | ", " * |
---|
729 | swap$ |
---|
730 | n.dashify |
---|
731 | "pages" bibinfo.check |
---|
732 | * |
---|
733 | } |
---|
734 | if$ |
---|
735 | } |
---|
736 | if$ |
---|
737 | } |
---|
738 | FUNCTION {format.vol.num.pages} |
---|
739 | { volume field.or.null |
---|
740 | duplicate$ empty$ 'skip$ |
---|
741 | { |
---|
742 | "volume" bibinfo.check |
---|
743 | } |
---|
744 | if$ |
---|
745 | } |
---|
746 | |
---|
747 | FUNCTION {format.chapter.pages} |
---|
748 | { chapter empty$ |
---|
749 | { "" } |
---|
750 | { type empty$ |
---|
751 | { bbl.chapter } |
---|
752 | { type "l" change.case$ |
---|
753 | "type" bibinfo.check |
---|
754 | } |
---|
755 | if$ |
---|
756 | chapter tie.or.space.prefix |
---|
757 | "chapter" bibinfo.check |
---|
758 | * * |
---|
759 | } |
---|
760 | if$ |
---|
761 | } |
---|
762 | |
---|
763 | FUNCTION {format.booktitle} |
---|
764 | { |
---|
765 | booktitle "booktitle" bibinfo.check |
---|
766 | } |
---|
767 | FUNCTION {format.in.ed.booktitle} |
---|
768 | { format.booktitle duplicate$ empty$ 'skip$ |
---|
769 | { |
---|
770 | editor "editor" format.names.ed duplicate$ empty$ 'pop$ |
---|
771 | { |
---|
772 | " " * |
---|
773 | get.bbl.editor |
---|
774 | capitalize |
---|
775 | "(" swap$ * "), " * |
---|
776 | * swap$ |
---|
777 | * } |
---|
778 | if$ |
---|
779 | word.in swap$ * |
---|
780 | } |
---|
781 | if$ |
---|
782 | } |
---|
783 | FUNCTION {format.thesis.type} |
---|
784 | { type duplicate$ empty$ |
---|
785 | 'pop$ |
---|
786 | { swap$ pop$ |
---|
787 | "t" change.case$ "type" bibinfo.check |
---|
788 | } |
---|
789 | if$ |
---|
790 | } |
---|
791 | FUNCTION {format.tr.number} |
---|
792 | { number "number" bibinfo.check |
---|
793 | type duplicate$ empty$ |
---|
794 | { pop$ bbl.techrep } |
---|
795 | 'skip$ |
---|
796 | if$ |
---|
797 | "type" bibinfo.check |
---|
798 | swap$ duplicate$ empty$ |
---|
799 | { pop$ "t" change.case$ } |
---|
800 | { tie.or.space.prefix * * } |
---|
801 | if$ |
---|
802 | } |
---|
803 | FUNCTION {format.article.crossref} |
---|
804 | { |
---|
805 | word.in |
---|
806 | " \cite{" * crossref * "}" * |
---|
807 | } |
---|
808 | FUNCTION {format.book.crossref} |
---|
809 | { volume duplicate$ empty$ |
---|
810 | { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ |
---|
811 | pop$ word.in |
---|
812 | } |
---|
813 | { bbl.volume |
---|
814 | capitalize |
---|
815 | swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word * |
---|
816 | } |
---|
817 | if$ |
---|
818 | " \cite{" * crossref * "}" * |
---|
819 | } |
---|
820 | FUNCTION {format.incoll.inproc.crossref} |
---|
821 | { |
---|
822 | word.in |
---|
823 | " \cite{" * crossref * "}" * |
---|
824 | } |
---|
825 | FUNCTION {format.org.or.pub} |
---|
826 | { 't := |
---|
827 | "" |
---|
828 | address empty$ t empty$ and |
---|
829 | 'skip$ |
---|
830 | { |
---|
831 | t empty$ |
---|
832 | { address "address" bibinfo.check * |
---|
833 | } |
---|
834 | { t * |
---|
835 | address empty$ |
---|
836 | 'skip$ |
---|
837 | { ", " * address "address" bibinfo.check * } |
---|
838 | if$ |
---|
839 | } |
---|
840 | if$ |
---|
841 | } |
---|
842 | if$ |
---|
843 | } |
---|
844 | FUNCTION {format.publisher.address} |
---|
845 | { publisher "publisher" bibinfo.check format.org.or.pub |
---|
846 | } |
---|
847 | |
---|
848 | FUNCTION {format.organization.address} |
---|
849 | { organization "organization" bibinfo.check format.org.or.pub |
---|
850 | } |
---|
851 | |
---|
852 | FUNCTION {article} |
---|
853 | { "%Type = Article" write$ |
---|
854 | output.bibitem |
---|
855 | format.authors "author" output.check |
---|
856 | author format.key output |
---|
857 | format.date "year" output.check |
---|
858 | date.block |
---|
859 | format.title "title" output.check |
---|
860 | new.block |
---|
861 | crossref missing$ |
---|
862 | { |
---|
863 | journal |
---|
864 | "journal" bibinfo.check |
---|
865 | "journal" output.check |
---|
866 | add.blank |
---|
867 | format.vol.num.pages output |
---|
868 | } |
---|
869 | { format.article.crossref output.nonnull |
---|
870 | } |
---|
871 | if$ |
---|
872 | format.journal.pages |
---|
873 | new.block |
---|
874 | format.note output |
---|
875 | format.eprint output |
---|
876 | fin.entry |
---|
877 | } |
---|
878 | FUNCTION {book} |
---|
879 | { "%Type = Book" write$ |
---|
880 | output.bibitem |
---|
881 | author empty$ |
---|
882 | { format.editors "author and editor" output.check |
---|
883 | editor format.key output |
---|
884 | } |
---|
885 | { format.authors output.nonnull |
---|
886 | crossref missing$ |
---|
887 | { "author and editor" editor either.or.check } |
---|
888 | 'skip$ |
---|
889 | if$ |
---|
890 | } |
---|
891 | if$ |
---|
892 | format.date "year" output.check |
---|
893 | date.block |
---|
894 | format.btitle "title" output.check |
---|
895 | crossref missing$ |
---|
896 | { format.bvolume output |
---|
897 | new.block |
---|
898 | format.number.series output |
---|
899 | new.sentence |
---|
900 | format.publisher.address output |
---|
901 | } |
---|
902 | { |
---|
903 | new.block |
---|
904 | format.book.crossref output.nonnull |
---|
905 | } |
---|
906 | if$ |
---|
907 | format.edition output |
---|
908 | new.block |
---|
909 | format.note output |
---|
910 | format.eprint output |
---|
911 | fin.entry |
---|
912 | } |
---|
913 | FUNCTION {booklet} |
---|
914 | { "%Type = Booklet" write$ |
---|
915 | output.bibitem |
---|
916 | format.authors output |
---|
917 | author format.key output |
---|
918 | format.date "year" output.check |
---|
919 | date.block |
---|
920 | format.title "title" output.check |
---|
921 | new.block |
---|
922 | howpublished "howpublished" bibinfo.check output |
---|
923 | address "address" bibinfo.check output |
---|
924 | new.block |
---|
925 | format.note output |
---|
926 | format.eprint output |
---|
927 | fin.entry |
---|
928 | } |
---|
929 | |
---|
930 | FUNCTION {inbook} |
---|
931 | { "%Type = Inbook" write$ |
---|
932 | output.bibitem |
---|
933 | author empty$ |
---|
934 | { format.editors "author and editor" output.check |
---|
935 | editor format.key output |
---|
936 | } |
---|
937 | { format.authors output.nonnull |
---|
938 | crossref missing$ |
---|
939 | { "author and editor" editor either.or.check } |
---|
940 | 'skip$ |
---|
941 | if$ |
---|
942 | } |
---|
943 | if$ |
---|
944 | format.date "year" output.check |
---|
945 | date.block |
---|
946 | format.btitle "title" output.check |
---|
947 | crossref missing$ |
---|
948 | { |
---|
949 | format.publisher.address output |
---|
950 | format.bvolume output |
---|
951 | format.chapter.pages "chapter and pages" output.check |
---|
952 | new.block |
---|
953 | format.number.series output |
---|
954 | new.sentence |
---|
955 | } |
---|
956 | { |
---|
957 | format.chapter.pages "chapter and pages" output.check |
---|
958 | new.block |
---|
959 | format.book.crossref output.nonnull |
---|
960 | } |
---|
961 | if$ |
---|
962 | format.edition output |
---|
963 | format.pages "pages" output.check |
---|
964 | new.block |
---|
965 | format.note output |
---|
966 | format.eprint output |
---|
967 | fin.entry |
---|
968 | } |
---|
969 | |
---|
970 | FUNCTION {incollection} |
---|
971 | { "%Type = Incollection" write$ |
---|
972 | output.bibitem |
---|
973 | format.authors "author" output.check |
---|
974 | author format.key output |
---|
975 | format.date "year" output.check |
---|
976 | date.block |
---|
977 | format.title "title" output.book.check |
---|
978 | new.sentence |
---|
979 | crossref missing$ |
---|
980 | { format.in.ed.booktitle "booktitle" output.book.check |
---|
981 | format.publisher.address output |
---|
982 | format.bvolume output |
---|
983 | format.number.series output |
---|
984 | format.chapter.pages output |
---|
985 | new.sentence |
---|
986 | format.edition output |
---|
987 | } |
---|
988 | { format.incoll.inproc.crossref output.nonnull |
---|
989 | format.chapter.pages output |
---|
990 | } |
---|
991 | if$ |
---|
992 | format.pages "pages" output.check |
---|
993 | new.block |
---|
994 | format.note output |
---|
995 | format.eprint output |
---|
996 | fin.entry |
---|
997 | } |
---|
998 | FUNCTION {inproceedings} |
---|
999 | { "%Type = Inproceedings" write$ |
---|
1000 | output.bibitem |
---|
1001 | format.authors "author" output.check |
---|
1002 | author format.key output |
---|
1003 | format.date "year" output.check |
---|
1004 | date.block |
---|
1005 | format.title "title" output.book.check |
---|
1006 | new.sentence |
---|
1007 | crossref missing$ |
---|
1008 | { format.in.ed.booktitle "booktitle" output.check |
---|
1009 | new.sentence |
---|
1010 | publisher empty$ |
---|
1011 | { format.organization.address output } |
---|
1012 | { organization "organization" bibinfo.check output |
---|
1013 | format.publisher.address output |
---|
1014 | } |
---|
1015 | if$ |
---|
1016 | % format.bvolume output |
---|
1017 | % format.number.series output |
---|
1018 | % format.pages output |
---|
1019 | } |
---|
1020 | { format.incoll.inproc.crossref output.nonnull |
---|
1021 | format.pages output |
---|
1022 | } |
---|
1023 | if$ |
---|
1024 | format.pages "pages" output.check |
---|
1025 | new.block |
---|
1026 | format.note output |
---|
1027 | format.eprint output |
---|
1028 | fin.entry |
---|
1029 | } |
---|
1030 | FUNCTION {conference} { inproceedings } |
---|
1031 | FUNCTION {manual} |
---|
1032 | { "%Type = Manual" write$ |
---|
1033 | output.bibitem |
---|
1034 | format.authors output |
---|
1035 | author format.key output |
---|
1036 | format.date "year" output.check |
---|
1037 | date.block |
---|
1038 | format.btitle "title" output.check |
---|
1039 | organization address new.block.checkb |
---|
1040 | organization "organization" bibinfo.check output |
---|
1041 | address "address" bibinfo.check output |
---|
1042 | format.edition output |
---|
1043 | new.block |
---|
1044 | format.note output |
---|
1045 | format.eprint output |
---|
1046 | fin.entry |
---|
1047 | } |
---|
1048 | |
---|
1049 | FUNCTION {mastersthesis} |
---|
1050 | { "%Type = Masterthesis" write$ |
---|
1051 | output.bibitem |
---|
1052 | format.authors "author" output.check |
---|
1053 | author format.key output |
---|
1054 | format.date "year" output.check |
---|
1055 | date.block |
---|
1056 | format.btitle |
---|
1057 | "title" output.check |
---|
1058 | new.block |
---|
1059 | bbl.mthesis format.thesis.type output.nonnull |
---|
1060 | school "school" bibinfo.warn output |
---|
1061 | address "address" bibinfo.check output |
---|
1062 | new.block |
---|
1063 | format.note output |
---|
1064 | format.eprint output |
---|
1065 | fin.entry |
---|
1066 | } |
---|
1067 | |
---|
1068 | FUNCTION {misc} |
---|
1069 | { "%Type = Misc" write$ |
---|
1070 | output.bibitem |
---|
1071 | format.authors output |
---|
1072 | author format.key output |
---|
1073 | format.date "year" output.check |
---|
1074 | date.block |
---|
1075 | format.title output |
---|
1076 | new.block |
---|
1077 | howpublished "howpublished" bibinfo.check output |
---|
1078 | new.block |
---|
1079 | format.note output |
---|
1080 | format.eprint output |
---|
1081 | fin.entry |
---|
1082 | } |
---|
1083 | FUNCTION {phdthesis} |
---|
1084 | { "%Type = Phdthesis" write$ |
---|
1085 | output.bibitem |
---|
1086 | format.authors "author" output.check |
---|
1087 | author format.key output |
---|
1088 | format.date "year" output.check |
---|
1089 | date.block |
---|
1090 | format.btitle |
---|
1091 | "title" output.check |
---|
1092 | new.block |
---|
1093 | bbl.phdthesis format.thesis.type output.nonnull |
---|
1094 | school "school" bibinfo.warn output |
---|
1095 | address "address" bibinfo.check output |
---|
1096 | new.block |
---|
1097 | format.note output |
---|
1098 | format.eprint output |
---|
1099 | fin.entry |
---|
1100 | } |
---|
1101 | |
---|
1102 | FUNCTION {proceedings} |
---|
1103 | { "%Type = Proceedings" write$ |
---|
1104 | output.bibitem |
---|
1105 | format.editors output |
---|
1106 | editor format.key output |
---|
1107 | format.date "year" output.check |
---|
1108 | date.block |
---|
1109 | format.btitle "title" output.check |
---|
1110 | format.bvolume output |
---|
1111 | format.number.series output |
---|
1112 | new.sentence |
---|
1113 | publisher empty$ |
---|
1114 | { format.organization.address output } |
---|
1115 | { organization "organization" bibinfo.check output |
---|
1116 | format.publisher.address output |
---|
1117 | } |
---|
1118 | if$ |
---|
1119 | new.block |
---|
1120 | format.note output |
---|
1121 | format.eprint output |
---|
1122 | fin.entry |
---|
1123 | } |
---|
1124 | |
---|
1125 | FUNCTION {techreport} |
---|
1126 | { "%Type = Techreport" write$ |
---|
1127 | output.bibitem |
---|
1128 | format.authors "author" output.check |
---|
1129 | author format.key output |
---|
1130 | format.date "year" output.check |
---|
1131 | date.block |
---|
1132 | format.btitle |
---|
1133 | "title" output.check |
---|
1134 | new.block |
---|
1135 | format.tr.number output.nonnull |
---|
1136 | institution "institution" bibinfo.warn output |
---|
1137 | address "address" bibinfo.check output |
---|
1138 | new.block |
---|
1139 | format.note output |
---|
1140 | format.eprint output |
---|
1141 | fin.entry |
---|
1142 | } |
---|
1143 | |
---|
1144 | FUNCTION {unpublished} |
---|
1145 | { "%Type = Unpublished" write$ |
---|
1146 | output.bibitem |
---|
1147 | format.authors "author" output.check |
---|
1148 | author format.key output |
---|
1149 | format.date "year" output.check |
---|
1150 | date.block |
---|
1151 | format.title "title" output.check |
---|
1152 | new.block |
---|
1153 | format.note "note" output.check |
---|
1154 | format.eprint output |
---|
1155 | fin.entry |
---|
1156 | } |
---|
1157 | |
---|
1158 | FUNCTION {default.type} { misc } |
---|
1159 | READ |
---|
1160 | FUNCTION {sortify} |
---|
1161 | { purify$ |
---|
1162 | "l" change.case$ |
---|
1163 | } |
---|
1164 | INTEGERS { len } |
---|
1165 | FUNCTION {chop.word} |
---|
1166 | { 's := |
---|
1167 | 'len := |
---|
1168 | s #1 len substring$ = |
---|
1169 | { s len #1 + global.max$ substring$ } |
---|
1170 | 's |
---|
1171 | if$ |
---|
1172 | } |
---|
1173 | FUNCTION {format.lab.names} |
---|
1174 | { 's := |
---|
1175 | "" 't := |
---|
1176 | s #1 "{vv~}{ll}" format.name$ |
---|
1177 | s num.names$ duplicate$ |
---|
1178 | #2 > |
---|
1179 | { pop$ |
---|
1180 | " " * bbl.etal * |
---|
1181 | } |
---|
1182 | { #2 < |
---|
1183 | 'skip$ |
---|
1184 | { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = |
---|
1185 | { |
---|
1186 | " " * bbl.etal * |
---|
1187 | } |
---|
1188 | { bbl.and space.word * s #2 "{vv~}{ll}" format.name$ |
---|
1189 | * } |
---|
1190 | if$ |
---|
1191 | } |
---|
1192 | if$ |
---|
1193 | } |
---|
1194 | if$ |
---|
1195 | } |
---|
1196 | |
---|
1197 | FUNCTION {author.key.label} |
---|
1198 | { author empty$ |
---|
1199 | { key empty$ |
---|
1200 | { cite$ #1 #3 substring$ } |
---|
1201 | 'key |
---|
1202 | if$ |
---|
1203 | } |
---|
1204 | { author format.lab.names } |
---|
1205 | if$ |
---|
1206 | } |
---|
1207 | |
---|
1208 | FUNCTION {author.editor.key.label} |
---|
1209 | { author empty$ |
---|
1210 | { editor empty$ |
---|
1211 | { key empty$ |
---|
1212 | { cite$ #1 #3 substring$ } |
---|
1213 | 'key |
---|
1214 | if$ |
---|
1215 | } |
---|
1216 | { editor format.lab.names } |
---|
1217 | if$ |
---|
1218 | } |
---|
1219 | { author format.lab.names } |
---|
1220 | if$ |
---|
1221 | } |
---|
1222 | |
---|
1223 | FUNCTION {editor.key.label} |
---|
1224 | { editor empty$ |
---|
1225 | { key empty$ |
---|
1226 | { cite$ #1 #3 substring$ } |
---|
1227 | 'key |
---|
1228 | if$ |
---|
1229 | } |
---|
1230 | { editor format.lab.names } |
---|
1231 | if$ |
---|
1232 | } |
---|
1233 | |
---|
1234 | FUNCTION {calc.short.authors} |
---|
1235 | { type$ "book" = |
---|
1236 | type$ "inbook" = |
---|
1237 | or |
---|
1238 | 'author.editor.key.label |
---|
1239 | { type$ "proceedings" = |
---|
1240 | 'editor.key.label |
---|
1241 | 'author.key.label |
---|
1242 | if$ |
---|
1243 | } |
---|
1244 | if$ |
---|
1245 | 'short.list := |
---|
1246 | } |
---|
1247 | |
---|
1248 | FUNCTION {calc.label} |
---|
1249 | { calc.short.authors |
---|
1250 | short.list |
---|
1251 | "(" |
---|
1252 | * |
---|
1253 | year duplicate$ empty$ |
---|
1254 | short.list key field.or.null = or |
---|
1255 | { pop$ "" } |
---|
1256 | 'skip$ |
---|
1257 | if$ |
---|
1258 | * |
---|
1259 | 'label := |
---|
1260 | } |
---|
1261 | |
---|
1262 | FUNCTION {sort.format.names} |
---|
1263 | { 's := |
---|
1264 | #1 'nameptr := |
---|
1265 | "" |
---|
1266 | s num.names$ 'numnames := |
---|
1267 | numnames 'namesleft := |
---|
1268 | { namesleft #0 > } |
---|
1269 | { s nameptr |
---|
1270 | "{ll{ }}{ f{ }}{ jj{ }}" |
---|
1271 | format.name$ 't := |
---|
1272 | nameptr #1 > |
---|
1273 | { |
---|
1274 | " " * |
---|
1275 | namesleft #1 = t "others" = and |
---|
1276 | { "zzzzz" * } |
---|
1277 | { t sortify * } |
---|
1278 | if$ |
---|
1279 | } |
---|
1280 | { t sortify * } |
---|
1281 | if$ |
---|
1282 | nameptr #1 + 'nameptr := |
---|
1283 | namesleft #1 - 'namesleft := |
---|
1284 | } |
---|
1285 | while$ |
---|
1286 | } |
---|
1287 | |
---|
1288 | FUNCTION {sort.format.title} |
---|
1289 | { 't := |
---|
1290 | "A " #2 |
---|
1291 | "An " #3 |
---|
1292 | "The " #4 t chop.word |
---|
1293 | chop.word |
---|
1294 | chop.word |
---|
1295 | sortify |
---|
1296 | #1 global.max$ substring$ |
---|
1297 | } |
---|
1298 | FUNCTION {author.sort} |
---|
1299 | { author empty$ |
---|
1300 | { key empty$ |
---|
1301 | { "to sort, need author or key in " cite$ * warning$ |
---|
1302 | "" |
---|
1303 | } |
---|
1304 | { key sortify } |
---|
1305 | if$ |
---|
1306 | } |
---|
1307 | { author sort.format.names } |
---|
1308 | if$ |
---|
1309 | } |
---|
1310 | FUNCTION {author.editor.sort} |
---|
1311 | { author empty$ |
---|
1312 | { editor empty$ |
---|
1313 | { key empty$ |
---|
1314 | { "to sort, need author, editor, or key in " cite$ * warning$ |
---|
1315 | "" |
---|
1316 | } |
---|
1317 | { key sortify } |
---|
1318 | if$ |
---|
1319 | } |
---|
1320 | { editor sort.format.names } |
---|
1321 | if$ |
---|
1322 | } |
---|
1323 | { author sort.format.names } |
---|
1324 | if$ |
---|
1325 | } |
---|
1326 | FUNCTION {editor.sort} |
---|
1327 | { editor empty$ |
---|
1328 | { key empty$ |
---|
1329 | { "to sort, need editor or key in " cite$ * warning$ |
---|
1330 | "" |
---|
1331 | } |
---|
1332 | { key sortify } |
---|
1333 | if$ |
---|
1334 | } |
---|
1335 | { editor sort.format.names } |
---|
1336 | if$ |
---|
1337 | } |
---|
1338 | FUNCTION {presort} |
---|
1339 | { calc.label |
---|
1340 | label sortify |
---|
1341 | " " |
---|
1342 | * |
---|
1343 | type$ "book" = |
---|
1344 | type$ "inbook" = |
---|
1345 | or |
---|
1346 | 'author.editor.sort |
---|
1347 | { type$ "proceedings" = |
---|
1348 | 'editor.sort |
---|
1349 | 'author.sort |
---|
1350 | if$ |
---|
1351 | } |
---|
1352 | if$ |
---|
1353 | #1 entry.max$ substring$ |
---|
1354 | 'sort.label := |
---|
1355 | sort.label |
---|
1356 | * |
---|
1357 | " " |
---|
1358 | * |
---|
1359 | title field.or.null |
---|
1360 | sort.format.title |
---|
1361 | * |
---|
1362 | #1 entry.max$ substring$ |
---|
1363 | 'sort.key$ := |
---|
1364 | } |
---|
1365 | |
---|
1366 | ITERATE {presort} |
---|
1367 | SORT |
---|
1368 | STRINGS { last.label next.extra } |
---|
1369 | INTEGERS { last.extra.num number.label } |
---|
1370 | FUNCTION {initialize.extra.label.stuff} |
---|
1371 | { #0 int.to.chr$ 'last.label := |
---|
1372 | "" 'next.extra := |
---|
1373 | #0 'last.extra.num := |
---|
1374 | #0 'number.label := |
---|
1375 | } |
---|
1376 | FUNCTION {forward.pass} |
---|
1377 | { last.label label = |
---|
1378 | { last.extra.num #1 + 'last.extra.num := |
---|
1379 | last.extra.num int.to.chr$ 'extra.label := |
---|
1380 | } |
---|
1381 | { "a" chr.to.int$ 'last.extra.num := |
---|
1382 | "" 'extra.label := |
---|
1383 | label 'last.label := |
---|
1384 | } |
---|
1385 | if$ |
---|
1386 | number.label #1 + 'number.label := |
---|
1387 | } |
---|
1388 | FUNCTION {reverse.pass} |
---|
1389 | { next.extra "b" = |
---|
1390 | { "a" 'extra.label := } |
---|
1391 | 'skip$ |
---|
1392 | if$ |
---|
1393 | extra.label 'next.extra := |
---|
1394 | extra.label |
---|
1395 | duplicate$ empty$ |
---|
1396 | 'skip$ |
---|
1397 | % { "{\natexlab{" swap$ * "}}" * } |
---|
1398 | { "" swap$ * "" * } |
---|
1399 | if$ |
---|
1400 | 'extra.label := |
---|
1401 | label extra.label * 'label := |
---|
1402 | } |
---|
1403 | EXECUTE {initialize.extra.label.stuff} |
---|
1404 | ITERATE {forward.pass} |
---|
1405 | REVERSE {reverse.pass} |
---|
1406 | FUNCTION {bib.sort.order} |
---|
1407 | { sort.label |
---|
1408 | " " |
---|
1409 | * |
---|
1410 | year field.or.null sortify |
---|
1411 | * |
---|
1412 | " " |
---|
1413 | * |
---|
1414 | title field.or.null |
---|
1415 | sort.format.title |
---|
1416 | * |
---|
1417 | #1 entry.max$ substring$ |
---|
1418 | 'sort.key$ := |
---|
1419 | } |
---|
1420 | ITERATE {bib.sort.order} |
---|
1421 | SORT |
---|
1422 | FUNCTION {begin.bib} |
---|
1423 | { preamble$ empty$ |
---|
1424 | 'skip$ |
---|
1425 | { preamble$ write$ newline$ } |
---|
1426 | if$ |
---|
1427 | "\begin{thebibliography}{" number.label int.to.str$ * "}" * |
---|
1428 | write$ newline$ |
---|
1429 | "\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi" |
---|
1430 | write$ newline$ |
---|
1431 | "\expandafter\ifx\csname url\endcsname\relax" |
---|
1432 | write$ newline$ |
---|
1433 | " \def\url#1{\texttt{#1}}\fi" |
---|
1434 | write$ newline$ |
---|
1435 | "\expandafter\ifx\csname urlprefix\endcsname\relax\def\urlprefix{URL }\fi" |
---|
1436 | write$ newline$ |
---|
1437 | "\providecommand{\eprint}[2][]{\url{#2}}" |
---|
1438 | write$ newline$ |
---|
1439 | "\providecommand{\bibinfo}[2]{#2}" |
---|
1440 | write$ newline$ |
---|
1441 | "\ifx\xfnm\relax \def\xfnm[#1]{\unskip,\space#1}\fi" |
---|
1442 | write$ newline$ |
---|
1443 | } |
---|
1444 | EXECUTE {begin.bib} |
---|
1445 | EXECUTE {init.state.consts} |
---|
1446 | ITERATE {call.type$} |
---|
1447 | FUNCTION {end.bib} |
---|
1448 | { newline$ |
---|
1449 | "\end{thebibliography}" write$ newline$ |
---|
1450 | } |
---|
1451 | EXECUTE {end.bib} |
---|
1452 | %% End of customized bst file |
---|
1453 | %% |
---|
1454 | %% End of file `model2-names.bst'. |
---|