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