2 %% This is file `mjo.bst',
3 %% generated with the docstrip utility.
5 %% The original source files were:
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 %% ----------------------------------------
11 %% Copyright 1994-2011 Patrick W Daly
12 % ===============================================================
14 % This bibliographic style (bst) file has been generated from one or
15 % more master bibliographic style (mbs) files, listed above.
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
31 % Usage of \cite is as follows:
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 %---------------------------------------------------------------------
70 STRINGS { doiprefix doiurl }
71 FUNCTION {init.doi.variables}
73 "http://dx.doi.org/" 'doiurl := % prefix to make URL from DOI
74 "doi:" 'doiprefix := % text prefix printed before DOI ref
76 INTEGERS { output.state before.all mid.sentence after.sentence after.block }
77 FUNCTION {init.state.consts}
84 FUNCTION {output.nonnull}
86 output.state mid.sentence =
88 { output.state after.block =
93 { output.state before.all =
95 { add.period$ " " * write$ }
99 mid.sentence 'output.state :=
110 FUNCTION {output.check}
113 { pop$ "empty " t * " in " * cite$ * warning$ }
124 { output.state before.all =
126 { after.block 'output.state := }
129 FUNCTION {new.sentence}
130 { output.state after.block =
132 { output.state before.all =
134 { after.sentence 'output.state := }
140 { " " * before.all 'output.state :=
143 FUNCTION {date.block}
165 FUNCTION {remove.dots}
171 { z #3 global.max$ substring$ 'z := * }
174 z #2 global.max$ substring$ 'z :=
175 duplicate$ "." = 'pop$
183 FUNCTION {new.block.checka}
189 FUNCTION {new.block.checkb}
197 FUNCTION {new.sentence.checka}
203 FUNCTION {new.sentence.checkb}
211 FUNCTION {field.or.null}
220 { "\emph{" swap$ * "}" * }
223 FUNCTION {tie.or.space.prefix}
224 { duplicate$ text.length$ #3 <
231 FUNCTION {capitalize}
232 { "u" change.case$ "t" change.case$ }
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
245 FUNCTION {bbl.editors}
248 FUNCTION {bbl.editor}
254 FUNCTION {bbl.edition}
257 FUNCTION {bbl.volume}
263 FUNCTION {bbl.number}
278 FUNCTION {bbl.chapter}
281 FUNCTION {bbl.techrep}
284 FUNCTION {bbl.mthesis}
285 { "Master's thesis" }
287 FUNCTION {bbl.phdthesis}
314 FUNCTION {bibinfo.check}
332 FUNCTION {bibinfo.warn}
336 swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
341 swap$ "empty " swap$ * " in " * cite$ * warning$
350 FUNCTION {format.url}
355 { "\urlprefix\url{" swap$ * "}" * }
359 INTEGERS { nameptr namesleft numnames }
364 FUNCTION {format.names}
366 duplicate$ empty$ 'skip$ {
370 s num.names$ 'numnames :=
371 numnames 'namesleft :=
374 "{ff~}{vv~}{ll}{, jj}"
376 bibinfo bibinfo.check
383 s nameptr "{ll}" format.name$ duplicate$ "others" =
406 nameptr #1 + 'nameptr :=
407 namesleft #1 - 'namesleft :=
412 FUNCTION {format.names.ed}
416 FUNCTION {format.authors}
417 { author "author" format.names
419 FUNCTION {get.bbl.editor}
420 { editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
422 FUNCTION {format.editors}
423 { editor "editor" format.names duplicate$ empty$ 'skip$
432 FUNCTION {format.isbn}
433 { isbn "isbn" bibinfo.check
434 duplicate$ empty$ 'skip$
442 FUNCTION {format.issn}
443 { issn "issn" bibinfo.check
444 duplicate$ empty$ 'skip$
453 { "\href {" swap$ * "} {\path{" * swap$ * "}}" * }
455 FUNCTION {format.doi}
458 { doiprefix doi * doiurl doi * make.href }
461 FUNCTION {format.note}
465 { note #1 #1 substring$
468 { output.state mid.sentence =
475 note #2 global.max$ substring$ * "note" bibinfo.check
480 FUNCTION {format.title}
482 duplicate$ empty$ 'skip$
485 "title" bibinfo.check
486 duplicate$ empty$ 'skip$
492 FUNCTION {output.bibitem}
499 before.all 'output.state :=
507 { t #1 #1 substring$ "-" =
508 { t #1 #2 substring$ "--" = not
510 t #2 global.max$ substring$ 't :=
512 { { t #1 #1 substring$ "-" = }
514 t #2 global.max$ substring$ 't :=
520 { t #1 #1 substring$ *
521 t #2 global.max$ substring$ 't :=
532 FUNCTION {format.date}
534 month "month" bibinfo.check
536 year "year" bibinfo.check duplicate$ empty$
538 { "there's a month but no year in " cite$ * warning$ }
553 FUNCTION {format.btitle}
554 { title "title" bibinfo.check
555 duplicate$ empty$ 'skip$
561 FUNCTION {either.or.check}
564 { "can't use both " swap$ * " fields in " * cite$ * warning$ }
567 FUNCTION {format.bvolume}
570 { bbl.volume volume tie.or.space.prefix
571 "volume" bibinfo.check * *
572 series "series" bibinfo.check
573 duplicate$ empty$ 'pop$
574 { swap$ bbl.of space.word * swap$
577 "volume and number" number either.or.check
581 FUNCTION {format.number.series}
584 { series field.or.null }
586 { number "number" bibinfo.check }
587 { output.state mid.sentence =
589 { bbl.number capitalize }
591 number tie.or.space.prefix "number" bibinfo.check * *
593 series "series" bibinfo.check *
603 FUNCTION {format.edition}
604 { edition duplicate$ empty$ 'skip$
606 output.state mid.sentence =
610 "edition" bibinfo.check
615 INTEGERS { multiresult }
616 FUNCTION {multi.page.check}
625 swap$ duplicate$ "," =
628 { #1 'multiresult := }
629 { t #2 global.max$ substring$ 't := }
635 FUNCTION {format.pages}
636 { pages duplicate$ empty$ 'skip$
637 { duplicate$ multi.page.check
644 "pages" bibinfo.check
648 FUNCTION {format.journal.pages}
649 { pages duplicate$ empty$ 'pop$
650 { swap$ duplicate$ empty$
651 { pop$ pop$ format.pages }
656 "pages" bibinfo.check
663 FUNCTION {format.journal.eid}
664 { eid "eid" bibinfo.check
665 duplicate$ empty$ 'pop$
666 { swap$ duplicate$ empty$ 'skip$
675 FUNCTION {format.vol.num.pages}
676 { volume field.or.null
677 duplicate$ empty$ 'skip$
679 bbl.volume swap$ tie.or.space.prefix
680 "volume" bibinfo.check
684 number "number" bibinfo.check duplicate$ empty$ 'skip$
686 swap$ duplicate$ empty$
687 { "there's a number but no volume in " cite$ * warning$ }
695 { format.journal.pages }
696 { format.journal.eid }
700 FUNCTION {format.chapter.pages}
705 { type "l" change.case$
709 chapter tie.or.space.prefix
710 "chapter" bibinfo.check
714 { ", " * format.pages * }
720 FUNCTION {format.booktitle}
722 booktitle "booktitle" bibinfo.check
725 FUNCTION {format.in.ed.booktitle}
726 { format.booktitle duplicate$ empty$ 'skip$
728 editor "editor" format.names.ed duplicate$ empty$ 'pop$
740 FUNCTION {empty.misc.check}
741 { author empty$ title empty$ howpublished empty$
742 month empty$ year empty$ note empty$
745 { "all relevant fields are empty in " cite$ * warning$ }
749 FUNCTION {format.thesis.type}
750 { type duplicate$ empty$
753 "t" change.case$ "type" bibinfo.check
757 FUNCTION {format.tr.number}
758 { number "number" bibinfo.check
759 type duplicate$ empty$
764 swap$ duplicate$ empty$
765 { pop$ "t" change.case$ }
766 { tie.or.space.prefix * * }
769 FUNCTION {format.article.crossref}
771 key duplicate$ empty$
773 journal duplicate$ empty$
774 { "need key or journal for " cite$ * " to crossref " * crossref * warning$ }
775 { "journal" bibinfo.check emphasize word.in swap$ * }
778 { word.in swap$ * " " *}
780 " \cite{" * crossref * "}" *
782 FUNCTION {format.crossref.editor}
783 { editor #1 "{vv~}{ll}" format.name$
784 "editor" bibinfo.check
785 editor num.names$ duplicate$
788 "editor" bibinfo.check
794 { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
796 "editor" bibinfo.check
802 * editor #2 "{vv~}{ll}" format.name$
803 "editor" bibinfo.check
812 FUNCTION {format.book.crossref}
813 { volume duplicate$ empty$
814 { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
819 swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
823 editor field.or.null author field.or.null =
827 { "need editor, key, or series for " cite$ * " to crossref " *
831 { series emphasize * }
837 { format.crossref.editor * }
839 " \cite{" * crossref * "}" *
841 FUNCTION {format.incoll.inproc.crossref}
844 editor field.or.null author field.or.null =
847 { format.booktitle duplicate$ empty$
848 { "need editor, key, or booktitle for " cite$ * " to crossref " *
854 { word.in key * " " *}
857 { word.in format.crossref.editor * " " *}
859 " \cite{" * crossref * "}" *
861 FUNCTION {format.org.or.pub}
864 address empty$ t empty$ and
868 { address "address" bibinfo.check *
873 { ", " * address "address" bibinfo.check * }
880 FUNCTION {format.publisher.address}
881 { publisher "publisher" bibinfo.warn format.org.or.pub
884 FUNCTION {format.organization.address}
885 { organization "organization" bibinfo.check format.org.or.pub
890 format.authors "author" output.check
892 format.title "title" output.check
897 "journal" bibinfo.check
898 "journal" output.check
899 format.vol.num.pages output
900 format.date "year" output.check
902 { format.article.crossref output.nonnull
917 { format.editors "author and editor" output.check
919 { format.authors output.nonnull
921 { "author and editor" editor either.or.check }
927 format.btitle "title" output.check
929 { format.bvolume output
931 format.number.series output
933 format.publisher.address output
937 format.book.crossref output.nonnull
940 format.edition output
941 format.date "year" output.check
952 format.authors output
954 format.title "title" output.check
956 howpublished "howpublished" bibinfo.check output
957 address "address" bibinfo.check output
971 { format.editors "author and editor" output.check
973 { format.authors output.nonnull
975 { "author and editor" editor either.or.check }
981 format.btitle "title" output.check
984 format.bvolume output
985 format.chapter.pages "chapter and pages" output.check
987 format.number.series output
989 format.publisher.address output
992 format.chapter.pages "chapter and pages" output.check
994 format.book.crossref output.nonnull
997 format.edition output
998 format.date "year" output.check
1000 { format.isbn output }
1011 FUNCTION {incollection}
1013 format.authors "author" output.check
1015 format.title "title" output.check
1018 { format.in.ed.booktitle "booktitle" output.check
1019 format.bvolume output
1020 format.number.series output
1021 format.chapter.pages output
1023 format.publisher.address output
1024 format.edition output
1025 format.date "year" output.check
1028 { format.incoll.inproc.crossref output.nonnull
1029 format.chapter.pages output
1039 FUNCTION {inproceedings}
1041 format.authors "author" output.check
1043 format.title "title" output.check
1046 { format.in.ed.booktitle "booktitle" output.check
1047 format.bvolume output
1048 format.number.series output
1052 { format.organization.address output }
1053 { organization "organization" bibinfo.check output
1054 format.publisher.address output
1057 format.date "year" output.check
1061 { format.incoll.inproc.crossref output.nonnull
1072 FUNCTION {conference} { inproceedings }
1076 { organization "organization" bibinfo.check
1077 duplicate$ empty$ 'pop$
1079 address "address" bibinfo.check output
1083 { format.authors output.nonnull }
1086 format.btitle "title" output.check
1088 { organization empty$
1090 address new.block.checka
1091 address "address" bibinfo.check output
1097 organization address new.block.checkb
1098 organization "organization" bibinfo.check output
1099 address "address" bibinfo.check output
1102 format.edition output
1112 FUNCTION {mastersthesis}
1114 format.authors "author" output.check
1117 "title" output.check
1119 bbl.mthesis format.thesis.type output.nonnull
1120 school "school" bibinfo.warn output
1121 address "address" bibinfo.check output
1122 format.date "year" output.check
1133 format.authors output
1134 title howpublished new.block.checkb
1136 howpublished new.block.checka
1137 howpublished "howpublished" bibinfo.check output
1147 FUNCTION {phdthesis}
1149 format.authors "author" output.check
1152 "title" output.check
1154 bbl.phdthesis format.thesis.type output.nonnull
1155 school "school" bibinfo.warn output
1156 address "address" bibinfo.check output
1157 format.date "year" output.check
1166 FUNCTION {proceedings}
1169 { organization "organization" bibinfo.check output
1171 { format.editors output.nonnull }
1174 format.btitle "title" output.check
1175 format.bvolume output
1176 format.number.series output
1182 format.publisher.address output
1189 format.organization.address output }
1192 organization "organization" bibinfo.check output
1193 format.publisher.address output
1198 format.date "year" output.check
1209 FUNCTION {techreport}
1211 format.authors "author" output.check
1214 "title" output.check
1216 format.tr.number output.nonnull
1217 institution "institution" bibinfo.warn output
1218 address "address" bibinfo.check output
1219 format.date "year" output.check
1228 FUNCTION {unpublished}
1230 format.authors "author" output.check
1232 format.title "title" output.check
1238 format.note "note" output.check
1242 FUNCTION {default.type} { misc }
1249 FUNCTION {chop.word}
1252 s #1 len substring$ =
1253 { s len #1 + global.max$ substring$ }
1257 FUNCTION {sort.format.names}
1261 s num.names$ 'numnames :=
1262 numnames 'namesleft :=
1265 "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}"
1270 namesleft #1 = t "others" = and
1278 nameptr #1 + 'nameptr :=
1279 namesleft #1 - 'namesleft :=
1284 FUNCTION {sort.format.title}
1288 "The " #4 t chop.word
1292 #1 global.max$ substring$
1294 FUNCTION {author.sort}
1297 { "to sort, need author or key in " cite$ * warning$
1303 { author sort.format.names }
1306 FUNCTION {author.editor.sort}
1310 { "to sort, need author, editor, or key in " cite$ * warning$
1316 { editor sort.format.names }
1319 { author sort.format.names }
1322 FUNCTION {author.organization.sort}
1324 { organization empty$
1326 { "to sort, need author, organization, or key in " cite$ * warning$
1332 { "The " #4 organization chop.word sortify }
1335 { author sort.format.names }
1338 FUNCTION {editor.organization.sort}
1340 { organization empty$
1342 { "to sort, need editor, organization, or key in " cite$ * warning$
1348 { "The " #4 organization chop.word sortify }
1351 { editor sort.format.names }
1359 { type$ "proceedings" =
1360 'editor.organization.sort
1362 'author.organization.sort
1371 year field.or.null sortify
1378 #1 entry.max$ substring$
1383 STRINGS { longest.label }
1384 INTEGERS { number.label longest.label.width }
1385 FUNCTION {initialize.longest.label}
1386 { "" 'longest.label :=
1388 #0 'longest.label.width :=
1390 FUNCTION {longest.label.pass}
1391 { number.label int.to.str$ 'label :=
1392 number.label #1 + 'number.label :=
1393 label width$ longest.label.width >
1394 { label 'longest.label :=
1395 label width$ 'longest.label.width :=
1400 EXECUTE {initialize.longest.label}
1401 ITERATE {longest.label.pass}
1402 FUNCTION {begin.bib}
1405 { preamble$ write$ newline$ }
1407 "\begin{thebibliography}{" longest.label * "}" *
1409 "\providecommand{\url}[1]{\texttt{#1}}"
1411 "\providecommand{\urlprefix}{URL }"
1413 "\expandafter\ifx\csname urlstyle\endcsname\relax"
1415 " \providecommand{\doi}[1]{doi:\discretionary{}{}{}#1}\else"
1417 " \providecommand{\doi}{doi:\discretionary{}{}{}\begingroup \urlstyle{rm}\Url}\fi"
1419 "\expandafter\ifx\csname href\endcsname\relax"
1421 " \def\href#1#2{#2} \def\path#1{#1}\fi"
1425 EXECUTE {init.doi.variables}
1426 EXECUTE {init.state.consts}
1427 ITERATE {call.type$}
1430 "\end{thebibliography}" write$ newline$
1433 %% End of customized bst file
1435 %% End of file `mjo.bst'.