Debian Codegraph @

texmf-dist/bibtex/bst/bibhtml/unsrthtml.bst

raw
1 %% unsrthtml.bst
2 %%
3 %% Part of bibhtml, version 2.0.2, released 2013 September 8
4 %% Hg node 7076ce83a035.
5 %% See <http://purl.org/nxg/dist/bibhtml>
6 %%
7 %% Copyright 1999, 2005, 2006, 2009, Norman Gray <[email protected]>
8 %%
9 %% This is a modification of a modification!
10 %%
11 %%% Modification of BibTeX style file /usr/local/texlive/2008/texmf-dist/bibtex/bst/base/unsrt.bst
12 %%% ... by urlbst, version 0.6-4 (marked with "% urlbst")
13 %%% See <http://purl.org/nxg/dist/urlbst>
14 %%% Added webpage entry type, and url and lastchecked fields.
15 %%% Added eprint support.
16 %%% Added DOI support.
17 %%% Added PUBMED support.
18 %%% Added hyperref support.
19 %%% Original headers follow...
20
21 % BibTeX standard bibliography style `unsrt'
22 % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
23 % Copyright (C) 1985, all rights reserved.
24 % Copying of this file is authorized only if either
25 % (1) you make absolutely no changes to your copy, including name, or
26 % (2) if you do make changes, you name it something other than
27 % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
28 % This restriction helps ensure that all standard styles are identical.
29 % The file btxbst.doc has the documentation for this style.
30
31 ENTRY
32 { address
33 author
34 booktitle
35 chapter
36 edition
37 editor
38 howpublished
39 institution
40 journal
41 key
42 month
43 note
44 number
45 organization
46 pages
47 publisher
48 school
49 series
50 title
51 type
52 volume
53 year
54 eprint % urlbst
55 doi % urlbst
56 pubmed % urlbst
57 url % urlbst
58 lastchecked % urlbst
59 }
60 {}
61 { label }
62
63 INTEGERS { output.state before.all mid.sentence after.sentence after.block doiform }
64
65 STRINGS { urlintro eprinturl eprintprefix doiprefix doiurl pubmedprefix pubmedurl openinlinelink closeinlinelink } % urlbst...
66 INTEGERS { inlinelinks makeinlinelink addeprints adddoiresolver addpubmedresolver }
67 % Following constants may be adjusted by hand, if desired
68 FUNCTION {init.urlbst.variables}
69 {
70 "Available from: " 'urlintro := % prefix before URL
71 "http://arxiv.org/abs/" 'eprinturl := % prefix to make URL from eprint ref
72 "arXiv:" 'eprintprefix := % text prefix printed before eprint ref
73 "http://dx.doi.org/" 'doiurl := % prefix to make URL from DOI
74 "doi:" 'doiprefix := % text prefix printed before DOI ref
75 "http://www.ncbi.nlm.nih.gov/pubmed/" 'pubmedurl := % prefix to make URL from PUBMED
76 "PMID:" 'pubmedprefix := % text prefix printed before PUBMED ref
77 #1 'addeprints := % 0=no eprints; 1=include eprints
78 #1 'adddoiresolver := % 0=no DOI resolver; 1=include it
79 #1 'addpubmedresolver := % 0=no PUBMED resolver; 1=include it
80 #1 'inlinelinks := % 0=URLs explicit; 1=URLs attached to titles
81 #1 'doiform := % 0=simple, but can produce invalid HTML; 1=needs post-processing
82 % the following are internal state variables, not config constants
83 #0 'makeinlinelink := % state variable managed by possibly.setup.inlinelink
84 "" 'openinlinelink := % ditto
85 "" 'closeinlinelink := % ditto
86 }
87 INTEGERS {
88 bracket.state
89 outside.brackets
90 open.brackets
91 within.brackets
92 close.brackets
93 close.first.block
94 }
95 % ...urlbst to here
96 FUNCTION {init.state.consts}
97 { #0 'outside.brackets := % urlbst
98 #1 'open.brackets :=
99 #2 'within.brackets :=
100 #3 'close.brackets :=
101
102 #0 'before.all :=
103 #1 'mid.sentence :=
104 #2 'after.sentence :=
105 #3 'after.block :=
106 #0 'close.first.block :=
107 }
108
109 STRINGS { s t }
110
111 % urlbst
112 FUNCTION {output.nonnull.original}
113 { 's :=
114 output.state mid.sentence =
115 { ", " * write$ }
116 { output.state after.block =
117 { add.period$ write$
118 % close the <dt> after the end of the first block
119 close.first.block
120 { "</a></dt>" write$ newline$ "<dd>" write$
121 #0 'close.first.block := }
122 { newline$ }
123 if$
124 }
125 { output.state before.all =
126 'write$
127 { add.period$ " " * write$ }
128 if$
129 }
130 if$
131 mid.sentence 'output.state :=
132 }
133 if$
134 s
135 }
136
137 % urlbst...
138 % The following three functions are for handling inlinelink. They wrap
139 % a block of text which is potentially output with write$ by multiple
140 % other functions, so we don't know the content a priori.
141 % They communicate between each other using the variables makeinlinelink
142 % (which is true if a link should be made), and closeinlinelink (which holds
143 % the string which should close any current link. They can be called
144 % at any time, but start.inlinelink will be a no-op unless something has
145 % previously set makeinlinelink true, and the two ...end.inlinelink functions
146 % will only do their stuff if start.inlinelink has previously set
147 % closeinlinelink to be non-empty.
148 FUNCTION {possibly.setup.inlinelink}
149 { makeinlinelink
150 { "<a href=" quote$ * url * quote$ * ">" * 'openinlinelink :=
151 "</a>" 'closeinlinelink :=
152 #0 'makeinlinelink := }
153 'skip$
154 if$ % makeinlinelink
155 }
156 FUNCTION {add.inlinelink}
157 { openinlinelink empty$
158 'skip$
159 { openinlinelink swap$ * closeinlinelink *
160 "" 'openinlinelink :=
161 }
162 if$
163 }
164 FUNCTION {output.nonnull}
165 { % Save the thing we've been asked to output
166 's :=
167 % If the bracket-state is close.brackets, then add a close-bracket to
168 % what is currently at the top of the stack, and set bracket.state
169 % to outside.brackets
170 bracket.state close.brackets =
171 { "]" *
172 outside.brackets 'bracket.state :=
173 }
174 'skip$
175 if$
176 bracket.state outside.brackets =
177 { % We're outside all brackets -- this is the normal situation.
178 % Write out what's currently at the top of the stack, using the
179 % original output.nonnull function.
180 s
181 add.inlinelink
182 output.nonnull.original % invoke the original output.nonnull
183 }
184 { % Still in brackets. Add open-bracket or (continuation) comma, add the
185 % new text (in s) to the top of the stack, and move to the close-brackets
186 % state, ready for next time (unless inbrackets resets it). If we come
187 % into this branch, then output.state is carefully undisturbed.
188 bracket.state open.brackets =
189 { " [" * }
190 { ", " * } % bracket.state will be within.brackets
191 if$
192 s *
193 close.brackets 'bracket.state :=
194 }
195 if$
196 }
197
198 % Call this function just before adding something which should be presented in
199 % brackets. bracket.state is handled specially within output.nonnull.
200 FUNCTION {inbrackets}
201 { bracket.state close.brackets =
202 { within.brackets 'bracket.state := } % reset the state: not open nor closed
203 { open.brackets 'bracket.state := }
204 if$
205 }
206
207 FUNCTION {format.lastchecked}
208 { lastchecked empty$
209 { "" }
210 { inbrackets "cited " lastchecked * }
211 if$
212 }
213 % ...urlbst to here
214
215 FUNCTION {output}
216 { duplicate$ empty$
217 'pop$
218 'output.nonnull
219 if$
220 }
221
222 FUNCTION {output.check}
223 { 't :=
224 duplicate$ empty$
225 { pop$ "empty " t * " in " * cite$ * warning$ }
226 'output.nonnull
227 if$
228 }
229
230 FUNCTION {output.bibitem.original}
231 { newline$
232 "<dt><a name='" write$
233 cite$ write$
234 "'>[" cite$ * "] " * write$
235 % the <dt> is closed within output.nonnull, as long as close.first.block is true
236 #1 'close.first.block :=
237 newline$
238 ""
239 before.all 'output.state :=
240 }
241
242 FUNCTION {fin.entry.original}
243 { add.period$ "</dd>" *
244 write$
245 newline$
246 }
247
248 FUNCTION {new.block}
249 { output.state before.all =
250 'skip$
251 { after.block 'output.state := }
252 if$
253 }
254
255 FUNCTION {new.sentence}
256 { output.state after.block =
257 'skip$
258 { output.state before.all =
259 'skip$
260 { after.sentence 'output.state := }
261 if$
262 }
263 if$
264 }
265
266 FUNCTION {not}
267 { { #0 }
268 { #1 }
269 if$
270 }
271
272 FUNCTION {and}
273 { 'skip$
274 { pop$ #0 }
275 if$
276 }
277
278 FUNCTION {or}
279 { { pop$ #1 }
280 'skip$
281 if$
282 }
283
284 FUNCTION {new.block.checka}
285 { empty$
286 'skip$
287 'new.block
288 if$
289 }
290
291 FUNCTION {new.block.checkb}
292 { empty$
293 swap$ empty$
294 and
295 'skip$
296 'new.block
297 if$
298 }
299
300 FUNCTION {new.sentence.checka}
301 { empty$
302 'skip$
303 'new.sentence
304 if$
305 }
306
307 FUNCTION {new.sentence.checkb}
308 { empty$
309 swap$ empty$
310 and
311 'skip$
312 'new.sentence
313 if$
314 }
315
316 FUNCTION {field.or.null}
317 { duplicate$ empty$
318 { pop$ "" }
319 'skip$
320 if$
321 }
322
323 FUNCTION {emphasize}
324 { duplicate$ empty$
325 { pop$ "" }
326 { "<em>" swap$ * "</em>" * }
327 if$
328 }
329
330 INTEGERS { nameptr namesleft numnames }
331
332 FUNCTION {format.names}
333 { 's :=
334 #1 'nameptr :=
335 s num.names$ 'numnames :=
336 numnames 'namesleft :=
337 { namesleft #0 > }
338 { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
339 nameptr #1 >
340 { namesleft #1 >
341 { ", " * t * }
342 { numnames #2 >
343 { "," * }
344 'skip$
345 if$
346 t "others" =
347 { " et~al." * }
348 { " and " * t * }
349 if$
350 }
351 if$
352 }
353 't
354 if$
355 nameptr #1 + 'nameptr :=
356 namesleft #1 - 'namesleft :=
357 }
358 while$
359 }
360
361 FUNCTION {format.authors}
362 { author empty$
363 { "" }
364 { author format.names }
365 if$
366 }
367
368 FUNCTION {format.editors}
369 { editor empty$
370 { "" }
371 { editor format.names
372 editor num.names$ #1 >
373 { ", editors" * }
374 { ", editor" * }
375 if$
376 }
377 if$
378 }
379
380 FUNCTION {format.title}
381 { title empty$
382 { "" }
383 { title "t" change.case$ }
384 if$
385 }
386
387 FUNCTION {n.dashify}
388 { 't :=
389 ""
390 { t empty$ not }
391 { t #1 #1 substring$ "-" =
392 { t #1 #2 substring$ "--" = not
393 { "--" *
394 t #2 global.max$ substring$ 't :=
395 }
396 { { t #1 #1 substring$ "-" = }
397 { "-" *
398 t #2 global.max$ substring$ 't :=
399 }
400 while$
401 }
402 if$
403 }
404 { t #1 #1 substring$ *
405 t #2 global.max$ substring$ 't :=
406 }
407 if$
408 }
409 while$
410 }
411
412 FUNCTION {format.date}
413 { year empty$
414 { month empty$
415 { "" }
416 { "there's a month but no year in " cite$ * warning$
417 month
418 }
419 if$
420 }
421 { month empty$
422 'year
423 { month " " * year * }
424 if$
425 }
426 if$
427 }
428
429 FUNCTION {format.btitle}
430 { title emphasize
431 }
432
433 FUNCTION {tie.or.space.connect}
434 { duplicate$ text.length$ #3 <
435 { "~" }
436 { " " }
437 if$
438 swap$ * *
439 }
440
441 FUNCTION {either.or.check}
442 { empty$
443 'pop$
444 { "can't use both " swap$ * " fields in " * cite$ * warning$ }
445 if$
446 }
447
448 FUNCTION {format.bvolume}
449 { volume empty$
450 { "" }
451 { "volume" volume tie.or.space.connect
452 series empty$
453 'skip$
454 { " of " * series emphasize * }
455 if$
456 "volume and number" number either.or.check
457 }
458 if$
459 }
460
461 FUNCTION {format.number.series}
462 { volume empty$
463 { number empty$
464 { series field.or.null }
465 { output.state mid.sentence =
466 { "number" }
467 { "Number" }
468 if$
469 number tie.or.space.connect
470 series empty$
471 { "there's a number but no series in " cite$ * warning$ }
472 { " in " * series * }
473 if$
474 }
475 if$
476 }
477 { "" }
478 if$
479 }
480
481 FUNCTION {format.edition}
482 { edition empty$
483 { "" }
484 { output.state mid.sentence =
485 { edition "l" change.case$ " edition" * }
486 { edition "t" change.case$ " edition" * }
487 if$
488 }
489 if$
490 }
491
492 INTEGERS { multiresult }
493
494 FUNCTION {multi.page.check}
495 { 't :=
496 #0 'multiresult :=
497 { multiresult not
498 t empty$ not
499 and
500 }
501 { t #1 #1 substring$
502 duplicate$ "-" =
503 swap$ duplicate$ "," =
504 swap$ "+" =
505 or or
506 { #1 'multiresult := }
507 { t #2 global.max$ substring$ 't := }
508 if$
509 }
510 while$
511 multiresult
512 }
513
514 FUNCTION {format.pages}
515 { pages empty$
516 { "" }
517 { pages multi.page.check
518 { "pages" pages n.dashify tie.or.space.connect }
519 { "page" pages tie.or.space.connect }
520 if$
521 }
522 if$
523 }
524
525 FUNCTION {format.vol.num.pages}
526 { volume field.or.null
527 number empty$
528 'skip$
529 { "(" number * ")" * *
530 volume empty$
531 { "there's a number but no volume in " cite$ * warning$ }
532 'skip$
533 if$
534 }
535 if$
536 pages empty$
537 'skip$
538 { duplicate$ empty$
539 { pop$ format.pages }
540 { ":" * pages n.dashify * }
541 if$
542 }
543 if$
544 }
545
546 FUNCTION {format.chapter.pages}
547 { chapter empty$
548 'format.pages
549 { type empty$
550 { "chapter" }
551 { type "l" change.case$ }
552 if$
553 chapter tie.or.space.connect
554 pages empty$
555 'skip$
556 { ", " * format.pages * }
557 if$
558 }
559 if$
560 }
561
562 FUNCTION {format.in.ed.booktitle}
563 { booktitle empty$
564 { "" }
565 { editor empty$
566 { "In " booktitle emphasize * }
567 { "In " format.editors * ", " * booktitle emphasize * }
568 if$
569 }
570 if$
571 }
572
573 FUNCTION {empty.misc.check}
574 { author empty$ title empty$ howpublished empty$
575 month empty$ year empty$ note empty$
576 and and and and and
577 { "all relevant fields are empty in " cite$ * warning$ }
578 'skip$
579 if$
580 }
581
582 FUNCTION {format.thesis.type}
583 { type empty$
584 'skip$
585 { pop$
586 type "t" change.case$
587 }
588 if$
589 }
590
591 FUNCTION {format.tr.number}
592 { type empty$
593 { "Technical Report" }
594 'type
595 if$
596 number empty$
597 { "t" change.case$ }
598 { number tie.or.space.connect }
599 if$
600 }
601
602 FUNCTION {format.article.crossref}
603 { key empty$
604 { journal empty$
605 { "need key or journal for " cite$ * " to crossref " * crossref *
606 warning$
607 ""
608 }
609 { "In <em>" journal * "</em>" * }
610 if$
611 }
612 { "In " key * }
613 if$
614 " <span class='cite'>" * crossref * "</span>" *
615 }
616
617 FUNCTION {format.crossref.editor}
618 { editor #1 "{vv~}{ll}" format.name$
619 editor num.names$ duplicate$
620 #2 >
621 { pop$ " et~al." * }
622 { #2 <
623 'skip$
624 { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
625 { " et~al." * }
626 { " and " * editor #2 "{vv~}{ll}" format.name$ * }
627 if$
628 }
629 if$
630 }
631 if$
632 }
633
634 FUNCTION {format.book.crossref}
635 { volume empty$
636 { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
637 "In "
638 }
639 { "Volume" volume tie.or.space.connect
640 " of " *
641 }
642 if$
643 editor empty$
644 editor field.or.null author field.or.null =
645 or
646 { key empty$
647 { series empty$
648 { "need editor, key, or series for " cite$ * " to crossref " *
649 crossref * warning$
650 "" *
651 }
652 { "<em>" * series * "</em>" * }
653 if$
654 }
655 { key * }
656 if$
657 }
658 { format.crossref.editor * }
659 if$
660 " <span class='cite'>" * crossref * "</span>" *
661 }
662
663 FUNCTION {format.incoll.inproc.crossref}
664 { editor empty$
665 editor field.or.null author field.or.null =
666 or
667 { key empty$
668 { booktitle empty$
669 { "need editor, key, or booktitle for " cite$ * " to crossref " *
670 crossref * warning$
671 ""
672 }
673 { "In <em>" booktitle * "</em>" * }
674 if$
675 }
676 { "In " key * }
677 if$
678 }
679 { "In " format.crossref.editor * }
680 if$
681 " <span class='cite'>" * crossref * "</span>" *
682 }
683
684 % urlbst...
685 % Functions for making hypertext links.
686 FUNCTION {make.href}
687 {
688 "<a href='" swap$ * "'><code>" * swap$ * "</code></a>" *
689 }
690
691 % If inlinelinks is true, then format.url should be a no-op, since it's
692 % (a) redundant, and (b) could end up as a link-within-a-link.
693 FUNCTION {format.url}
694 { inlinelinks #1 = url empty$ or
695 { "" }
696 { urlintro "<code>" * url * "</code>" * }
697 if$
698 }
699
700 FUNCTION {format.eprint}
701 { eprint empty$
702 { "" }
703 { eprintprefix eprint * eprinturl eprint * make.href }
704 if$
705 }
706
707 FUNCTION {format.doi}
708 { doi empty$
709 { "" }
710 { doiform #0 =
711 { doiprefix doi * doiurl doi * make.href }
712 { "DOI:{" doi * "}" * }
713 if$
714 }
715 if$
716 }
717
718 FUNCTION {format.pubmed}
719 { pubmed empty$
720 { "" }
721 { pubmedprefix pubmed * pubmedurl pubmed * make.href }
722 if$
723 }
724
725 % Output a URL. We can't use the more normal idiom (something like
726 % `format.url output'), because the `inbrackets' within
727 % format.lastchecked applies to everything between calls to `output',
728 % so that `format.url format.lastchecked * output' ends up with both
729 % the URL and the lastchecked in brackets.
730 FUNCTION {output.url}
731 { url empty$
732 'skip$
733 { new.block
734 format.url output
735 format.lastchecked output
736 }
737 if$
738 }
739
740 FUNCTION {output.web.refs}
741 {
742 new.block
743 output.url
744 addeprints eprint empty$ not and
745 { format.eprint output.nonnull }
746 'skip$
747 if$
748 adddoiresolver doi empty$ not and
749 { format.doi output.nonnull }
750 'skip$
751 if$
752 addpubmedresolver pubmed empty$ not and
753 { format.pubmed output.nonnull }
754 'skip$
755 if$
756 }
757
758 % Wrapper for output.bibitem.original.
759 % If the URL field is not empty, set makeinlinelink to be true,
760 % so that an inline link will be started at the next opportunity
761 FUNCTION {output.bibitem}
762 { outside.brackets 'bracket.state :=
763 output.bibitem.original
764 inlinelinks url empty$ not and
765 { #1 'makeinlinelink := }
766 { #0 'makeinlinelink := }
767 if$
768 }
769
770 % Wrapper for fin.entry.original
771 FUNCTION {fin.entry}
772 { output.web.refs % urlbst
773 makeinlinelink % ooops, it appears we didn't have a title for inlinelink
774 { possibly.setup.inlinelink % add some artificial link text here, as a fallback
775 "[link]" output.nonnull }
776 'skip$
777 if$
778 bracket.state close.brackets = % urlbst
779 { "]" * }
780 'skip$
781 if$
782 fin.entry.original
783 }
784
785 % Webpage entry type.
786 % Title and url fields required;
787 % author, note, year, month, and lastchecked fields optional
788 % See references
789 % ISO 690-2 http://www.nlc-bnc.ca/iso/tc46sc9/standard/690-2e.htm
790 % http://www.classroom.net/classroom/CitingNetResources.html
791 % http://neal.ctstateu.edu/history/cite.html
792 % http://www.cas.usf.edu/english/walker/mla.html
793 % for citation formats for web pages.
794 FUNCTION {webpage}
795 { output.bibitem
796 author empty$
797 { editor empty$
798 'skip$ % author and editor both optional
799 { format.editors output.nonnull }
800 if$
801 }
802 { editor empty$
803 { format.authors output.nonnull }
804 { "can't use both author and editor fields in " cite$ * warning$ }
805 if$
806 }
807 if$
808 new.block
809 title empty$ 'skip$ 'possibly.setup.inlinelink if$
810 format.title "title" output.check
811 inbrackets "online" output
812 new.block
813 year empty$
814 'skip$
815 { format.date "year" output.check }
816 if$
817 % We don't need to output the URL details ('lastchecked' and 'url'),
818 % because fin.entry does that for us, using output.web.refs. The only
819 % reason we would want to put them here is if we were to decide that
820 % they should go in front of the rather miscellaneous information in 'note'.
821 new.block
822 note output
823 fin.entry
824 }
825 % ...urlbst to here
826
827
828 FUNCTION {article}
829 { output.bibitem
830 format.authors "author" output.check
831 new.block
832 title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
833 format.title "title" output.check
834 new.block
835 crossref missing$
836 { journal emphasize "journal" output.check
837 possibly.setup.inlinelink format.vol.num.pages output% urlbst
838 format.date "year" output.check
839 }
840 { format.article.crossref output.nonnull
841 format.pages output
842 }
843 if$
844 new.block
845 note output
846 fin.entry
847 }
848
849 FUNCTION {book}
850 { output.bibitem
851 author empty$
852 { format.editors "author and editor" output.check }
853 { format.authors output.nonnull
854 crossref missing$
855 { "author and editor" editor either.or.check }
856 'skip$
857 if$
858 }
859 if$
860 new.block
861 title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
862 format.btitle "title" output.check
863 crossref missing$
864 { format.bvolume output
865 new.block
866 format.number.series output
867 new.sentence
868 publisher "publisher" output.check
869 address output
870 }
871 { new.block
872 format.book.crossref output.nonnull
873 }
874 if$
875 format.edition output
876 format.date "year" output.check
877 new.block
878 note output
879 fin.entry
880 }
881
882 FUNCTION {booklet}
883 { output.bibitem
884 format.authors output
885 new.block
886 title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
887 format.title "title" output.check
888 howpublished address new.block.checkb
889 howpublished output
890 address output
891 format.date output
892 new.block
893 note output
894 fin.entry
895 }
896
897 FUNCTION {inbook}
898 { output.bibitem
899 author empty$
900 { format.editors "author and editor" output.check }
901 { format.authors output.nonnull
902 crossref missing$
903 { "author and editor" editor either.or.check }
904 'skip$
905 if$
906 }
907 if$
908 new.block
909 title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
910 format.btitle "title" output.check
911 crossref missing$
912 { format.bvolume output
913 format.chapter.pages "chapter and pages" output.check
914 new.block
915 format.number.series output
916 new.sentence
917 publisher "publisher" output.check
918 address output
919 }
920 { format.chapter.pages "chapter and pages" output.check
921 new.block
922 format.book.crossref output.nonnull
923 }
924 if$
925 format.edition output
926 format.date "year" output.check
927 new.block
928 note output
929 fin.entry
930 }
931
932 FUNCTION {incollection}
933 { output.bibitem
934 format.authors "author" output.check
935 new.block
936 title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
937 format.title "title" output.check
938 new.block
939 crossref missing$
940 { format.in.ed.booktitle "booktitle" output.check
941 format.bvolume output
942 format.number.series output
943 format.chapter.pages output
944 new.sentence
945 publisher "publisher" output.check
946 address output
947 format.edition output
948 format.date "year" output.check
949 }
950 { format.incoll.inproc.crossref output.nonnull
951 format.chapter.pages output
952 }
953 if$
954 new.block
955 note output
956 fin.entry
957 }
958
959 FUNCTION {inproceedings}
960 { output.bibitem
961 format.authors "author" output.check
962 new.block
963 title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
964 format.title "title" output.check
965 new.block
966 crossref missing$
967 { format.in.ed.booktitle "booktitle" output.check
968 format.bvolume output
969 format.number.series output
970 format.pages output
971 address empty$
972 { organization publisher new.sentence.checkb
973 organization output
974 publisher output
975 format.date "year" output.check
976 }
977 { address output.nonnull
978 format.date "year" output.check
979 new.sentence
980 organization output
981 publisher output
982 }
983 if$
984 }
985 { format.incoll.inproc.crossref output.nonnull
986 format.pages output
987 }
988 if$
989 new.block
990 note output
991 fin.entry
992 }
993
994 FUNCTION {conference} { inproceedings }
995
996 FUNCTION {manual}
997 { output.bibitem
998 author empty$
999 { organization empty$
1000 'skip$
1001 { organization output.nonnull
1002 address output
1003 }
1004 if$
1005 }
1006 { format.authors output.nonnull }
1007 if$
1008 new.block
1009 title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
1010 format.btitle "title" output.check
1011 author empty$
1012 { organization empty$
1013 { address new.block.checka
1014 address output
1015 }
1016 'skip$
1017 if$
1018 }
1019 { organization address new.block.checkb
1020 organization output
1021 address output
1022 }
1023 if$
1024 format.edition output
1025 format.date output
1026 new.block
1027 note output
1028 fin.entry
1029 }
1030
1031 FUNCTION {mastersthesis}
1032 { output.bibitem
1033 format.authors "author" output.check
1034 new.block
1035 title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
1036 format.title "title" output.check
1037 new.block
1038 "Master's thesis" format.thesis.type output.nonnull
1039 school "school" output.check
1040 address output
1041 format.date "year" output.check
1042 new.block
1043 note output
1044 fin.entry
1045 }
1046
1047 FUNCTION {misc}
1048 { output.bibitem
1049 format.authors output
1050 title howpublished new.block.checkb
1051 title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
1052 format.title output
1053 howpublished new.block.checka
1054 howpublished output
1055 format.date output
1056 new.block
1057 note output
1058 fin.entry
1059 empty.misc.check
1060 }
1061
1062 FUNCTION {phdthesis}
1063 { output.bibitem
1064 format.authors "author" output.check
1065 new.block
1066 title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
1067 format.btitle "title" output.check
1068 new.block
1069 "PhD thesis" format.thesis.type output.nonnull
1070 school "school" output.check
1071 address output
1072 format.date "year" output.check
1073 new.block
1074 note output
1075 fin.entry
1076 }
1077
1078 FUNCTION {proceedings}
1079 { output.bibitem
1080 editor empty$
1081 { organization output }
1082 { format.editors output.nonnull }
1083 if$
1084 new.block
1085 title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
1086 format.btitle "title" output.check
1087 format.bvolume output
1088 format.number.series output
1089 address empty$
1090 { editor empty$
1091 { publisher new.sentence.checka }
1092 { organization publisher new.sentence.checkb
1093 organization output
1094 }
1095 if$
1096 publisher output
1097 format.date "year" output.check
1098 }
1099 { address output.nonnull
1100 format.date "year" output.check
1101 new.sentence
1102 editor empty$
1103 'skip$
1104 { organization output }
1105 if$
1106 publisher output
1107 }
1108 if$
1109 new.block
1110 note output
1111 fin.entry
1112 }
1113
1114 FUNCTION {techreport}
1115 { output.bibitem
1116 format.authors "author" output.check
1117 new.block
1118 title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
1119 format.title "title" output.check
1120 new.block
1121 format.tr.number output.nonnull
1122 institution "institution" output.check
1123 address output
1124 format.date "year" output.check
1125 new.block
1126 note output
1127 fin.entry
1128 }
1129
1130 FUNCTION {unpublished}
1131 { output.bibitem
1132 format.authors "author" output.check
1133 new.block
1134 title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
1135 format.title "title" output.check
1136 new.block
1137 note "note" output.check
1138 format.date output
1139 fin.entry
1140 }
1141
1142 FUNCTION {default.type} { misc }
1143
1144 MACRO {jan} {"January"}
1145
1146 MACRO {feb} {"February"}
1147
1148 MACRO {mar} {"March"}
1149
1150 MACRO {apr} {"April"}
1151
1152 MACRO {may} {"May"}
1153
1154 MACRO {jun} {"June"}
1155
1156 MACRO {jul} {"July"}
1157
1158 MACRO {aug} {"August"}
1159
1160 MACRO {sep} {"September"}
1161
1162 MACRO {oct} {"October"}
1163
1164 MACRO {nov} {"November"}
1165
1166 MACRO {dec} {"December"}
1167
1168 MACRO {acmcs} {"ACM Computing Surveys"}
1169
1170 MACRO {acta} {"Acta Informatica"}
1171
1172 MACRO {cacm} {"Communications of the ACM"}
1173
1174 MACRO {ibmjrd} {"IBM Journal of Research and Development"}
1175
1176 MACRO {ibmsj} {"IBM Systems Journal"}
1177
1178 MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
1179
1180 MACRO {ieeetc} {"IEEE Transactions on Computers"}
1181
1182 MACRO {ieeetcad}
1183 {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
1184
1185 MACRO {ipl} {"Information Processing Letters"}
1186
1187 MACRO {jacm} {"Journal of the ACM"}
1188
1189 MACRO {jcss} {"Journal of Computer and System Sciences"}
1190
1191 MACRO {scp} {"Science of Computer Programming"}
1192
1193 MACRO {sicomp} {"SIAM Journal on Computing"}
1194
1195 MACRO {tocs} {"ACM Transactions on Computer Systems"}
1196
1197 MACRO {tods} {"ACM Transactions on Database Systems"}
1198
1199 MACRO {tog} {"ACM Transactions on Graphics"}
1200
1201 MACRO {toms} {"ACM Transactions on Mathematical Software"}
1202
1203 MACRO {toois} {"ACM Transactions on Office Information Systems"}
1204
1205 MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
1206
1207 MACRO {tcs} {"Theoretical Computer Science"}
1208
1209 READ
1210
1211 STRINGS { longest.label }
1212
1213 INTEGERS { number.label longest.label.width }
1214
1215 FUNCTION {initialize.longest.label}
1216 { "" 'longest.label :=
1217 #1 'number.label :=
1218 #0 'longest.label.width :=
1219 }
1220
1221 FUNCTION {longest.label.pass}
1222 { number.label int.to.str$ 'label :=
1223 number.label #1 + 'number.label :=
1224 label width$ longest.label.width >
1225 { label 'longest.label :=
1226 label width$ 'longest.label.width :=
1227 }
1228 'skip$
1229 if$
1230 }
1231
1232 EXECUTE {initialize.longest.label}
1233
1234 ITERATE {longest.label.pass}
1235
1236 FUNCTION {begin.bib}
1237 { preamble$ empty$
1238 'skip$
1239 { preamble$ write$ newline$ }
1240 if$
1241 "<dl>" write$ newline$
1242 }
1243
1244 EXECUTE {begin.bib}
1245
1246 EXECUTE {init.urlbst.variables}
1247 EXECUTE {init.state.consts}
1248
1249 ITERATE {call.type$}
1250
1251 FUNCTION {end.bib}
1252 { newline$
1253 "</dl>" write$ newline$
1254 }
1255
1256 EXECUTE {end.bib}