Debian Codegraph @

texmf-dist/bibtex/bst/bookdb/bookdb.bst

raw
1 %% This is file `bookdb.bst' version 0.2,
2 %% as modified by Peter Wilson ([email protected]) in June 2015 from
3 %% `bookdb.bst' generated with the docstrip utility.
4 %%
5 %% It is intended for use in catalogueing a home library.
6 %%
7 %% The original source files were:
8 %%
9 %% merlin.mbs (with options: `ay,nat,ed-au,keyxyr,dt-end,yr-com,note-yr,tit-it,atit-u,num-xser,pg-bk,pub-date,isbn,edparxc,pp,ed,xedn,nfss,')
10 %% ----------------------------------------
11 %%
12 %% Copyright 1994-2011 Patrick W Daly
13 % ===============================================================
14 % IMPORTANT NOTICE:
15 % This bibliographic style (bst) file has been generated from one or
16 % more master bibliographic style (mbs) files, listed above.
17 %
18 % This generated file can be redistributed and/or modified under the terms
19 % of the LaTeX Project Public License Distributed from CTAN
20 % archives in directory macros/latex/base/lppl.txt; either
21 % version 1 of the License, or any later version.
22 %
23 % The originally generated file was modified by Peter Wilson in 2015
24 % to better suit his purposes.
25 % ===============================================================
26 % Name and version information of the main mbs file:
27 % \ProvidesFile{merlin.mbs}[2011/11/18 4.33 (PWD, AO, DPC)]
28 % For use with BibTeX version 0.99a or later
29 %-------------------------------------------------------------------
30 % This bibliography style file is intended for texts in ENGLISH
31 % This is an author-year citation style bibliography. As such, it is
32 % non-standard LaTeX, and requires a special package file to function properly.
33 % Such a package is natbib.sty by Patrick W. Daly
34 % The form of the \bibitem entries is
35 % \bibitem[Jones et al.(1990)]{key}...
36 % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
37 % The essential feature is that the label (the part in brackets) consists
38 % of the author names, as they should appear in the citation, with the year
39 % in parentheses following. There must be no space before the opening
40 % parenthesis!
41 % With natbib v5.3, a full list of authors may also follow the year.
42 % In natbib.sty, it is possible to define the type of enclosures that is
43 % really wanted (brackets or parentheses), but in either case, there must
44 % be parentheses in the label.
45 % The \cite command functions as follows:
46 % \citet{key} ==>> Jones et al. (1990)
47 % \citet*{key} ==>> Jones, Baker, and Smith (1990)
48 % \citep{key} ==>> (Jones et al., 1990)
49 % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
50 % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
51 % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
52 % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., 1990, p. 32)
53 % \citeauthor{key} ==>> Jones et al.
54 % \citeauthor*{key} ==>> Jones, Baker, and Smith
55 % \citeyear{key} ==>> 1990
56 %---------------------------------------------------------------------
57 %
58 % PW added entries for: binding, category, collator, condition, copy,
59 % foreword, illustrations, introduction,
60 % location, preface,translator, size, value,
61 % volumes,
62
63 ENTRY
64 { address
65 author
66 binding
67 booktitle
68 category
69 chapter
70 collator
71 condition
72 copy
73 edition
74 editor
75 eid
76 foreword
77 howpublished
78 illustrations
79 institution
80 introduction
81 isbn
82 journal
83 key
84 location
85 month
86 normal
87 note
88 number
89 organization
90 pages
91 preface
92 publisher
93 school
94 series
95 size
96 title
97 translator
98 type
99 value
100 volume
101 volumes
102 year
103 }
104 {}
105 { label extra.label sort.label short.list }
106 INTEGERS { output.state before.all mid.sentence after.sentence after.block }
107 FUNCTION {init.state.consts}
108 { #0 'before.all :=
109 #1 'mid.sentence :=
110 #2 'after.sentence :=
111 #3 'after.block :=
112 }
113 STRINGS { s t}
114 FUNCTION {output.nonnull}
115 { 's :=
116 output.state mid.sentence =
117 { ", " * write$ }
118 { output.state after.block =
119 { add.period$ write$
120 newline$
121 "\newblock " write$
122 }
123 { output.state before.all =
124 'write$
125 { add.period$ " " * write$ }
126 if$
127 }
128 if$
129 mid.sentence 'output.state :=
130 }
131 if$
132 s
133 }
134 FUNCTION {output}
135 { duplicate$ empty$
136 'pop$
137 'output.nonnull
138 if$
139 }
140 FUNCTION {output.check}
141 { 't :=
142 duplicate$ empty$
143 { pop$ "empty " t * " in " * cite$ * warning$ }
144 'output.nonnull
145 if$
146 }
147 FUNCTION {fin.entry}
148 { add.period$
149 write$
150 newline$
151 }
152
153 FUNCTION {new.block}
154 { output.state before.all =
155 'skip$
156 { after.block 'output.state := }
157 if$
158 }
159 FUNCTION {new.sentence}
160 { output.state after.block =
161 'skip$
162 { output.state before.all =
163 'skip$
164 { after.sentence 'output.state := }
165 if$
166 }
167 if$
168 }
169 FUNCTION {add.blank}
170 { " " * before.all 'output.state :=
171 }
172
173 FUNCTION {date.block}
174 {
175 new.block
176 }
177
178 FUNCTION {not}
179 { { #0 }
180 { #1 }
181 if$
182 }
183 FUNCTION {and}
184 { 'skip$
185 { pop$ #0 }
186 if$
187 }
188 FUNCTION {or}
189 { { pop$ #1 }
190 'skip$
191 if$
192 }
193 FUNCTION {new.block.checkb}
194 { empty$
195 swap$ empty$
196 and
197 'skip$
198 'new.block
199 if$
200 }
201 FUNCTION {field.or.null}
202 { duplicate$ empty$
203 { pop$ "" }
204 'skip$
205 if$
206 }
207 FUNCTION {emphasize}
208 { duplicate$ empty$
209 { pop$ "" }
210 { "\emph{" swap$ * "}" * }
211 if$
212 }
213
214 %% PW added this for a bold font
215 FUNCTION {bold}
216 { duplicate$ empty$
217 { pop$ "" }
218 { "\textbf{" swap$ * "}" * }
219 if$
220 }
221 %% and this
222 FUNCTION {boldcat}
223 { duplicate$ empty$
224 { pop$ "" }
225 { "Category: \textbf{" swap$ * "}" * }
226 if$
227 }
228 FUNCTION {boldval}
229 { duplicate$ empty$
230 { pop$ "" }
231 { "Value: \textbf{" swap$ * "}" * }
232 if$
233 }
234
235 FUNCTION {tie.or.space.prefix}
236 { duplicate$ text.length$ #3 <
237 { "~" }
238 { " " }
239 if$
240 swap$
241 }
242
243 FUNCTION {capitalize}
244 { "u" change.case$ "t" change.case$ }
245
246 FUNCTION {space.word}
247 { " " swap$ * " " * }
248 % Here are the language-specific definitions for explicit words.
249 % Each function has a name bbl.xxx where xxx is the English word.
250 % The language selected here is ENGLISH
251 FUNCTION {bbl.and}
252 { "and"}
253
254 FUNCTION {bbl.etal}
255 { "et~al." }
256
257 FUNCTION {bbl.editors}
258 { "eds." }
259
260 FUNCTION {bbl.editor}
261 { "ed." }
262
263 FUNCTION {bbl.edby}
264 { "edited by" }
265
266 FUNCTION {bbl.edition}
267 { "edition" }
268
269 FUNCTION {bbl.volume}
270 { "volume" }
271
272 FUNCTION {bbl.of}
273 { "of" }
274
275 FUNCTION {bbl.number}
276 { "number" }
277
278 FUNCTION {bbl.nr}
279 { "no." }
280
281 FUNCTION {bbl.in}
282 { "in" }
283
284 FUNCTION {bbl.pages}
285 { "pp." }
286
287 FUNCTION {bbl.page}
288 { "p." }
289
290 FUNCTION {bbl.chapter}
291 { "chapter" }
292
293 FUNCTION {bbl.collator}
294 { "collator" }
295
296 FUNCTION {bbl.collators}
297 { "collators" }
298
299 FUNCTION {bbl.techrep}
300 { "Technical Report" }
301
302 FUNCTION {bbl.mthesis}
303 { "Master's thesis" }
304
305 FUNCTION {bbl.phdthesis}
306 { "Ph.D. thesis" }
307
308 FUNCTION {bbl.translator}
309 { "translator" }
310
311 FUNCTION {bbl.translators}
312 { "translators" }
313
314 FUNCTION {bbl.foreword}
315 { "foreword by " }
316
317 FUNCTION {bbl.introduction}
318 { "introduction by " }
319
320 FUNCTION {bbl.preface}
321 { "preface by " }
322
323 MACRO {jan} {"January"}
324
325 MACRO {feb} {"February"}
326
327 MACRO {mar} {"March"}
328
329 MACRO {apr} {"April"}
330
331 MACRO {may} {"May"}
332
333 MACRO {jun} {"June"}
334
335 MACRO {jul} {"July"}
336
337 MACRO {aug} {"August"}
338
339 MACRO {sep} {"September"}
340
341 MACRO {oct} {"October"}
342
343 MACRO {nov} {"November"}
344
345 MACRO {dec} {"December"}
346
347 MACRO {acmcs} {"ACM Computing Surveys"}
348
349 MACRO {acta} {"Acta Informatica"}
350
351 MACRO {cacm} {"Communications of the ACM"}
352
353 MACRO {ibmjrd} {"IBM Journal of Research and Development"}
354
355 MACRO {ibmsj} {"IBM Systems Journal"}
356
357 MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
358
359 MACRO {ieeetc} {"IEEE Transactions on Computers"}
360
361 MACRO {ieeetcad}
362 {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
363
364 MACRO {ipl} {"Information Processing Letters"}
365
366 MACRO {jacm} {"Journal of the ACM"}
367
368 MACRO {jcss} {"Journal of Computer and System Sciences"}
369
370 MACRO {scp} {"Science of Computer Programming"}
371
372 MACRO {sicomp} {"SIAM Journal on Computing"}
373
374 MACRO {tocs} {"ACM Transactions on Computer Systems"}
375
376 MACRO {tods} {"ACM Transactions on Database Systems"}
377
378 MACRO {tog} {"ACM Transactions on Graphics"}
379
380 MACRO {toms} {"ACM Transactions on Mathematical Software"}
381
382 MACRO {toois} {"ACM Transactions on Office Information Systems"}
383
384 MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
385
386 MACRO {tcs} {"Theoretical Computer Science"}
387
388 %% Publishers
389
390 % MACRO {CUP} {"Cambridge University Press"}
391
392 % MACRO {OUP} {"Oxford University Press"}
393
394 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
395
396 FUNCTION {bibinfo.check}
397 { swap$
398 duplicate$ missing$
399 {
400 pop$ pop$
401 ""
402 }
403 { duplicate$ empty$
404 {
405 swap$ pop$
406 }
407 { swap$
408 pop$
409 }
410 if$
411 }
412 if$
413 }
414 FUNCTION {bibinfo.warn}
415 { swap$
416 duplicate$ missing$
417 {
418 swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
419 ""
420 }
421 { duplicate$ empty$
422 {
423 swap$ "empty " swap$ * " in " * cite$ * warning$
424 }
425 { swap$
426 pop$
427 }
428 if$
429 }
430 if$
431 }
432 INTEGERS { nameptr namesleft numnames }
433
434
435 STRINGS { bibinfo}
436
437 FUNCTION {format.names}
438 { 'bibinfo :=
439 duplicate$ empty$ 'skip$ {
440 's :=
441 "" 't :=
442 #1 'nameptr :=
443 s num.names$ 'numnames :=
444 numnames 'namesleft :=
445 { namesleft #0 > }
446 { s nameptr
447 "{ff~}{vv~}{ll}{, jj}"
448 format.name$
449 bibinfo bibinfo.check
450 't :=
451 nameptr #1 >
452 {
453 namesleft #1 >
454 { ", " * t * }
455 {
456 s nameptr "{ll}" format.name$ duplicate$ "others" =
457 { 't := }
458 { pop$ }
459 if$
460 numnames #2 >
461 { "," * }
462 'skip$
463 if$
464 t "others" =
465 {
466 " " * bbl.etal *
467 }
468 {
469 bbl.and
470 space.word * t *
471 }
472 if$
473 }
474 if$
475 }
476 't
477 if$
478 nameptr #1 + 'nameptr :=
479 namesleft #1 - 'namesleft :=
480 }
481 while$
482 } if$
483 }
484 FUNCTION {format.names.ed}
485 {
486 format.names
487 }
488 FUNCTION {format.key}
489 { empty$
490 { key field.or.null }
491 { "" }
492 if$
493 }
494
495 FUNCTION {format.authors}
496 { author "author" format.names
497 }
498 FUNCTION {get.bbl.editor}
499 { editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
500
501 FUNCTION {format.editors}
502 { editor "editor" format.names duplicate$ empty$ 'skip$
503 {
504 " " *
505 get.bbl.editor
506 "(" swap$ * ")" *
507 *
508 }
509 if$
510 }
511
512 % PW added collator names
513 FUNCTION {get.bbl.collator}
514 { collator num.names$ #1 > 'bbl.collators 'bbl.collator if$ }
515
516 FUNCTION {format.collator}
517 { collator "collator" format.names duplicate$ empty$ 'skip$
518 {
519 " " *
520 get.bbl.collator
521 "(" swap$ * ")" *
522 *
523 }
524 if$
525 }
526
527 % PW added translator names
528 FUNCTION {get.bbl.translator}
529 { translator num.names$ #1 > 'bbl.translators 'bbl.translator if$ }
530 FUNCTION {format.translator}
531 { translator "translator" format.names duplicate$ empty$ 'skip$
532 {
533 " " *
534 get.bbl.translator
535 "(" swap$ * ")" *
536 *
537 }
538 if$
539 }
540
541 % PW added foreword names
542 FUNCTION {get.bbl.foreword}
543 {foreword 'bbl.foreword }
544 FUNCTION {format.foreword}
545 { foreword "foreword" format.names duplicate$ empty$ 'skip$
546 {
547 "" *
548 bbl.foreword
549 swap$ *
550 }
551 if$
552 }
553
554 % PW added introduction names
555 FUNCTION {get.bbl.introduction}
556 {introduction 'bbl.introduction }
557 FUNCTION {format.introduction}
558 { introduction "introduction" format.names duplicate$ empty$ 'skip$
559 {
560 "" *
561 bbl.introduction
562 swap$ *
563 }
564 if$
565 }
566
567 % PW added preface names
568 FUNCTION {get.bbl.preface}
569 {preface 'bbl.preface }
570 FUNCTION {format.preface}
571 { preface "preface" format.names duplicate$ empty$ 'skip$
572 {
573 "" *
574 bbl.preface
575 swap$ *
576 }
577 if$
578 }
579
580
581 FUNCTION {format.book.pages}
582 { pages "pages" bibinfo.check
583 duplicate$ empty$ 'skip$
584 { " " * bbl.pages * }
585 if$
586 }
587 FUNCTION {format.isbn}
588 { isbn "isbn" bibinfo.check
589 duplicate$ empty$ 'skip$
590 {
591 new.block
592 "ISBN " swap$ *
593 }
594 if$
595 }
596
597 FUNCTION {format.note}
598 {
599 note empty$
600 { "" }
601 { note #1 #1 substring$
602 duplicate$ "{" =
603 'skip$
604 { output.state mid.sentence =
605 { "l" }
606 { "u" }
607 if$
608 change.case$
609 }
610 if$
611 note #2 global.max$ substring$ * "note" bibinfo.check
612 }
613 if$
614 }
615
616 FUNCTION {format.title}
617 { title
618 "title" bibinfo.check
619 duplicate$ empty$ 'skip$
620 {
621 emphasize
622 }
623 if$
624 }
625 FUNCTION {format.full.names}
626 {'s :=
627 "" 't :=
628 #1 'nameptr :=
629 s num.names$ 'numnames :=
630 numnames 'namesleft :=
631 { namesleft #0 > }
632 { s nameptr
633 "{vv~}{ll}" format.name$
634 't :=
635 nameptr #1 >
636 {
637 namesleft #1 >
638 { ", " * t * }
639 {
640 s nameptr "{ll}" format.name$ duplicate$ "others" =
641 { 't := }
642 { pop$ }
643 if$
644 t "others" =
645 {
646 " " * bbl.etal *
647 }
648 {
649 numnames #2 >
650 { "," * }
651 'skip$
652 if$
653 bbl.and
654 space.word * t *
655 }
656 if$
657 }
658 if$
659 }
660 't
661 if$
662 nameptr #1 + 'nameptr :=
663 namesleft #1 - 'namesleft :=
664 }
665 while$
666 }
667
668 FUNCTION {author.editor.key.full}
669 { author empty$
670 { editor empty$
671 { key empty$
672 { cite$ #1 #3 substring$ }
673 'key
674 if$
675 }
676 { editor format.full.names }
677 if$
678 }
679 { author format.full.names }
680 if$
681 }
682
683 FUNCTION {author.key.full}
684 { author empty$
685 { key empty$
686 { cite$ #1 #3 substring$ }
687 'key
688 if$
689 }
690 { author format.full.names }
691 if$
692 }
693
694 FUNCTION {editor.key.full}
695 { editor empty$
696 { key empty$
697 { cite$ #1 #3 substring$ }
698 'key
699 if$
700 }
701 { editor format.full.names }
702 if$
703 }
704
705 FUNCTION {make.full.names}
706 { type$ "book" =
707 type$ "inbook" =
708 or
709 'author.editor.key.full
710 { type$ "proceedings" =
711 'editor.key.full
712 'author.key.full
713 if$
714 }
715 if$
716 }
717
718 FUNCTION {output.bibitem}
719 { newline$
720 "\bibitem[{" write$
721 label write$
722 ")" make.full.names duplicate$ short.list =
723 { pop$ }
724 { * }
725 if$
726 "}]{" * write$
727 cite$ write$
728 "}" write$
729 newline$
730 ""
731 before.all 'output.state :=
732 }
733
734 FUNCTION {n.dashify}
735 {
736 't :=
737 ""
738 { t empty$ not }
739 { t #1 #1 substring$ "-" =
740 { t #1 #2 substring$ "--" = not
741 { "--" *
742 t #2 global.max$ substring$ 't :=
743 }
744 { { t #1 #1 substring$ "-" = }
745 { "-" *
746 t #2 global.max$ substring$ 't :=
747 }
748 while$
749 }
750 if$
751 }
752 { t #1 #1 substring$ *
753 t #2 global.max$ substring$ 't :=
754 }
755 if$
756 }
757 while$
758 }
759
760 FUNCTION {word.in}
761 { bbl.in capitalize
762 " " * }
763
764 FUNCTION {format.date}
765 { year "year" bibinfo.check duplicate$ empty$
766 {
767 "empty year in " cite$ * "; set to ????" * warning$
768 pop$ "????"
769 }
770 'skip$
771 if$
772 extra.label *
773 before.all 'output.state :=
774 ", " swap$ *
775 }
776 FUNCTION {format.btitle}
777 { title "title" bibinfo.check
778 duplicate$ empty$ 'skip$
779 {
780 emphasize
781 }
782 if$
783 }
784 FUNCTION {either.or.check}
785 { empty$
786 'pop$
787 { "can't use both " swap$ * " fields in " * cite$ * warning$ }
788 if$
789 }
790 FUNCTION {format.bvolume}
791 { volume empty$
792 { "" }
793 { bbl.volume volume tie.or.space.prefix
794 "volume" bibinfo.check * *
795 series "series" bibinfo.check
796 duplicate$ empty$ 'pop$
797 { swap$ bbl.of space.word * swap$
798 emphasize * }
799 if$
800 "volume and number" number either.or.check
801 }
802 if$
803 }
804 FUNCTION {format.number.series}
805 { volume empty$
806 { number empty$
807 { series field.or.null }
808 { series empty$
809 { number "number" bibinfo.check }
810 { output.state mid.sentence =
811 { bbl.number }
812 { bbl.number capitalize }
813 if$
814 number tie.or.space.prefix "number" bibinfo.check * *
815 bbl.in space.word *
816 series "series" bibinfo.check *
817 }
818 if$
819 }
820 if$
821 }
822 { "" }
823 if$
824 }
825
826 FUNCTION {format.edition}
827 { edition duplicate$ empty$ 'skip$
828 {
829 output.state mid.sentence =
830 { "l" }
831 { "t" }
832 if$ change.case$
833 "edition" bibinfo.check
834 " " * bbl.edition *
835 }
836 if$
837 }
838 INTEGERS { multiresult }
839 FUNCTION {multi.page.check}
840 { 't :=
841 #0 'multiresult :=
842 { multiresult not
843 t empty$ not
844 and
845 }
846 { t #1 #1 substring$
847 duplicate$ "-" =
848 swap$ duplicate$ "," =
849 swap$ "+" =
850 or or
851 { #1 'multiresult := }
852 { t #2 global.max$ substring$ 't := }
853 if$
854 }
855 while$
856 multiresult
857 }
858 FUNCTION {format.pages}
859 { pages duplicate$ empty$ 'skip$
860 { duplicate$ multi.page.check
861 {
862 bbl.pages swap$
863 n.dashify
864 }
865 {
866 bbl.page swap$
867 }
868 if$
869 tie.or.space.prefix
870 "pages" bibinfo.check
871 * *
872 }
873 if$
874 }
875 FUNCTION {format.journal.pages}
876 { pages duplicate$ empty$ 'pop$
877 { swap$ duplicate$ empty$
878 { pop$ pop$ format.pages }
879 {
880 ":" *
881 swap$
882 n.dashify
883 "pages" bibinfo.check
884 *
885 }
886 if$
887 }
888 if$
889 }
890 FUNCTION {format.journal.eid}
891 { eid "eid" bibinfo.check
892 duplicate$ empty$ 'pop$
893 { swap$ duplicate$ empty$ 'skip$
894 {
895 ":" *
896 }
897 if$
898 swap$ *
899 }
900 if$
901 }
902 FUNCTION {format.vol.num.pages}
903 { volume field.or.null
904 duplicate$ empty$ 'skip$
905 {
906 "volume" bibinfo.check
907 }
908 if$
909 number "number" bibinfo.check duplicate$ empty$ 'skip$
910 {
911 swap$ duplicate$ empty$
912 { "there's a number but no volume in " cite$ * warning$ }
913 'skip$
914 if$
915 swap$
916 "(" swap$ * ")" *
917 }
918 if$ *
919 eid empty$
920 { format.journal.pages }
921 { format.journal.eid }
922 if$
923 }
924
925 FUNCTION {format.chapter.pages}
926 { chapter empty$
927 'format.pages
928 { type empty$
929 { bbl.chapter }
930 { type "l" change.case$
931 "type" bibinfo.check
932 }
933 if$
934 chapter tie.or.space.prefix
935 "chapter" bibinfo.check
936 * *
937 pages empty$
938 'skip$
939 { ", " * format.pages * }
940 if$
941 }
942 if$
943 }
944
945 FUNCTION {format.booktitle}
946 {
947 booktitle "booktitle" bibinfo.check
948 emphasize
949 }
950 FUNCTION {format.in.ed.booktitle}
951 { format.booktitle duplicate$ empty$ 'skip$
952 {
953 editor "editor" format.names.ed duplicate$ empty$ 'pop$
954 {
955 " " *
956 get.bbl.editor
957 "(" swap$ * ") " *
958 * swap$
959 * }
960 if$
961 word.in swap$ *
962 }
963 if$
964 }
965 FUNCTION {format.thesis.type}
966 { type duplicate$ empty$
967 'pop$
968 { swap$ pop$
969 "t" change.case$ "type" bibinfo.check
970 }
971 if$
972 }
973 FUNCTION {format.tr.number}
974 { number "number" bibinfo.check
975 type duplicate$ empty$
976 { pop$ bbl.techrep }
977 'skip$
978 if$
979 "type" bibinfo.check
980 swap$ duplicate$ empty$
981 { pop$ "t" change.case$ }
982 { tie.or.space.prefix * * }
983 if$
984 }
985 FUNCTION {format.article.crossref}
986 {
987 word.in
988 " \cite{" * crossref * "}" *
989 }
990 FUNCTION {format.book.crossref}
991 { volume duplicate$ empty$
992 { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
993 pop$ word.in
994 }
995 { bbl.volume
996 capitalize
997 swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
998 }
999 if$
1000 " \cite{" * crossref * "}" *
1001 }
1002 FUNCTION {format.incoll.inproc.crossref}
1003 {
1004 word.in
1005 " \cite{" * crossref * "}" *
1006 }
1007 FUNCTION {format.org.or.pub}
1008 { 't :=
1009 ""
1010 add.blank "(" *
1011 t empty$
1012 { address "address" bibinfo.check *
1013 }
1014 { t *
1015 address empty$
1016 'skip$
1017 { ", " * address "address" bibinfo.check * }
1018 if$
1019 }
1020 if$
1021 year duplicate$ empty$
1022 { "empty year in " cite$ * "; set to ????" * warning$
1023 pop$ "????" }
1024 { "year" bibinfo.check extra.label * }
1025 if$
1026 t empty$ address empty$ and
1027 { * }
1028 { ", " swap$ * * }
1029 if$
1030 ")" *
1031 }
1032 FUNCTION {format.publisher.address}
1033 { publisher "publisher" bibinfo.warn format.org.or.pub
1034 }
1035
1036 FUNCTION {format.organization.address}
1037 { organization "organization" bibinfo.check format.org.or.pub
1038 }
1039
1040 %----------------------------------------------------------------
1041 % PW formatting added entry types
1042
1043 FUNCTION {format.binding}
1044 { binding "binding" bibinfo.check
1045 duplicate$ empty$ 'skip$
1046 {
1047 new.block
1048 "Binding: " swap$ *
1049 }
1050 if$
1051 }
1052
1053 FUNCTION {format.category}
1054 { category "category" bibinfo.check
1055 duplicate$ empty$ 'skip$
1056 {
1057 new.block
1058 boldcat
1059 }
1060 if$
1061 }
1062
1063
1064 FUNCTION {format.condition}
1065 { condition "condition" bibinfo.check
1066 duplicate$ empty$ 'skip$
1067 { new.block
1068 "Condition: " swap$ *
1069 }
1070 if$
1071 }
1072
1073 FUNCTION {format.copy}
1074 { copy "copy" bibinfo.check
1075 duplicate$ empty$ 'skip$
1076 {
1077 new.block
1078 "Copy: " swap$ *
1079 }
1080 if$
1081 }
1082
1083 FUNCTION {format.illustrations}
1084 { illustrations "illustrations" bibinfo.check
1085 duplicate$ empty$ 'skip$
1086 {
1087 new.block
1088 "Illustrations: " swap$ *
1089 }
1090 if$
1091 }
1092
1093 FUNCTION {format.location}
1094 { location "location" bibinfo.check
1095 duplicate$ empty$ 'skip$
1096 {
1097 new.block
1098 "Location: " swap$ *
1099 }
1100 if$
1101 }
1102
1103 FUNCTION {format.size}
1104 { size "size" bibinfo.check
1105 duplicate$ empty$ 'skip$
1106 {
1107 new.block
1108 "Size: " swap$ *
1109 }
1110 if$
1111 }
1112
1113 FUNCTION {format.value}
1114 { value "value" bibinfo.check
1115 duplicate$ empty$ 'skip$
1116 {
1117 new.block
1118 boldval
1119 }
1120 if$
1121 }
1122
1123 FUNCTION {format.volumes}
1124 { volumes "volumes" bibinfo.check
1125 duplicate$ empty$ 'skip$
1126 {
1127 new.block
1128 "Volumes: " swap$ *
1129 }
1130 if$
1131 }
1132
1133 %-----------------------------------------------------------------
1134
1135 FUNCTION {article}
1136 { output.bibitem
1137 format.authors "author" output.check
1138 author format.key output
1139 new.block
1140 format.title "title" output.check
1141 new.block
1142 crossref missing$
1143 {
1144 journal
1145 "journal" bibinfo.check
1146 emphasize
1147 "journal" output.check
1148 format.vol.num.pages output
1149 }
1150 { format.article.crossref output.nonnull
1151 format.pages output
1152 }
1153 if$
1154 new.block
1155 format.note output
1156 new.block
1157 format.date "year" output.check
1158 fin.entry
1159 }
1160
1161 % ---------------------------------------------------------
1162 % PW extended the book entry
1163
1164 FUNCTION {book}
1165 { output.bibitem
1166 author empty$
1167 { format.editors "author and editor" output.check
1168 editor format.key output
1169 add.blank
1170 }
1171 { format.authors output.nonnull
1172 crossref missing$
1173 { "author and editor" editor either.or.check }
1174 'skip$
1175 if$
1176 }
1177 if$
1178 new.block
1179 format.btitle "title" output.check
1180 format.editors output
1181 format.collator output
1182 format.translator output
1183 format.foreword output
1184 format.preface output
1185 format.introduction output
1186 crossref missing$
1187 { format.bvolume output
1188 new.block
1189 format.number.series output
1190 new.sentence
1191 format.publisher.address output
1192 }
1193 {
1194 new.block
1195 format.book.crossref output.nonnull
1196 }
1197 if$
1198 format.book.pages output
1199 format.edition output
1200 format.isbn output
1201 format.volumes output
1202 format.illustrations output
1203 format.binding output
1204 format.size output
1205 new.block
1206 format.note output
1207 new.block
1208 format.condition output
1209 format.copy output
1210 format.location output
1211 format.category output
1212 format.value output
1213 fin.entry
1214 }
1215
1216 % --------------------------------------------------------
1217
1218 FUNCTION {booklet}
1219 { output.bibitem
1220 format.authors output
1221 author format.key output
1222 new.block
1223 format.title "title" output.check
1224 new.block
1225 howpublished "howpublished" bibinfo.check output
1226 address "address" bibinfo.check output
1227 format.isbn output
1228 format.book.pages output
1229 new.block
1230 format.note output
1231 new.block
1232 format.date "year" output.check
1233 fin.entry
1234 }
1235
1236 FUNCTION {inbook}
1237 { output.bibitem
1238 author empty$
1239 { format.editors "author and editor" output.check
1240 editor format.key output
1241 }
1242 { format.authors output.nonnull
1243 crossref missing$
1244 { "author and editor" editor either.or.check }
1245 'skip$
1246 if$
1247 }
1248 if$
1249 new.block
1250 format.btitle "title" output.check
1251 crossref missing$
1252 {
1253 format.bvolume output
1254 format.chapter.pages "chapter and pages" output.check
1255 new.block
1256 format.number.series output
1257 new.sentence
1258 format.publisher.address output
1259 }
1260 {
1261 format.chapter.pages "chapter and pages" output.check
1262 new.block
1263 format.book.crossref output.nonnull
1264 }
1265 if$
1266 format.edition output
1267 crossref missing$
1268 { format.isbn output }
1269 'skip$
1270 if$
1271 new.block
1272 format.note output
1273 fin.entry
1274 }
1275
1276 FUNCTION {incollection}
1277 { output.bibitem
1278 format.authors "author" output.check
1279 author format.key output
1280 new.block
1281 format.title "title" output.check
1282 new.block
1283 crossref missing$
1284 { format.in.ed.booktitle "booktitle" output.check
1285 format.bvolume output
1286 format.number.series output
1287 format.chapter.pages output
1288 new.sentence
1289 format.publisher.address output
1290 format.edition output
1291 format.isbn output
1292 }
1293 { format.incoll.inproc.crossref output.nonnull
1294 format.chapter.pages output
1295 }
1296 if$
1297 new.block
1298 format.note output
1299 fin.entry
1300 }
1301 FUNCTION {inproceedings}
1302 { output.bibitem
1303 format.authors "author" output.check
1304 author format.key output
1305 new.block
1306 format.title "title" output.check
1307 new.block
1308 crossref missing$
1309 { format.in.ed.booktitle "booktitle" output.check
1310 format.bvolume output
1311 format.number.series output
1312 format.pages output
1313 new.sentence
1314 publisher empty$
1315 { format.organization.address output }
1316 { organization "organization" bibinfo.check output
1317 format.publisher.address output
1318 }
1319 if$
1320 format.isbn output
1321 }
1322 { format.incoll.inproc.crossref output.nonnull
1323 format.pages output
1324 }
1325 if$
1326 new.block
1327 format.note output
1328 fin.entry
1329 }
1330 FUNCTION {conference} { inproceedings }
1331 FUNCTION {manual}
1332 { output.bibitem
1333 format.authors output
1334 author format.key output
1335 new.block
1336 format.btitle "title" output.check
1337 organization address new.block.checkb
1338 organization "organization" bibinfo.check output
1339 address "address" bibinfo.check output
1340 format.edition output
1341 new.block
1342 format.note output
1343 new.block
1344 format.date "year" output.check
1345 fin.entry
1346 }
1347
1348 FUNCTION {mastersthesis}
1349 { output.bibitem
1350 format.authors "author" output.check
1351 author format.key output
1352 new.block
1353 format.btitle
1354 "title" output.check
1355 new.block
1356 bbl.mthesis format.thesis.type output.nonnull
1357 school "school" bibinfo.warn output
1358 address "address" bibinfo.check output
1359 new.block
1360 format.note output
1361 new.block
1362 format.date "year" output.check
1363 fin.entry
1364 }
1365
1366 FUNCTION {misc}
1367 { output.bibitem
1368 format.authors output
1369 author format.key output
1370 new.block
1371 format.title output
1372 new.block
1373 howpublished "howpublished" bibinfo.check output
1374 new.block
1375 format.note output
1376 new.block
1377 format.date "year" output.check
1378 fin.entry
1379 }
1380
1381 FUNCTION {heading}
1382 { output.bibitem
1383 format.authors output
1384 author format.key output
1385 new.block
1386 format.note output
1387 fin.entry
1388 }
1389
1390
1391
1392 FUNCTION {phdthesis}
1393 { output.bibitem
1394 format.authors "author" output.check
1395 author format.key output
1396 new.block
1397 format.btitle
1398 "title" output.check
1399 new.block
1400 bbl.phdthesis format.thesis.type output.nonnull
1401 school "school" bibinfo.warn output
1402 address "address" bibinfo.check output
1403 new.block
1404 format.note output
1405 new.block
1406 format.date "year" output.check
1407 fin.entry
1408 }
1409
1410 FUNCTION {proceedings}
1411 { output.bibitem
1412 format.editors output
1413 editor format.key output
1414 new.block
1415 format.btitle "title" output.check
1416 format.bvolume output
1417 format.number.series output
1418 new.sentence
1419 publisher empty$
1420 { format.organization.address output }
1421 { organization "organization" bibinfo.check output
1422 format.publisher.address output
1423 }
1424 if$
1425 format.isbn output
1426 new.block
1427 format.note output
1428 fin.entry
1429 }
1430
1431 FUNCTION {techreport}
1432 { output.bibitem
1433 format.authors "author" output.check
1434 author format.key output
1435 new.block
1436 format.title
1437 "title" output.check
1438 new.block
1439 format.tr.number output.nonnull
1440 institution "institution" bibinfo.warn output
1441 address "address" bibinfo.check output
1442 new.block
1443 format.note output
1444 new.block
1445 format.date "year" output.check
1446 fin.entry
1447 }
1448
1449 FUNCTION {unpublished}
1450 { output.bibitem
1451 format.authors "author" output.check
1452 author format.key output
1453 new.block
1454 format.title "title" output.check
1455 new.block
1456 format.note "note" output.check
1457 new.block
1458 format.date output
1459 fin.entry
1460 }
1461
1462 FUNCTION {default.type} { misc }
1463 READ
1464 FUNCTION {sortify}
1465 { purify$
1466 "l" change.case$
1467 }
1468 INTEGERS { len }
1469 FUNCTION {chop.word}
1470 { 's :=
1471 'len :=
1472 s #1 len substring$ =
1473 { s len #1 + global.max$ substring$ }
1474 's
1475 if$
1476 }
1477 FUNCTION {format.lab.names}
1478 { 's :=
1479 "" 't :=
1480 s #1 "{vv~}{ll}" format.name$
1481 s num.names$ duplicate$
1482 #2 >
1483 { pop$
1484 " " * bbl.etal *
1485 }
1486 { #2 <
1487 'skip$
1488 { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
1489 {
1490 " " * bbl.etal *
1491 }
1492 { bbl.and space.word * s #2 "{vv~}{ll}" format.name$
1493 * }
1494 if$
1495 }
1496 if$
1497 }
1498 if$
1499 }
1500
1501 FUNCTION {author.key.label}
1502 { author empty$
1503 { key empty$
1504 { cite$ #1 #3 substring$ }
1505 'key
1506 if$
1507 }
1508 { author format.lab.names }
1509 if$
1510 }
1511
1512 FUNCTION {author.editor.key.label}
1513 { author empty$
1514 { editor empty$
1515 { key empty$
1516 { cite$ #1 #3 substring$ }
1517 'key
1518 if$
1519 }
1520 { editor format.lab.names }
1521 if$
1522 }
1523 { author format.lab.names }
1524 if$
1525 }
1526
1527 FUNCTION {editor.key.label}
1528 { editor empty$
1529 { key empty$
1530 { cite$ #1 #3 substring$ }
1531 'key
1532 if$
1533 }
1534 { editor format.lab.names }
1535 if$
1536 }
1537
1538 FUNCTION {calc.short.authors}
1539 { type$ "book" =
1540 type$ "inbook" =
1541 or
1542 'author.editor.key.label
1543 { type$ "proceedings" =
1544 'editor.key.label
1545 'author.key.label
1546 if$
1547 }
1548 if$
1549 'short.list :=
1550 }
1551
1552 FUNCTION {calc.label}
1553 { calc.short.authors
1554 short.list
1555 "("
1556 *
1557 year duplicate$ empty$
1558 short.list key field.or.null = or
1559 { pop$ "" }
1560 'skip$
1561 if$
1562 *
1563 'label :=
1564 }
1565
1566 FUNCTION {sort.format.names}
1567 { 's :=
1568 #1 'nameptr :=
1569 ""
1570 s num.names$ 'numnames :=
1571 numnames 'namesleft :=
1572 { namesleft #0 > }
1573 { s nameptr
1574 "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}"
1575 format.name$ 't :=
1576 nameptr #1 >
1577 {
1578 " " *
1579 namesleft #1 = t "others" = and
1580 { "zzzzz" 't := }
1581 'skip$
1582 if$
1583 t sortify *
1584 }
1585 { t sortify * }
1586 if$
1587 nameptr #1 + 'nameptr :=
1588 namesleft #1 - 'namesleft :=
1589 }
1590 while$
1591 }
1592
1593 FUNCTION {sort.format.title}
1594 { 't :=
1595 "A " #2
1596 "An " #3
1597 "The " #4 t chop.word
1598 chop.word
1599 chop.word
1600 sortify
1601 #1 global.max$ substring$
1602 }
1603 FUNCTION {author.sort}
1604 { author empty$
1605 { key empty$
1606 { "to sort, need author or key in " cite$ * warning$
1607 ""
1608 }
1609 { key sortify }
1610 if$
1611 }
1612 { author sort.format.names }
1613 if$
1614 }
1615 FUNCTION {author.editor.sort}
1616 { author empty$
1617 { editor empty$
1618 { key empty$
1619 { "to sort, need author, editor, or key in " cite$ * warning$
1620 ""
1621 }
1622 { key sortify }
1623 if$
1624 }
1625 { editor sort.format.names }
1626 if$
1627 }
1628 { author sort.format.names }
1629 if$
1630 }
1631 FUNCTION {editor.sort}
1632 { editor empty$
1633 { key empty$
1634 { "to sort, need editor or key in " cite$ * warning$
1635 ""
1636 }
1637 { key sortify }
1638 if$
1639 }
1640 { editor sort.format.names }
1641 if$
1642 }
1643 FUNCTION {presort}
1644 { calc.label
1645 label sortify
1646 " "
1647 *
1648 type$ "book" =
1649 type$ "inbook" =
1650 or
1651 'author.editor.sort
1652 { type$ "proceedings" =
1653 'editor.sort
1654 'author.sort
1655 if$
1656 }
1657 if$
1658 #1 entry.max$ substring$
1659 'sort.label :=
1660 sort.label
1661 *
1662 " "
1663 *
1664 title field.or.null
1665 sort.format.title
1666 *
1667 #1 entry.max$ substring$
1668 'sort.key$ :=
1669 }
1670
1671 ITERATE {presort}
1672 SORT
1673 STRINGS { last.label next.extra }
1674 INTEGERS { last.extra.num last.extra.num.extended last.extra.num.blank number.label }
1675 FUNCTION {initialize.extra.label.stuff}
1676 { #0 int.to.chr$ 'last.label :=
1677 "" 'next.extra :=
1678 #0 'last.extra.num :=
1679 "a" chr.to.int$ #1 - 'last.extra.num.blank :=
1680 last.extra.num.blank 'last.extra.num.extended :=
1681 #0 'number.label :=
1682 }
1683 FUNCTION {forward.pass}
1684 { last.label label =
1685 { last.extra.num #1 + 'last.extra.num :=
1686 last.extra.num "z" chr.to.int$ >
1687 { "a" chr.to.int$ 'last.extra.num :=
1688 last.extra.num.extended #1 + 'last.extra.num.extended :=
1689 }
1690 'skip$
1691 if$
1692 last.extra.num.extended last.extra.num.blank >
1693 { last.extra.num.extended int.to.chr$
1694 last.extra.num int.to.chr$
1695 * 'extra.label := }
1696 { last.extra.num int.to.chr$ 'extra.label := }
1697 if$
1698 }
1699 { "a" chr.to.int$ 'last.extra.num :=
1700 "" 'extra.label :=
1701 label 'last.label :=
1702 }
1703 if$
1704 number.label #1 + 'number.label :=
1705 }
1706 FUNCTION {reverse.pass}
1707 { next.extra "b" =
1708 { "a" 'extra.label := }
1709 'skip$
1710 if$
1711 extra.label 'next.extra :=
1712 extra.label
1713 duplicate$ empty$
1714 'skip$
1715 { "{\natexlab{" swap$ * "}}" * }
1716 if$
1717 'extra.label :=
1718 label extra.label * 'label :=
1719 }
1720 EXECUTE {initialize.extra.label.stuff}
1721 ITERATE {forward.pass}
1722 REVERSE {reverse.pass}
1723 FUNCTION {bib.sort.order}
1724 { sort.label
1725 " "
1726 *
1727 year field.or.null sortify
1728 *
1729 " "
1730 *
1731 title field.or.null
1732 sort.format.title
1733 *
1734 #1 entry.max$ substring$
1735 'sort.key$ :=
1736 }
1737 ITERATE {bib.sort.order}
1738 SORT
1739 FUNCTION {begin.bib}
1740 { preamble$ empty$
1741 'skip$
1742 { preamble$ write$ newline$ }
1743 if$
1744 "\begin{thebibliography}{" number.label int.to.str$ * "}" *
1745 write$ newline$
1746 "\providecommand{\natexlab}[1]{#1}"
1747 write$ newline$
1748 }
1749 EXECUTE {begin.bib}
1750 EXECUTE {init.state.consts}
1751 ITERATE {call.type$}
1752 FUNCTION {end.bib}
1753 { newline$
1754 "\end{thebibliography}" write$ newline$
1755 }
1756 EXECUTE {end.bib}
1757 %% End of customized bst file
1758 %%
1759 %% End of file `bookdb.bst'.