Debian Codegraph @

texmf-dist/source/bibtex/bibtools/html-cv.bst

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