Debian Codegraph @

texmf-dist/bibtex/bst/els-cas-templates/cas-model2-names.bst

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