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