Debian Codegraph @

texmf-dist/bibtex/bst/rsc/rsc.bst

raw
1 %%
2 %% This is file `rsc.bst',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% rsc.dtx (with options: `bst,rsc')
8 %% ----------------------------------------------------------------
9 %% rsc --- BibTeX styles for Royal Society of Chemistry and Wiley
10 %% journals
11 %% E-mail: [email protected]
12 %% Released under the LaTeX Project Public License v1.3c or later
13 %% See http://www.latex-project.org/lppl.txt
14 %% ----------------------------------------------------------------
15 %%
16 ENTRY
17 { address
18 author
19 booktitle
20 chapter
21 ctrl-use-title
22 ctrl-etal-number
23 ctrl-link-doi
24 ctrl-use-doi-all
25 doi
26 edition
27 editor
28 howpublished
29 institution
30 journal
31 key
32 note
33 number
34 organization
35 pages
36 publisher
37 school
38 series
39 title
40 type
41 url
42 volume
43 year
44 }
45 {}
46 { label
47 extra.label
48 short.list
49 }
50
51 INTEGERS { output.state before.all mid.sentence }
52 INTEGERS { after.sentence after.block after.item }
53 INTEGERS { author.or.editor }
54
55 FUNCTION {init.state.consts}
56 { #0 'before.all :=
57 #1 'mid.sentence :=
58 #2 'after.sentence :=
59 #3 'after.block :=
60 #4 'after.item :=
61 }
62
63 INTEGERS { is.use.title etal.number use.doi.all link.doi }
64
65 %% #0 turns off the display of the title for articles
66 %% #1 enables
67 FUNCTION {default.is.use.title} { #0 }
68
69 %% The number of names that force "et al." to be used
70 FUNCTION {default.etal.number} { #0 }
71
72 %% #0 turns off the display of the DOI for articles
73 %% #1 enables
74 FUNCTION {default.use.doi.all} { #0 }
75
76 %% #0 turns off hyperlinks for DOI
77 %% #1 enables
78 FUNCTION {default.link.doi} { #0 }
79
80 FUNCTION {add.comma}
81 { ", " * }
82
83 STRINGS { s t }
84
85 FUNCTION {output.nonnull}
86 { 's :=
87 output.state mid.sentence =
88 { add.comma write$ }
89 { output.state after.block =
90 { add.comma write$
91 newline$
92 "\newblock " write$
93 }
94 { output.state before.all =
95 'write$
96 { output.state after.item =
97 { " " * write$ }
98 { add.period$ " " * write$ }
99 if$
100 }
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 INTEGERS { would.add.period.textlen }
126
127 FUNCTION {would.add.period}
128 { duplicate$
129 add.period$
130 text.length$
131 'would.add.period.textlen :=
132 duplicate$
133 text.length$
134 would.add.period.textlen =
135 { #0 }
136 { #1 }
137 if$
138 }
139
140 FUNCTION {fin.entry}
141 { would.add.period
142 { "\relax" * write$ newline$
143 "\mciteBstWouldAddEndPuncttrue" write$ newline$
144 "\mciteSetBstMidEndSepPunct{\mcitedefaultmidpunct}"
145 write$ newline$
146 "{\mcitedefaultendpunct}{\mcitedefaultseppunct}\relax"
147 }
148 { "\relax" * write$ newline$
149 "\mciteBstWouldAddEndPunctfalse" write$ newline$
150 "\mciteSetBstMidEndSepPunct{\mcitedefaultmidpunct}"
151 write$ newline$
152 "{}{\mcitedefaultseppunct}\relax"
153 }
154 if$
155 write$
156 newline$
157 "\EndOfBibitem" write$
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 {field.or.null}
179 { duplicate$ empty$
180 { pop$ "" }
181 'skip$
182 if$
183 }
184
185 FUNCTION {emphasize}
186 { duplicate$ empty$
187 { pop$ "" }
188 { "\emph{" swap$ * "}" * }
189 if$
190 }
191
192 FUNCTION {boldface}
193 { duplicate$ empty$
194 { pop$ "" }
195 { "\textbf{" swap$ * "}" * }
196 if$
197 }
198
199 FUNCTION {paren}
200 { duplicate$ empty$
201 { pop$ "" }
202 { "(" swap$ * ")" * }
203 if$
204 }
205
206 FUNCTION {bbl.and}
207 { "and" }
208
209 FUNCTION {bbl.chapter}
210 { "ch." }
211
212 FUNCTION {bbl.doi}
213 { "DOI:" }
214
215 FUNCTION {bbl.editor}
216 { "ed." }
217
218
219 FUNCTION {bbl.edition}
220 { "edn." }
221
222 FUNCTION {bbl.etal}
223 { "et~al." emphasize }
224
225 FUNCTION {bbl.in}
226 { "in" }
227
228 FUNCTION {bbl.inpress}
229 { "in press" }
230
231 FUNCTION {bbl.msc}
232 { "M.Sc. thesis" }
233
234 FUNCTION {bbl.page}
235 { "p." }
236
237 FUNCTION {bbl.pages}
238 { "pp." }
239
240 FUNCTION {bbl.phd}
241 { "Ph.D. thesis" }
242
243 FUNCTION {bbl.submitted}
244 { "submitted for publication" }
245
246 FUNCTION {bbl.techreport}
247 { "Technical Report" }
248
249 FUNCTION {bbl.volume}
250 { "vol." }
251
252 FUNCTION {bbl.first}
253 { "1st" }
254
255 FUNCTION {bbl.second}
256 { "2nd" }
257
258 FUNCTION {bbl.third}
259 { "3rd" }
260
261 FUNCTION {bbl.fourth}
262 { "4th" }
263
264 FUNCTION {bbl.fifth}
265 { "5th" }
266
267 FUNCTION {bbl.st}
268 { "st" }
269
270 FUNCTION {bbl.nd}
271 { "nd" }
272
273 FUNCTION {bbl.rd}
274 { "rd" }
275
276 FUNCTION {bbl.th}
277 { "th" }
278
279 FUNCTION {eng.ord}
280 { duplicate$ "1" swap$ *
281 #-2 #1 substring$ "1" =
282 { bbl.th * }
283 { duplicate$ #-1 #1 substring$
284 duplicate$ "1" =
285 { pop$ bbl.st * }
286 { duplicate$ "2" =
287 { pop$ bbl.nd * }
288 { "3" =
289 { bbl.rd * }
290 { bbl.th * }
291 if$
292 }
293 if$
294 }
295 if$
296 }
297 if$
298 }
299
300 INTEGERS{ l }
301
302 FUNCTION{string.length}
303 { #1 'l :=
304 { duplicate$ duplicate$ #1 l substring$ = not }
305 { l #1 + 'l := }
306 while$
307 pop$ l
308 }
309
310 STRINGS{replace find text}
311
312 INTEGERS{find_length}
313
314 FUNCTION{find.replace}
315 { 'replace :=
316 'find :=
317 'text :=
318 find string.length 'find_length :=
319 ""
320 { text empty$ not }
321 { text #1 find_length substring$ find =
322 { replace *
323 text #1 find_length + global.max$ substring$ 'text :=
324 }
325 { text #1 #1 substring$ *
326 text #2 global.max$ substring$ 'text :=
327 }
328 if$
329 }
330 while$
331 }
332
333 FUNCTION {chr.to.value}
334 { chr.to.int$ #48 -
335 duplicate$ duplicate$
336 #0 < swap$ #9 > or
337 { #48 + int.to.chr$
338 " is not a number..." *
339 warning$
340 pop$ #0
341 }
342 {}
343 if$
344 }
345
346 FUNCTION{is.a.digit}
347 { duplicate$ "" =
348 {pop$ #0}
349 {chr.to.int$ #48 - duplicate$
350 #0 < swap$ #9 > or not}
351 if$
352 }
353
354 FUNCTION{is.a.number}
355 {
356 { duplicate$ #1 #1 substring$ is.a.digit }
357 {#2 global.max$ substring$}
358 while$
359 "" =
360 }
361
362 FUNCTION {extract.num}
363 { duplicate$ 't :=
364 "" 's :=
365 { t empty$ not }
366 { t #1 #1 substring$
367 t #2 global.max$ substring$ 't :=
368 duplicate$ is.a.number
369 { s swap$ * 's := }
370 { pop$ "" 't := }
371 if$
372 }
373 while$
374 s empty$
375 'skip$
376 { pop$ s }
377 if$
378 }
379
380 FUNCTION {bibinfo.check}
381 { swap$
382 duplicate$ missing$
383 { pop$ pop$
384 ""
385 }
386 { duplicate$ empty$
387 {
388 swap$ pop$
389 }
390 { swap$
391 pop$
392 }
393 if$
394 }
395 if$
396 }
397
398 FUNCTION {convert.edition}
399 { extract.num "l" change.case$ 's :=
400 s "first" = s "1" = or
401 { bbl.first 't := }
402 { s "second" = s "2" = or
403 { bbl.second 't := }
404 { s "third" = s "3" = or
405 { bbl.third 't := }
406 { s "fourth" = s "4" = or
407 { bbl.fourth 't := }
408 { s "fifth" = s "5" = or
409 { bbl.fifth 't := }
410 { s #1 #1 substring$ is.a.number
411 { s eng.ord 't := }
412 { edition 't := }
413 if$
414 }
415 if$
416 }
417 if$
418 }
419 if$
420 }
421 if$
422 }
423 if$
424 t
425 }
426
427 FUNCTION {tie.or.space.connect}
428 { duplicate$ text.length$ #3 <
429 { "~" }
430 { " " }
431 if$
432 swap$ * *
433 }
434
435 FUNCTION {space.connect}
436 { " " swap$ * * }
437
438 INTEGERS { nameptr namesleft numnames }
439
440 FUNCTION {format.names}
441 { 's :=
442 #1 'nameptr :=
443 s num.names$ 'numnames :=
444 numnames 'namesleft :=
445 numnames etal.number > etal.number #0 > and
446 { s #1 "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
447 t bbl.etal space.connect
448 }
449 {
450 { namesleft #0 > }
451 { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
452 nameptr #1 >
453 { namesleft #1 >
454 { add.comma t * }
455 { numnames #2 >
456 { "" * }
457 'skip$
458 if$
459 t "others" =
460 { bbl.etal space.connect }
461 { bbl.and space.connect t space.connect }
462 if$
463 }
464 if$
465 }
466 't
467 if$
468 nameptr #1 + 'nameptr :=
469 namesleft #1 - 'namesleft :=
470 }
471 while$
472 }
473 if$
474 }
475
476 FUNCTION {format.authors}
477 { author empty$
478 { "" }
479 { #1 'author.or.editor :=
480 author format.names }
481 if$
482 }
483
484 FUNCTION {strip.comma}
485 { duplicate$
486 string.length 'find_length :=
487 duplicate$
488 find_length #1 - #1 substring$
489 "," =
490 { #1 find_length #2 - substring$
491 " " *
492 }
493 'skip$
494 if$
495 }
496
497 FUNCTION {format.editors}
498 { editor empty$
499 { "" }
500 { #2 'author.or.editor :=
501 bbl.editor " " * *
502 editor format.names
503 }
504 if$
505 }
506
507 FUNCTION {format.doi}
508 { use.doi.all
509 { doi empty$
510 'skip$
511 {
512 link.doi
513 {
514 "\href{http://dx.doi.org/"
515 doi *
516 "}{" *
517 bbl.doi doi tie.or.space.connect *
518 "}" *
519 }
520 { bbl.doi doi tie.or.space.connect }
521 if$
522 output
523 }
524 if$
525 }
526 'skip$
527 if$
528 }
529
530 FUNCTION {n.separate.multi}
531 { 't :=
532 ""
533 #0 'numnames :=
534 t text.length$ #4 > t is.a.number and
535 {
536 { t empty$ not }
537 { t #-1 #1 substring$ is.a.number
538 { numnames #1 + 'numnames := }
539 { #0 'numnames := }
540 if$
541 t #-1 #1 substring$ swap$ *
542 t #-2 global.max$ substring$ 't :=
543 numnames #4 =
544 { duplicate$ #1 #1 substring$ swap$
545 #2 global.max$ substring$
546 "\," swap$ * *
547 #1 'numnames :=
548 }
549 'skip$
550 if$
551 }
552 while$
553 }
554 { t swap$ * }
555 if$
556 }
557
558 FUNCTION {format.bvolume}
559 { volume empty$
560 { "" }
561 { bbl.volume volume tie.or.space.connect }
562 if$
563 }
564
565 FUNCTION {format.cvolume}
566 { volume empty$
567 { "" }
568 {
569 bbl.volume volume tie.or.space.connect
570 series empty$
571 'skip$
572 { " of " * series * }
573 if$
574 }
575 if$
576 }
577
578 FUNCTION {format.title.noemph}
579 { 't :=
580 t empty$
581 { "" }
582 { t }
583 if$
584 }
585
586 FUNCTION {format.title}
587 { 't :=
588 t empty$
589 { "" }
590 { t emphasize }
591 if$
592 }
593
594 FUNCTION {format.url}
595 { url empty$
596 { "" }
597 { "\url{" url * "}" * }
598 if$
599 }
600
601 FUNCTION {format.title.vol}
602 { 't :=
603 t empty$
604 { "" }
605 { t emphasize }
606 if$
607 volume empty$
608 'skip$
609 { format.bvolume emphasize
610 swap$ add.comma swap$ *
611 }
612 if$
613 }
614
615 FUNCTION {format.full.names}
616 {'s :=
617 #1 'nameptr :=
618 s num.names$ 'numnames :=
619 numnames 'namesleft :=
620 { namesleft #0 > }
621 { s nameptr
622 "{vv~}{ll}" format.name$ 't :=
623 nameptr #1 >
624 {
625 namesleft #1 >
626 { ", " * t * }
627 {
628 numnames #2 >
629 { "," * }
630 'skip$
631 if$
632 t "others" =
633 { bbl.etal * }
634 { bbl.and space.connect t space.connect }
635 if$
636 }
637 if$
638 }
639 't
640 if$
641 nameptr #1 + 'nameptr :=
642 namesleft #1 - 'namesleft :=
643 }
644 while$
645 }
646
647 FUNCTION {author.editor.full}
648 { author empty$
649 { editor empty$
650 { "" }
651 { editor format.full.names }
652 if$
653 }
654 { author format.full.names }
655 if$
656 }
657
658 FUNCTION {author.full}
659 { author empty$
660 { "" }
661 { author format.full.names }
662 if$
663 }
664
665 FUNCTION {editor.full}
666 { editor empty$
667 { "" }
668 { editor format.full.names }
669 if$
670 }
671
672 FUNCTION {make.full.names}
673 { type$ "book" =
674 type$ "inbook" =
675 or
676 'author.editor.full
677 { type$ "proceedings" =
678 'editor.full
679 'author.full
680 if$
681 }
682 if$
683 }
684
685 FUNCTION {output.bibitem} { newline$
686 "\bibitem[" write$
687 label write$
688 ")" make.full.names duplicate$ short.list =
689 { pop$ }
690 { * }
691 if$
692 "]{" * write$
693 cite$ write$
694 "}" write$
695 newline$
696 ""
697 before.all 'output.state :=
698 }
699
700 FUNCTION {n.dashify} { 't :=
701 ""
702 { t empty$ not }
703 { t #1 #1 substring$ "-" =
704 { t #1 #2 substring$ "--" = not
705 { "--" *
706 t #2 global.max$ substring$ 't :=
707 }
708 { { t #1 #1 substring$ "-" = }
709 { "-" *
710 t #2 global.max$ substring$ 't :=
711 }
712 while$
713 }
714 if$
715 }
716 { t #1 #1 substring$ *
717 t #2 global.max$ substring$ 't :=
718 }
719 if$
720 }
721 while$
722 }
723
724 FUNCTION {format.date}
725 { year empty$
726 { "" }
727 'year
728 if$
729 }
730
731 FUNCTION {format.bdate}
732 { year empty$
733 { "There's no year in " cite$ * warning$ }
734 'year
735 if$
736 }
737
738 FUNCTION {either.or.check}
739 { empty$
740 'pop$
741 { "Can't use both " swap$ * " fields in "
742 * cite$ * warning$ }
743 if$
744 }
745
746 FUNCTION {format.edition}
747 { edition duplicate$ empty$
748 'skip$
749 { convert.edition
750 bbl.edition bibinfo.check
751 " " * bbl.edition *
752 }
753 if$
754 }
755
756 INTEGERS { multiresult }
757
758 FUNCTION {multi.page.check}
759 { 't :=
760 #0 'multiresult :=
761 { multiresult not
762 t empty$ not
763 and
764 }
765 { t #1 #1 substring$
766 duplicate$ "-" =
767 swap$ duplicate$ "," =
768 swap$ "+" =
769 or or
770 { #1 'multiresult := }
771 { t #2 global.max$ substring$ 't := }
772 if$
773 }
774 while$
775 multiresult
776 }
777
778 FUNCTION {format.pages}
779 { pages empty$
780 { "" }
781 { pages multi.page.check
782 { bbl.pages pages n.dashify tie.or.space.connect }
783 { bbl.page pages tie.or.space.connect }
784 if$
785 }
786 if$
787 }
788
789 FUNCTION {format.pages.required}
790 { pages empty$
791 { ""
792 "There are no page numbers for " cite$ * warning$
793 output
794 }
795 { pages multi.page.check
796 { bbl.pages pages n.dashify tie.or.space.connect }
797 { bbl.page pages tie.or.space.connect }
798 if$
799 }
800 if$
801 }
802
803 FUNCTION {format.pages.nopp}
804 { pages empty$
805 { ""
806 "There are no page numbers for " cite$ * warning$
807 output
808 }
809 { pages multi.page.check
810 { pages n.dashify space.connect }
811 { pages space.connect }
812 if$
813 }
814 if$
815 }
816
817 FUNCTION {format.pages.patent}
818 { pages empty$
819 { "There is no patent number for " cite$ * warning$ }
820 { pages multi.page.check
821 { pages n.dashify }
822 { pages n.separate.multi }
823 if$
824 }
825 if$
826 }
827
828 FUNCTION {format.vol.pages}
829 { volume boldface field.or.null
830 duplicate$ empty$
831 { pop$ format.pages.required }
832 { add.comma pages n.dashify * }
833 if$
834 }
835
836 FUNCTION {format.chapter.pages}
837 { chapter empty$
838 'format.pages
839 { type empty$
840 { bbl.chapter }
841 { type "l" change.case$ }
842 if$
843 chapter tie.or.space.connect
844 pages empty$
845 'skip$
846 { add.comma format.pages * }
847 if$
848 }
849 if$
850 }
851
852 FUNCTION {format.title.in}
853 { 's :=
854 s empty$
855 { "" }
856 { editor empty$
857 { bbl.in s format.title space.connect }
858 { bbl.in s format.title space.connect
859 add.comma format.editors *
860 }
861 if$
862 }
863 if$
864 }
865
866 FUNCTION {format.title.vol.in}
867 { 's :=
868 after.item 'output.state :=
869 s empty$
870 { "" }
871 { editor empty$
872 { bbl.in s format.title.vol space.connect }
873 { bbl.in s format.title.vol space.connect
874 add.comma format.editors *
875 }
876 if$
877 }
878 if$
879 }
880
881 FUNCTION {format.pub.address}
882 { publisher empty$
883 { "" }
884 { address empty$
885 { publisher }
886 { publisher add.comma address *}
887 if$
888 }
889 if$
890 }
891
892 FUNCTION {empty.misc.check}
893 { author empty$ title empty$ howpublished empty$
894 year empty$ note empty$ url empty$
895 and and and and and
896 { "all relevant fields are empty in " cite$ * warning$ }
897 'skip$
898 if$
899 }
900
901 FUNCTION {empty.doi.note}
902 { doi empty$ note empty$ and
903 { "Need either a note or DOI for " cite$ * warning$ }
904 'skip$
905 if$
906 }
907
908 FUNCTION {format.thesis.type}
909 { type empty$
910 'skip$
911 { pop$
912 type emphasize
913 }
914 if$
915 }
916
917 FUNCTION {article}
918 { output.bibitem
919 format.authors "author" output.check
920 is.use.title
921 { title format.title.noemph "title" output.check }
922 'skip$
923 if$
924 journal emphasize "journal" output.check
925 format.date "year" output.check
926 volume empty$
927 { "" format.pages.nopp output }
928 { format.vol.pages output }
929 if$
930 format.doi
931 fin.entry
932 }
933
934 FUNCTION {book}
935 { output.bibitem
936 author empty$
937 { title format.title "title" output.check
938 editor empty$
939 { "Need either an author or editor for "
940 cite$ * warning$ }
941 { "" format.editors * "editor" output.check }
942 if$
943 }
944 { format.authors output
945 "author and editor" editor either.or.check
946 title format.title "title" output.check
947 }
948 if$
949 format.pub.address "publisher" output.check
950 format.edition output
951 format.bdate "year" output.check
952 format.bvolume output
953 pages empty$
954 'skip$
955 { format.pages output }
956 if$
957 format.doi
958 fin.entry
959 }
960
961 FUNCTION {booklet}
962 { output.bibitem
963 format.authors output
964 title format.title "title" output.check
965 howpublished output
966 address output
967 format.date output
968 format.doi
969 fin.entry
970 }
971
972 FUNCTION {inbook}
973 { output.bibitem
974 author empty$
975 { title format.title "title" output.check
976 editor empty$
977 { "Need at least an author or an editor for "
978 cite$ * warning$ }
979 { "" format.editors * "editor" output.check }
980 if$
981 }
982 { format.authors output
983 title format.title.in "title" output.check
984 }
985 if$
986 format.pub.address "publisher" output.check
987 format.edition output
988 format.bdate "year" output.check
989 format.bvolume output
990 format.chapter.pages "chapter and pages" output.check
991 format.doi
992 fin.entry
993 }
994
995 FUNCTION {incollection}
996 { output.bibitem
997 author empty$
998 { booktitle format.title "booktitle" output.check
999 editor empty$
1000 { "Need at least an author or an editor for "
1001 cite$ * warning$ }
1002 { "" format.editors * "editor" output.check }
1003 if$
1004 }
1005 { format.authors output
1006 booktitle format.title.in "booktitle" output.check
1007 }
1008 if$
1009 format.pub.address "publisher" output.check
1010 format.edition output
1011 format.bdate "year" output.check
1012 format.cvolume output
1013 format.chapter.pages "chapter and pages" output.check
1014 format.doi
1015 fin.entry
1016 }
1017
1018 FUNCTION {inpress}
1019 { output.bibitem
1020 format.authors "author" output.check
1021 journal emphasize "journal" output.check
1022 bbl.inpress output
1023 format.doi
1024 fin.entry
1025 }
1026
1027 FUNCTION {inproceedings}
1028 { output.bibitem
1029 format.authors "author" output.check
1030 booktitle format.title.noemph "booktitle" output.check
1031 address output
1032 format.date "year" output.check
1033 pages empty$
1034 'skip$
1035 { format.pages output }
1036 if$
1037 format.doi
1038 fin.entry
1039 }
1040
1041 FUNCTION {manual}
1042 { output.bibitem
1043 author empty$
1044 { organization empty$
1045 'skip$
1046 { organization output
1047 address output
1048 }
1049 if$
1050 }
1051 { format.authors output }
1052 if$
1053 title format.title "title" output.check
1054 author empty$
1055 { organization empty$
1056 { address output }
1057 'skip$
1058 if$
1059 }
1060 { organization output
1061 address output
1062 }
1063 if$
1064 format.edition output
1065 format.date output
1066 format.doi
1067 fin.entry
1068 }
1069
1070 FUNCTION {mastersthesis}
1071 { output.bibitem
1072 format.authors "author" output.check
1073 bbl.msc emphasize format.thesis.type output
1074 school "school" output.check
1075 address output
1076 format.date "year" output.check
1077 format.doi
1078 fin.entry
1079 }
1080
1081 FUNCTION {misc}
1082 { output.bibitem
1083 format.authors output
1084 title empty$
1085 'skip$
1086 { title format.title output }
1087 if$
1088 howpublished output
1089 year output
1090 format.url output
1091 note output
1092 format.doi
1093 fin.entry
1094 empty.misc.check
1095 }
1096
1097 FUNCTION {patent}
1098 { output.bibitem
1099 organization empty$
1100 { format.authors "author and organization" output.check }
1101 { author empty$
1102 { organization }
1103 { format.authors organization paren space.connect }
1104 if$
1105 "author and organization" output.check
1106 }
1107 if$
1108 journal emphasize "journal" output.check
1109 format.pages.patent "pages" output.check
1110 format.date "year" output.check
1111 format.doi
1112 fin.entry
1113 }
1114
1115 FUNCTION {phdthesis}
1116 { output.bibitem
1117 format.authors "author" output.check
1118 bbl.phd emphasize format.thesis.type output
1119 school "school" output.check
1120 address output
1121 format.date "year" output.check
1122 format.doi
1123 fin.entry
1124 }
1125
1126 FUNCTION {proceedings}
1127 { output.bibitem
1128 title format.title.noemph "title" output.check
1129 address output
1130 format.date "year" output.check
1131 pages empty$
1132 'skip$
1133 { format.pages output }
1134 if$
1135 format.doi
1136 fin.entry
1137 }
1138
1139 FUNCTION {techreport}
1140 { output.bibitem
1141 format.authors "author" output.check
1142 title format.title "title" output.check
1143 institution
1144 type empty$
1145 'bbl.techreport
1146 'type
1147 if$
1148 space.connect
1149 number empty$
1150 { "t" change.case$ }
1151 { number tie.or.space.connect }
1152 if$
1153 output
1154 format.pub.address output
1155 format.date "year" output.check
1156 format.doi
1157 fin.entry
1158 }
1159
1160 FUNCTION {unpublished}
1161 { output.bibitem
1162 format.authors "author" output.check
1163 journal empty$
1164 'skip$
1165 { journal emphasize "journal" output.check }
1166 if$
1167 doi empty$
1168 { note output }
1169 {
1170 format.date output
1171 bbl.doi doi tie.or.space.connect output
1172 }
1173 if$
1174 fin.entry
1175 empty.doi.note
1176 }
1177
1178 INTEGERS { a b }
1179
1180 FUNCTION {mult}
1181 { 'a :=
1182 'b :=
1183 b #0 <
1184 {#-1 #0 b - 'b :=}
1185 {#1}
1186 if$
1187 #0
1188 {b #0 >}
1189 { a +
1190 b #1 - 'b :=
1191 }
1192 while$
1193 swap$
1194 'skip$
1195 {#0 swap$ -}
1196 if$
1197 }
1198
1199 FUNCTION {str.to.int.aux}
1200 { {duplicate$ empty$ not}
1201 { swap$ #10 mult 'a :=
1202 duplicate$ #1 #1 substring$
1203 chr.to.value a +
1204 swap$
1205 #2 global.max$ substring$
1206 }
1207 while$
1208 pop$
1209 }
1210
1211 FUNCTION {str.to.int}
1212 { duplicate$ #1 #1 substring$ "-" =
1213 {#1 swap$ #2 global.max$ substring$}
1214 {#0 swap$}
1215 if$
1216 #0 swap$ str.to.int.aux
1217 swap$
1218 {#0 swap$ -}
1219 {}
1220 if$
1221 }
1222
1223 FUNCTION {yes.no.to.int}
1224 { "l" change.case$ duplicate$
1225 "yes" =
1226 { pop$ #1 }
1227 { duplicate$ "no" =
1228 { pop$ #0 }
1229 { "unknown Boolean " quote$ * swap$ * quote$ *
1230 " in " * cite$ * warning$
1231 #0
1232 }
1233 if$
1234 }
1235 if$
1236 }
1237
1238 FUNCTION {Control}
1239 { ctrl-use-title
1240 empty$
1241 { skip$ }
1242 { ctrl-use-title
1243 yes.no.to.int
1244 'is.use.title := }
1245 if$
1246 ctrl-etal-number
1247 empty$
1248 { skip$ }
1249 { ctrl-etal-number
1250 str.to.int
1251 'etal.number := }
1252 if$
1253 ctrl-use-doi-all
1254 empty$
1255 { skip$ }
1256 { ctrl-use-doi-all
1257 yes.no.to.int
1258 'use.doi.all := }
1259 if$
1260 ctrl-link-doi
1261 empty$
1262 { skip$ }
1263 { ctrl-link-doi
1264 yes.no.to.int
1265 'link.doi := }
1266 if$
1267 }
1268
1269 FUNCTION {conference} {inproceedings}
1270
1271 FUNCTION {other} {patent}
1272
1273 FUNCTION {default.type} {misc}
1274
1275 MACRO {jan} {"January"}
1276 MACRO {feb} {"February"}
1277 MACRO {mar} {"March"}
1278 MACRO {apr} {"April"}
1279 MACRO {may} {"May"}
1280 MACRO {jun} {"June"}
1281 MACRO {jul} {"July"}
1282 MACRO {aug} {"August"}
1283 MACRO {sep} {"September"}
1284 MACRO {oct} {"October"}
1285 MACRO {nov} {"November"}
1286 MACRO {dec} {"December"}
1287
1288 READ
1289
1290 FUNCTION {initialize.controls}
1291 { default.is.use.title 'is.use.title :=
1292 default.etal.number 'etal.number :=
1293 default.use.doi.all 'use.doi.all :=
1294 default.link.doi 'link.doi :=
1295 }
1296
1297 INTEGERS { len }
1298
1299 FUNCTION {chop.word}
1300 { 's :=
1301 'len :=
1302 s #1 len substring$ =
1303 { s len #1 + global.max$ substring$ }
1304 's
1305 if$
1306 }
1307
1308 FUNCTION {format.lab.names}
1309 { 's :=
1310 s #1 "{vv~}{ll}" format.name$
1311 s num.names$ duplicate$
1312 #2 >
1313 { pop$ bbl.etal space.connect }
1314 { #2 <
1315 'skip$
1316 { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
1317 { bbl.etal space.connect }
1318 { bbl.and space.connect s #2 "{vv~}{ll}"
1319 format.name$ space.connect }
1320 if$
1321 }
1322 if$
1323 }
1324 if$
1325 }
1326
1327 FUNCTION {author.key.label}
1328 { author empty$
1329 { key empty$
1330 { cite$ #1 #3 substring$ }
1331 'key
1332 if$
1333 }
1334 { author format.lab.names }
1335 if$
1336 }
1337
1338 FUNCTION {author.editor.key.label}
1339 { author empty$
1340 { editor empty$
1341 { key empty$
1342 { cite$ #1 #3 substring$ }
1343 'key
1344 if$
1345 }
1346 { editor format.lab.names }
1347 if$
1348 }
1349 { author format.lab.names }
1350 if$
1351 }
1352
1353 FUNCTION {author.key.organization.label}
1354 { author empty$
1355 { key empty$
1356 { organization empty$
1357 { cite$ #1 #3 substring$ }
1358 { "The " #4 organization chop.word #3
1359 text.prefix$ }
1360 if$
1361 }
1362 'key
1363 if$
1364 }
1365 { author format.lab.names }
1366 if$
1367 }
1368
1369 FUNCTION {editor.key.organization.label}
1370 { editor empty$
1371 { key empty$
1372 { organization empty$
1373 { cite$ #1 #3 substring$ }
1374 { "The " #4 organization chop.word #3
1375 text.prefix$ }
1376 if$
1377 }
1378 'key
1379 if$
1380 }
1381 { editor format.lab.names }
1382 if$
1383 }
1384
1385 FUNCTION {calc.short.authors}
1386 { type$ "book" =
1387 type$ "inbook" =
1388 or
1389 'author.editor.key.label
1390 { type$ "proceedings" =
1391 'editor.key.organization.label
1392 { type$ "manual" =
1393 'author.key.organization.label
1394 'author.key.label
1395 if$
1396 }
1397 if$
1398 }
1399 if$
1400 'short.list :=
1401 }
1402
1403 FUNCTION {calc.label}
1404 { calc.short.authors
1405 short.list
1406 "("
1407 *
1408 year duplicate$ empty$
1409 short.list key field.or.null = or
1410 { pop$ "" }
1411 'skip$
1412 if$
1413 *
1414 'label :=
1415 }
1416
1417 ITERATE {calc.label}
1418
1419 STRINGS { longest.label last.label next.extra }
1420
1421 INTEGERS { longest.label.width last.extra.num number.label }
1422
1423 FUNCTION {initialize.longest.label}
1424 { "" 'longest.label :=
1425 #0 int.to.chr$ 'last.label :=
1426 "" 'next.extra :=
1427 #0 'longest.label.width :=
1428 #0 'last.extra.num :=
1429 #0 'number.label :=
1430 }
1431
1432 FUNCTION {forward.pass}
1433 { last.label label =
1434 { last.extra.num #1 + 'last.extra.num :=
1435 last.extra.num int.to.chr$ 'extra.label :=
1436 }
1437 { "a" chr.to.int$ 'last.extra.num :=
1438 "" 'extra.label :=
1439 label 'last.label :=
1440 }
1441 if$
1442 number.label #1 + 'number.label :=
1443 }
1444
1445 EXECUTE {initialize.longest.label}
1446
1447 ITERATE {forward.pass}
1448
1449 FUNCTION {begin.bib}
1450 {
1451 "rsc 2016/08/22 v3.1f" top$
1452 preamble$ empty$
1453 'skip$
1454 { preamble$ write$ newline$ }
1455 if$
1456 "\providecommand*{\mcitethebibliography}{\thebibliography}"
1457 write$ newline$
1458 "\csname @ifundefined\endcsname{endmcitethebibliography}"
1459 write$ newline$
1460 "{\let\endmcitethebibliography\endthebibliography}{}"
1461 write$ newline$
1462 "\begin{mcitethebibliography}{" number.label int.to.str$ * "}" *
1463 write$ newline$
1464 "\providecommand*{\natexlab}[1]{#1}"
1465 write$ newline$
1466 "\providecommand*{\mciteSetBstSublistMode}[1]{}"
1467 write$ newline$
1468 "\providecommand*{\mciteSetBstMaxWidthForm}[2]{}"
1469 write$ newline$
1470 "\providecommand*{\mciteBstWouldAddEndPuncttrue}"
1471 write$ newline$
1472 " {\def\EndOfBibitem{\unskip.}}"
1473 write$ newline$
1474 "\providecommand*{\mciteBstWouldAddEndPunctfalse}"
1475 write$ newline$
1476 " {\let\EndOfBibitem\relax}"
1477 write$ newline$
1478 "\providecommand*{\mciteSetBstMidEndSepPunct}[3]{}"
1479 write$ newline$
1480 "\providecommand*{\mciteSetBstSublistLabelBeginEnd}[3]{}"
1481 write$ newline$
1482 "\providecommand*{\EndOfBibitem}{}"
1483 write$ newline$
1484 "\mciteSetBstSublistMode{f}"
1485 write$ newline$
1486 "\mciteSetBstMaxWidthForm{subitem}"
1487 write$ newline$
1488 "{(\emph{\alph{mcitesubitemcount}})}"
1489 write$ newline$
1490 "\mciteSetBstSublistLabelBeginEnd{\mcitemaxwidthsubitemform\space}"
1491 write$ newline$
1492 "{\relax}{\relax}"
1493 write$ newline$
1494 }
1495
1496 EXECUTE {begin.bib}
1497
1498 EXECUTE {init.state.consts}
1499
1500 ITERATE {call.type$}
1501
1502 FUNCTION {end.bib}
1503 { newline$
1504 "\end{mcitethebibliography}" write$ newline$
1505 }
1506
1507 EXECUTE {end.bib}
1508 %%
1509 %% Copyright (C) 2006-2009,2011,2013,2016 by
1510 %% Joseph Wright <[email protected]>
1511 %%
1512 %% It may be distributed and/or modified under the conditions of
1513 %% the LaTeX Project Public License (LPPL), either version 1.3c of
1514 %% this license or (at your option) any later version. The latest
1515 %% version of this license is in the file:
1516 %%
1517 %% http://www.latex-project.org/lppl.txt
1518 %%
1519 %% This work is "maintained" (as per LPPL maintenance status) by
1520 %% Joseph Wright.
1521 %%
1522 %% This work consists of the file rsc.dtx
1523 %% and the derived files rsc.pdf,
1524 %% rsc.ins,
1525 %% rsc.sty,
1526 %% rsc.bib and
1527 %% rsc-demo.tex.
1528 %%
1529 %%
1530 %%
1531 %% End of file `rsc.bst'.