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