1 | %% |
---|
2 | %% This is file `elsart-num.bst', |
---|
3 | %% generated with the docstrip utility. |
---|
4 | %% |
---|
5 | %% The original source files were: |
---|
6 | %% |
---|
7 | %% merlin.mbs (with options: `,seq-no,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.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 that by which the works were originally |
---|
47 | % cited in the text, or that in the database. |
---|
48 | %--------------------------------------------------------------------- |
---|
49 | |
---|
50 | ENTRY |
---|
51 | { address |
---|
52 | author |
---|
53 | booktitle |
---|
54 | chapter |
---|
55 | edition |
---|
56 | editor |
---|
57 | howpublished |
---|
58 | institution |
---|
59 | journal |
---|
60 | key |
---|
61 | month |
---|
62 | note |
---|
63 | number |
---|
64 | organization |
---|
65 | pages |
---|
66 | publisher |
---|
67 | school |
---|
68 | series |
---|
69 | title |
---|
70 | type |
---|
71 | url |
---|
72 | volume |
---|
73 | year |
---|
74 | } |
---|
75 | {} |
---|
76 | { label } |
---|
77 | |
---|
78 | INTEGERS { output.state before.all mid.sentence after.sentence after.block } |
---|
79 | |
---|
80 | FUNCTION {init.state.consts} |
---|
81 | { #0 'before.all := |
---|
82 | #1 'mid.sentence := |
---|
83 | #2 'after.sentence := |
---|
84 | #3 'after.block := |
---|
85 | } |
---|
86 | |
---|
87 | STRINGS { s t } |
---|
88 | |
---|
89 | FUNCTION {output.nonnull} |
---|
90 | { 's := |
---|
91 | output.state mid.sentence = |
---|
92 | { ", " * write$ } |
---|
93 | { output.state after.block = |
---|
94 | { add.period$ write$ |
---|
95 | newline$ |
---|
96 | "\newblock " write$ |
---|
97 | } |
---|
98 | { output.state before.all = |
---|
99 | 'write$ |
---|
100 | { add.period$ " " * write$ } |
---|
101 | if$ |
---|
102 | } |
---|
103 | if$ |
---|
104 | mid.sentence 'output.state := |
---|
105 | } |
---|
106 | if$ |
---|
107 | s |
---|
108 | } |
---|
109 | |
---|
110 | FUNCTION {output} |
---|
111 | { duplicate$ empty$ |
---|
112 | 'pop$ |
---|
113 | 'output.nonnull |
---|
114 | if$ |
---|
115 | } |
---|
116 | |
---|
117 | FUNCTION {output.check} |
---|
118 | { 't := |
---|
119 | duplicate$ empty$ |
---|
120 | { pop$ "empty " t * " in " * cite$ * warning$ } |
---|
121 | 'output.nonnull |
---|
122 | if$ |
---|
123 | } |
---|
124 | |
---|
125 | FUNCTION {fin.entry} |
---|
126 | { add.period$ |
---|
127 | write$ |
---|
128 | newline$ |
---|
129 | } |
---|
130 | |
---|
131 | FUNCTION {new.block} |
---|
132 | { output.state before.all = |
---|
133 | 'skip$ |
---|
134 | { after.block 'output.state := } |
---|
135 | if$ |
---|
136 | } |
---|
137 | |
---|
138 | FUNCTION {new.sentence} |
---|
139 | { output.state after.block = |
---|
140 | 'skip$ |
---|
141 | { output.state before.all = |
---|
142 | 'skip$ |
---|
143 | { after.sentence 'output.state := } |
---|
144 | if$ |
---|
145 | } |
---|
146 | if$ |
---|
147 | } |
---|
148 | |
---|
149 | %SP 2003/07/25 |
---|
150 | % No longer used |
---|
151 | FUNCTION {add.blank} |
---|
152 | { " " * before.all 'output.state := |
---|
153 | } |
---|
154 | |
---|
155 | FUNCTION {date.block} |
---|
156 | { |
---|
157 | add.blank |
---|
158 | } |
---|
159 | |
---|
160 | FUNCTION {not} |
---|
161 | { { #0 } |
---|
162 | { #1 } |
---|
163 | if$ |
---|
164 | } |
---|
165 | |
---|
166 | FUNCTION {and} |
---|
167 | { 'skip$ |
---|
168 | { pop$ #0 } |
---|
169 | if$ |
---|
170 | } |
---|
171 | |
---|
172 | FUNCTION {or} |
---|
173 | { { pop$ #1 } |
---|
174 | 'skip$ |
---|
175 | if$ |
---|
176 | } |
---|
177 | |
---|
178 | FUNCTION {new.block.checka} |
---|
179 | { empty$ |
---|
180 | 'skip$ |
---|
181 | 'new.block |
---|
182 | if$ |
---|
183 | } |
---|
184 | |
---|
185 | FUNCTION {new.block.checkb} |
---|
186 | { empty$ |
---|
187 | swap$ empty$ |
---|
188 | and |
---|
189 | 'skip$ |
---|
190 | 'new.block |
---|
191 | if$ |
---|
192 | } |
---|
193 | |
---|
194 | FUNCTION {new.sentence.checka} |
---|
195 | { empty$ |
---|
196 | 'skip$ |
---|
197 | 'new.sentence |
---|
198 | if$ |
---|
199 | } |
---|
200 | |
---|
201 | FUNCTION {new.sentence.checkb} |
---|
202 | { empty$ |
---|
203 | swap$ empty$ |
---|
204 | and |
---|
205 | 'skip$ |
---|
206 | 'new.sentence |
---|
207 | if$ |
---|
208 | } |
---|
209 | |
---|
210 | FUNCTION {field.or.null} |
---|
211 | { duplicate$ empty$ |
---|
212 | { pop$ "" } |
---|
213 | 'skip$ |
---|
214 | if$ |
---|
215 | } |
---|
216 | |
---|
217 | FUNCTION {emphasize} |
---|
218 | { skip$ } |
---|
219 | |
---|
220 | FUNCTION {capitalize} |
---|
221 | { "u" change.case$ "t" change.case$ } |
---|
222 | |
---|
223 | FUNCTION {space.word} |
---|
224 | { " " swap$ * " " * } |
---|
225 | |
---|
226 | % Here are the language-specific definitions for explicit words. |
---|
227 | % Each function has a name bbl.xxx where xxx is the English word. |
---|
228 | % The language selected here is ENGLISH |
---|
229 | FUNCTION {bbl.and} |
---|
230 | { "and"} |
---|
231 | |
---|
232 | FUNCTION {bbl.etal} |
---|
233 | { "et~al." } |
---|
234 | |
---|
235 | FUNCTION {bbl.editors} |
---|
236 | { "Eds." } |
---|
237 | |
---|
238 | FUNCTION {bbl.editor} |
---|
239 | { "Ed." } |
---|
240 | |
---|
241 | FUNCTION {bbl.edby} |
---|
242 | { "edited by" } |
---|
243 | |
---|
244 | FUNCTION {bbl.edition} |
---|
245 | { "Edition" } |
---|
246 | |
---|
247 | FUNCTION {bbl.volume} |
---|
248 | { "Vol." } |
---|
249 | |
---|
250 | FUNCTION {bbl.of} |
---|
251 | { "of" } |
---|
252 | |
---|
253 | %SP 2005/01/21 |
---|
254 | % capitalize, as Ch. and Vol. |
---|
255 | FUNCTION {bbl.number} |
---|
256 | { "No." } |
---|
257 | |
---|
258 | FUNCTION {bbl.nr} |
---|
259 | { "no." } |
---|
260 | |
---|
261 | FUNCTION {bbl.in} |
---|
262 | { "in" } |
---|
263 | |
---|
264 | FUNCTION {bbl.pages} |
---|
265 | { "pp." } |
---|
266 | |
---|
267 | FUNCTION {bbl.page} |
---|
268 | { "p." } |
---|
269 | |
---|
270 | FUNCTION {bbl.chapter} |
---|
271 | { "Ch." } |
---|
272 | |
---|
273 | FUNCTION {bbl.techrep} |
---|
274 | { "Tech. Rep." } |
---|
275 | |
---|
276 | FUNCTION {bbl.mthesis} |
---|
277 | { "Master's thesis" } |
---|
278 | |
---|
279 | FUNCTION {bbl.phdthesis} |
---|
280 | { "Ph.D. thesis" } |
---|
281 | |
---|
282 | FUNCTION {bbl.first} |
---|
283 | { "1st" } |
---|
284 | |
---|
285 | FUNCTION {bbl.second} |
---|
286 | { "2nd" } |
---|
287 | |
---|
288 | FUNCTION {bbl.third} |
---|
289 | { "3rd" } |
---|
290 | |
---|
291 | FUNCTION {bbl.fourth} |
---|
292 | { "4th" } |
---|
293 | |
---|
294 | FUNCTION {bbl.fifth} |
---|
295 | { "5th" } |
---|
296 | |
---|
297 | FUNCTION {bbl.st} |
---|
298 | { "st" } |
---|
299 | |
---|
300 | FUNCTION {bbl.nd} |
---|
301 | { "nd" } |
---|
302 | |
---|
303 | FUNCTION {bbl.rd} |
---|
304 | { "rd" } |
---|
305 | |
---|
306 | FUNCTION {bbl.th} |
---|
307 | { "th" } |
---|
308 | |
---|
309 | MACRO {jan} {"Jan."} |
---|
310 | |
---|
311 | MACRO {feb} {"Feb."} |
---|
312 | |
---|
313 | MACRO {mar} {"Mar."} |
---|
314 | |
---|
315 | MACRO {apr} {"Apr."} |
---|
316 | |
---|
317 | MACRO {may} {"May"} |
---|
318 | |
---|
319 | MACRO {jun} {"Jun."} |
---|
320 | |
---|
321 | MACRO {jul} {"Jul."} |
---|
322 | |
---|
323 | MACRO {aug} {"Aug."} |
---|
324 | |
---|
325 | MACRO {sep} {"Sep."} |
---|
326 | |
---|
327 | MACRO {oct} {"Oct."} |
---|
328 | |
---|
329 | MACRO {nov} {"Nov."} |
---|
330 | |
---|
331 | MACRO {dec} {"Dec."} |
---|
332 | |
---|
333 | FUNCTION {eng.ord} |
---|
334 | { duplicate$ "1" swap$ * |
---|
335 | #-2 #1 substring$ "1" = |
---|
336 | { bbl.th * } |
---|
337 | { duplicate$ #-1 #1 substring$ |
---|
338 | duplicate$ "1" = |
---|
339 | { pop$ bbl.st * } |
---|
340 | { duplicate$ "2" = |
---|
341 | { pop$ bbl.nd * } |
---|
342 | { "3" = |
---|
343 | { bbl.rd * } |
---|
344 | { bbl.th * } |
---|
345 | if$ |
---|
346 | } |
---|
347 | if$ |
---|
348 | } |
---|
349 | if$ |
---|
350 | } |
---|
351 | if$ |
---|
352 | } |
---|
353 | |
---|
354 | MACRO {acmcs} {"ACM Comput. Surv."} |
---|
355 | |
---|
356 | MACRO {acta} {"Acta Inf."} |
---|
357 | |
---|
358 | MACRO {cacm} {"Commun. ACM"} |
---|
359 | |
---|
360 | MACRO {ibmjrd} {"IBM J. Res. Dev."} |
---|
361 | |
---|
362 | MACRO {ibmsj} {"IBM Syst.~J."} |
---|
363 | |
---|
364 | MACRO {ieeese} {"IEEE Trans. Softw. Eng."} |
---|
365 | |
---|
366 | MACRO {ieeetc} {"IEEE Trans. Comput."} |
---|
367 | |
---|
368 | MACRO {ieeetcad} |
---|
369 | {"IEEE Trans. Comput.-Aided Design Integrated Circuits"} |
---|
370 | |
---|
371 | MACRO {ipl} {"Inf. Process. Lett."} |
---|
372 | |
---|
373 | MACRO {jacm} {"J.~ACM"} |
---|
374 | |
---|
375 | MACRO {jcss} {"J.~Comput. Syst. Sci."} |
---|
376 | |
---|
377 | MACRO {scp} {"Sci. Comput. Programming"} |
---|
378 | |
---|
379 | MACRO {sicomp} {"SIAM J. Comput."} |
---|
380 | |
---|
381 | MACRO {tocs} {"ACM Trans. Comput. Syst."} |
---|
382 | |
---|
383 | MACRO {tods} {"ACM Trans. Database Syst."} |
---|
384 | |
---|
385 | MACRO {tog} {"ACM Trans. Gr."} |
---|
386 | |
---|
387 | MACRO {toms} {"ACM Trans. Math. Softw."} |
---|
388 | |
---|
389 | MACRO {toois} {"ACM Trans. Office Inf. Syst."} |
---|
390 | |
---|
391 | MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."} |
---|
392 | |
---|
393 | MACRO {tcs} {"Theoretical Comput. Sci."} |
---|
394 | |
---|
395 | FUNCTION {write.url} |
---|
396 | { url empty$ |
---|
397 | { skip$ } |
---|
398 | { "\newline\urlprefix\url{" url * "}" * write$ newline$ } |
---|
399 | if$ |
---|
400 | } |
---|
401 | |
---|
402 | |
---|
403 | INTEGERS { nameptr namesleft numnames } |
---|
404 | |
---|
405 | FUNCTION {format.names} |
---|
406 | { 's := |
---|
407 | #1 'nameptr := |
---|
408 | s num.names$ 'numnames := |
---|
409 | numnames 'namesleft := |
---|
410 | { namesleft #0 > } |
---|
411 | { s nameptr |
---|
412 | "{f.~}{vv~}{ll}{, jj}" format.name$ |
---|
413 | 't := |
---|
414 | nameptr #1 > |
---|
415 | { |
---|
416 | namesleft #1 > |
---|
417 | { ", " * t * } |
---|
418 | { |
---|
419 | "," * |
---|
420 | s nameptr "{ll}" format.name$ duplicate$ "others" = |
---|
421 | { 't := } |
---|
422 | { pop$ } |
---|
423 | if$ |
---|
424 | t "others" = |
---|
425 | { |
---|
426 | " " * bbl.etal * |
---|
427 | } |
---|
428 | { " " * t * } |
---|
429 | if$ |
---|
430 | } |
---|
431 | if$ |
---|
432 | } |
---|
433 | 't |
---|
434 | if$ |
---|
435 | nameptr #1 + 'nameptr := |
---|
436 | namesleft #1 - 'namesleft := |
---|
437 | } |
---|
438 | while$ |
---|
439 | } |
---|
440 | FUNCTION {format.names.ed} |
---|
441 | { format.names } |
---|
442 | FUNCTION {format.authors} |
---|
443 | { author empty$ |
---|
444 | { "" } |
---|
445 | { author format.names } |
---|
446 | if$ |
---|
447 | } |
---|
448 | |
---|
449 | FUNCTION {format.editors} |
---|
450 | { editor empty$ |
---|
451 | { "" } |
---|
452 | { editor format.names |
---|
453 | editor num.names$ #1 > |
---|
454 | { " (" * bbl.editors * ")" * } |
---|
455 | { " (" * bbl.editor * ")" * } |
---|
456 | if$ |
---|
457 | } |
---|
458 | if$ |
---|
459 | } |
---|
460 | |
---|
461 | FUNCTION {format.in.editors} |
---|
462 | { editor empty$ |
---|
463 | { "" } |
---|
464 | { editor format.names.ed |
---|
465 | editor num.names$ #1 > |
---|
466 | { " (" * bbl.editors * ")" * } |
---|
467 | { " (" * bbl.editor * ")" * } |
---|
468 | if$ |
---|
469 | } |
---|
470 | if$ |
---|
471 | } |
---|
472 | |
---|
473 | FUNCTION {format.note} |
---|
474 | { |
---|
475 | note empty$ |
---|
476 | { "" } |
---|
477 | { note #1 #1 substring$ |
---|
478 | duplicate$ "{" = |
---|
479 | 'skip$ |
---|
480 | { output.state mid.sentence = |
---|
481 | { "l" } |
---|
482 | { "u" } |
---|
483 | if$ |
---|
484 | change.case$ |
---|
485 | } |
---|
486 | if$ |
---|
487 | note #2 global.max$ substring$ * |
---|
488 | } |
---|
489 | if$ |
---|
490 | } |
---|
491 | |
---|
492 | FUNCTION {format.title} |
---|
493 | { title empty$ |
---|
494 | { "" } |
---|
495 | { title "t" change.case$ |
---|
496 | } |
---|
497 | if$ |
---|
498 | } |
---|
499 | |
---|
500 | FUNCTION {output.bibitem} |
---|
501 | { newline$ |
---|
502 | "\bibitem{" write$ |
---|
503 | cite$ write$ |
---|
504 | "}" write$ |
---|
505 | newline$ |
---|
506 | "" |
---|
507 | before.all 'output.state := |
---|
508 | } |
---|
509 | |
---|
510 | FUNCTION {n.dashify} |
---|
511 | { |
---|
512 | 't := |
---|
513 | "" |
---|
514 | { t empty$ not } |
---|
515 | { t #1 #1 substring$ "-" = |
---|
516 | { t #1 #2 substring$ "--" = not |
---|
517 | { "--" * |
---|
518 | t #2 global.max$ substring$ 't := |
---|
519 | } |
---|
520 | { { t #1 #1 substring$ "-" = } |
---|
521 | { "-" * |
---|
522 | t #2 global.max$ substring$ 't := |
---|
523 | } |
---|
524 | while$ |
---|
525 | } |
---|
526 | if$ |
---|
527 | } |
---|
528 | { t #1 #1 substring$ * |
---|
529 | t #2 global.max$ substring$ 't := |
---|
530 | } |
---|
531 | if$ |
---|
532 | } |
---|
533 | while$ |
---|
534 | } |
---|
535 | |
---|
536 | FUNCTION {word.in} |
---|
537 | { bbl.in |
---|
538 | ":" * |
---|
539 | " " * } |
---|
540 | |
---|
541 | FUNCTION {format.date} |
---|
542 | { year empty$ |
---|
543 | { month empty$ |
---|
544 | { "" } |
---|
545 | { "there's a month but no year in " cite$ * warning$ |
---|
546 | month |
---|
547 | } |
---|
548 | if$ |
---|
549 | } |
---|
550 | { month empty$ |
---|
551 | 'year |
---|
552 | { month " " * year * } |
---|
553 | if$ |
---|
554 | } |
---|
555 | if$ |
---|
556 | duplicate$ empty$ |
---|
557 | 'skip$ |
---|
558 | { |
---|
559 | before.all 'output.state := |
---|
560 | " (" swap$ * ")" * |
---|
561 | } |
---|
562 | if$ |
---|
563 | } |
---|
564 | |
---|
565 | FUNCTION{format.year} |
---|
566 | { year duplicate$ empty$ |
---|
567 | { "empty year in " cite$ * warning$ pop$ "" } |
---|
568 | { "(" swap$ * ")" * } |
---|
569 | if$ |
---|
570 | } |
---|
571 | |
---|
572 | FUNCTION {format.btitle} |
---|
573 | { title |
---|
574 | } |
---|
575 | |
---|
576 | FUNCTION {tie.or.space.connect} |
---|
577 | { duplicate$ text.length$ #3 < |
---|
578 | { "~" } |
---|
579 | { " " } |
---|
580 | if$ |
---|
581 | swap$ * * |
---|
582 | } |
---|
583 | |
---|
584 | FUNCTION {either.or.check} |
---|
585 | { empty$ |
---|
586 | 'pop$ |
---|
587 | { "can't use both " swap$ * " fields in " * cite$ * warning$ } |
---|
588 | if$ |
---|
589 | } |
---|
590 | |
---|
591 | FUNCTION {format.bvolume} |
---|
592 | { volume empty$ |
---|
593 | { "" } |
---|
594 | { bbl.volume volume tie.or.space.connect |
---|
595 | series empty$ |
---|
596 | 'skip$ |
---|
597 | { bbl.of space.word * series emphasize * } |
---|
598 | if$ |
---|
599 | "volume and number" number either.or.check |
---|
600 | } |
---|
601 | if$ |
---|
602 | } |
---|
603 | |
---|
604 | FUNCTION {format.number.series} |
---|
605 | { volume empty$ |
---|
606 | { number empty$ |
---|
607 | { series field.or.null } |
---|
608 | { output.state mid.sentence = |
---|
609 | { bbl.number } |
---|
610 | { bbl.number capitalize } |
---|
611 | if$ |
---|
612 | number tie.or.space.connect |
---|
613 | series empty$ |
---|
614 | { "there's a number but no series in " cite$ * warning$ } |
---|
615 | { bbl.in space.word * series * } |
---|
616 | if$ |
---|
617 | } |
---|
618 | if$ |
---|
619 | } |
---|
620 | { "" } |
---|
621 | if$ |
---|
622 | } |
---|
623 | |
---|
624 | FUNCTION {is.num} |
---|
625 | { chr.to.int$ |
---|
626 | duplicate$ "0" chr.to.int$ < not |
---|
627 | swap$ "9" chr.to.int$ > not and |
---|
628 | } |
---|
629 | |
---|
630 | FUNCTION {extract.num} |
---|
631 | { duplicate$ 't := |
---|
632 | "" 's := |
---|
633 | { t empty$ not } |
---|
634 | { t #1 #1 substring$ |
---|
635 | t #2 global.max$ substring$ 't := |
---|
636 | duplicate$ is.num |
---|
637 | { s swap$ * 's := } |
---|
638 | { pop$ "" 't := } |
---|
639 | if$ |
---|
640 | } |
---|
641 | while$ |
---|
642 | s empty$ |
---|
643 | 'skip$ |
---|
644 | { pop$ s } |
---|
645 | if$ |
---|
646 | } |
---|
647 | |
---|
648 | FUNCTION {convert.edition} |
---|
649 | { edition extract.num "l" change.case$ 's := |
---|
650 | s "first" = s "1" = or |
---|
651 | { bbl.first 't := } |
---|
652 | { s "second" = s "2" = or |
---|
653 | { bbl.second 't := } |
---|
654 | { s "third" = s "3" = or |
---|
655 | { bbl.third 't := } |
---|
656 | { s "fourth" = s "4" = or |
---|
657 | { bbl.fourth 't := } |
---|
658 | { s "fifth" = s "5" = or |
---|
659 | { bbl.fifth 't := } |
---|
660 | { s #1 #1 substring$ is.num |
---|
661 | { s eng.ord 't := } |
---|
662 | { edition 't := } |
---|
663 | if$ |
---|
664 | } |
---|
665 | if$ |
---|
666 | } |
---|
667 | if$ |
---|
668 | } |
---|
669 | if$ |
---|
670 | } |
---|
671 | if$ |
---|
672 | } |
---|
673 | if$ |
---|
674 | t |
---|
675 | } |
---|
676 | |
---|
677 | FUNCTION {format.edition} |
---|
678 | { edition empty$ |
---|
679 | { "" } |
---|
680 | { output.state mid.sentence = |
---|
681 | { convert.edition "l" change.case$ " " * bbl.edition * } |
---|
682 | { convert.edition "t" change.case$ " " * bbl.edition * } |
---|
683 | if$ |
---|
684 | } |
---|
685 | if$ |
---|
686 | } |
---|
687 | |
---|
688 | INTEGERS { multiresult } |
---|
689 | |
---|
690 | FUNCTION {multi.page.check} |
---|
691 | { 't := |
---|
692 | #0 'multiresult := |
---|
693 | { multiresult not |
---|
694 | t empty$ not |
---|
695 | and |
---|
696 | } |
---|
697 | { t #1 #1 substring$ |
---|
698 | duplicate$ "-" = |
---|
699 | swap$ duplicate$ "," = |
---|
700 | swap$ "+" = |
---|
701 | or or |
---|
702 | { #1 'multiresult := } |
---|
703 | { t #2 global.max$ substring$ 't := } |
---|
704 | if$ |
---|
705 | } |
---|
706 | while$ |
---|
707 | multiresult |
---|
708 | } |
---|
709 | |
---|
710 | FUNCTION {format.pages} |
---|
711 | { pages empty$ |
---|
712 | { "" } |
---|
713 | { pages multi.page.check |
---|
714 | { bbl.pages pages n.dashify tie.or.space.connect } |
---|
715 | { bbl.page pages tie.or.space.connect } |
---|
716 | if$ |
---|
717 | } |
---|
718 | if$ |
---|
719 | } |
---|
720 | |
---|
721 | FUNCTION {format.journal.pages} |
---|
722 | { pages empty$ |
---|
723 | 'skip$ |
---|
724 | { duplicate$ empty$ |
---|
725 | { pop$ format.pages } |
---|
726 | { |
---|
727 | " " * |
---|
728 | format.year * " " * |
---|
729 | pages n.dashify * |
---|
730 | } |
---|
731 | if$ |
---|
732 | } |
---|
733 | if$ |
---|
734 | } |
---|
735 | |
---|
736 | %SP 2001/01/23 |
---|
737 | % Only used in articles |
---|
738 | FUNCTION {format.vol.num.pages} |
---|
739 | { |
---|
740 | %SP 2001/01/23 |
---|
741 | % Add the leading space only if there is a volume |
---|
742 | % volume field.or.null |
---|
743 | " " |
---|
744 | volume empty$ |
---|
745 | { pop$ "" } |
---|
746 | { volume * } |
---|
747 | if$ |
---|
748 | number empty$ |
---|
749 | 'skip$ |
---|
750 | { |
---|
751 | "~(" number * ")" * * |
---|
752 | volume empty$ |
---|
753 | { "there's a number but no volume in " cite$ * warning$ } |
---|
754 | 'skip$ |
---|
755 | if$ |
---|
756 | } |
---|
757 | if$ |
---|
758 | } |
---|
759 | |
---|
760 | FUNCTION {format.chapter.pages} |
---|
761 | { chapter empty$ |
---|
762 | { "" } |
---|
763 | { type empty$ |
---|
764 | { bbl.chapter } |
---|
765 | { type "l" change.case$ } |
---|
766 | if$ |
---|
767 | chapter tie.or.space.connect |
---|
768 | } |
---|
769 | if$ |
---|
770 | } |
---|
771 | |
---|
772 | FUNCTION {format.in.ed.booktitle} |
---|
773 | { booktitle empty$ |
---|
774 | { "" } |
---|
775 | { editor empty$ |
---|
776 | { word.in booktitle * } |
---|
777 | { word.in format.in.editors * ", " * |
---|
778 | booktitle * } |
---|
779 | if$ |
---|
780 | } |
---|
781 | if$ |
---|
782 | } |
---|
783 | |
---|
784 | FUNCTION {empty.misc.check} |
---|
785 | { author empty$ title empty$ howpublished empty$ |
---|
786 | month empty$ year empty$ note empty$ |
---|
787 | and and and and 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.edition output |
---|
995 | format.bvolume output |
---|
996 | format.number.series 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.edition output |
---|
1036 | format.bvolume output |
---|
1037 | format.number.series output |
---|
1038 | format.publisher.address output |
---|
1039 | format.chapter.pages "chapter and pages" output.check |
---|
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.edition output |
---|
1059 | format.bvolume output |
---|
1060 | format.number.series output |
---|
1061 | format.publisher.address output |
---|
1062 | format.chapter.pages 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.edition output |
---|
1085 | format.bvolume output |
---|
1086 | format.number.series output |
---|
1087 | publisher empty$ |
---|
1088 | { format.organization.address output } |
---|
1089 | { organization output |
---|
1090 | format.publisher.address output |
---|
1091 | } |
---|
1092 | if$ |
---|
1093 | %SP 2001/01/23 |
---|
1094 | % format.pages output |
---|
1095 | } |
---|
1096 | { format.incoll.inproc.crossref output.nonnull |
---|
1097 | %SP 2001/01/23 |
---|
1098 | % format.pages output |
---|
1099 | } |
---|
1100 | if$ |
---|
1101 | %SP 2001/01/23 |
---|
1102 | format.pages "pages" output.check |
---|
1103 | format.note output |
---|
1104 | fin.entry |
---|
1105 | write.url |
---|
1106 | } |
---|
1107 | |
---|
1108 | FUNCTION {conference} { inproceedings } |
---|
1109 | |
---|
1110 | FUNCTION {manual} |
---|
1111 | { output.bibitem |
---|
1112 | author empty$ |
---|
1113 | { organization empty$ |
---|
1114 | 'skip$ |
---|
1115 | { organization output.nonnull |
---|
1116 | address output |
---|
1117 | } |
---|
1118 | if$ |
---|
1119 | } |
---|
1120 | { format.authors output.nonnull } |
---|
1121 | if$ |
---|
1122 | format.btitle "title" output.check |
---|
1123 | author empty$ |
---|
1124 | { organization empty$ |
---|
1125 | { |
---|
1126 | address output |
---|
1127 | } |
---|
1128 | 'skip$ |
---|
1129 | if$ |
---|
1130 | } |
---|
1131 | { |
---|
1132 | organization output |
---|
1133 | address output |
---|
1134 | } |
---|
1135 | if$ |
---|
1136 | format.edition output |
---|
1137 | format.note output |
---|
1138 | format.date output |
---|
1139 | fin.entry |
---|
1140 | write.url |
---|
1141 | } |
---|
1142 | |
---|
1143 | FUNCTION {mastersthesis} |
---|
1144 | { output.bibitem |
---|
1145 | format.authors "author" output.check |
---|
1146 | format.title "title" output.check |
---|
1147 | bbl.mthesis format.thesis.type output.nonnull |
---|
1148 | school "school" output.check |
---|
1149 | address output |
---|
1150 | format.note output |
---|
1151 | format.date "year" output.check |
---|
1152 | fin.entry |
---|
1153 | write.url |
---|
1154 | } |
---|
1155 | |
---|
1156 | FUNCTION {misc} |
---|
1157 | { output.bibitem |
---|
1158 | format.authors output |
---|
1159 | format.title output |
---|
1160 | howpublished output |
---|
1161 | format.note output |
---|
1162 | format.date output |
---|
1163 | fin.entry |
---|
1164 | write.url |
---|
1165 | empty.misc.check |
---|
1166 | } |
---|
1167 | |
---|
1168 | FUNCTION {phdthesis} |
---|
1169 | { output.bibitem |
---|
1170 | format.authors "author" output.check |
---|
1171 | format.title "title" output.check |
---|
1172 | bbl.phdthesis format.thesis.type output.nonnull |
---|
1173 | school "school" output.check |
---|
1174 | address output |
---|
1175 | format.note output |
---|
1176 | format.date "year" output.check |
---|
1177 | fin.entry |
---|
1178 | write.url |
---|
1179 | } |
---|
1180 | |
---|
1181 | FUNCTION {proceedings} |
---|
1182 | { output.bibitem |
---|
1183 | editor empty$ |
---|
1184 | { organization output } |
---|
1185 | { format.editors output.nonnull } |
---|
1186 | if$ |
---|
1187 | format.btitle "title" output.check |
---|
1188 | format.bvolume output |
---|
1189 | format.number.series output |
---|
1190 | editor empty$ |
---|
1191 | { publisher empty$ |
---|
1192 | 'skip$ |
---|
1193 | { |
---|
1194 | format.publisher.address output |
---|
1195 | } |
---|
1196 | if$ |
---|
1197 | } |
---|
1198 | { publisher empty$ |
---|
1199 | { |
---|
1200 | format.organization.address output } |
---|
1201 | { |
---|
1202 | organization output |
---|
1203 | format.publisher.address output |
---|
1204 | } |
---|
1205 | if$ |
---|
1206 | } |
---|
1207 | if$ |
---|
1208 | format.note output |
---|
1209 | % format.date "year" output.check |
---|
1210 | fin.entry |
---|
1211 | write.url |
---|
1212 | } |
---|
1213 | |
---|
1214 | FUNCTION {techreport} |
---|
1215 | { output.bibitem |
---|
1216 | format.authors "author" output.check |
---|
1217 | format.title "title" output.check |
---|
1218 | format.tr.number output.nonnull |
---|
1219 | institution "institution" output.check |
---|
1220 | address output |
---|
1221 | format.note output |
---|
1222 | format.date "year" output.check |
---|
1223 | fin.entry |
---|
1224 | write.url |
---|
1225 | } |
---|
1226 | |
---|
1227 | FUNCTION {unpublished} |
---|
1228 | { output.bibitem |
---|
1229 | format.authors "author" output.check |
---|
1230 | format.title "title" output.check |
---|
1231 | format.note "note" output.check |
---|
1232 | format.date output |
---|
1233 | fin.entry |
---|
1234 | write.url |
---|
1235 | } |
---|
1236 | |
---|
1237 | FUNCTION {default.type} { misc } |
---|
1238 | |
---|
1239 | READ |
---|
1240 | |
---|
1241 | STRINGS { longest.label } |
---|
1242 | |
---|
1243 | INTEGERS { number.label longest.label.width } |
---|
1244 | |
---|
1245 | FUNCTION {initialize.longest.label} |
---|
1246 | { "" 'longest.label := |
---|
1247 | #1 'number.label := |
---|
1248 | #0 'longest.label.width := |
---|
1249 | } |
---|
1250 | |
---|
1251 | FUNCTION {longest.label.pass} |
---|
1252 | { number.label int.to.str$ 'label := |
---|
1253 | number.label #1 + 'number.label := |
---|
1254 | label width$ longest.label.width > |
---|
1255 | { label 'longest.label := |
---|
1256 | label width$ 'longest.label.width := |
---|
1257 | } |
---|
1258 | 'skip$ |
---|
1259 | if$ |
---|
1260 | } |
---|
1261 | |
---|
1262 | EXECUTE {initialize.longest.label} |
---|
1263 | |
---|
1264 | ITERATE {longest.label.pass} |
---|
1265 | |
---|
1266 | FUNCTION {begin.bib} |
---|
1267 | { preamble$ empty$ |
---|
1268 | 'skip$ |
---|
1269 | { preamble$ write$ newline$ } |
---|
1270 | if$ |
---|
1271 | "\begin{thebibliography}{" longest.label * "}" * |
---|
1272 | write$ newline$ |
---|
1273 | "\expandafter\ifx\csname url\endcsname\relax" |
---|
1274 | write$ newline$ |
---|
1275 | " \def\url#1{\texttt{#1}}\fi" |
---|
1276 | write$ newline$ |
---|
1277 | "\expandafter\ifx\csname urlprefix\endcsname\relax\def\urlprefix{URL }\fi" |
---|
1278 | write$ newline$ |
---|
1279 | } |
---|
1280 | |
---|
1281 | EXECUTE {begin.bib} |
---|
1282 | |
---|
1283 | EXECUTE {init.state.consts} |
---|
1284 | |
---|
1285 | ITERATE {call.type$} |
---|
1286 | |
---|
1287 | FUNCTION {end.bib} |
---|
1288 | { newline$ |
---|
1289 | "\end{thebibliography}" write$ newline$ |
---|
1290 | } |
---|
1291 | |
---|
1292 | EXECUTE {end.bib} |
---|
1293 | %% End of customized bst file |
---|
1294 | %% |
---|
1295 | %% End of file `elsart-num.bst'. |
---|