Add a lintian override for the INSTALL file
[tor.git] / doc / latex8.bst
blob2dd324963394641c820defeefaf231dce8d69389
2 % ---------------------------------------------------------------
4 % $Id$
6 % by Paolo.Ienne@di.epfl.ch
9 % ---------------------------------------------------------------
11 % no guarantee is given that the format corresponds perfectly to 
12 % IEEE 8.5" x 11" Proceedings, but most features should be ok.
14 % ---------------------------------------------------------------
16 % `latex8' from BibTeX standard bibliography style `abbrv'
17 % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
18 % Copyright (C) 1985, all rights reserved.
19 % Copying of this file is authorized only if either
20 % (1) you make absolutely no changes to your copy, including name, or
21 % (2) if you do make changes, you name it something other than
22 % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
23 % This restriction helps ensure that all standard styles are identical.
24 % The file btxbst.doc has the documentation for this style.
26 ENTRY
27   { address
28     author
29     booktitle
30     chapter
31     edition
32     editor
33     howpublished
34     institution
35     journal
36     key
37     month
38     note
39     number
40     organization
41     pages
42     publisher
43     school
44     series
45     title
46     type
47     volume
48     year
49   }
50   {}
51   { label }
53 INTEGERS { output.state before.all mid.sentence after.sentence after.block }
55 FUNCTION {init.state.consts}
56 { #0 'before.all :=
57   #1 'mid.sentence :=
58   #2 'after.sentence :=
59   #3 'after.block :=
62 STRINGS { s t }
64 FUNCTION {output.nonnull}
65 { 's :=
66   output.state mid.sentence =
67     { ", " * write$ }
68     { output.state after.block =
69  { add.period$ write$
70    newline$
71    "\newblock " write$
72  }
73  { output.state before.all =
74      'write$
75      { add.period$ " " * write$ }
76    if$
77  }
78       if$
79       mid.sentence 'output.state :=
80     }
81   if$
82   s
85 FUNCTION {output}
86 { duplicate$ empty$
87     'pop$
88     'output.nonnull
89   if$
92 FUNCTION {output.check}
93 { 't :=
94   duplicate$ empty$
95     { pop$ "empty " t * " in " * cite$ * warning$ }
96     'output.nonnull
97   if$
100 FUNCTION {output.bibitem}
101 { newline$
102   "\bibitem{" write$
103   cite$ write$
104   "}" write$
105   newline$
106   ""
107   before.all 'output.state :=
110 FUNCTION {fin.entry}
111 { add.period$
112   write$
113   newline$
116 FUNCTION {new.block}
117 { output.state before.all =
118     'skip$
119     { after.block 'output.state := }
120   if$
123 FUNCTION {new.sentence}
124 { output.state after.block =
125     'skip$
126     { output.state before.all =
127  'skip$
128  { after.sentence 'output.state := }
129       if$
130     }
131   if$
134 FUNCTION {not}
135 {   { #0 }
136     { #1 }
137   if$
140 FUNCTION {and}
141 {   'skip$
142     { pop$ #0 }
143   if$
146 FUNCTION {or}
147 {   { pop$ #1 }
148     'skip$
149   if$
152 FUNCTION {new.block.checka}
153 { empty$
154     'skip$
155     'new.block
156   if$
159 FUNCTION {new.block.checkb}
160 { empty$
161   swap$ empty$
162   and
163     'skip$
164     'new.block
165   if$
168 FUNCTION {new.sentence.checka}
169 { empty$
170     'skip$
171     'new.sentence
172   if$
175 FUNCTION {new.sentence.checkb}
176 { empty$
177   swap$ empty$
178   and
179     'skip$
180     'new.sentence
181   if$
184 FUNCTION {field.or.null}
185 { duplicate$ empty$
186     { pop$ "" }
187     'skip$
188   if$
191 FUNCTION {emphasize}
192 { duplicate$ empty$
193     { pop$ "" }
194     { "{\em " swap$ * "}" * }
195   if$
198 INTEGERS { nameptr namesleft numnames }
200 FUNCTION {format.names}
201 { 's :=
202   #1 'nameptr :=
203   s num.names$ 'numnames :=
204   numnames 'namesleft :=
205     { namesleft #0 > }
206     { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
207       nameptr #1 >
208  { namesleft #1 >
209      { ", " * t * }
210      { numnames #2 >
211   { "," * }
212   'skip$
213        if$
214        t "others" =
215   { " et~al." * }
216   { " and " * t * }
217        if$
218      }
219    if$
221  't
222       if$
223       nameptr #1 + 'nameptr :=
225       namesleft #1 - 'namesleft :=
226     }
227   while$
230 FUNCTION {format.authors}
231 { author empty$
232     { "" }
233     { author format.names }
234   if$
237 FUNCTION {format.editors}
238 { editor empty$
239     { "" }
240     { editor format.names
241       editor num.names$ #1 >
242  { ", editors" * }
243  { ", editor" * }
244       if$
245     }
246   if$
249 FUNCTION {format.title}
250 { title empty$
251     { "" }
252     { title "t" change.case$ }
253   if$
256 FUNCTION {n.dashify}
257 { 't :=
258   ""
259     { t empty$ not }
260     { t #1 #1 substring$ "-" =
261  { t #1 #2 substring$ "--" = not
262      { "--" *
263        t #2 global.max$ substring$ 't :=
264      }
265      {   { t #1 #1 substring$ "-" = }
266   { "-" *
267     t #2 global.max$ substring$ 't :=
268   }
269        while$
270      }
271    if$
273  { t #1 #1 substring$ *
274    t #2 global.max$ substring$ 't :=
276       if$
277     }
278   while$
281 FUNCTION {format.date}
282 { year empty$
283     { month empty$
284  { "" }
285  { "there's a month but no year in " cite$ * warning$
286    month
288       if$
289     }
290     { month empty$
291  'year
292  { month " " * year * }
293       if$
294     }
295   if$
298 FUNCTION {format.btitle}
299 { title emphasize
302 FUNCTION {tie.or.space.connect}
303 { duplicate$ text.length$ #3 <
304     { "~" }
305     { " " }
306   if$
307   swap$ * *
310 FUNCTION {either.or.check}
311 { empty$
312     'pop$
313     { "can't use both " swap$ * " fields in " * cite$ * warning$ }
314   if$
317 FUNCTION {format.bvolume}
318 { volume empty$
319     { "" }
320     { "volume" volume tie.or.space.connect
321       series empty$
322  'skip$
323  { " of " * series emphasize * }
324       if$
325       "volume and number" number either.or.check
326     }
327   if$
330 FUNCTION {format.number.series}
331 { volume empty$
332     { number empty$
333  { series field.or.null }
334  { output.state mid.sentence =
335      { "number" }
336      { "Number" }
337    if$
338    number tie.or.space.connect
339    series empty$
340      { "there's a number but no series in " cite$ * warning$ }
341      { " in " * series * }
342    if$
344       if$
345     }
346     { "" }
347   if$
350 FUNCTION {format.edition}
351 { edition empty$
352     { "" }
353     { output.state mid.sentence =
354  { edition "l" change.case$ " edition" * }
355  { edition "t" change.case$ " edition" * }
356       if$
357     }
358   if$
361 INTEGERS { multiresult }
363 FUNCTION {multi.page.check}
364 { 't :=
365   #0 'multiresult :=
366     { multiresult not
367       t empty$ not
368       and
369     }
370     { t #1 #1 substring$
371       duplicate$ "-" =
372       swap$ duplicate$ "," =
373       swap$ "+" =
374       or or
375  { #1 'multiresult := }
376  { t #2 global.max$ substring$ 't := }
377       if$
378     }
379   while$
380   multiresult
383 FUNCTION {format.pages}
384 { pages empty$
385     { "" }
386     { pages multi.page.check
387  { "pages" pages n.dashify tie.or.space.connect }
388  { "page" pages tie.or.space.connect }
389       if$
390     }
391   if$
394 FUNCTION {format.vol.num.pages}
395 { volume field.or.null
396   number empty$
397     'skip$
398     { "(" number * ")" * *
399       volume empty$
400  { "there's a number but no volume in " cite$ * warning$ }
401  'skip$
402       if$
403     }
404   if$
405   pages empty$
406     'skip$
407     { duplicate$ empty$
408  { pop$ format.pages }
409  { ":" * pages n.dashify * }
410       if$
411     }
412   if$
415 FUNCTION {format.chapter.pages}
416 { chapter empty$
417     'format.pages
418     { type empty$
419  { "chapter" }
420  { type "l" change.case$ }
421       if$
422       chapter tie.or.space.connect
423       pages empty$
424  'skip$
425  { ", " * format.pages * }
426       if$
427     }
428   if$
431 FUNCTION {format.in.ed.booktitle}
432 { booktitle empty$
433     { "" }
434     { editor empty$
435  { "In " booktitle emphasize * }
436  { "In " format.editors * ", " * booktitle emphasize * }
437       if$
438     }
439   if$
442 FUNCTION {empty.misc.check}
444 { author empty$ title empty$ howpublished empty$
445   month empty$ year empty$ note empty$
446   and and and and and
447   key empty$ not and
448     { "all relevant fields are empty in " cite$ * warning$ }
449     'skip$
450   if$
453 FUNCTION {format.thesis.type}
454 { type empty$
455     'skip$
456     { pop$
457       type "t" change.case$
458     }
459   if$
462 FUNCTION {format.tr.number}
463 { type empty$
464     { "Technical Report" }
465     'type
466   if$
467   number empty$
468     { "t" change.case$ }
469     { number tie.or.space.connect }
470   if$
473 FUNCTION {format.article.crossref}
474 { key empty$
475     { journal empty$
476  { "need key or journal for " cite$ * " to crossref " * crossref *
477    warning$
478    ""
480  { "In {\em " journal * "\/}" * }
481       if$
482     }
483     { "In " key * }
484   if$
485   " \cite{" * crossref * "}" *
488 FUNCTION {format.crossref.editor}
489 { editor #1 "{vv~}{ll}" format.name$
490   editor num.names$ duplicate$
491   #2 >
492     { pop$ " et~al." * }
493     { #2 <
494  'skip$
495  { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
496      { " et~al." * }
497      { " and " * editor #2 "{vv~}{ll}" format.name$ * }
498    if$
500       if$
501     }
502   if$
505 FUNCTION {format.book.crossref}
506 { volume empty$
507     { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
508       "In "
509     }
510     { "Volume" volume tie.or.space.connect
511       " of " *
512     }
513   if$
514   editor empty$
515   editor field.or.null author field.or.null =
516   or
517     { key empty$
518  { series empty$
519      { "need editor, key, or series for " cite$ * " to crossref " *
520        crossref * warning$
521        "" *
522      }
523      { "{\em " * series * "\/}" * }
524    if$
526  { key * }
527       if$
528     }
529     { format.crossref.editor * }
530   if$
531   " \cite{" * crossref * "}" *
534 FUNCTION {format.incoll.inproc.crossref}
535 { editor empty$
536   editor field.or.null author field.or.null =
537   or
538     { key empty$
539  { booktitle empty$
540      { "need editor, key, or booktitle for " cite$ * " to crossref " *
541        crossref * warning$
542        ""
543      }
544      { "In {\em " booktitle * "\/}" * }
545    if$
547  { "In " key * }
548       if$
549     }
550     { "In " format.crossref.editor * }
551   if$
552   " \cite{" * crossref * "}" *
555 FUNCTION {article}
556 { output.bibitem
557   format.authors "author" output.check
558   new.block
559   format.title "title" output.check
560   new.block
561   crossref missing$
562     { journal emphasize "journal" output.check
563       format.vol.num.pages output
564       format.date "year" output.check
565     }
566     { format.article.crossref output.nonnull
567       format.pages output
568     }
569   if$
570   new.block
571   note output
572   fin.entry
575 FUNCTION {book}
576 { output.bibitem
577   author empty$
578     { format.editors "author and editor" output.check }
579     { format.authors output.nonnull
580       crossref missing$
581  { "author and editor" editor either.or.check }
582  'skip$
583       if$
584     }
585   if$
586   new.block
587   format.btitle "title" output.check
588   crossref missing$
589     { format.bvolume output
590       new.block
591       format.number.series output
592       new.sentence
593       publisher "publisher" output.check
594       address output
595     }
596     { new.block
597       format.book.crossref output.nonnull
598     }
599   if$
600   format.edition output
601   format.date "year" output.check
602   new.block
603   note output
604   fin.entry
607 FUNCTION {booklet}
608 { output.bibitem
609   format.authors output
610   new.block
611   format.title "title" output.check
612   howpublished address new.block.checkb
613   howpublished output
614   address output
615   format.date output
616   new.block
617   note output
618   fin.entry
621 FUNCTION {inbook}
622 { output.bibitem
623   author empty$
624     { format.editors "author and editor" output.check }
625     { format.authors output.nonnull
627       crossref missing$
628  { "author and editor" editor either.or.check }
629  'skip$
630       if$
631     }
632   if$
633   new.block
634   format.btitle "title" output.check
635   crossref missing$
636     { format.bvolume output
637       format.chapter.pages "chapter and pages" output.check
638       new.block
639       format.number.series output
640       new.sentence
641       publisher "publisher" output.check
642       address output
643     }
644     { format.chapter.pages "chapter and pages" output.check
645       new.block
646       format.book.crossref output.nonnull
647     }
648   if$
649   format.edition output
650   format.date "year" output.check
651   new.block
652   note output
653   fin.entry
656 FUNCTION {incollection}
657 { output.bibitem
658   format.authors "author" output.check
659   new.block
660   format.title "title" output.check
661   new.block
662   crossref missing$
663     { format.in.ed.booktitle "booktitle" output.check
664       format.bvolume output
665       format.number.series output
666       format.chapter.pages output
667       new.sentence
668       publisher "publisher" output.check
669       address output
670       format.edition output
671       format.date "year" output.check
672     }
673     { format.incoll.inproc.crossref output.nonnull
674       format.chapter.pages output
675     }
676   if$
677   new.block
678   note output
679   fin.entry
682 FUNCTION {inproceedings}
683 { output.bibitem
684   format.authors "author" output.check
685   new.block
686   format.title "title" output.check
687   new.block
688   crossref missing$
689     { format.in.ed.booktitle "booktitle" output.check
690       format.bvolume output
691       format.number.series output
692       format.pages output
693       address empty$
694  { organization publisher new.sentence.checkb
695    organization output
696    publisher output
697    format.date "year" output.check
699  { address output.nonnull
700    format.date "year" output.check
701    new.sentence
702    organization output
703    publisher output
705       if$
706     }
707     { format.incoll.inproc.crossref output.nonnull
708       format.pages output
709     }
710   if$
711   new.block
712   note output
713   fin.entry
716 FUNCTION {conference} { inproceedings }
718 FUNCTION {manual}
719 { output.bibitem
720   author empty$
721     { organization empty$
722  'skip$
723  { organization output.nonnull
724    address output
726       if$
727     }
728     { format.authors output.nonnull }
729   if$
730   new.block
731   format.btitle "title" output.check
732   author empty$
733     { organization empty$
734  { address new.block.checka
735    address output
737  'skip$
738       if$
739     }
740     { organization address new.block.checkb
741       organization output
742       address output
743     }
744   if$
745   format.edition output
746   format.date output
747   new.block
748   note output
749   fin.entry
752 FUNCTION {mastersthesis}
753 { output.bibitem
754   format.authors "author" output.check
755   new.block
756   format.title "title" output.check
757   new.block
758   "Master's thesis" format.thesis.type output.nonnull
759   school "school" output.check
760   address output
761   format.date "year" output.check
762   new.block
763   note output
764   fin.entry
767 FUNCTION {misc}
768 { output.bibitem
769   format.authors output
770   title howpublished new.block.checkb
771   format.title output
772   howpublished new.block.checka
773   howpublished output
774   format.date output
775   new.block
776   note output
777   fin.entry
778   empty.misc.check
781 FUNCTION {phdthesis}
782 { output.bibitem
783   format.authors "author" output.check
784   new.block
785   format.btitle "title" output.check
786   new.block
787   "PhD thesis" format.thesis.type output.nonnull
788   school "school" output.check
789   address output
790   format.date "year" output.check
791   new.block
792   note output
793   fin.entry
796 FUNCTION {proceedings}
797 { output.bibitem
798   editor empty$
799     { organization output }
800     { format.editors output.nonnull }
802   if$
803   new.block
804   format.btitle "title" output.check
805   format.bvolume output
806   format.number.series output
807   address empty$
808     { editor empty$
809  { publisher new.sentence.checka }
810  { organization publisher new.sentence.checkb
811    organization output
813       if$
814       publisher output
815       format.date "year" output.check
816     }
817     { address output.nonnull
818       format.date "year" output.check
819       new.sentence
820       editor empty$
821  'skip$
822  { organization output }
823       if$
824       publisher output
825     }
826   if$
827   new.block
828   note output
829   fin.entry
832 FUNCTION {techreport}
833 { output.bibitem
834   format.authors "author" output.check
835   new.block
836   format.title "title" output.check
837   new.block
838   format.tr.number output.nonnull
839   institution "institution" output.check
840   address output
841   format.date "year" output.check
842   new.block
843   note output
844   fin.entry
847 FUNCTION {unpublished}
848 { output.bibitem
849   format.authors "author" output.check
850   new.block
851   format.title "title" output.check
852   new.block
853   note "note" output.check
854   format.date output
855   fin.entry
858 FUNCTION {default.type} { misc }
860 MACRO {jan} {"Jan."}
862 MACRO {feb} {"Feb."}
864 MACRO {mar} {"Mar."}
866 MACRO {apr} {"Apr."}
868 MACRO {may} {"May"}
870 MACRO {jun} {"June"}
872 MACRO {jul} {"July"}
874 MACRO {aug} {"Aug."}
876 MACRO {sep} {"Sept."}
878 MACRO {oct} {"Oct."}
880 MACRO {nov} {"Nov."}
882 MACRO {dec} {"Dec."}
884 MACRO {acmcs} {"ACM Comput. Surv."}
886 MACRO {acta} {"Acta Inf."}
888 MACRO {cacm} {"Commun. ACM"}
890 MACRO {ibmjrd} {"IBM J. Res. Dev."}
892 MACRO {ibmsj} {"IBM Syst.~J."}
894 MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
896 MACRO {ieeetc} {"IEEE Trans. Comput."}
898 MACRO {ieeetcad}
899  {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
901 MACRO {ipl} {"Inf. Process. Lett."}
903 MACRO {jacm} {"J.~ACM"}
905 MACRO {jcss} {"J.~Comput. Syst. Sci."}
907 MACRO {scp} {"Sci. Comput. Programming"}
909 MACRO {sicomp} {"SIAM J. Comput."}
911 MACRO {tocs} {"ACM Trans. Comput. Syst."}
913 MACRO {tods} {"ACM Trans. Database Syst."}
915 MACRO {tog} {"ACM Trans. Gr."}
917 MACRO {toms} {"ACM Trans. Math. Softw."}
919 MACRO {toois} {"ACM Trans. Office Inf. Syst."}
921 MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
923 MACRO {tcs} {"Theoretical Comput. Sci."}
925 READ
927 FUNCTION {sortify}
928 { purify$
929   "l" change.case$
932 INTEGERS { len }
934 FUNCTION {chop.word}
935 { 's :=
936   'len :=
937   s #1 len substring$ =
938     { s len #1 + global.max$ substring$ }
939     's
940   if$
943 FUNCTION {sort.format.names}
944 { 's :=
945   #1 'nameptr :=
946   ""
947   s num.names$ 'numnames :=
948   numnames 'namesleft :=
949     { namesleft #0 > }
950     { nameptr #1 >
951  { "   " * }
952  'skip$
953       if$
954       s nameptr "{vv{ } }{ll{ }}{  f{ }}{  jj{ }}" format.name$ 't :=
955       nameptr numnames = t "others" = and
956  { "et al" * }
957  { t sortify * }
958       if$
959       nameptr #1 + 'nameptr :=
960       namesleft #1 - 'namesleft :=
961     }
962   while$
965 FUNCTION {sort.format.title}
966 { 't :=
967   "A " #2
968     "An " #3
969       "The " #4 t chop.word
970     chop.word
971   chop.word
972   sortify
973   #1 global.max$ substring$
976 FUNCTION {author.sort}
977 { author empty$
978     { key empty$
979  { "to sort, need author or key in " cite$ * warning$
980    ""
982  { key sortify }
983       if$
984     }
985     { author sort.format.names }
986   if$
989 FUNCTION {author.editor.sort}
990 { author empty$
991     { editor empty$
992  { key empty$
993      { "to sort, need author, editor, or key in " cite$ * warning$
994        ""
995      }
996      { key sortify }
997    if$
999  { editor sort.format.names }
1000       if$
1001     }
1002     { author sort.format.names }
1003   if$
1006 FUNCTION {author.organization.sort}
1007 { author empty$
1009     { organization empty$
1010  { key empty$
1011      { "to sort, need author, organization, or key in " cite$ * warning$
1012        ""
1013      }
1014      { key sortify }
1015    if$
1017  { "The " #4 organization chop.word sortify }
1018       if$
1019     }
1020     { author sort.format.names }
1021   if$
1024 FUNCTION {editor.organization.sort}
1025 { editor empty$
1026     { organization empty$
1027  { key empty$
1028      { "to sort, need editor, organization, or key in " cite$ * warning$
1029        ""
1030      }
1031      { key sortify }
1032    if$
1034  { "The " #4 organization chop.word sortify }
1035       if$
1036     }
1037     { editor sort.format.names }
1038   if$
1041 FUNCTION {presort}
1042 { type$ "book" =
1043   type$ "inbook" =
1044   or
1045     'author.editor.sort
1046     { type$ "proceedings" =
1047  'editor.organization.sort
1048  { type$ "manual" =
1049      'author.organization.sort
1050      'author.sort
1051    if$
1053       if$
1054     }
1055   if$
1056   "    "
1057   *
1058   year field.or.null sortify
1059   *
1060   "    "
1061   *
1062   title field.or.null
1063   sort.format.title
1064   *
1065   #1 entry.max$ substring$
1066   'sort.key$ :=
1069 ITERATE {presort}
1071 SORT
1073 STRINGS { longest.label }
1075 INTEGERS { number.label longest.label.width }
1077 FUNCTION {initialize.longest.label}
1078 { "" 'longest.label :=
1079   #1 'number.label :=
1080   #0 'longest.label.width :=
1083 FUNCTION {longest.label.pass}
1084 { number.label int.to.str$ 'label :=
1085   number.label #1 + 'number.label :=
1086   label width$ longest.label.width >
1087     { label 'longest.label :=
1088       label width$ 'longest.label.width :=
1089     }
1090     'skip$
1091   if$
1094 EXECUTE {initialize.longest.label}
1096 ITERATE {longest.label.pass}
1098 FUNCTION {begin.bib}
1099 { preamble$ empty$
1100     'skip$
1101     { preamble$ write$ newline$ }
1102   if$
1103   "\begin{thebibliography}{"  longest.label  * 
1104   "}\setlength{\itemsep}{-1ex}\small" * write$ newline$
1107 EXECUTE {begin.bib}
1109 EXECUTE {init.state.consts}
1111 ITERATE {call.type$}
1113 FUNCTION {end.bib}
1114 { newline$
1115   "\end{thebibliography}" write$ newline$
1118 EXECUTE {end.bib}
1120 % end of file latex8.bst
1121 % ---------------------------------------------------------------