Debian Codegraph @

texmf-dist/bibtex/bst/sapthesis/sapthesis.bst

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