Debian Codegraph @

texmf-dist/bibtex/bst/shipunov/rusnat.bst

raw
1 %%
2 %% This is file `rusnat.bst', part of `shipunov' bundle.
3 %% Author: Alexey B. Shipunov ([email protected])
4 %% Version 1.1., 2008/02/11
5 %%
6
7 ENTRY
8 { address
9 author
10 booktitle
11 chapter
12 edition
13 howpublished
14 journal
15 key
16 month
17 note
18 number
19 part
20 pages
21 publisher
22 responsible
23 series
24 title
25 type
26 url
27 volume
28 year
29 }
30 {}
31 { label extra.label sort.label short.list }
32
33 INTEGERS { output.state before.all mid.sentence after.sentence after.block }
34
35 FUNCTION {init.state.consts}
36 { #0 'before.all :=
37 #1 'mid.sentence :=
38 #2 'after.sentence :=
39 #3 'after.block :=
40 }
41
42 STRINGS { s t }
43
44 FUNCTION {output.nonnull}
45 { 's :=
46 output.state mid.sentence =
47 { add.period$ " " * write$ }
48 { output.state after.block =
49 { add.period$ write$
50 newline$
51 "\newblock " write$
52 }
53 { output.state before.all =
54 'write$
55 { add.period$ " " * write$ }
56 if$
57 }
58 if$
59 mid.sentence 'output.state :=
60 }
61 if$
62 s
63 }
64
65 FUNCTION {output}
66 { duplicate$ empty$
67 'pop$
68 'output.nonnull
69 if$
70 }
71
72 FUNCTION {output.check}
73 { 't :=
74 duplicate$ empty$
75 { pop$ "empty " t * " in " * cite$ * warning$ }
76 'output.nonnull
77 if$
78 }
79
80 FUNCTION {fin.entry}
81 { add.period$
82 write$
83 newline$
84 }
85
86 FUNCTION {new.block}
87 { output.state before.all =
88 'skip$
89 { after.block 'output.state := }
90 if$
91 }
92
93 FUNCTION {new.sentence}
94 { output.state after.block =
95 'skip$
96 { output.state before.all =
97 'skip$
98 { after.sentence 'output.state := }
99 if$
100 }
101 if$
102 }
103
104 FUNCTION {not}
105 { { #0 }
106 { #1 }
107 if$
108 }
109
110 FUNCTION {and}
111 { 'skip$
112 { pop$ #0 }
113 if$
114 }
115
116 FUNCTION {or}
117 { { pop$ #1 }
118 'skip$
119 if$
120 }
121
122 FUNCTION {new.block.checka}
123 { empty$
124 'skip$
125 'new.block
126 if$
127 }
128
129 FUNCTION {new.block.checkb}
130 { empty$
131 swap$ empty$
132 and
133 'skip$
134 'new.block
135 if$
136 }
137
138 FUNCTION {new.sentence.checka}
139 { empty$
140 'skip$
141 'new.sentence
142 if$
143 }
144
145 FUNCTION {new.sentence.checkb}
146 { empty$
147 swap$ empty$
148 and
149 'skip$
150 'new.sentence
151 if$
152 }
153
154 FUNCTION {field.or.null}
155 { duplicate$ empty$
156 { pop$ "" }
157 'skip$
158 if$
159 }
160
161 FUNCTION {emphasize}
162 { duplicate$ empty$
163 { pop$ "" }
164 { "{\EM " swap$ * "}" * }
165 if$
166 }
167
168 FUNCTION {paren}
169 { duplicate$ empty$
170 { pop$ "" }
171 { "(" swap$ * ")" * }
172 if$
173 }
174
175 INTEGERS { nameptr namesleft numnames }
176
177 FUNCTION {format.names}
178 { 's :=
179 #1 'nameptr :=
180 s num.names$ 'numnames :=
181 numnames 'namesleft :=
182 { namesleft #0 > }
183 { s nameptr "{ll~}{ff}{ vv}{ jj}" format.name$ 't :=
184 nameptr #1 >
185 { namesleft #1 >
186 { ", " * t * }
187 { t "others" =
188 { ", et~al." * }
189 { ", " * t * }
190 if$
191 }
192 if$
193 }
194 't
195 if$
196 nameptr #1 + 'nameptr :=
197 namesleft #1 - 'namesleft :=
198 }
199 while$
200 }
201
202 FUNCTION {format.authors}
203 { author empty$
204 { "" }
205 { author format.names emphasize }
206 if$
207 }
208
209 FUNCTION {format.title}
210 { title empty$
211 { "" }
212 { responsible empty$
213 { title }
214 { title " \allowbreak\newblock/ " * responsible * }
215 if$
216 }
217 if$
218 }
219
220 FUNCTION {format.title.non.r}
221 { title empty$
222 { "" }
223 { title }
224 if$
225 }
226
227 FUNCTION {format.btitle}
228 { booktitle empty$
229 { "" }
230 { responsible empty$
231 { booktitle }
232 { booktitle " \allowbreak\newblock/ " * responsible * }
233 if$
234 }
235 if$
236 }
237
238 FUNCTION {format.full.names}
239 {'s :=
240 #1 'nameptr :=
241 s num.names$ 'numnames :=
242 numnames 'namesleft :=
243 { namesleft #0 > }
244 { s nameptr "{f.~}{vv~}{ll}{ jj}" format.name$ 't :=
245 nameptr #1 >
246 { namesleft #1 >
247 { ", " * t * }
248 { t "others" =
249 { ", et~al." * }
250 { ", " * t * }
251 if$
252 }
253 if$
254 }
255 't
256 if$
257 nameptr #1 + 'nameptr :=
258 namesleft #1 - 'namesleft :=
259 }
260 while$
261 }
262
263 FUNCTION {author.key.full}
264 { author empty$
265 { key empty$
266 { cite$ #1 #3 substring$ }
267 'key
268 if$
269 }
270 { author format.full.names }
271 if$
272 }
273
274 FUNCTION {make.full.names}
275 { type$ "article" =
276 'author.key.full
277 'author.key.full
278 if$
279 }
280
281 FUNCTION {output.bibitem}
282 { newline$
283 "\bibitem[" write$
284 label write$
285 ")" make.full.names duplicate$ short.list =
286 { pop$ }
287 { * }
288 if$
289 "]{" * write$
290 cite$ write$
291 "}" write$
292 newline$
293 ""
294 before.all 'output.state :=
295 }
296
297 FUNCTION {n.dashify}
298 { 't :=
299 ""
300 { t empty$ not }
301 { t #1 #1 substring$ "-" =
302 { t #1 #2 substring$ "--" = not
303 { "--" *
304 t #2 global.max$ substring$ 't :=
305 }
306 { { t #1 #1 substring$ "-" = }
307 { "-" *
308 t #2 global.max$ substring$ 't :=
309 }
310 while$
311 }
312 if$
313 }
314 { t #1 #1 substring$ *
315 t #2 global.max$ substring$ 't :=
316 }
317 if$
318 }
319 while$
320 }
321
322 FUNCTION {format.date}
323 { year duplicate$ empty$
324 { "empty year in " cite$ * "; set to ????" * warning$
325 pop$ "????" }
326 'skip$
327 if$
328 month empty$
329 'skip$
330 { month
331 " " * swap$ *
332 }
333 if$
334 extra.label *
335 }
336
337 FUNCTION {tie.or.space.connect}
338 { duplicate$ text.length$ #3 <
339 { "~" }
340 { " " }
341 if$
342 swap$ * *
343 }
344
345 FUNCTION {format.bvolume.part.num}
346 { volume empty$
347 { "" }
348 { add.period$ " " volume * }
349 if$
350 part empty$
351 'skip$
352 { volume empty$
353 { "there's a part but no volume in " cite$ * warning$ }
354 { ", " * part * }
355 if$
356 }
357 if$
358 number empty$
359 'skip$
360 { volume empty$
361 { "there's a number but no volume in " cite$ * warning$ }
362 { ", " * number * }
363 if$
364 }
365 if$
366 }
367
368 FUNCTION {format.series}
369 { series empty$
370 { "" }
371 { series paren }
372 if$
373 }
374
375 FUNCTION {format.edition}
376 { edition empty$
377 { "" }
378 { edition }
379 if$
380 }
381
382 FUNCTION {format.address.how.date}
383 { address empty$
384 { format.date }
385 { howpublished empty$
386 { address ", " * format.date * }
387 { address ": " * howpublished * ", " * format.date * }
388 if$
389 }
390 if$
391 }
392
393 FUNCTION {format.address.pub.date}
394 { address empty$
395 { format.date }
396 { publisher empty$
397 { address ", " * format.date * }
398 { address ": " * publisher * ", " * format.date * }
399 if$
400 }
401 if$
402 }
403
404 FUNCTION {format.url}
405 { url empty$
406 { "" }
407 { "{URL: \catcode`\/13\let/\slash\tt " url * "}" * }
408 if$
409 }
410
411 INTEGERS { multiresult }
412
413 FUNCTION {multi.page.check}
414 { 't :=
415 #0 'multiresult :=
416 { multiresult not
417 t empty$ not
418 and
419 }
420 { t #1 #1 substring$
421 duplicate$ "-" =
422 swap$ duplicate$ "," =
423 swap$ "+" =
424 or or
425 { #1 'multiresult := }
426 { t #2 global.max$ substring$ 't := }
427 if$
428 }
429 while$
430 multiresult
431 }
432
433 FUNCTION {format.pages}
434 { pages empty$
435 { "" }
436 { pages multi.page.check
437 { "" pages n.dashify tie.or.space.connect }
438 { "" pages tie.or.space.connect }
439 if$
440 }
441 if$
442 }
443
444 FUNCTION {format.vol.num.pages}
445 { number empty$
446 { volume empty$
447 { "need volume or number in " cite$ * warning$
448 ""
449 }
450 { volume }
451 if$
452 }
453 { volume empty$
454 { number }
455 { volume ", " * number * }
456 if$
457 }
458 if$
459 pages empty$
460 'skip$
461 { duplicate$ empty$
462 { pop$ format.pages }
463 { add.period$ " " * pages n.dashify * }
464 if$
465 }
466 if$
467 }
468
469 FUNCTION {format.chapter.pages}
470 { chapter empty$
471 'format.pages
472 { type empty$
473 { "" }
474 { type }
475 if$
476 chapter tie.or.space.connect
477 pages empty$
478 'skip$
479 { ", " * format.pages * }
480 if$
481 }
482 if$
483 }
484
485 FUNCTION {format.title.sl.journal}
486 { format.title
487 journal empty$
488 { " \allowbreak\newblock// " }
489 { " \allowbreak\newblock// " * journal * }
490 if$
491 }
492
493 FUNCTION {format.title.sl.btitle}
494 { format.title.non.r
495 booktitle empty$
496 { " \allowbreak\newblock// " }
497 { " \allowbreak\newblock// " * format.btitle * }
498 if$
499 }
500
501 FUNCTION {empty.misc.check}
502 { author empty$ title empty$ howpublished empty$
503 month empty$ year empty$ note empty$
504 and and and and and
505 key empty$ not and
506 { "all relevant fields are empty in " cite$ * warning$ }
507 'skip$
508 if$
509 }
510
511 FUNCTION {article}
512 { output.bibitem
513 format.authors "author" output.check
514 new.block
515 format.title.sl.journal "title and journal" output.check
516 series output
517 format.date "year" output.check
518 format.vol.num.pages "pages" output.check
519 new.block
520 note output
521 fin.entry
522 }
523
524 FUNCTION {book}
525 { output.bibitem
526 format.authors "author" output.check
527 new.block
528 format.title "title" output.check
529 format.bvolume.part.num output
530 new.sentence
531 format.address.pub.date output
532 format.edition output
533 format.pages "pages" output.check
534 new.block
535 format.series output
536 new.block
537 note output
538 fin.entry
539 }
540
541 FUNCTION {booklet} { book }
542
543 FUNCTION {inbook}
544 { output.bibitem
545 format.authors "author" output.check
546 new.block
547 format.title.sl.btitle "title and booktitle" output.check
548 format.bvolume.part.num output
549 new.sentence
550 format.address.pub.date output
551 format.edition output
552 format.chapter.pages "pages" output.check
553 new.block
554 format.series output
555 new.block
556 note output
557 fin.entry
558 }
559
560 FUNCTION {incollection}
561 { output.bibitem
562 format.authors "author" output.check
563 new.block
564 format.title.sl.btitle "title and booktitle" output.check
565 format.bvolume.part.num output
566 new.sentence
567 format.address.pub.date output
568 format.edition output
569 format.chapter.pages "pages" output.check
570 new.block
571 format.series output
572 new.block
573 note output
574 fin.entry
575 }
576
577 FUNCTION {inproceedings}
578 { output.bibitem
579 format.authors "author" output.check
580 new.block
581 format.title.sl.btitle "title and booktitle" output.check
582 format.bvolume.part.num output
583 format.address.pub.date output
584 format.pages "pages" output.check
585 new.block
586 format.series output
587 new.block
588 note output
589 fin.entry
590 }
591
592 FUNCTION {conference} { inproceedings }
593
594 FUNCTION {manual} { book }
595
596 FUNCTION {mastersthesis} { book }
597
598 FUNCTION {phdthesis} { book }
599
600 FUNCTION {proceedings} { book }
601
602 FUNCTION {techreport} { book }
603
604 FUNCTION {www}
605 { output.bibitem
606 format.authors output
607 format.title output
608 format.url "url" output.check
609 format.date output
610 new.block
611 note output
612 fin.entry
613 }
614
615 FUNCTION {misc}
616 { output.bibitem
617 format.authors output
618 title howpublished new.block.checkb
619 format.title output
620 howpublished new.block.checka
621 format.address.how.date output
622 format.pages output
623 new.block
624 note output
625 fin.entry
626 empty.misc.check
627 }
628
629 FUNCTION {unpublished}
630 { output.bibitem
631 format.authors "author" output.check
632 new.block
633 format.title "title" output.check
634 new.block
635 note "note" output.check
636 format.date output
637 fin.entry
638 }
639
640 FUNCTION {default.type} { misc }
641
642 MACRO {jan} {"I"}
643
644 MACRO {feb} {"II"}
645
646 MACRO {mar} {"III"}
647
648 MACRO {apr} {"IV"}
649
650 MACRO {may} {"V"}
651
652 MACRO {jun} {"VI"}
653
654 MACRO {jul} {"VII"}
655
656 MACRO {aug} {"VIII"}
657
658 MACRO {sep} {"IX"}
659
660 MACRO {oct} {"X"}
661
662 MACRO {nov} {"XI"}
663
664 MACRO {dec} {"XII"}
665
666 READ
667
668 FUNCTION {sortify}
669 { purify$
670 }
671
672 INTEGERS { len }
673
674 FUNCTION {chop.word}
675 { 's :=
676 'len :=
677 s #1 len substring$ =
678 { s len #1 + global.max$ substring$ }
679 's
680 if$
681 }
682
683 FUNCTION {format.lab.names}
684 { 's :=
685 s #1 "{ll}{ vv}" format.name$
686 s num.names$ duplicate$
687 #2 >
688 { pop$ " et~al." * }
689 { #2 <
690 'skip$
691 { s #2 "{ll~}{ff}{ vv}{ jj}" format.name$ "others" =
692 { " et~al." * }
693 { ", " * s #2 "{ll}{ vv}" format.name$ * }
694 if$
695 }
696 if$
697 }
698 if$
699 }
700
701 FUNCTION {author.key.label}
702 { author empty$
703 { key empty$
704 { cite$ #1 #3 substring$ }
705 { key #3 text.prefix$ }
706 if$
707 }
708 { author format.lab.names }
709 if$
710 }
711
712 FUNCTION {calc.short.authors}
713 { type$ "article" =
714 'author.key.label
715 'author.key.label
716 if$
717 'short.list :=
718 }
719
720 FUNCTION {calc.label}
721 { calc.short.authors
722 short.list
723 "("
724 *
725 year duplicate$ empty$
726 { pop$ "????" }
727 'skip$
728 if$
729 *
730 'label :=
731 }
732
733 FUNCTION {sort.format.names}
734 { 's :=
735 #1 'nameptr :=
736 ""
737 s num.names$ 'numnames :=
738 numnames 'namesleft :=
739 { namesleft #0 > }
740 { nameptr #1 >
741 { " " * }
742 'skip$
743 if$
744 s nameptr "{ll{ } }{ff{ }}{ vv{ }}{ jj{ }}" format.name$ 't :=
745 nameptr numnames = t "others" = and
746 { "et al" * }
747 { t sortify * }
748 if$
749 nameptr #1 + 'nameptr :=
750 namesleft #1 - 'namesleft :=
751 }
752 while$
753 }
754
755 FUNCTION {sort.format.title}
756 { 't :=
757 "A " #2
758 "An " #3
759 "The " #4 t chop.word
760 chop.word
761 chop.word
762 sortify
763 #1 global.max$ substring$
764 }
765
766 FUNCTION {author.sort}
767 { author empty$
768 { key empty$
769 { "to sort, need author or key in " cite$ * warning$
770 ""
771 }
772 { key sortify }
773 if$
774 }
775 { author sort.format.names }
776 if$
777 }
778
779 FUNCTION {presort}
780 { calc.label
781 label sortify
782 " "
783 *
784 type$ "article" =
785 'author.sort
786 'author.sort
787 if$
788 " "
789 *
790 year field.or.null sortify
791 *
792 " "
793 *
794 title field.or.null
795 sort.format.title
796 *
797 #1 entry.max$ substring$
798 'sort.label :=
799 sort.label *
800 #1 entry.max$ substring$
801 'sort.key$ :=
802 }
803
804 ITERATE {presort}
805
806 SORT
807
808 STRINGS { longest.label last.label next.extra }
809
810 INTEGERS { longest.label.width last.extra.num number.label }
811
812 FUNCTION {initialize.longest.label}
813 { "" 'longest.label :=
814 #0 int.to.chr$ 'last.label :=
815 "" 'next.extra :=
816 #0 'longest.label.width :=
817 #0 'last.extra.num :=
818 #0 'number.label :=
819 }
820
821 FUNCTION {forward.pass}
822 { last.label label =
823 { last.extra.num #1 + 'last.extra.num :=
824 last.extra.num int.to.chr$ 'extra.label :=
825 }
826 { "a" chr.to.int$ 'last.extra.num :=
827 "" 'extra.label :=
828 label 'last.label :=
829 }
830 if$
831 number.label #1 + 'number.label :=
832 }
833
834 FUNCTION {reverse.pass}
835 { next.extra "b" =
836 { "a" 'extra.label := }
837 'skip$
838 if$
839 extra.label 'next.extra :=
840 extra.label
841 duplicate$ empty$
842 'skip$
843 { "{\natexlab{" swap$ * "}}" * }
844 if$
845 'extra.label :=
846 label extra.label * 'label :=
847 }
848
849 EXECUTE {initialize.longest.label}
850
851 ITERATE {forward.pass}
852
853 REVERSE {reverse.pass}
854
855 FUNCTION {bib.sort.order}
856 { sort.label 'sort.key$ :=
857 }
858
859 ITERATE {bib.sort.order}
860
861 SORT
862
863 FUNCTION {begin.bib}
864 { preamble$ empty$
865 'skip$
866 { preamble$ write$ newline$ }
867 if$
868 "\begin{thebibliography}{" number.label int.to.str$ * "}" *
869 write$ newline$
870 "\providecommand{\natexlab}[1]{#1}"
871 write$ newline$
872 "\providecommand{\EM}{\em}"
873 write$ newline$
874 "\providecommand{\RNtxt}{\relax}"
875 write$ newline$
876 "\RNtxt{}"
877 write$ newline$
878 }
879
880 EXECUTE {begin.bib}
881
882 EXECUTE {init.state.consts}
883
884 ITERATE {call.type$}
885
886 FUNCTION {end.bib}
887 { newline$
888 "\end{thebibliography}" write$ newline$
889 }
890
891 EXECUTE {end.bib}
892 %% End of file `RUSNAT.BST'