Debian Codegraph @

texmf-dist/bibtex/bst/elsarticle/elsarticle-num.bst

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