source: papers/FDL2012/IEEEbib.bst @ 76

Last change on this file since 76 was 48, checked in by syed, 13 years ago

/papers/FDL2012

  • Property svn:executable set to *
File size: 17.5 KB
Line 
1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  IEEE.bst  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2% Bibliography Syle file for articles according to IEEE instructions
3% balemi@aut.ee.ethz.ch     <22-JUN-93>
4% modified from unsrt.bib. Contributions by Richard H. Roy
5
6ENTRY
7  { address
8    author
9    booktitle
10    chapter
11    edition
12    editor
13    howpublished
14    institution
15    journal
16    key
17    month
18    note
19    number
20    organization
21    pages
22    publisher
23    school
24    series
25    title
26    type
27    volume
28    year
29  }
30  {}
31  { label }
32
33INTEGERS { output.state before.all mid.sentence after.sentence after.block }
34
35FUNCTION {init.state.consts}
36{ #0 'before.all :=
37  #1 'mid.sentence :=
38  #2 'after.sentence :=
39  #3 'after.block :=
40}
41
42STRINGS { s t }
43
44FUNCTION {output.nonnull}
45{ 's :=
46  output.state mid.sentence =
47    { ", " * write$ }
48    { output.state after.block =
49% next line commented out by rhr and changed to write comma
50%       { add.period$ write$
51        { ", " * write$
52          newline$
53          "\newblock " write$
54        }
55        { output.state before.all =
56            'write$
57            { add.period$ " " * write$ }
58          if$
59        }
60      if$
61      mid.sentence 'output.state :=
62    }
63  if$
64  s
65}
66
67FUNCTION {output}
68{ duplicate$ empty$
69    'pop$
70    'output.nonnull
71  if$
72}
73
74FUNCTION {output.check}
75{ 't :=
76  duplicate$ empty$
77    { pop$ "empty " t * " in " * cite$ * warning$ }
78    'output.nonnull
79  if$
80}
81
82FUNCTION {output.bibitem}
83{ newline$
84  "\bibitem{" write$
85  cite$ write$
86  "}" write$
87  newline$
88  ""
89  before.all 'output.state :=
90}
91
92FUNCTION {fin.entry}
93{ add.period$
94  write$
95  newline$
96}
97
98% 5/24/89 rhr
99%  modified fin.entry function - prints note field after body of entry 
100%FUNCTION {fin.entry}
101%{ add.period$
102%  note empty$
103%    'write$
104%    { "\par\bgroup\parindent=0em  " * annote * "\par\egroup " * write$
105%    }
106%  if$
107%  newline$
108%}
109
110FUNCTION {new.block}
111{ output.state before.all =
112    'skip$
113    { after.block 'output.state := }
114  if$
115}
116
117% new block without terminating last block with a comma
118FUNCTION {new.ncblock}
119{
120  write$
121  newline$
122  "\newblock "
123  before.all 'output.state :=
124}
125
126FUNCTION {new.nccont}
127{
128  write$
129  " "
130  before.all 'output.state :=
131}
132
133FUNCTION {new.sentence}
134{ output.state after.block =
135    'skip$
136    { output.state before.all =
137        'skip$
138        { after.sentence 'output.state := }
139      if$
140    }
141  if$
142}
143
144FUNCTION {not}
145{   { #0 }
146    { #1 }
147  if$
148}
149
150FUNCTION {and}
151{   'skip$
152    { pop$ #0 }
153  if$
154}
155
156FUNCTION {or}
157{   { pop$ #1 }
158    'skip$
159  if$
160}
161
162FUNCTION {new.block.checka}
163{ empty$
164    'skip$
165    'new.block
166  if$
167}
168
169FUNCTION {new.block.checkb}
170{ empty$
171  swap$ empty$
172  and
173    'skip$
174    'new.block
175  if$
176}
177
178FUNCTION {new.sentence.checka}
179{ empty$
180    'skip$
181    'new.sentence
182  if$
183}
184
185FUNCTION {new.sentence.checkb}
186{ empty$
187  swap$ empty$
188  and
189    'skip$
190    'new.sentence
191  if$
192}
193
194FUNCTION {field.or.null}
195{ duplicate$ empty$
196    { pop$ "" }
197    'skip$
198  if$
199}
200
201FUNCTION {emphasize}
202{ duplicate$ empty$
203    { pop$ "" }
204    { "{\em " swap$ * "}" * }
205  if$
206}
207
208FUNCTION {boldface}
209{ duplicate$ empty$
210    { pop$ "" }
211    { "{\bf " swap$ * "}" * }
212  if$
213}
214
215%FUNCTION {boldface}
216%{ 's swap$ :=
217%  s "" =
218%    { "" }
219%    { "{\bf " s * "}" * }
220%  if$
221%}
222%
223INTEGERS { nameptr namesleft numnames }
224
225FUNCTION {format.names}
226{ 's :=
227  #1 'nameptr :=
228  s num.names$ 'numnames :=
229  numnames 'namesleft :=
230    { namesleft #0 > }
231    { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
232      nameptr #1 >
233        { namesleft #1 >
234            { ", " * t * }
235            { numnames #2 >
236                { "," * }
237                'skip$
238              if$
239              t "others" =
240                { " et~al." * }
241                { " and " * t * }
242              if$
243            }
244          if$
245        }
246        't
247      if$
248      nameptr #1 + 'nameptr :=
249      namesleft #1 - 'namesleft :=
250    }
251  while$
252}
253
254FUNCTION {format.authors}
255{ author empty$
256    { "" }
257    { author format.names }
258  if$
259}
260
261FUNCTION {format.editors}
262{ editor empty$
263    { "" }
264    { editor format.names
265      editor num.names$ #1 >
266        { ", Eds." * }
267        { ", Ed." * }
268      if$
269    }
270  if$
271}
272
273FUNCTION {format.title}
274{ title empty$
275    { "" }
276    { "``" title "t" change.case$ * }
277  if$
278}
279
280FUNCTION {n.dashify}
281{ 't :=
282  ""
283    { t empty$ not }
284    { t #1 #1 substring$ "-" =
285        { t #1 #2 substring$ "--" = not
286            { "--" *
287              t #2 global.max$ substring$ 't :=
288            }
289            {   { t #1 #1 substring$ "-" = }
290                { "-" *
291                  t #2 global.max$ substring$ 't :=
292                }
293              while$
294            }
295          if$
296        }
297        { t #1 #1 substring$ *
298          t #2 global.max$ substring$ 't :=
299        }
300      if$
301    }
302  while$
303}
304
305FUNCTION {format.date}
306{ year empty$
307    { month empty$
308        { "" }
309        { "there's a month but no year in " cite$ * warning$
310          month
311        }
312      if$
313    }
314    { month empty$
315        'year
316        { month " " * year * }
317      if$
318    }
319  if$
320}
321
322% FUNCTION {format.date}
323% { year empty$
324%       'year
325%       { " "  year * }
326%   if$
327% }
328
329FUNCTION {format.btitle}
330{ title emphasize
331}
332
333FUNCTION {tie.or.space.connect}
334{ duplicate$ text.length$ #3 <
335    { "~" }
336    { " " }
337  if$
338  swap$ * *
339}
340
341FUNCTION {either.or.check}
342{ empty$
343    'pop$
344    { "can't use both " swap$ * " fields in " * cite$ * warning$ }
345  if$
346}
347
348FUNCTION {format.bvolume}
349{ volume empty$
350    { "" }
351    { "vol." volume tie.or.space.connect
352      series empty$
353        'skip$
354        { " of " * series emphasize * }
355      if$
356      "volume and number" number either.or.check
357    }
358  if$
359}
360
361FUNCTION {format.number.series}
362{ volume empty$
363    { number empty$
364        { series field.or.null }
365        { output.state mid.sentence =
366            { "number" }
367            { "Number" }
368          if$
369          number tie.or.space.connect
370          series empty$
371            { "there's a number but no series in " cite$ * warning$ }
372            { " in " * series * }
373          if$
374        }
375      if$
376    }
377    { "" }
378  if$
379}
380
381FUNCTION {format.edition}
382{ edition empty$
383    { "" }
384    { output.state mid.sentence =
385        { edition "l" change.case$ " edition" * }
386        { edition "t" change.case$ " edition" * }
387      if$
388    }
389  if$
390}
391
392INTEGERS { multiresult }
393
394FUNCTION {multi.page.check}
395{ 't :=
396  #0 'multiresult :=
397    { multiresult not
398      t empty$ not
399      and
400    }
401    { t #1 #1 substring$
402      duplicate$ "-" =
403      swap$ duplicate$ "," =
404      swap$ "+" =
405      or or
406        { #1 'multiresult := }
407        { t #2 global.max$ substring$ 't := }
408      if$
409    }
410  while$
411  multiresult
412}
413
414FUNCTION {format.pages}
415{ pages empty$
416    { "" }
417    { pages multi.page.check
418        { "pp." pages n.dashify tie.or.space.connect }
419        { "p." pages tie.or.space.connect }
420      if$
421    }
422  if$
423}
424
425FUNCTION {format.vol.num.pages}
426{
427volume empty$
428   {"" }
429   {"vol. " volume *}
430if$
431number empty$
432   'skip$
433   {", no. " number * *}
434if$
435pages empty$
436   'skip$
437    { duplicate$ empty$
438        { pop$ format.pages }
439        { ", pp. " * pages n.dashify * }
440      if$
441    }
442if$
443}
444
445%FUNCTION {format.vol.num.pages}
446%%boldface added 3/17/87 rhr
447%{ volume field.or.null boldface
448%  number empty$
449%    'skip$
450%    { "(" number * ")" * *
451%      volume empty$
452%       { "there's a number but no volume in " cite$ * warning$ }
453%       'skip$
454%      if$
455%    }
456%  if$
457%  pages empty$
458%    'skip$
459%    { duplicate$ empty$
460%       { pop$ format.pages }
461%       { ":" * pages n.dashify * }
462%      if$
463%    }
464%  if$
465%}
466
467FUNCTION {format.chapter.pages}
468{ chapter empty$
469    'format.pages
470    { type empty$
471        { "chapter" }
472        { type "l" change.case$ }
473      if$
474      chapter tie.or.space.connect
475      pages empty$
476        'skip$
477        { ", " * format.pages * }
478      if$
479    }
480  if$
481}
482
483FUNCTION {format.in.ed.booktitle}
484{ booktitle empty$
485    { "" }
486    { editor empty$
487        { "in " booktitle emphasize * }
488        { "in "  booktitle emphasize *  ", " * format.editors * }
489      if$
490    }
491  if$
492}
493
494FUNCTION {empty.misc.check}
495{ author empty$ title empty$ howpublished empty$
496  month empty$ year empty$ note empty$
497  and and and and and
498    { "all relevant fields are empty in " cite$ * warning$ }
499    'skip$
500  if$
501}
502
503FUNCTION {format.thesis.type}
504{ type empty$
505    'skip$
506    { pop$
507      type "t" change.case$
508    }
509  if$
510}
511
512FUNCTION {format.tr.number}
513{ type empty$
514    { "Tech. {R}ep." }
515    'type
516  if$
517  number empty$
518    { "t" change.case$ }
519    { number tie.or.space.connect }
520  if$
521}
522
523FUNCTION {format.article.crossref}
524{ key empty$
525    { journal empty$
526        { "need key or journal for " cite$ * " to crossref " * crossref *
527          warning$
528          ""
529        }
530        { "In {\em " journal * "\/}" * }
531      if$
532    }
533    { "In " key * }
534  if$
535  " \cite{" * crossref * "}" *
536}
537
538FUNCTION {format.crossref.editor}
539{ editor #1 "{vv~}{ll}" format.name$
540  editor num.names$ duplicate$
541  #2 >
542    { pop$ " et~al." * }
543    { #2 <
544        'skip$
545        { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
546            { " et~al." * }
547            { " and " * editor #2 "{vv~}{ll}" format.name$ * }
548          if$
549        }
550      if$
551    }
552  if$
553}
554
555FUNCTION {format.book.crossref}
556{ volume empty$
557    { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
558      "In "
559    }
560    { "vol." volume tie.or.space.connect
561      " of " *
562    }
563  if$
564  editor empty$
565  editor field.or.null author field.or.null =
566  or
567    { key empty$
568        { series empty$
569            { "need editor, key, or series for " cite$ * " to crossref " *
570              crossref * warning$
571              "" *
572            }
573            { "{\em " * series * "\/}" * }
574          if$
575        }
576        { key * }
577      if$
578    }
579    { format.crossref.editor * }
580  if$
581  " \cite{" * crossref * "}" *
582}
583
584FUNCTION {format.incoll.inproc.crossref}
585{ editor empty$
586  editor field.or.null author field.or.null =
587  or
588    { key empty$
589        { booktitle empty$
590            { "need editor, key, or booktitle for " cite$ * " to crossref " *
591              crossref * warning$
592              ""
593            }
594            { "In {\em " booktitle * "\/}" * }
595          if$
596        }
597        { "In " key * }
598      if$
599    }
600    { "In " format.crossref.editor * }
601  if$
602  " \cite{" * crossref * "}" *
603}
604
605FUNCTION {article}
606{ output.bibitem
607  format.authors "author" output.check
608  new.block
609  format.title ",''" * "title" output.check
610  new.ncblock
611  crossref missing$
612    { journal emphasize "journal" output.check
613      format.vol.num.pages output
614      format.date "year" output.check
615    }
616    { format.article.crossref output.nonnull
617      format.pages output
618    }
619  if$
620  new.block
621  note output
622  fin.entry
623}
624
625FUNCTION {book}
626{ output.bibitem
627  author empty$
628    { format.editors "author and editor" output.check }
629    { format.authors output.nonnull
630      crossref missing$
631        { "author and editor" editor either.or.check }
632        'skip$
633      if$
634    }
635  if$
636  new.block
637  format.btitle "title" output.check
638  crossref missing$
639    { format.bvolume output
640      new.block
641      format.number.series output
642      new.sentence
643      publisher "publisher" output.check
644      address output
645    }
646    { new.block
647      format.book.crossref output.nonnull
648    }
649  if$
650  format.edition output
651  format.date "year" output.check
652  new.block
653  note output
654  fin.entry
655}
656
657FUNCTION {booklet}
658{ output.bibitem
659  format.authors output
660  new.block
661  format.title ",''" * "title" output.check
662  new.nccont
663  howpublished address new.block.checkb
664  howpublished output
665  address output
666  format.date output
667  new.block
668  note output
669  fin.entry
670}
671
672FUNCTION {inbook}
673{ output.bibitem
674  author empty$
675    { format.editors "author and editor" output.check }
676    { format.authors output.nonnull
677      crossref missing$
678        { "author and editor" editor either.or.check }
679        'skip$
680      if$
681    }
682  if$
683  new.block
684  format.btitle "title" output.check
685  crossref missing$
686    { format.bvolume output
687      format.chapter.pages "chapter and pages" output.check
688      new.block
689      format.number.series output
690      new.sentence
691      publisher "publisher" output.check
692      address output
693    }
694    { format.chapter.pages "chapter and pages" output.check
695      new.block
696      format.book.crossref output.nonnull
697    }
698  if$
699  format.edition output
700  format.date "year" output.check
701  new.block
702  note output
703  fin.entry
704}
705
706FUNCTION {incollection}
707{ output.bibitem
708  format.authors "author" output.check
709  new.block
710  format.title ",''" * "title" output.check
711  new.ncblock
712  crossref missing$
713    { format.in.ed.booktitle "booktitle" output.check
714      format.bvolume output
715      format.number.series output
716      format.chapter.pages output
717      new.sentence
718      publisher "publisher" output.check
719      address output
720      format.edition output
721      format.date "year" output.check
722    }
723    { format.incoll.inproc.crossref output.nonnull
724      format.chapter.pages output
725    }
726  if$
727  new.block
728  note output
729  fin.entry
730}
731
732FUNCTION {inproceedings}
733{ output.bibitem
734  format.authors "author" output.check
735  new.block
736  format.title ",''" * "title" output.check
737  new.ncblock
738  crossref missing$
739    { format.in.ed.booktitle "booktitle" output.check
740      address empty$
741        { organization publisher new.sentence.checkb
742          organization output
743          format.date "year" output.check
744        }
745        { address output.nonnull
746          format.date "year" output.check
747          organization output
748        }
749      if$
750      format.bvolume output
751      format.number.series output
752      format.pages output
753      publisher output
754    }
755    { format.incoll.inproc.crossref output.nonnull
756      format.pages output
757    }
758  if$
759  new.block
760  note output
761  fin.entry
762}
763
764FUNCTION {conference} { inproceedings }
765
766FUNCTION {manual}
767{ output.bibitem
768  author empty$
769    { organization empty$
770        'skip$
771        { organization output.nonnull
772          address output
773        }
774      if$
775    }
776    { format.authors output.nonnull }
777  if$
778  new.block
779  format.btitle "title" output.check
780  author empty$
781    { organization empty$
782        { address new.block.checka
783          address output
784        }
785        'skip$
786      if$
787    }
788    { organization address new.block.checkb
789      organization output
790      address output
791    }
792  if$
793  format.edition output
794  format.date output
795  new.block
796  note output
797  fin.entry
798}
799
800FUNCTION {mastersthesis}
801{ output.bibitem
802  format.authors "author" output.check
803  new.block
804  format.title ",''" * "title" output.check
805  new.ncblock
806  "M.S. thesis" format.thesis.type output.nonnull
807  school "school" output.check
808  address output
809  format.date "year" output.check
810  new.block
811  note output
812  fin.entry
813}
814
815FUNCTION {misc}
816{ output.bibitem
817  format.authors output
818  title howpublished new.block.checkb
819  format.title ",''" * output
820  new.nccont
821  howpublished new.block.checka
822  howpublished output
823  format.date output
824  new.block
825  note output
826  fin.entry
827  empty.misc.check
828}
829
830FUNCTION {phdthesis}
831{ output.bibitem
832  format.authors "author" output.check
833  new.block
834  format.btitle "title" output.check
835  new.block
836  "Ph.D. thesis" format.thesis.type output.nonnull
837  school "school" output.check
838  address output
839  format.date "year" output.check
840  new.block
841  note output
842  fin.entry
843}
844
845FUNCTION {proceedings}
846{ output.bibitem
847  editor empty$
848    { organization output }
849    { format.editors output.nonnull }
850  if$
851  new.block
852  format.btitle "title" output.check
853  format.bvolume output
854  format.number.series output
855  address empty$
856    { editor empty$
857        { publisher new.sentence.checka }
858        { organization publisher new.sentence.checkb
859          organization output
860        }
861      if$
862      publisher output
863      format.date "year" output.check
864    }
865    { address output.nonnull
866      format.date "year" output.check
867      new.sentence
868      editor empty$
869        'skip$
870        { organization output }
871      if$
872      publisher output
873    }
874  if$
875  new.block
876  note output
877  fin.entry
878}
879
880FUNCTION {techreport}
881{ output.bibitem
882  format.authors "author" output.check
883  new.block
884  format.title ",''" * "title" output.check
885  new.ncblock
886  format.tr.number output.nonnull
887  institution "institution" output.check
888  address output
889  format.date "year" output.check
890  new.block
891  note output
892  fin.entry
893}
894
895FUNCTION {unpublished}
896{ output.bibitem
897  format.authors "author" output.check
898  new.block
899  format.title ",''" * "title" output.check
900  new.ncblock
901  note "note" output.check
902  format.date output
903  fin.entry
904}
905
906FUNCTION {default.type} { misc }
907
908MACRO {jan} {"Jan."}
909
910MACRO {feb} {"Feb."}
911
912MACRO {mar} {"Mar."}
913
914MACRO {apr} {"Apr."}
915
916MACRO {may} {"May"}
917
918MACRO {jun} {"June"}
919
920MACRO {jul} {"July"}
921
922MACRO {aug} {"Aug."}
923
924MACRO {sep} {"Sept."}
925
926MACRO {oct} {"Oct."}
927
928MACRO {nov} {"Nov."}
929
930MACRO {dec} {"Dec."}
931
932MACRO {acmcs} {"ACM Computing Surveys"}
933
934MACRO {acta} {"Acta Informatica"}
935
936MACRO {cacm} {"Communications of the ACM"}
937
938MACRO {ibmjrd} {"IBM Journal of Research and Development"}
939
940MACRO {ibmsj} {"IBM Systems Journal"}
941
942MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
943
944MACRO {ieeetc} {"IEEE Transactions on Computers"}
945
946MACRO {ieeetcad}
947 {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
948
949MACRO {ipl} {"Information Processing Letters"}
950
951MACRO {jacm} {"Journal of the ACM"}
952
953MACRO {jcss} {"Journal of Computer and System Sciences"}
954
955MACRO {scp} {"Science of Computer Programming"}
956
957MACRO {sicomp} {"SIAM Journal on Computing"}
958
959MACRO {tocs} {"ACM Transactions on Computer Systems"}
960
961MACRO {tods} {"ACM Transactions on Database Systems"}
962
963MACRO {tog} {"ACM Transactions on Graphics"}
964
965MACRO {toms} {"ACM Transactions on Mathematical Software"}
966
967MACRO {toois} {"ACM Transactions on Office Information Systems"}
968
969MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
970
971MACRO {tcs} {"Theoretical Computer Science"}
972
973READ
974
975STRINGS { longest.label }
976
977INTEGERS { number.label longest.label.width }
978
979FUNCTION {initialize.longest.label}
980{ "" 'longest.label :=
981  #1 'number.label :=
982  #0 'longest.label.width :=
983}
984
985FUNCTION {longest.label.pass}
986{ number.label int.to.str$ 'label :=
987  number.label #1 + 'number.label :=
988  label width$ longest.label.width >
989    { label 'longest.label :=
990      label width$ 'longest.label.width :=
991    }
992    'skip$
993  if$
994}
995
996EXECUTE {initialize.longest.label}
997
998ITERATE {longest.label.pass}
999
1000FUNCTION {begin.bib}
1001{ preamble$ empty$
1002    'skip$
1003    { preamble$ write$ newline$ }
1004  if$
1005  "\begin{thebibliography}{"  longest.label  * "}" * write$ newline$
1006}
1007
1008EXECUTE {begin.bib}
1009
1010EXECUTE {init.state.consts}
1011
1012ITERATE {call.type$}
1013
1014FUNCTION {end.bib}
1015{ newline$
1016  "\end{thebibliography}" write$ newline$
1017}
1018
1019EXECUTE {end.bib}
1020
1021%%%%%%%%%%%%%%%%%%%%%%%%%%%%% End of IEEE.bst %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Note: See TracBrowser for help on using the repository browser.