Mercurial > hg > Papers > 2011 > nobu-prosym
comparison Paper/ipsjunsrt.bst @ 1:878e70793abe
mkdir Paper
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 17 Nov 2011 09:18:31 +0900 |
parents | ipsjunsrt.bst@9fc7603e8e8b |
children |
comparison
equal
deleted
inserted
replaced
0:9fc7603e8e8b | 1:878e70793abe |
---|---|
1 % ipsjsort.bst nakasima@kuis.kyoto-u.ac.jp (Hiroshi Nakashima) | |
2 % jssst.bst tomura@etl.go.jp (Satoru Tomura) | |
3 % BibTeX standard bibliography style `jplain' | |
4 % version 0.10 for JBibTeX versions 0.10 or later, JLaTeX version 2.09. | |
5 % by Shouichi Matsui, matsui@denken.junet | |
6 | |
7 ENTRY | |
8 { address | |
9 author | |
10 booktitle | |
11 chapter | |
12 edition | |
13 editor | |
14 howpublished | |
15 institution | |
16 journal | |
17 key | |
18 month | |
19 note | |
20 number | |
21 organization | |
22 pages | |
23 publisher | |
24 school | |
25 series | |
26 title | |
27 type | |
28 volume | |
29 year | |
30 yomi | |
31 } | |
32 {} | |
33 { label } | |
34 | |
35 INTEGERS { output.state before.all mid.sentence after.sentence after.block } | |
36 | |
37 INTEGERS { before.year } | |
38 | |
39 FUNCTION {init.state.consts} | |
40 { #0 'before.all := | |
41 #1 'mid.sentence := | |
42 #2 'after.sentence := | |
43 #3 'after.block := | |
44 #4 'before.year := % year doesn't follows "," nor ".". (H.N.) | |
45 } | |
46 | |
47 STRINGS { s t } | |
48 | |
49 FUNCTION {output.nonnull} | |
50 { 's := | |
51 output.state mid.sentence = | |
52 { ", " * write$ } | |
53 { output.state after.block = | |
54 { add.period$ write$ | |
55 newline$ | |
56 "\newblock " write$ | |
57 } | |
58 { output.state before.all = | |
59 'write$ | |
60 { output.state before.year = | |
61 % year doesn't follows "," nor ".". (H.N.) | |
62 { " " * write$ } | |
63 { add.period$ " " * write$ } | |
64 if$ | |
65 } | |
66 if$ | |
67 } | |
68 if$ | |
69 mid.sentence 'output.state := | |
70 } | |
71 if$ | |
72 s | |
73 } | |
74 | |
75 FUNCTION {output} | |
76 { duplicate$ empty$ | |
77 'pop$ | |
78 'output.nonnull | |
79 if$ | |
80 } | |
81 | |
82 FUNCTION {required.argument} | |
83 { 't := | |
84 empty$ | |
85 {"Missing required argument " t * " in " * cite$ * warning$} | |
86 'skip$ | |
87 if$ | |
88 } | |
89 | |
90 FUNCTION {required.exclusive.or.argument} | |
91 { 't := | |
92 empty$ | |
93 { 's := | |
94 empty$ | |
95 { t " or " * s * " is missing in " * cite$ * warning$} | |
96 'skip$ | |
97 if$ | |
98 } | |
99 { 's := | |
100 empty$ | |
101 'skip$ | |
102 { "You can use only one of " t * " and " * s * " in " * cite$ * warning$} | |
103 if$ | |
104 } | |
105 if$ | |
106 } | |
107 | |
108 FUNCTION {required.and.or.argument} | |
109 { 't := empty$ | |
110 { 's := empty$ | |
111 { "there's no " t * " and/or " * s * cite$ * warning$ } | |
112 'skip$ | |
113 if$ | |
114 } | |
115 { pop$ pop$ } | |
116 if$ | |
117 } | |
118 | |
119 FUNCTION {optional.series.volume.number.argument} | |
120 { series empty$ | |
121 { volume empty$ | |
122 { number empty$ | |
123 'skip$ | |
124 { "there's a number but no series in " cite$ * warning$ } | |
125 if$ | |
126 } | |
127 { number empty$ | |
128 { "there's a volume but no series in " cite$ * warning$ } | |
129 { "you can use only one of volume and number in " cite$ * warning$} | |
130 if$ | |
131 } | |
132 if$ | |
133 } | |
134 { volume empty$ | |
135 { number empty$ | |
136 { "there's a series but neither volume nor number in " cite$ * warning$ } | |
137 'skip$ | |
138 if$ | |
139 } | |
140 { number empty$ | |
141 'skip$ | |
142 { "you can use only one of volume and number in " cite$ * warning$ } | |
143 if$ | |
144 } | |
145 if$ | |
146 } | |
147 if$ | |
148 } | |
149 | |
150 FUNCTION {output.bibitem} | |
151 { newline$ | |
152 "\bibitem{" write$ | |
153 cite$ write$ | |
154 "}" write$ | |
155 newline$ | |
156 before.all 'output.state := | |
157 } | |
158 | |
159 FUNCTION {fin.entry} | |
160 { add.period$ | |
161 write$ | |
162 newline$ | |
163 } | |
164 | |
165 FUNCTION {new.block} | |
166 { output.state before.all = | |
167 'skip$ | |
168 { after.block 'output.state := } | |
169 if$ | |
170 } | |
171 | |
172 FUNCTION {new.sentence} | |
173 { output.state after.block = | |
174 'skip$ | |
175 { output.state before.all = | |
176 'skip$ | |
177 { after.sentence 'output.state := } | |
178 if$ | |
179 } | |
180 if$ | |
181 } | |
182 | |
183 FUNCTION {not} | |
184 { { #0 } | |
185 { #1 } | |
186 if$ | |
187 } | |
188 | |
189 FUNCTION {and} | |
190 { 'skip$ | |
191 { pop$ #0 } | |
192 if$ | |
193 } | |
194 | |
195 FUNCTION {or} | |
196 { { pop$ #1 } | |
197 'skip$ | |
198 if$ | |
199 } | |
200 | |
201 FUNCTION {new.block.checka} | |
202 { empty$ | |
203 'skip$ | |
204 'new.block | |
205 if$ | |
206 } | |
207 | |
208 FUNCTION {new.block.checkb} | |
209 { empty$ | |
210 swap$ empty$ | |
211 and | |
212 'skip$ | |
213 'new.block | |
214 if$ | |
215 } | |
216 | |
217 FUNCTION {new.sentence.checka} | |
218 { empty$ | |
219 'skip$ | |
220 'new.sentence | |
221 if$ | |
222 } | |
223 | |
224 FUNCTION {new.sentence.checkb} | |
225 { empty$ | |
226 swap$ empty$ | |
227 and | |
228 'skip$ | |
229 'new.sentence | |
230 if$ | |
231 } | |
232 | |
233 FUNCTION {field.or.null} | |
234 { duplicate$ empty$ | |
235 { pop$ "" } | |
236 'skip$ | |
237 if$ | |
238 } | |
239 | |
240 FUNCTION {is.kanji} | |
241 %%%{ #1 text.prefix$ chr.to.int$ #127 > } | |
242 %%%{ #1 #1 substring$ chr.to.int$ #127 > } | |
243 %%%{ purify$ #1 text.prefix$ chr.to.int$ #127 >} | |
244 { is.kanji.str$ } | |
245 | |
246 FUNCTION {emphasize} | |
247 { duplicate$ empty$ | |
248 { pop$ "" } | |
249 { duplicate$ is.kanji | |
250 'skip$ | |
251 { "{\em " swap$ * "\/}" * } | |
252 if$ | |
253 } | |
254 if$ | |
255 } | |
256 | |
257 INTEGERS { nameptr namesleft numnames } | |
258 | |
259 FUNCTION {format.names} | |
260 { 's := | |
261 #1 'nameptr := | |
262 s num.names$ 'numnames := | |
263 numnames 'namesleft := | |
264 { namesleft #0 > } | |
265 { s nameptr | |
266 s nameptr "{ll}" format.name$ is.kanji | |
267 { "{ff}{vv}{ll}" } | |
268 { "{vv }{ll}{, jj}{, f.}" } | |
269 if$ | |
270 format.name$ 't := | |
271 nameptr #1 > | |
272 { namesleft #1 > | |
273 { ", " * t * } | |
274 { | |
275 % numnames #2 > | |
276 % { "," * } | |
277 % 'skip$ | |
278 % if$ | |
279 % Don't put "," before "and" (H.N.) | |
280 % | |
281 % numnames #3 < | |
282 % { t is.kanji | |
283 % {"," * "" *} 'skip$ if$ | |
284 % } | |
285 % 'skip$ | |
286 % if$ | |
287 % Don't put "," before "ほか" (H.N.) | |
288 % | |
289 t "others" = | |
290 { s is.kanji | |
291 {"ほか" * } | |
292 {" et al." * } | |
293 if$ | |
294 } | |
295 { s is.kanji | |
296 % {" " * t * } | |
297 {", " * t * } % put "," here for Kanji (H.N.) | |
298 {" and " * t * } | |
299 if$ | |
300 } | |
301 if$ | |
302 } | |
303 if$ | |
304 } | |
305 't | |
306 if$ | |
307 nameptr #1 + 'nameptr := | |
308 namesleft #1 - 'namesleft := | |
309 } | |
310 while$ | |
311 } | |
312 | |
313 FUNCTION {format.authors} | |
314 { author empty$ | |
315 { "" } | |
316 { author format.names } | |
317 if$ | |
318 } | |
319 | |
320 FUNCTION {format.editors} | |
321 { editor empty$ | |
322 { "" } | |
323 { editor format.names | |
324 editor num.names$ #1 > | |
325 { editor is.kanji | |
326 {"(編)" * } %%{", editors" * } if$ | |
327 {"(eds.)" *} if$ | |
328 } | |
329 { editor is.kanji | |
330 {"(編)" *} %%{", editor" * } if$ | |
331 {"(ed.)" *} if$ | |
332 } | |
333 if$ | |
334 } | |
335 if$ | |
336 } | |
337 | |
338 FUNCTION {n.dashify} | |
339 { 't := | |
340 "" | |
341 { t empty$ not } | |
342 { t #1 #1 substring$ "-" = | |
343 { t #1 #2 substring$ "--" = not | |
344 { "--" * | |
345 t #2 global.max$ substring$ 't := | |
346 } | |
347 { { t #1 #1 substring$ "-" = } | |
348 { "-" * | |
349 t #2 global.max$ substring$ 't := | |
350 } | |
351 while$ | |
352 } | |
353 if$ | |
354 } | |
355 { t #1 #1 substring$ * | |
356 t #2 global.max$ substring$ 't := | |
357 } | |
358 if$ | |
359 } | |
360 while$ | |
361 } | |
362 | |
363 FUNCTION {format.date} | |
364 { before.year 'output.state := % year doesn't follows "," nor ".". (H.N.) | |
365 year empty$ | |
366 { month empty$ | |
367 { "" } | |
368 { "there's a month but no year in " cite$ * warning$ | |
369 % month % no worth to put month only. (H.N.) | |
370 "" | |
371 } | |
372 if$ | |
373 } | |
374 % { month empty$ | |
375 % 'year | |
376 % { month " " * year * } | |
377 % if$ | |
378 % } | |
379 % month is not printed even if it is given. (H.N.) | |
380 % | |
381 { "(" year ")" * * } % year is surrounded by parens. (H.N.) | |
382 if$ | |
383 } | |
384 | |
385 FUNCTION {tie.or.space.connect} | |
386 { duplicate$ text.length$ #3 < | |
387 { "~" } | |
388 { "\ " } | |
389 if$ | |
390 swap$ * * | |
391 } | |
392 | |
393 FUNCTION {output.volume} | |
394 { | |
395 volume empty$ | |
396 'skip$ | |
397 { "Vol.~" volume * output} | |
398 if$ | |
399 | |
400 } | |
401 | |
402 FUNCTION {output.number} | |
403 { | |
404 number empty$ | |
405 'skip$ | |
406 { "No.~" number * output} | |
407 if$ | |
408 } | |
409 | |
410 FUNCTION {output.series.volume.number} | |
411 { series empty$ | |
412 { output.volume | |
413 output.number } | |
414 { series is.kanji | |
415 volume empty$ | |
416 number empty$ | |
417 or | |
418 and | |
419 { series " " * volume * number * output} | |
420 { series output | |
421 output.volume | |
422 output.number} | |
423 if$ | |
424 } | |
425 if$ | |
426 } | |
427 | |
428 FUNCTION {format.edition} | |
429 { edition empty$ | |
430 { "" } | |
431 { output.state mid.sentence = | |
432 { edition "l" change.case$ " edition" * } | |
433 { edition "t" change.case$ " edition" * } | |
434 if$ | |
435 } | |
436 if$ | |
437 } | |
438 | |
439 INTEGERS { multiresult } | |
440 | |
441 FUNCTION {multi.page.check} | |
442 { 't := | |
443 #0 'multiresult := | |
444 { multiresult not | |
445 t empty$ not | |
446 and | |
447 } | |
448 { t #1 #1 substring$ | |
449 duplicate$ "-" = | |
450 swap$ duplicate$ "," = | |
451 swap$ "+" = | |
452 or or | |
453 { #1 'multiresult := } | |
454 { t #2 global.max$ substring$ 't := } | |
455 if$ | |
456 } | |
457 while$ | |
458 multiresult | |
459 } | |
460 | |
461 FUNCTION {format.pages} | |
462 { pages empty$ | |
463 { "" } | |
464 { pages multi.page.check | |
465 % { "pp.~" pages n.dashify tie.or.space.connect } | |
466 % { "pp.~" pages tie.or.space.connect } | |
467 % '~' might be add by tie.or.space.connect. (H.N.) | |
468 % "p." is probably better for single page reference (H.N.) | |
469 { "pp." pages n.dashify tie.or.space.connect } | |
470 { "p." pages tie.or.space.connect } | |
471 if$ | |
472 } | |
473 if$ | |
474 } | |
475 | |
476 % This function is replaced by format.vol.num.pages (H.N.) | |
477 %FUNCTION {format.volume.number.year.pages} | |
478 %{ volume empty$ | |
479 % { number empty$ | |
480 % { year empty$ | |
481 % { "" } | |
482 % { "(" year * ")" * } | |
483 % if$} | |
484 % { year empty$ | |
485 % { "No.~" number * } | |
486 % { "No.~" number * "(" * year * ")" * } | |
487 % if$} | |
488 % if$} | |
489 % { number empty$ | |
490 % { year empty$ | |
491 % { "Vol.~" volume * } | |
492 % { "Vol.~" volume * "(" * year * ")" * } | |
493 % if$} | |
494 % { year empty$ | |
495 % {"Vol.~" volume * "," * "No.~" * number * } | |
496 % {"Vol.~" volume * "," * "No.~" * number * "(" * year * ")" * } | |
497 % if$} | |
498 % if$} | |
499 % if$ | |
500 % pages empty$ | |
501 % 'skip$ | |
502 % { duplicate$ empty$ | |
503 % { pop$ format.pages } | |
504 % { "," * " pp.~" * pages n.dashify * } | |
505 % if$ | |
506 % } | |
507 % if$ | |
508 %} | |
509 | |
510 FUNCTION {format.vol.num.pages} | |
511 { volume empty$ | |
512 { ""} | |
513 { " Vol.~" volume * } | |
514 if$ | |
515 number empty$ | |
516 'skip$ | |
517 { volume empty$ | |
518 { "there's a number but no volume in " cite$ * warning$ } | |
519 { "," *} | |
520 if$ | |
521 " No.~" number * * | |
522 } | |
523 if$ | |
524 pages empty$ | |
525 'skip$ | |
526 { duplicate$ empty$ | |
527 { pop$ format.pages } | |
528 { ", " * format.pages * } | |
529 % tieing "pp." and the first page will be too hard for a narrow column. (H.N.) | |
530 if$ | |
531 } | |
532 if$ | |
533 } | |
534 | |
535 FUNCTION {format.chapter.pages} | |
536 { chapter empty$ | |
537 'format.pages | |
538 { type empty$ | |
539 { "chapter" chapter tie.or.space.connect } | |
540 { type is.kanji | |
541 { chapter type tie.or.space.connect } | |
542 { type "l" change.case$ chapter tie.or.space.connect } | |
543 if$ | |
544 } | |
545 if$ | |
546 pages empty$ | |
547 'skip$ | |
548 { ", " * format.pages * } | |
549 if$ | |
550 } | |
551 if$ | |
552 } | |
553 | |
554 FUNCTION {format.in.ed.booktitle} | |
555 { booktitle empty$ | |
556 { "" } | |
557 { editor empty$ | |
558 { booktitle is.kanji | |
559 { " " booktitle emphasize * } | |
560 { " " booktitle emphasize * } | |
561 if$ | |
562 } | |
563 { booktitle is.kanji | |
564 % { booktitle emphasize "(" * format.editors * ")" *} | |
565 % { booktitle emphasize "(" * format.editors * ")" *} | |
566 % awful without leading space (H.N.) | |
567 { booktitle emphasize " (" * format.editors * ")" *} | |
568 { booktitle emphasize " (" * format.editors * ")" *} | |
569 if$ | |
570 } | |
571 if$ | |
572 } | |
573 if$ | |
574 } | |
575 | |
576 FUNCTION {empty.misc.check} | |
577 { author empty$ title empty$ howpublished empty$ | |
578 month empty$ year empty$ note empty$ | |
579 and and and and and | |
580 key empty$ not and | |
581 { "all relevant fields are empty in " cite$ * warning$ } | |
582 'skip$ | |
583 if$ | |
584 } | |
585 | |
586 FUNCTION {format.thesis.type} | |
587 { type empty$ | |
588 'skip$ | |
589 { pop$ | |
590 type "t" change.case$ | |
591 } | |
592 if$ | |
593 } | |
594 | |
595 FUNCTION {format.tr.number} | |
596 { type empty$ | |
597 { title empty$ | |
598 { "Technical Report" } | |
599 { title is.kanji | |
600 { "技術報告" } | |
601 { "Technical Report" } | |
602 if$ | |
603 } | |
604 if$ | |
605 } | |
606 {type} | |
607 if$ | |
608 number empty$ | |
609 { "t" change.case$ } | |
610 { number tie.or.space.connect } | |
611 if$ | |
612 } | |
613 | |
614 FUNCTION {format.article.crossref} | |
615 { key empty$ | |
616 { journal empty$ | |
617 { "need key or journal for " cite$ * " to crossref " * crossref * | |
618 warning$ | |
619 "" | |
620 } | |
621 { "In " journal emphasize * } | |
622 if$ | |
623 } | |
624 { "In " key * } | |
625 if$ | |
626 " \cite{" * crossref * "}" * | |
627 } | |
628 | |
629 FUNCTION {format.crossref.editor} | |
630 { editor #1 "{vv }{ll}" format.name$ | |
631 editor num.names$ duplicate$ | |
632 #2 > | |
633 { editor is.kanji | |
634 {pop$ " ほか" *} {pop$ " et al." * } if$ | |
635 } | |
636 { #2 < | |
637 'skip$ | |
638 { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = | |
639 { editor is.kanji | |
640 {" ほか" *} {"et al." * } if$ | |
641 } | |
642 { editor is.kanji | |
643 {" " * editor #2 "{vv }{ll}" format.name$ * } | |
644 {" and " * editor #2 "{vv }{ll}" format.name$ * } | |
645 if$ | |
646 } | |
647 if$ | |
648 } | |
649 if$ | |
650 } | |
651 if$ | |
652 } | |
653 | |
654 FUNCTION {format.book.crossref} | |
655 { volume empty$ | |
656 { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ | |
657 title is.kanji | |
658 {" "} {"In "} if$ | |
659 } | |
660 { "Volume" volume tie.or.space.connect | |
661 " of " * | |
662 } | |
663 if$ | |
664 editor empty$ | |
665 editor field.or.null author field.or.null = | |
666 or | |
667 { key empty$ | |
668 { series empty$ | |
669 { "need editor, key, or series for " cite$ * " to crossref " * | |
670 crossref * warning$ | |
671 "" * | |
672 } | |
673 { series emphasize } | |
674 if$ | |
675 } | |
676 { key * } | |
677 if$ | |
678 } | |
679 { format.crossref.editor * } | |
680 if$ | |
681 " \cite{" * crossref * "}" * | |
682 } | |
683 | |
684 FUNCTION {format.incoll.inproc.crossref} | |
685 { editor empty$ | |
686 editor field.or.null author field.or.null = | |
687 or | |
688 { key empty$ | |
689 { booktitle empty$ | |
690 { "need editor, key, or booktitle for " cite$ * " to crossref " * | |
691 crossref * warning$ | |
692 "" | |
693 } | |
694 { booktitle is.kanji | |
695 booktitle | |
696 {"In " booktitle emphasize * } | |
697 if$ | |
698 } | |
699 if$ | |
700 } | |
701 { "In " key * } | |
702 if$ | |
703 } | |
704 { title is.kanji | |
705 {" " format.crossref.editor * } | |
706 {"In " format.crossref.editor * } | |
707 if$ | |
708 } | |
709 if$ | |
710 " \cite{" * crossref * "}" * | |
711 } | |
712 | |
713 FUNCTION {article} | |
714 { | |
715 %%%% | |
716 author "author" required.argument | |
717 title "title" required.argument | |
718 journal "journal" required.argument | |
719 year "year" required.argument | |
720 %%%% jssst | |
721 volume "volume" | |
722 number "number" | |
723 required.and.or.argument | |
724 pages "pages" required.argument | |
725 %%%% | |
726 output.bibitem | |
727 format.authors ": " * | |
728 title output | |
729 crossref missing$ | |
730 { journal emphasize output | |
731 % format.volume.number.year.pages output | |
732 % date is always at the end. (H.N.) | |
733 format.vol.num.pages output | |
734 format.date output | |
735 } | |
736 { format.article.crossref output.nonnull | |
737 format.pages output | |
738 } | |
739 if$ | |
740 new.block | |
741 note output | |
742 fin.entry | |
743 } | |
744 | |
745 FUNCTION {book} | |
746 { | |
747 %%%% | |
748 author "author" | |
749 editor "editor" | |
750 required.exclusive.or.argument | |
751 title "title" required.argument | |
752 publisher "publisher" required.argument | |
753 year "year" required.argument | |
754 optional.series.volume.number.argument | |
755 %%%% | |
756 output.bibitem | |
757 author empty$ | |
758 { format.editors} | |
759 { format.authors} | |
760 if$ | |
761 ": " * | |
762 title emphasize output | |
763 crossref missing$ | |
764 { output.series.volume.number | |
765 publisher output | |
766 address output | |
767 } | |
768 { new.block | |
769 format.book.crossref output.nonnull | |
770 } | |
771 if$ | |
772 format.edition output | |
773 format.date output | |
774 new.block | |
775 note output | |
776 fin.entry | |
777 } | |
778 | |
779 FUNCTION {booklet} | |
780 { | |
781 %%%% | |
782 title "title" required.argument | |
783 %%%% jssst | |
784 author "author" required.argument | |
785 %%%% | |
786 output.bibitem | |
787 format.authors ": " * | |
788 title output | |
789 howpublished output | |
790 address output | |
791 format.date output | |
792 new.block | |
793 note output | |
794 fin.entry | |
795 } | |
796 | |
797 FUNCTION {inbook} | |
798 { | |
799 %%%% | |
800 author "author" | |
801 editor "editor" | |
802 required.exclusive.or.argument | |
803 title "title" required.argument | |
804 chapter "chapter" | |
805 pages "pages" | |
806 required.and.or.argument | |
807 publisher "publisher" required.argument | |
808 year "year" required.argument | |
809 | |
810 optional.series.volume.number.argument | |
811 %%%% | |
812 output.bibitem | |
813 author empty$ | |
814 { format.editors} | |
815 { format.authors} | |
816 if$ | |
817 ": " * | |
818 title emphasize output | |
819 crossref missing$ | |
820 { output.series.volume.number | |
821 publisher output | |
822 } | |
823 { format.chapter.pages output | |
824 new.block | |
825 format.book.crossref output.nonnull | |
826 } | |
827 if$ | |
828 format.edition output | |
829 % format.date output | |
830 format.chapter.pages output | |
831 format.date output % date is always at the end. (H.N.) | |
832 new.block | |
833 note output | |
834 fin.entry | |
835 } | |
836 | |
837 FUNCTION {incollection} | |
838 { | |
839 %%%% | |
840 author "author" required.argument | |
841 title "title" required.argument | |
842 booktitle "booktitle" required.argument | |
843 publisher "publisher" required.argument | |
844 year "year" required.argument | |
845 | |
846 optional.series.volume.number.argument | |
847 %%%% | |
848 output.bibitem | |
849 format.authors ": " * | |
850 title output | |
851 crossref missing$ | |
852 { format.in.ed.booktitle output | |
853 output.series.volume.number | |
854 publisher output | |
855 address output | |
856 format.edition output | |
857 format.chapter.pages output % date is always at the end. (H.N.) | |
858 format.date output | |
859 } | |
860 { format.incoll.inproc.crossref output.nonnull | |
861 format.chapter.pages output | |
862 } | |
863 if$ | |
864 % format.chapter.pages output | |
865 new.block | |
866 note output | |
867 fin.entry | |
868 } | |
869 | |
870 FUNCTION {inproceedings} | |
871 { | |
872 %%%% | |
873 author "author" required.argument | |
874 title "title" required.argument | |
875 booktitle "booktitle" required.argument | |
876 year "year" required.argument | |
877 | |
878 optional.series.volume.number.argument | |
879 %%%% | |
880 output.bibitem | |
881 format.authors ": " * | |
882 title output | |
883 crossref missing$ | |
884 { format.in.ed.booktitle output | |
885 output.series.volume.number | |
886 address output | |
887 organization output | |
888 publisher output | |
889 % format.date output | |
890 format.pages output | |
891 format.date output % date is always at the end. (H.N.) | |
892 } | |
893 { format.incoll.inproc.crossref output.nonnull | |
894 format.pages output | |
895 } | |
896 if$ | |
897 new.block | |
898 note output | |
899 fin.entry | |
900 } | |
901 | |
902 FUNCTION {conference} { inproceedings } | |
903 | |
904 FUNCTION {manual} | |
905 { | |
906 %%%% | |
907 title "title" required.argument | |
908 %%%% jssst | |
909 author "author" | |
910 organization "organazaion" | |
911 required.exclusive.or.argument | |
912 %%%% | |
913 output.bibitem | |
914 author empty$ | |
915 { organization} | |
916 { format.authors} | |
917 if$ | |
918 ": " * | |
919 title emphasize output | |
920 author empty$ | |
921 'skip$ | |
922 { organization output } | |
923 if$ | |
924 address output | |
925 format.edition output | |
926 format.date output | |
927 new.block | |
928 note output | |
929 fin.entry | |
930 } | |
931 | |
932 FUNCTION {mastersthesis} | |
933 { | |
934 %%%% | |
935 author "author" required.argument | |
936 title "title" required.argument | |
937 school "school" required.argument | |
938 year "year" required.argument | |
939 %%%% | |
940 output.bibitem | |
941 format.authors ": " * | |
942 title output | |
943 author empty$ | |
944 { "Master's thesis" } | |
945 { author is.kanji | |
946 { "修士論文" } | |
947 { "Master's thesis" } | |
948 if$ | |
949 } | |
950 if$ | |
951 format.thesis.type output.nonnull | |
952 school output | |
953 address output | |
954 format.date output | |
955 new.block | |
956 note output | |
957 fin.entry | |
958 } | |
959 | |
960 FUNCTION {misc} | |
961 { | |
962 %%%% | |
963 %%%% jssst | |
964 author "author" required.argument | |
965 title "title" required.argument | |
966 %%%% | |
967 output.bibitem | |
968 format.authors | |
969 ": " * | |
970 title output | |
971 howpublished output | |
972 format.date output | |
973 new.block | |
974 note output | |
975 fin.entry | |
976 empty.misc.check | |
977 } | |
978 | |
979 FUNCTION {phdthesis} | |
980 { | |
981 %%%% | |
982 author "author" required.argument | |
983 title "title" required.argument | |
984 school "school" required.argument | |
985 year "year" required.argument | |
986 %%%% | |
987 output.bibitem | |
988 format.authors ": " * | |
989 title emphasize output | |
990 author empty$ | |
991 { "PhD Thesis" } | |
992 { author is.kanji | |
993 { "博士論文" } | |
994 { "PhD Thesis" } | |
995 if$ | |
996 } | |
997 if$ | |
998 format.thesis.type output.nonnull | |
999 school output | |
1000 address output | |
1001 format.date output | |
1002 new.block | |
1003 note output | |
1004 fin.entry | |
1005 } | |
1006 | |
1007 FUNCTION {proceedings} | |
1008 { | |
1009 %%%% | |
1010 title "title" required.argument | |
1011 year "year" required.argument | |
1012 | |
1013 optional.series.volume.number.argument | |
1014 %%%% jssst | |
1015 editor "editor" | |
1016 organization "organization" | |
1017 required.exclusive.or.argument | |
1018 %%%% | |
1019 output.bibitem | |
1020 editor empty$ | |
1021 { organization } | |
1022 { format.editors } | |
1023 if$ | |
1024 ": " * | |
1025 title emphasize output | |
1026 output.series.volume.number | |
1027 address output | |
1028 editor empty$ | |
1029 'skip$ | |
1030 { organization output } | |
1031 if$ | |
1032 publisher output | |
1033 format.date output | |
1034 new.block | |
1035 note output | |
1036 fin.entry | |
1037 } | |
1038 | |
1039 FUNCTION {techreport} | |
1040 { | |
1041 %%%% | |
1042 author "author" required.argument | |
1043 title "title" required.argument | |
1044 institution "institution" required.argument | |
1045 year "year" required.argument | |
1046 %%%% | |
1047 output.bibitem | |
1048 format.authors ": " * | |
1049 title output | |
1050 format.tr.number output.nonnull | |
1051 institution output | |
1052 address output | |
1053 format.date output | |
1054 new.block | |
1055 note output | |
1056 fin.entry | |
1057 } | |
1058 | |
1059 FUNCTION {unpublished} | |
1060 { | |
1061 %%%% | |
1062 author "author" required.argument | |
1063 title "title" required.argument | |
1064 note "note" required.argument | |
1065 %%%% | |
1066 output.bibitem | |
1067 format.authors ": " * | |
1068 title output | |
1069 format.date output | |
1070 new.block | |
1071 note output | |
1072 fin.entry | |
1073 } | |
1074 | |
1075 FUNCTION {default.type} { misc } | |
1076 | |
1077 MACRO {jan} {"January"} | |
1078 | |
1079 MACRO {feb} {"February"} | |
1080 | |
1081 MACRO {mar} {"March"} | |
1082 | |
1083 MACRO {apr} {"April"} | |
1084 | |
1085 MACRO {may} {"May"} | |
1086 | |
1087 MACRO {jun} {"June"} | |
1088 | |
1089 MACRO {jul} {"July"} | |
1090 | |
1091 MACRO {aug} {"August"} | |
1092 | |
1093 MACRO {sep} {"September"} | |
1094 | |
1095 MACRO {oct} {"October"} | |
1096 | |
1097 MACRO {nov} {"November"} | |
1098 | |
1099 MACRO {dec} {"December"} | |
1100 | |
1101 MACRO {acmcs} {"ACM Computing Surveys"} | |
1102 | |
1103 MACRO {acta} {"Acta Informatica"} | |
1104 | |
1105 MACRO {cacm} {"Communications of the ACM"} | |
1106 | |
1107 MACRO {ibmjrd} {"IBM Journal of Research and Development"} | |
1108 | |
1109 MACRO {ibmsj} {"IBM Systems Journal"} | |
1110 | |
1111 MACRO {ieeese} {"IEEE Transactions on Software Engineering"} | |
1112 | |
1113 MACRO {ieeetc} {"IEEE Transactions on Computers"} | |
1114 | |
1115 MACRO {ieeetcad} | |
1116 {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"} | |
1117 | |
1118 MACRO {ipl} {"Information Processing Letters"} | |
1119 | |
1120 MACRO {jacm} {"Journal of the ACM"} | |
1121 | |
1122 MACRO {jcss} {"Journal of Computer and System Sciences"} | |
1123 | |
1124 MACRO {scp} {"Science of Computer Programming"} | |
1125 | |
1126 MACRO {sicomp} {"SIAM Journal on Computing"} | |
1127 | |
1128 MACRO {tocs} {"ACM Transactions on Computer Systems"} | |
1129 | |
1130 MACRO {tods} {"ACM Transactions on Database Systems"} | |
1131 | |
1132 MACRO {tog} {"ACM Transactions on Graphics"} | |
1133 | |
1134 MACRO {toms} {"ACM Transactions on Mathematical Software"} | |
1135 | |
1136 MACRO {toois} {"ACM Transactions on Office Information Systems"} | |
1137 | |
1138 MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"} | |
1139 | |
1140 MACRO {tcs} {"Theoretical Computer Science"} | |
1141 | |
1142 READ | |
1143 | |
1144 STRINGS { longest.label } | |
1145 | |
1146 INTEGERS { number.label longest.label.width } | |
1147 | |
1148 FUNCTION {initialize.longest.label} | |
1149 { "" 'longest.label := | |
1150 #1 'number.label := | |
1151 #0 'longest.label.width := | |
1152 } | |
1153 | |
1154 FUNCTION {longest.label.pass} | |
1155 { number.label int.to.str$ 'label := | |
1156 number.label #1 + 'number.label := | |
1157 label width$ longest.label.width > | |
1158 { label 'longest.label := | |
1159 label width$ 'longest.label.width := | |
1160 } | |
1161 'skip$ | |
1162 if$ | |
1163 } | |
1164 | |
1165 EXECUTE {initialize.longest.label} | |
1166 | |
1167 ITERATE {longest.label.pass} | |
1168 | |
1169 FUNCTION {begin.bib} | |
1170 { preamble$ empty$ | |
1171 'skip$ | |
1172 { preamble$ write$ newline$ } | |
1173 if$ | |
1174 "\begin{thebibliography}{" longest.label * "}" * write$ newline$ | |
1175 } | |
1176 | |
1177 EXECUTE {begin.bib} | |
1178 | |
1179 EXECUTE {init.state.consts} | |
1180 | |
1181 ITERATE {call.type$} | |
1182 | |
1183 FUNCTION {end.bib} | |
1184 { newline$ | |
1185 "\end{thebibliography}" write$ newline$ | |
1186 } | |
1187 | |
1188 EXECUTE {end.bib} | |
1189 | |
1190 |