FUNCTION {jecon.version} { "2.7" }
FUNCTION {jecon.debug}
{ #0 }
FUNCTION {bst.use.bysame}
{ #1 }
FUNCTION {bst.bysame.definition}
{ "\hskip.3em \leavevmode\rule[.5ex]{3em}{.3pt}\hskip0.5em" }
FUNCTION {bst.author.name}
{ #0 }
FUNCTION {bst.first.name.initial}
{ #0 }
FUNCTION {bst.title.lower.case}
{ #0 }
FUNCTION {bst.hide.title}
{ #0 }
FUNCTION {bst.mixed.order}
{ #0 }
FUNCTION {bst.hide.month}
{ #0 }
FUNCTION {bst.hide.number}
{ #0 }
FUNCTION {bst.use.number.index}
{ #0 }
FUNCTION {bst.number.index.pre}
{ "[" }
FUNCTION {bst.number.index.post}
{ "]\hskip1.0em " }
FUNCTION {bst.number.index.digit}
{ "3" }
FUNCTION {bst.number.index.bibhang.one}
{ "2.05em" }
FUNCTION {bst.number.index.bibhang.ten}
{ "2.55em" }
FUNCTION {bst.number.index.bibhang.hund}
{ "3.05em" }
FUNCTION {bst.year.backward}
{ #0 }
FUNCTION {bst.kansuji.jp}
{ #0 }
FUNCTION {bst.tatebo.definition}
{ "\hskip.1em \leavevmode\rule[0ex]{1em}{.3pt}\hskip0.1em" }
FUNCTION {bst.reverse.year}
{ #0 }
FUNCTION {bst.sort.year}
{ #0 }
FUNCTION {bst.no.sort}
{ #0 }
FUNCTION {bst.sort.entry.type}
{ #0 }
FUNCTION {bst.notuse.absorder.field}
{ #0 }
FUNCTION {bst.notuse.order.field}
{ #0 }
FUNCTION {bst.and}
{ " and " }
FUNCTION {bst.ands}
{ ", and " }
FUNCTION {bst.and.jp}
{ "・" }
FUNCTION {bst.cite.and}
{ " and " }
FUNCTION {bst.cite.ands}
{ " and " }
FUNCTION {bst.cite.and.jp}
{ "・" }
FUNCTION {bst.and.others.num}
{ #3 }
FUNCTION {bst.and.others}
{ " et~al." }
FUNCTION {bst.and.others.jp}
{ "他" }
FUNCTION {bst.author.pre}
{ "" }
FUNCTION {bst.author.post}
{ "" }
FUNCTION {bst.author.pre.jp}
{ "" }
FUNCTION {bst.author.post.jp}
{ "" }
FUNCTION {bst.sei.mei.one.jp}
{ "" }
FUNCTION {bst.sei.mei.two.jp}
{ "" }
FUNCTION {bst.year.pre}
{ " (" }
FUNCTION {bst.year.post}
{ ") " }
FUNCTION {bst.year.pre.jp}
{ " (" }
FUNCTION {bst.year.post.jp}
{ ") " }
FUNCTION {bst.title.pre}
{ "``" }
FUNCTION {bst.title.post}
{ ",''" }
FUNCTION {bst.title.pre.jp}
{ "「" }
FUNCTION {bst.title.post.jp}
{ "」," }
FUNCTION {bst.book.pre}
{ " {\it " }
FUNCTION {bst.book.post}
{ "}" }
FUNCTION {bst.book.pre.jp}
{ "『" }
FUNCTION {bst.book.post.jp}
{ "』" }
FUNCTION {bst.btitle.pre}
{ " {\it " }
FUNCTION {bst.btitle.post}
{ "}" }
FUNCTION {bst.btitle.pre.jp}
{ "『" }
FUNCTION {bst.btitle.post.jp}
{ "』" }
FUNCTION {bst.journal.pre}
{ " {\it " }
FUNCTION {bst.journal.post}
{ "}" }
FUNCTION {bst.journal.pre.jp}
{ "『" }
FUNCTION {bst.journal.post.jp}
{ "』" }
FUNCTION {bst.editors}
{ " eds. " }
FUNCTION {bst.editor}
{ " ed. " }
FUNCTION {bst.editor.jp}
{ "(編)" }
FUNCTION {bst.edition.pre}
{ ", " }
FUNCTION {bst.edition.post}
{ " edition" }
FUNCTION {bst.edition.pre.jp}
{ ",第" }
FUNCTION {bst.edition.post.jp}
{ "版" }
FUNCTION {bst.volume.pre}
{ ", Vol. " }
FUNCTION {bst.volume.post}
{ "" }
FUNCTION {bst.volume.pre.jp}
{ ",第" }
FUNCTION {bst.volume.post.jp}
{ "巻" }
FUNCTION {bst.number.pre}
{ ", No. " }
FUNCTION {bst.number.post}
{ "" }
FUNCTION {bst.number.pre.jp}
{ ",第" }
FUNCTION {bst.number.post.jp}
{ "号" }
FUNCTION {bst.in}
{ " in " }
FUNCTION {bst.pages.pre}
{ ", pp." }
FUNCTION {bst.page.pre}
{ ", p." }
FUNCTION {bst.pages.post}
{ "" }
FUNCTION {bst.page.post}
{ "" }
FUNCTION {bst.page.pre.jp}
{ "," }
FUNCTION {bst.page.post.jp}
{ "頁" }
FUNCTION {bst.chapter.pre}
{ ", Chap." }
FUNCTION {bst.chapter.post}
{ "" }
FUNCTION {bst.chapter.pre.jp}
{ ",第" }
FUNCTION {bst.chapter.post.jp}
{ "章" }
FUNCTION {bst.month.pre}
{ ", " }
FUNCTION {bst.month.post}
{ "" }
FUNCTION {bst.month.pre.jp}
{ "," }
FUNCTION {bst.month.post.jp}
{ "月" }
FUNCTION {bst.address.pre}
{ ", " }
FUNCTION {bst.address.post}
{ "" }
FUNCTION {bst.address.pre.jp}
{ "," }
FUNCTION {bst.address.post.jp}
{ "" }
FUNCTION {bst.publisher.pre}
{ ": " }
FUNCTION {bst.publisher.post}
{ "" }
FUNCTION {bst.publisher.pre.jp}
{ "," }
FUNCTION {bst.publisher.post.jp}
{ "" }
FUNCTION {bst.series.pre}
{ ", " }
FUNCTION {bst.series.post}
{ "" }
FUNCTION {bst.series.pre.jp}
{ "," }
FUNCTION {bst.series.post.jp}
{ "" }
FUNCTION {bst.organization.pre}
{ ", " }
FUNCTION {bst.organization.post}
{ "" }
FUNCTION {bst.organization.pre.jp}
{ "," }
FUNCTION {bst.organization.post.jp}
{ "" }
FUNCTION {bst.school.pre}
{ ", " }
FUNCTION {bst.school.post}
{ "" }
FUNCTION {bst.school.pre.jp}
{ "," }
FUNCTION {bst.school.post.jp}
{ "" }
FUNCTION {bst.institution.pre}
{ ", " }
FUNCTION {bst.institution.post}
{ "" }
FUNCTION {bst.institution.pre.jp}
{ "," }
FUNCTION {bst.institution.post.jp}
{ "" }
FUNCTION {bst.howpublished.pre}
{ " " }
FUNCTION {bst.howpublished.post}
{ "" }
FUNCTION {bst.howpublished.pre.jp}
{ "," }
FUNCTION {bst.howpublished.post.jp}
{ "" }
FUNCTION {bst.hoyakusho.pre.jp}
{ "(" }
FUNCTION {bst.hoyakusho.post.jp}
{ ")" }
FUNCTION {bst.kuten.jp}
{ "." }
FUNCTION {bst.touten.jp}
{ "," }
FUNCTION {bst.dashify.off}
{ #1 }
FUNCTION {bst.harvarditem.off}
{ #0 }
FUNCTION {bst.thebibliography.begin}
{
"" write$ newline$
"\begin{thebibliography}{xxx}" write$ newline$
"" write$ newline$
}
FUNCTION {bst.thebibliography.end}
{
"" write$ newline$
"\end{thebibliography}" write$ newline$
"" write$ newline$
}
FUNCTION {bst.techrep}
{ " Tech. Rep." }
FUNCTION {bst.techrep.jp}
{ " テクニカル・レポート" }
FUNCTION {bst.mthesis}
{ " Master's thesis" }
FUNCTION {bst.mthesis.jp}
{ "修士論文" }
FUNCTION {bst.phdthesis}
{ " Ph.D. dissertation" }
FUNCTION {bst.phdthesis.jp}
{ "博士論文" }
FUNCTION {bst.first}
{ "1st" }
FUNCTION {bst.second}
{ "2nd" }
FUNCTION {bst.third}
{ "3rd" }
FUNCTION {bst.fourth}
{ "4th" }
FUNCTION {bst.fifth}
{ "5th" }
FUNCTION {bst.st}
{ "st" }
FUNCTION {bst.nd}
{ "nd" }
FUNCTION {bst.rd}
{ "rd" }
FUNCTION {bst.th}
{ "th" }
ENTRY
{ address author booktitle chapter edition editor howpublished
institution journal key month note number organization pages publisher
school series title type volume year yomi
jauthor jkanyaku jtitle jpublisher jyear
order absorder
}
{ is.kanji.entry is.kanji.entry.two order.cited }
{ label cyear flabel alabel extra.label sort.label sort.label.abb
extra.label.bysame }
STRINGS { s t ss tt sss }
STRINGS { year.num }
STRINGS { num.kanji }
STRINGS { preone preten }
STRINGS { last.sort.label next.extra prev.author this.author }
STRINGS { hang }
STRINGS { item.type }
INTEGERS { nameptr namesleft numnames alphabet.in.author name.num }
INTEGERS { bysame.check }
INTEGERS { multiresult }
INTEGERS { index }
INTEGERS { len }
INTEGERS { last.extra.num }
INTEGERS { output.state before.all mid.sentence after.sentence after.block int }
INTEGERS { last.period.comma }
FUNCTION {not}
{ { #0 }
{ #1 }
if$
}
FUNCTION {and}
{ 'skip$
{ pop$ #0 }
if$
}
FUNCTION {or}
{ { pop$ #1 }
'skip$
if$
}
FUNCTION {init.state.consts}
{ #0 'before.all :=
#1 'mid.sentence :=
#2 'after.sentence :=
#3 'after.block :=
}
FUNCTION {add.period.x}
{ duplicate$
#-1 #1 substring$ "," =
{ #-2 global.max$ substring$ "." * }
{ duplicate$
#-1 #2 substring$ ". " =
{ #-3 global.max$ substring$ "." * }
{ duplicate$
#-1 #2 substring$ ". " =
{ #-3 global.max$ substring$ "." * }
{ duplicate$
#-1 #2 substring$ ",'" =
{ #-3 global.max$ substring$ ".'" * }
{ duplicate$
#-1 #2 substring$ ".'" =
{ #-3 global.max$ substring$ ".'" * }
{ duplicate$
#-1 #2 substring$ ".~" =
{ #-3 global.max$ substring$ ".~" * }
{ duplicate$
#-1 #2 substring$ ",~" =
{ #-3 global.max$ substring$ ".~" * }
{ duplicate$
#-1 #3 substring$ ",''" =
{ #-4 global.max$ substring$ ".''" * }
{ duplicate$
#-1 #3 substring$ ".''" =
{ #-4 global.max$ substring$ ".''" * }
{ add.period$ }
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
FUNCTION {add.kanji.period.x}
{
duplicate$
#-1 #1 substring$ "," =
{ #-2 global.max$ substring$ bst.kuten.jp * }
{ duplicate$
#-1 #1 substring$ "、" =
{ #-2 global.max$ substring$ bst.kuten.jp * }
{ duplicate$
#-1 #1 substring$ "." =
{#-2 global.max$ substring$ bst.kuten.jp * }
{#-1 global.max$ substring$ bst.kuten.jp * }
if$
}
if$
}
if$
}
INTEGERS { comma.period.a.p comma.period.b.p }
STRINGS { pc }
FUNCTION {period.comma.a.p}
{ 'pc :=
pc #-1 #1 substring$ "." =
pc #-1 #1 substring$ "," = or
pc #-1 #2 substring$ ". " = or
pc #-1 #2 substring$ ", " = or
pc #-1 #2 substring$ ".'" = or
pc #-1 #2 substring$ ",'" = or
pc #-1 #3 substring$ ".''" = or
pc #-1 #3 substring$ ",''" = or
{ #1 'comma.period.a.p := }
{ #0 'comma.period.a.p := }
if$
}
FUNCTION {period.comma.b.p}
{ 'pc :=
pc #-1 #3 substring$ ".' " =
pc #-1 #3 substring$ ",' " = or
pc #-1 #4 substring$ ".'' " = or
pc #-1 #4 substring$ ",'' " = or
pc #-1 #2 substring$ ".~" = or
pc #-1 #2 substring$ ",~" = or
pc #-1 #1 substring$ "。" = or
pc #-1 #1 substring$ "." = or
{ #1 'comma.period.b.p := }
{ #0 'comma.period.b.p := }
if$
}
FUNCTION {period.comma.p}
{ duplicate$ 't :=
t period.comma.a.p
t period.comma.b.p
comma.period.a.p #1 =
comma.period.b.p #1 = or
{ #1 'last.period.comma := }
{ #0 'last.period.comma := }
if$
}
FUNCTION {remove.pre.comma.period}
{ 's :=
s empty$
{ "" }
{ s #1 #1 substring$ "," =
s #1 #1 substring$ "." = or
{ s #2 global.max$ substring$ }
{ s #1 #2 substring$ "," =
s #1 #2 substring$ "、" = or
s #1 #2 substring$ "。" = or
s #1 #2 substring$ "." = or
{ s #3 global.max$ substring$ }
's
if$
}
if$
}
if$
}
FUNCTION {output.nonnull.nocomma}
{ 's :=
output.state mid.sentence =
{
period.comma.p
write$ }
{ output.state after.block =
{ is.kanji.entry
{ add.kanji.period.x write$}
{ add.period.x " " * write$ }
if$
}
{ output.state before.all =
'write$
{ is.kanji.entry
{ add.kanji.period.x write$ }
{ add.period$ " " * write$ }
if$
}
if$
}
if$
mid.sentence 'output.state :=
}
if$
last.period.comma #0 =
{ s }
{ s remove.pre.comma.period }
if$
}
FUNCTION {output.nocomma}
{ duplicate$ empty$
'pop$
'output.nonnull.nocomma
if$
}
FUNCTION {output.check.nocomma}
{ 't :=
duplicate$ empty$
{ pop$ "empty " t * " in " * cite$ * warning$ }
'output.nonnull.nocomma
if$
}
FUNCTION {fin.entry}
{ is.kanji.entry
{ add.kanji.period.x }
{ add.period.x }
if$
write$
newline$
}
FUNCTION {new.block}
{ output.state before.all =
'skip$
{ after.block 'output.state := }
if$
}
FUNCTION {new.sentence}
{ output.state after.block =
'skip$
{ output.state before.all =
'skip$
{ after.sentence 'output.state := }
if$
}
if$
}
FUNCTION {new.block.check}
{ empty$
'skip$
'new.block
if$
}
FUNCTION {field.or.null}
{ duplicate$ empty$
{ pop$ "" }
'skip$
if$
}
FUNCTION {format.btitle}
{ booktitle empty$
{ "" }
{ booktitle is.kanji.str$
{ bst.btitle.pre.jp booktitle * bst.btitle.post.jp * }
{ bst.btitle.pre booktitle * bst.btitle.post * }
if$
}
if$
}
FUNCTION {format.journal}
{ journal empty$
{ "" }
{ journal is.kanji.str$
{ bst.journal.pre.jp journal * bst.journal.post.jp * }
{ bst.journal.pre journal * bst.journal.post * }
if$
}
if$
}
FUNCTION {format.book}
{ title empty$
{ "" }
{ title is.kanji.str$
{ bst.book.pre.jp title * bst.book.post.jp * }
{ bst.book.pre title * bst.book.post * }
if$
}
if$
}
FUNCTION {set.alphabet.in.author}
{ name.num "{ff}" format.name$ 't :=
#0 'alphabet.in.author :=
"" t =
{ #0 'alphabet.in.author := }
{
t purify$ 't :=
t #1 text.prefix$ 't :=
t is.kanji.str$
{ #0 'alphabet.in.author :=
}
{ #1 'alphabet.in.author :=
}
if$
}
if$
}
FUNCTION {count.number.of.letters}
{ 'sss :=
sss text.length$ #2 =
{ "1" }
{ "0" }
if$
}
FUNCTION {format.names}
{ 's :=
#1 'nameptr :=
s num.names$ 'numnames :=
numnames 'namesleft :=
{ namesleft #0 > }
{ s is.kanji.str$
{ nameptr 'name.num :=
s set.alphabet.in.author
alphabet.in.author #0 =
{ s nameptr "{ff}" format.name$ 'ss :=
s nameptr "{ll}" format.name$ 'tt :=
ss "" =
{ tt 't := }
{ ss count.number.of.letters "1" =
tt count.number.of.letters "1" = or
{ ss bst.sei.mei.one.jp * tt * 't := }
{ ss bst.sei.mei.two.jp * tt * 't := }
if$
}
if$
}
{ nameptr #1 =
{ bst.author.name #0 =
bst.author.name #1 = or
{ s nameptr "{ll}" format.name$ 'ss :=
s nameptr "{ff}" format.name$ 'tt :=
ss bst.touten.jp * tt * 't := }
{ s nameptr "{ff~}{ll}" format.name$ 't := }
if$
}
{ bst.author.name #0 =
bst.author.name #2 = or
{ s nameptr "{ff~}{ll}" format.name$ 't := }
{ s nameptr "{ll}" format.name$ 'ss :=
s nameptr "{ff}" format.name$ 'tt :=
ss bst.touten.jp * tt * 't := }
if$
}
if$
}
if$
}
{ nameptr #1 =
{ bst.author.name #0 =
bst.author.name #1 =
or
{ bst.first.name.initial #0 =
{ s nameptr "{vv~}{ll}{, ff}{, jj}" format.name$ 't := }
{ s nameptr "{vv~}{ll}{, f.}{, jj}" format.name$ 't := }
if$
}
{ bst.first.name.initial #0 =
{ s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't := }
{ s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := }
if$
}
if$
}
{ bst.author.name #0 =
bst.author.name #2 =
or
{ bst.first.name.initial #0 =
{ s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't := }
{ s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := }
if$
}
{ bst.first.name.initial #0 =
{ s nameptr "{vv~}{ll}{, ff}{, jj}" format.name$ 't := }
{ s nameptr "{vv~}{ll}{, f.}{, jj}" format.name$ 't := }
if$
}
if$
}
if$
}
if$
nameptr #1 >
{ namesleft #1 >
{ s is.kanji.str$
{ bst.and.jp * t * }
{ ", " * t * }
if$
}
{ t "others" =
{ s is.kanji.str$
{ bst.and.others.jp * }
{ bst.and.others * }
if$
}
{ s is.kanji.str$
{ bst.and.jp * t * }
{ numnames #2 =
{ bst.and * t * }
{ bst.ands * t * }
if$
}
if$
}
if$
}
if$
}
't
if$
nameptr #1 + 'nameptr :=
namesleft #1 - 'namesleft :=
}
while$
}
FUNCTION {format.authors}
{ author empty$
{ "" }
{ extra.label.bysame "bysame" =
{"\bysame "}
{ author is.kanji.str$
{ bst.author.pre.jp author format.names * bst.author.post.jp * }
{ bst.author.pre author format.names * bst.author.post * }
if$
}
if$
}
if$
}
FUNCTION {format.editors}
{ editor empty$
{ "" }
{ extra.label.bysame "bysame" =
{ #1 'bysame.check :=
"\bysame " }
{ editor is.kanji.str$
{ bst.author.pre.jp editor format.names * }
{ bst.author.pre editor format.names * bst.author.post * }
if$
}
if$
#1 bysame.check =
{ "" * }
{ editor num.names$ #1 >
{ editor is.kanji.str$
{ bst.editor.jp * }
{ bst.editors * }
if$
}
{ editor is.kanji.str$
{ bst.editor.jp * }
{ bst.editor * }
if$
}
if$
}
if$
}
if$
}
FUNCTION {format.editors.x}
{ editor empty$
{ "" }
{ editor format.names
editor num.names$ #1 >
{ editor is.kanji.str$
{ bst.editor.jp * }
{ bst.editors * }
if$
}
{ editor is.kanji.str$
{ bst.editor.jp * }
{ bst.editor * }
if$
}
if$
}
if$
}
FUNCTION {remove.irrelevant.period.comma}
{ 's :=
s empty$
{ "" }
{ s #-1 #3 substring$ "?,'" =
s #-1 #3 substring$ "?.'" = or
{ s #-3 global.max$ substring$ "'" * }
{ s #-1 #4 substring$ "?,''" =
s #-1 #4 substring$ "?.''" = or
{ s #-4 global.max$ substring$ "''" * }
{ s #-1 #2 substring$ "?," =
s #-1 #2 substring$ "?." = or
{ s #-2 global.max$ substring$ "" * }
{ s #-1 #3 substring$ "?,~" =
s #-1 #3 substring$ "?.~" = or
{ s #-4 global.max$ substring$ "?~" * }
{ s #-1 #3 substring$ "?, " =
s #-1 #3 substring$ "?. " = or
{ s #-4 global.max$ substring$ "? " * }
's
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
FUNCTION {remove.irrelevant.kutoten}
{ 's :=
s empty$
{ "" * }
{ s #-1 #1 substring$ "、" =
s #-1 #1 substring$ "," = or
s #-1 #1 substring$ "。" = or
s #-1 #1 substring$ "." = or
{ s #-2 global.max$ substring$ "" * }
{ s }
if$
}
if$
}
FUNCTION {format.title.sub}
{ bst.title.lower.case #0 =
{ bst.title.pre title * bst.title.post * }
{ bst.title.pre title "t" change.case$ * bst.title.post * }
if$
}
FUNCTION {format.title}
{ title empty$
bst.hide.title #0 = not or
{ "" }
{ title is.kanji.str$
{ bst.title.pre.jp title * bst.title.post.jp * }
{ format.title.sub remove.irrelevant.period.comma }
if$
}
if$
}
FUNCTION {format.jtitle}
{ jtitle empty$
{ "" }
{ bst.book.pre.jp jtitle * bst.book.post.jp * }
if$
}
FUNCTION {format.misc.title}
{ title empty$
{ "" }
{ title is.kanji.str$
{ bst.title.pre.jp title * bst.title.post.jp * }
{ bst.title.pre title * bst.title.post * }
if$
}
if$
}
FUNCTION {n.dashify}
{ 't :=
""
{ t empty$ not }
{ t #1 #1 substring$ "-" =
{ t #1 #2 substring$ "--" = not
{ bst.dashify.off
{ "-" * }
{ "--" * }
if$
t #2 global.max$ substring$ 't :=
}
{ { t #1 #1 substring$ "-" = }
{ "-" *
t #2 global.max$ substring$ 't :=
}
while$
}
if$
}
{ t #1 #1 substring$ is.kanji.str$
{ t #1 #2 substring$ *
t #3 global.max$ substring$ 't :=
}
{ t #1 #1 substring$ *
t #2 global.max$ substring$ 't :=
}
if$
}
if$
}
while$
}
FUNCTION {convert.num.kanji}
{ 's :=
s "1" =
{ "一" }
{ s "2" =
{ "二" }
{ s "3" =
{ "三" }
{ s "4" =
{ "四" }
{ s "5" =
{ "五" }
{ s "6" =
{ "六" }
{ s "7" =
{ "七" }
{ s "8" =
{ "八" }
{ s "9" =
{ "九" }
{ s "0" =
{ "〇" }
{ s "-" =
{ "\tatebo{}" }
{ s }
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
FUNCTION {convert.alphabet.zenkaku}
{ 's :=
s "a" =
{ "a" }
{ s "b" =
{ "b" }
{ s "c" =
{ "c" }
{ s "d" =
{ "d" }
{ s "e" =
{ "e" }
{ s "f" =
{ "f" }
{ s "g" =
{ "g" }
{ s "h" =
{ "h" }
{ s "i" =
{ "i" }
{ s "j" =
{ "j" }
{ s }
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
FUNCTION{convert.year.kanji}
{ 't :=
bst.kansuji.jp #0 = not t is.kanji.str$ not and
{ "" 'tt :=
{ t empty$ not }
{ tt t #1 #1 substring$ convert.num.kanji convert.alphabet.zenkaku * 'tt :=
t #2 global.max$ substring$ 't := }
while$
}
{ t 'tt := }
if$
tt
}
FUNCTION{convert.num}
{ 't :=
bst.kansuji.jp #0 = t is.kanji.str$ or
{ t 'tt := }
{ "" 'tt :=
{ t empty$ not }
{ t #1 #1 substring$ convert.num.kanji 'ss :=
tt ss * 'tt :=
t #2 global.max$ substring$ 't :=
}
while$
}
if$
tt
}
STRINGS { da db dc dd }
FUNCTION {remove.duplicate.dash}
{ 'da :=
"" 'db :=
"" 'dc :=
"" 'dd :=
{ da empty$ not }
{ da #1 #1 substring$ 'db :=
db "-" = dc "-" = and
'skip$
{ dd db * 'dd := }
if$
db 'dc :=
da #2 global.max$ substring$ 'da :=
}
while$
dd
}
FUNCTION{convert.num.pages}
{ 't :=
bst.kansuji.jp #0 = t is.kanji.str$ or
{ t 'tt := }
{ "" 'tt :=
t remove.duplicate.dash 't :=
{ t empty$ not }
{ t #1 #1 substring$ convert.num.kanji 'ss :=
tt ss * 'tt :=
t #2 global.max$ substring$ 't :=
}
while$
}
if$
tt
}
FUNCTION {format.year}
{ year empty$
{ "there's no year in " cite$ * warning$
"" }
{ is.kanji.entry
{ bst.kansuji.jp #0 =
{ bst.year.pre.jp year * extra.label * bst.year.post.jp * }
{ bst.year.pre.jp year convert.year.kanji *
extra.label convert.alphabet.zenkaku * bst.year.post.jp * }
if$
}
{ bst.year.pre year * extra.label * bst.year.post * }
if$
}
if$
}
FUNCTION {format.book.pages}
{ pages empty$
{ "" }
{ is.kanji.entry
{ bst.page.pre.jp pages convert.num.pages * bst.page.post.jp * }
{ bst.pages.pre pages * bst.pages.post * }
if$
}
if$
}
FUNCTION {tie.or.space.connect}
{ duplicate$ text.length$ #3 <
{ "~" }
{ " " }
if$
swap$ * *
}
FUNCTION {either.or.check}
{ empty$
'pop$
{ "can't use both " swap$ * " fields in " * cite$ * warning$ }
if$
}
FUNCTION {format.bvolume}
{ volume empty$
{ "" }
{ is.kanji.entry
{ bst.volume.pre.jp volume convert.num * bst.volume.post.jp * }
{ bst.volume.pre volume * bst.volume.post * }
if$
series empty$
'skip$
{ is.kanji.entry
{ bst.series.pre.jp * series convert.num * bst.series.post.jp * }
{ " of " * series * bst.series.post * }
if$
}
if$
}
if$
}
FUNCTION {output.series}
{ series empty$
{ "" }
{ is.kanji.entry
{ bst.series.pre.jp series convert.num * bst.series.post.jp * }
{ bst.series.pre series * bst.series.post * }
if$
}
if$
}
FUNCTION {format.number.series}
{ volume empty$
{ number empty$
bst.hide.number #0 = not or
{ series empty$
{ "" }
{ output.series }
if$
}
{ series empty$
{ is.kanji.entry
{ bst.number.pre.jp number convert.num * bst.number.post.jp * }
{ bst.number.pre number * bst.number.post * }
if$
}
{ is.kanji.entry
{ bst.series.pre.jp series convert.num * bst.series.post.jp *
bst.number.pre.jp * number convert.num * bst.number.post.jp * }
{ bst.in bst.series.pre * series * bst.series.post *
bst.number.pre * number * bst.number.post * }
if$
}
if$
}
if$
}
{ "" }
if$
}
FUNCTION {is.num}
{ chr.to.int$
duplicate$ "0" chr.to.int$ < not
swap$ "9" chr.to.int$ > not and
}
FUNCTION {extract.num}
{ duplicate$ 't :=
"" 's :=
{ t empty$ not }
{ t #1 #1 substring$
t #2 global.max$ substring$ 't :=
duplicate$ is.num
{ s swap$ * 's := }
{ pop$ "" 't := }
if$
}
while$
s empty$
'skip$
{ pop$ s }
if$
}
FUNCTION {eng.ord}
{ duplicate$ "1" swap$ *
#-2 #1 substring$ "1" =
{ bst.th * }
{ duplicate$ #-1 #1 substring$
duplicate$ "1" =
{ pop$ bst.st * }
{ duplicate$ "2" =
{ pop$ bst.nd * }
{ "3" =
{ bst.rd * }
{ bst.th * }
if$
}
if$
}
if$
}
if$
}
FUNCTION {convert.edition}
{ edition extract.num "l" change.case$ 's :=
s "first" = s "1" = or
{ bst.first }
{ s "second" = s "2" = or
{ bst.second }
{ s "third" = s "3" = or
{ bst.third }
{ s "fourth" = s "4" = or
{ bst.fourth }
{ s "fifth" = s "5" = or
{ bst.fifth }
{ s #1 #1 substring$ is.num
{ s eng.ord }
{ edition }
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
FUNCTION {convert.month}
{ 't :=
t "January" =
{ "1" }
{ t "February" =
{ "2" }
{ t "March" =
{ "3" }
{ t "April" =
{ "4" }
{ t "May" =
{ "5" }
{ t "June" =
{ "6" }
{ t "July" =
{ "7" }
{ t "August" =
{ "8" }
{ t "September" =
{ "9" }
{ t "October" =
{ "10" }
{ t "November" =
{ "11" }
{ t "December" =
{ "12" }
't
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
FUNCTION {format.edition}
{ edition empty$
{ "" }
{ is.kanji.entry
{ bst.edition.pre.jp edition convert.num * bst.edition.post.jp * }
{ output.state mid.sentence =
{ bst.edition.pre convert.edition "l" change.case$ * bst.edition.post * }
{ bst.edition.pre convert.edition "t" change.case$ * bst.edition.post * }
if$
}
if$
}
if$
}
FUNCTION {format.month}
{ month empty$
bst.hide.month #0 = not or
{ "" }
{ is.kanji.entry
{ bst.month.pre.jp month convert.month convert.num * bst.month.post.jp * }
{ bst.month.pre month * bst.month.post * }
if$
}
if$
}
FUNCTION {format.date}
{ is.kanji.entry
{ format.year format.month * }
{ format.month format.year * }
if$
}
FUNCTION { multi.page.check }
{ 't :=
#0 'multiresult :=
{ multiresult not
t empty$ not
and
}
{ t #1 #1 substring$
duplicate$ "-" =
swap$ duplicate$ "," =
swap$ "+" =
or or
{ #1 'multiresult := }
{ t #2 global.max$ substring$ 't := }
if$
}
while$
multiresult
}
FUNCTION {format.pages}
{ pages empty$
{ "" }
{ is.kanji.entry
{ pages multi.page.check
{ bst.page.pre.jp pages n.dashify convert.num.pages * bst.page.post.jp * }
{ bst.page.pre.jp pages convert.num.pages * bst.page.post.jp * }
if$
}
{ pages multi.page.check
{ bst.pages.pre pages n.dashify tie.or.space.connect * bst.pages.post }
{ bst.page.pre pages tie.or.space.connect * bst.page.post }
if$
}
if$
}
if$
}
FUNCTION {format.number}
{ number empty$
bst.hide.number #0 = not or
{ "" }
{ is.kanji.entry
{ bst.number.pre.jp number convert.num * bst.number.post.jp * }
{ bst.number.pre number * bst.number.post * }
if$
}
if$
}
FUNCTION {format.volume}
{ volume empty$
'skip$
{ is.kanji.entry
{ bst.volume.pre.jp volume convert.num * bst.volume.post.jp * }
{ bst.volume.pre volume * bst.volume.post * }
if$
}
if$
}
FUNCTION {format.number.pages}
{ format.number format.pages * }
FUNCTION {format.volume.pages}
{ format.volume format.pages * }
FUNCTION {format.volume.number.pages}
{ format.volume format.number * format.pages * }
FUNCTION {format.vol.num.pages}
{ volume empty$
{ number empty$
{ pages empty$
{ "there is no volume, number, and pages in " cite$ * warning$ "" }
{ "" format.pages * }
if$
}
{ "there's a number but no volume in " cite$ * warning$
format.number.pages }
if$
}
{ number empty$
{ format.volume.pages }
{ format.volume.number.pages }
if$
}
if$
}
FUNCTION {format.chapter}
{ chapter empty$
{ "" }
{ type empty$
{ is.kanji.entry
{ bst.chapter.pre.jp chapter convert.num * bst.chapter.post.jp * }
{ bst.chapter.pre chapter tie.or.space.connect * bst.chapter.post }
if$
}
{ is.kanji.entry
{ bst.touten.jp * type " " * chapter convert.num * }
{ ", " * type " " * chapter * }
if$
}
if$
}
if$
}
FUNCTION {format.chapter.pages}
{ chapter empty$
{ pages empty$
{ "" }
{ "" format.pages * }
if$
}
{ pages empty$
{ "" format.chapter * }
{ "" format.chapter * format.pages * }
if$
}
if$
}
FUNCTION {format.in.ed.booktitle}
{ booktitle empty$
{ "" }
{ editor empty$
{ is.kanji.entry
{ format.btitle remove.pre.comma.period }
{ bst.in format.btitle * }
if$
}
{ is.kanji.entry
{ format.editors.x "" * format.btitle * }
{ bst.in format.editors.x * " " * format.btitle * }
if$
}
if$
}
if$
}
FUNCTION {format.howpublished}
{ howpublished empty$
{ "" }
{ is.kanji.entry
{ bst.howpublished.pre.jp howpublished * bst.howpublished.post.jp * }
{ bst.howpublished.pre howpublished * bst.howpublished.post * }
if$
}
if$
}
FUNCTION {format.address}
{ address empty$
{ "" }
{ address is.kanji.str$
{ bst.address.pre.jp address * bst.address.post.jp * }
{ bst.address.pre address * bst.address.post * }
if$
}
if$
}
FUNCTION {format.publisher}
{ publisher empty$
{ "" }
{ is.kanji.entry
{ bst.publisher.pre.jp publisher * bst.publisher.post.jp * }
{ bst.publisher.pre publisher * bst.publisher.post * }
if$
}
if$
}
FUNCTION {format.organization}
{ organization empty$
{ "" }
{ is.kanji.entry
{ bst.organization.pre.jp organization * bst.organization.post.jp * }
{ bst.organization.pre organization * bst.organization.post * }
if$
}
if$
}
FUNCTION {output.publisher.address}
{ address empty$
{ format.publisher "publisher" output.check.nocomma }
{ is.kanji.entry
{ format.publisher "publisher" output.check.nocomma
format.address output.nocomma }
{ format.address output.nocomma
format.publisher "publisher" output.check.nocomma }
if$
}
if$
}
FUNCTION {output.address.organization.publisher}
{ address empty$
{ organization empty$
{ publisher empty$
'skip$
{ format.publisher "publisher" output.check.nocomma }
if$
}
{ publisher empty$
{ format.organization "organization" output.check.nocomma }
{ format.organization "organization" output.check.nocomma
format.publisher "publisher" output.check.nocomma }
if$
}
if$
}
{ organization empty$
{ publisher empty$
{ format.address output.nocomma }
{ is.kanji.entry
{ format.publisher "publisher" output.check.nocomma
format.address output.nocomma }
{ format.address output.nocomma
format.publisher "publisher" output.check.nocomma }
if$
}
if$
}
{ publisher empty$
{ format.organization "organization" output.check.nocomma
format.address output.nocomma }
{ is.kanji.entry
{ format.organization "organization" output.check.nocomma
format.publisher "publisher" output.check.nocomma
format.address output.nocomma }
{ format.organization "organization" output.check.nocomma
format.address output.nocomma
format.publisher "publisher" output.check.nocomma }
if$
}
if$
}
if$
}
if$
}
FUNCTION {empty.misc.check}
{ author empty$ title empty$ howpublished empty$
month empty$ year empty$ note empty$
and and and and and
key empty$ not and
{ "all relevant fields are empty in " cite$ * warning$ }
'skip$
if$
}
FUNCTION {format.thesis.type}
{ type empty$
'skip$
{ pop$ " " type * }
if$
}
FUNCTION {format.tr.number}
{ type empty$
{ "Technical Report" }
{ " " type * }
if$
number empty$
{ "t" change.case$ }
{ number tie.or.space.connect }
if$
}
FUNCTION {format.phd}
{ is.kanji.entry
{ bst.phdthesis.jp }
{ bst.phdthesis }
if$
}
FUNCTION {format.mthesis}
{ is.kanji.entry
{ bst.mthesis.jp }
{ bst.mthesis }
if$
}
FUNCTION {format.school}
{ school empty$
{ "" }
{ is.kanji.entry
{ bst.school.pre.jp school * bst.school.post.jp * }
{ bst.school.pre school * bst.school.post * }
if$
}
if$
}
FUNCTION {format.institution}
{ institution empty$
{ "" }
{ is.kanji.entry
{ bst.institution.pre.jp institution * bst.institution.post.jp * }
{ bst.institution.pre institution * bst.institution.post * }
if$
}
if$
}
FUNCTION {format.hoyakusho}
{ jauthor empty$
jkanyaku empty$
jtitle empty$
jpublisher empty$
jyear empty$
and and and and
{ "" }
{
is.kanji.entry
{ bst.touten.jp * }
{ ", " * }
if$
jauthor empty$
{ jkanyaku empty$
{ "" }
{ jkanyaku format.names "監訳" * }
if$
}
{ jauthor format.names "訳" *
jkanyaku empty$
{ "" * }
{ bst.touten.jp * jkanyaku format.names * "監訳" * }
if$
}
if$
jtitle empty$
{ "" * }
{ bst.touten.jp * format.jtitle * bst.touten.jp * }
if$
jpublisher empty$
{ "" * }
{ jpublisher * bst.touten.jp * }
if$
jyear empty$
{ "" * }
{ "" * jyear convert.year.kanji * "年" * }
if$
remove.irrelevant.kutoten
bst.hoyakusho.pre.jp swap$ * bst.hoyakusho.post.jp *
}
if$
}
FUNCTION {output.number.index}
{
bst.use.number.index #0 =
'skip$
{ index #1 + 'index :=
"" 'preone :=
"" 'preten :=
bst.number.index.digit "1" =
'skip$
{ bst.number.index.digit "2" =
{ "\hskip0.5em" 'preone := }
{ bst.number.index.digit "3" =
{ "\hskip1em" 'preone :=
"\hskip0.5em" 'preten := }
'skip$
if$
}
if$
}
if$
}
if$
newline$
""
bst.use.number.index #0 =
'skip$
{ index #10 <
{ preone }
{ index #100 <
{ preten }
{ "" }
if$
}
if$
bst.number.index.pre * index int.to.str$ * bst.number.index.post * write$
}
if$
}
FUNCTION {output.bibitem}
{ bst.harvarditem.off
{ before.all 'output.state :=
"" }
{ newline$
"\harvarditem[" write$
alabel write$
"]{" write$
flabel write$
"}{" write$
is.kanji.entry
{ cyear convert.year.kanji write$ }
{ cyear write$ }
if$
"}{" write$
cite$ write$
"}" write$
before.all 'output.state :=
output.number.index
}
if$
}
FUNCTION {test}
{
output.bibitem
author output.nocomma
year output.nocomma
fin.entry
}
FUNCTION {article}
{ output.bibitem
format.authors "author" output.check.nocomma
bst.year.backward #0 =
{ format.year "year" output.check.nocomma }
'skip$
if$
format.title "title" output.check.nocomma
format.journal "journal" output.check.nocomma
format.vol.num.pages output.nocomma
bst.year.backward #0 =
{ format.month output.nocomma }
{ format.date output.nocomma }
if$
new.block
note output.nocomma
fin.entry
}
FUNCTION {book}
{ output.bibitem
author empty$
{ format.editors "author and editor" output.check.nocomma }
{ format.authors output.nonnull.nocomma
"author and editor" editor either.or.check
}
if$
bst.year.backward #0 =
{ format.year "year" output.check.nocomma }
'skip$
if$
format.book "title" output.check.nocomma
format.bvolume output.nocomma
format.number.series output.nocomma
output.publisher.address
format.edition output.nocomma
format.book.pages output.nocomma
bst.year.backward #0 =
'skip$
{ format.year "year" output.check.nocomma }
if$
format.hoyakusho output.nocomma
new.block
note output.nocomma
fin.entry
}
FUNCTION {booklet}
{ output.bibitem
format.authors output.nocomma
format.year output.nocomma
format.misc.title "title" output.check.nocomma
format.howpublished output.nocomma
format.address output.nocomma
new.block
note output.nocomma
fin.entry
}
FUNCTION {inbook}
{ output.bibitem
author empty$
{ format.editors "author and editor" output.check.nocomma }
{ format.authors output.nonnull.nocomma
"author and editor" editor either.or.check
}
if$
bst.year.backward #0 =
{ format.year "year" output.check.nocomma }
'skip$
if$
format.book "title" output.check.nocomma
format.edition output.nocomma
format.bvolume output.nocomma
format.chapter.pages "chapter and pages" output.check.nocomma
format.number.series output.nocomma
output.publisher.address
bst.year.backward #0 =
'skip$
{ format.year "year" output.check.nocomma }
if$
new.block
note output.nocomma
fin.entry
}
FUNCTION {incollection}
{ output.bibitem
format.authors "author" output.check.nocomma
bst.year.backward #0 =
{ format.year "year" output.check.nocomma }
'skip$
if$
format.title "title" output.check.nocomma
format.in.ed.booktitle "booktitle" output.check.nocomma
format.bvolume output.nocomma
output.address.organization.publisher
format.edition output.nocomma
format.chapter.pages output.nocomma
bst.year.backward #0 =
'skip$
{ format.year "year" output.check.nocomma }
if$
new.block
note output.nocomma
fin.entry
}
FUNCTION {inproceedings}
{ output.bibitem
format.authors "author" output.check.nocomma
bst.year.backward #0 =
{ format.year "year" output.check.nocomma }
'skip$
if$
format.title "title" output.check.nocomma
format.in.ed.booktitle "booktitle" output.check.nocomma
format.bvolume output.nocomma
format.number.series output.nocomma
format.pages output.nocomma
output.address.organization.publisher
bst.year.backward #0 =
{ format.month output.nocomma }
{ format.date output.nocomma }
if$
new.block
note output.nocomma
fin.entry
}
FUNCTION {conference}
{ inproceedings }
FUNCTION {manual}
{ output.bibitem
author empty$
{ organization empty$
'skip$
{ organization output.nonnull.nocomma
address output.nocomma
}
if$
}
{ format.authors output.nonnull.nocomma }
if$
bst.year.backward #0 =
{ format.year "year" output.check.nocomma }
'skip$
if$
format.book "title" output.check.nocomma
author empty$
{ organization empty$
{ format.address new.block.check
format.address output.nocomma
}
'skip$
if$
}
{ output.address.organization.publisher }
if$
format.edition output.nocomma
bst.year.backward #0 =
'skip$
{ format.year "year" output.check.nocomma }
if$
new.block
note output.nocomma
fin.entry
}
FUNCTION {mastersthesis}
{ output.bibitem
format.authors "author" output.check.nocomma
bst.year.backward #0 =
{ format.year "year" output.check.nocomma }
'skip$
if$
format.title "title" output.check.nocomma
format.mthesis format.thesis.type output.nonnull.nocomma
format.school "school" output.check.nocomma
format.address output.nocomma
bst.year.backward #0 =
'skip$
{ format.year "year" output.check.nocomma }
if$
new.block
note output.nocomma
fin.entry
}
FUNCTION {misc}
{ output.bibitem
format.authors "author" output.check.nocomma
bst.year.backward #0 =
{ format.year "year" output.check.nocomma }
'skip$
if$
format.misc.title output.nocomma
format.howpublished output.nocomma
remove.irrelevant.kutoten
bst.year.backward #0 =
{ format.month output.nocomma }
{ format.date output.nocomma }
if$
new.block
note output.nocomma
fin.entry
empty.misc.check
}
FUNCTION {phdthesis}
{ output.bibitem
format.authors "author" output.check.nocomma
bst.year.backward #0 =
{ format.year "year" output.check.nocomma }
'skip$
if$
format.title "title" output.check.nocomma
format.phd
format.thesis.type output.nonnull.nocomma
format.school "school" output.check.nocomma
address empty$
'skip$
{ format.address output.nocomma }
if$
bst.year.backward #0 =
'skip$
{ format.year "year" output.check.nocomma }
if$
new.block
note output.nocomma
fin.entry
}
FUNCTION {proceedings}
{ output.bibitem
editor empty$
{ organization output.nocomma }
{ format.editors output.nonnull.nocomma }
if$
bst.year.backward #0 =
{ format.year "year" output.check.nocomma }
'skip$
if$
format.btitle remove.pre.comma.period "title" output.check.nocomma
format.bvolume output.nocomma
format.number.series output.nocomma
output.address.organization.publisher
bst.year.backward #0 =
'skip$
{ format.year "year" output.check.nocomma }
if$
new.block
note output.nocomma
fin.entry
}
FUNCTION {techreport}
{ output.bibitem
format.authors "author" output.check.nocomma
bst.year.backward #0 =
{ format.year "year" output.check.nocomma }
'skip$
if$
format.title "title" output.check.nocomma
format.tr.number output.nonnull.nocomma
format.institution "institution" output.check.nocomma
format.address output.nocomma
format.chapter.pages output.nocomma
bst.year.backward #0 =
'skip$
{ format.year "year" output.check.nocomma }
if$
new.block
note output.nocomma
fin.entry
}
FUNCTION {unpublished}
{ output.bibitem
format.authors "author" output.check.nocomma
bst.year.backward #0 =
{ format.year "year" output.check.nocomma }
'skip$
if$
format.title "title" output.check.nocomma
bst.year.backward #0 =
{ format.month remove.pre.comma.period output.nocomma }
{ format.date remove.pre.comma.period output.nocomma }
if$
new.block
note "note" output.check.nocomma
fin.entry
}
FUNCTION {default.type}
{ misc }
MACRO {jan} {"January"}
MACRO {feb} {"February"}
MACRO {mar} {"March"}
MACRO {apr} {"April"}
MACRO {may} {"May"}
MACRO {jun} {"June"}
MACRO {jul} {"July"}
MACRO {aug} {"August"}
MACRO {sep} {"September"}
MACRO {oct} {"October"}
MACRO {nov} {"November"}
MACRO {dec} {"December"}
READ
FUNCTION {set.is.kanji.entry}
{
author field.or.null is.kanji.str$
title field.or.null is.kanji.str$ or
editor field.or.null is.kanji.str$ or
journal field.or.null is.kanji.str$ or
booktitle field.or.null is.kanji.str$ or
series field.or.null is.kanji.str$ or
'is.kanji.entry :=
}
FUNCTION {set.is.kanji.entry.two}
{
author field.or.null is.kanji.str$
title field.or.null is.kanji.str$ or
editor field.or.null is.kanji.str$ or
journal field.or.null is.kanji.str$ or
booktitle field.or.null is.kanji.str$ or
series field.or.null is.kanji.str$ or
yomi field.or.null is.kanji.str$ or
'is.kanji.entry.two :=
}
ITERATE {set.is.kanji.entry}
ITERATE {set.is.kanji.entry.two}
INTEGERS { order.num }
FUNCTION {initialize.order.num}
{
#1 'order.num :=
}
EXECUTE {initialize.order.num}
FUNCTION {set.order.cited}
{
order.num 'order.cited :=
#1 order.num + 'order.num :=
}
ITERATE {set.order.cited}
FUNCTION {sortify}
{ purify$ "l" change.case$ }
FUNCTION {chop.word}
{ 's :=
'len :=
s #1 len substring$ =
{ s len #1 + global.max$ substring$ }
's
if$
}
FUNCTION {sort.format.names}
{ 's :=
yomi empty$
'skip$
{ yomi 's := }
if$
#1 'nameptr :=
""
s num.names$ 'numnames :=
numnames 'namesleft :=
{ namesleft #0 > }
{ nameptr #1 >
{ ", " * }
'skip$
if$
s is.kanji.str$
{ s nameptr "{ff }{ll}" format.name$ 't := }
{ s nameptr "{ll}{ ff}{ jj}" format.name$ 't := }
if$
nameptr numnames = t "others" = and
{ s is.kanji.str$
{ bst.and.others.jp * }
{ bst.and.others *}
if$
}
{ t sortify * }
if$
nameptr #1 + 'nameptr :=
namesleft #1 - 'namesleft :=
}
while$
}
FUNCTION {sort.format.names.abb}
{ 's :=
yomi empty$
'skip$
{ yomi 's := }
if$
s num.names$ 'numnames :=
numnames bst.and.others.num <
{ s sort.format.names }
{ s is.kanji.str$
{ s #1 "{ff }{ll}" format.name$ " et al. " * }
{ s #1 "{ll}{ ff}{ jj}" format.name$ " et al. " * }
if$
}
if$
}
FUNCTION {format.lab.names.full}
{ 's :=
#1 'nameptr :=
s num.names$ 'numnames :=
numnames 'namesleft :=
{ namesleft #0 > }
{ s is.kanji.str$
{ nameptr 'name.num :=
s set.alphabet.in.author
alphabet.in.author #0 =
{ s nameptr "{ff}" format.name$ 't :=
t empty$
{ s #1 "{ll}" format.name$ 't := }
'skip$
if$
}
{ s nameptr "{ll}" format.name$ 't :=
t empty$
{ s #1 "{ff}" format.name$ 't := }
'skip$
if$
}
if$
nameptr #1 >
{ namesleft #1 >
{ bst.cite.and.jp * t * }
{ t "others" =
{ bst.and.others.jp * }
{ bst.cite.and.jp * t * }
if$
}
if$
}
't
if$
nameptr #1 + 'nameptr :=
namesleft #1 - 'namesleft :=
}
{ s nameptr "{vv~}{ll}" format.name$ 't :=
nameptr #1 >
{ namesleft #1 >
{ ", " * t * }
{ t "others" =
{ bst.and.others * }
{ numnames #2 >
{ bst.cite.ands * t * }
{ bst.cite.and * t * }
if$
}
if$
}
if$
}
't
if$
nameptr #1 + 'nameptr :=
namesleft #1 - 'namesleft :=
}
if$
}
while$
numnames #1 > #1 #2 = and {", eds" *} {} if$
numnames #1 = #1 #2 = and {", ed" *} {} if$
}
FUNCTION {format.lab.names.abb}
{ 's :=
s num.names$ 'numnames :=
numnames bst.and.others.num <
{ s format.lab.names.full }
{ s is.kanji.str$
{ #1 'name.num :=
s set.alphabet.in.author
alphabet.in.author #0 =
{ s #1 "{ff}" format.name$ 't :=
t empty$
{ s #1 "{ll}" format.name$ }
{ s #1 "{ff}" format.name$ }
if$
bst.and.others.jp * }
{ s #1 "{ll}" format.name$ 't :=
t empty$
{ s #1 "{ff}" format.name$ }
{ s #1 "{ll}" format.name$ }
if$
bst.and.others.jp * }
if$
}
{ s #1 "{ll}" format.name$ bst.and.others * }
if$
}
if$
}
FUNCTION {author.key.label.abb}
{ author empty$
{ key empty$
{ cite$ #1 #3 substring$ }
{ key #3 text.prefix$ }
if$
}
{ author format.lab.names.abb }
if$
}
FUNCTION {author.key.label.full}
{ author empty$
{ key empty$
{ cite$ #1 #3 substring$ }
{ key #3 text.prefix$ }
if$
}
{ author format.lab.names.full }
if$
}
FUNCTION {author.key.label.sort}
{ author empty$
{ key empty$
{ cite$ #1 #3 substring$ }
{ key #3 text.prefix$ }
if$
}
{ author sort.format.names }
if$
}
FUNCTION {author.editor.key.label.sort}
{ author empty$
{ editor empty$
{ key empty$
{ cite$ #1 #3 substring$ }
{ key #3 text.prefix$ }
if$
}
{ yomi empty$
{ editor sort.format.names }
{ bst.mixed.order #0 =
{ editor sort.format.names }
{ yomi sort.format.names }
if$
}
if$
}
if$
}
{ yomi empty$
{ author sort.format.names }
{ bst.mixed.order #0 =
{ author sort.format.names }
{ yomi sort.format.names }
if$
}
if$
}
if$
}
FUNCTION {author.editor.key.label.abb}
{ author empty$
{ editor empty$
{ key empty$
{ cite$ #1 #3 substring$ }
{ key #3 text.prefix$ }
if$
}
{ editor format.lab.names.abb }
if$
}
{ author format.lab.names.abb }
if$
}
FUNCTION {author.editor.key.label.full}
{ author empty$
{ editor empty$
{ key empty$
{ cite$ #1 #3 substring$ }
{ key #3 text.prefix$ }
if$
}
{ editor format.lab.names.full }
if$
}
{ author format.lab.names.full }
if$
}
FUNCTION {author.key.organization.label.full}
{ author empty$
{ key empty$
{ organization empty$
{ cite$ #1 #3 substring$ }
{ "The " #4 organization chop.word #3 text.prefix$ }
if$
}
{ key #3 text.prefix$ }
if$
}
{ author format.lab.names.full }
if$
}
FUNCTION {author.key.organization.label.abb}
{ author empty$
{ key empty$
{ organization empty$
{ cite$ #1 #3 substring$ }
{ "The " #4 organization chop.word #3 text.prefix$ }
if$
}
{ key #3 text.prefix$ }
if$
}
{ author format.lab.names.abb }
if$
}
FUNCTION {editor.key.organization.label.full}
{ editor empty$
{ key empty$
{ organization empty$
{ cite$ #1 #3 substring$ }
{ "The " #4 organization chop.word #3 text.prefix$ }
if$
}
{ key #3 text.prefix$ }
if$
}
{ editor format.lab.names.full }
if$
}
FUNCTION {editor.key.organization.label.abb}
{ editor empty$
{ key empty$
{ organization empty$
{ cite$ #1 #3 substring$ }
{ "The " #4 organization chop.word #3 text.prefix$ }
if$
}
{ key #3 text.prefix$ }
if$
}
{ editor format.lab.names.abb }
if$
}
FUNCTION {reverse.num}
{ 's :=
s "1" =
{ "8" 'year.num := }
{ s "2" =
{ "7" 'year.num := }
{ s "3" =
{ "6" 'year.num := }
{ s "4" =
{ "5" 'year.num := }
{ s "5" =
{ "4" 'year.num := }
{ s "6" =
{ "3" 'year.num := }
{ s "7" =
{ "2" 'year.num := }
{ s "8" =
{ "1" 'year.num := }
{ s "9" =
{ "0" 'year.num := }
{ s "0" =
{ "9" 'year.num := }
{ "9" 'year.num := }
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
if$
year.num
}
FUNCTION {convert.year}
{ 't :=
bst.reverse.year #0 =
{ t 'tt := }
{ t #1 #1 substring$ reverse.num
t #2 #1 substring$ reverse.num *
t #3 #1 substring$ reverse.num *
t #4 #1 substring$ reverse.num * 'tt := }
if$
tt
}
FUNCTION {calc.cyear}
{ type$ "book" =
type$ "inbook" =
or
'author.editor.key.label.sort
{ type$ "proceedings" =
'editor.key.organization.label.full
{ type$ "manual" =
'author.key.organization.label.full
'author.key.label.sort
if$
}
if$
}
if$
duplicate$
year 'cyear :=
" " year convert.year * field.or.null *
sortify 'sort.label :=
jecon.debug #0 = not
{ "sort.label = ``\texttt{" write$
sort.label write$
"}''\\" write$
newline$
}
'skip$
if$
}
FUNCTION {calc.sort.label.abb}
{ yomi empty$
{ author empty$
{ editor empty$
{ "" }
{ editor 's := }
if$
}
{ author 's := }
if$
}
{ yomi 's := }
if$
s sort.format.names.abb 't :=
t sortify " " * year convert.year * 'sort.label.abb :=
jecon.debug #0 = not
{ "sort.label.abb = ``\texttt{" write$
sort.label.abb write$
"}''\\" write$
newline$
}
'skip$
if$
}
FUNCTION {calc.flabel}
{ type$ "book" =
type$ "inbook" =
or
'author.editor.key.label.full
{ type$ "proceedings" =
'editor.key.organization.label.full
{ type$ "manual" =
'author.key.organization.label.full
'author.key.label.full
if$
}
if$
}
if$
'flabel :=
jecon.debug #0 = not
{ "flabel = ``\texttt{" write$
flabel write$
"}''\\" write$
newline$
}
'skip$
if$
}
FUNCTION {calc.alabel}
{ type$ "book" =
type$ "inbook" =
or
'author.editor.key.label.abb
{ type$ "proceedings" =
'editor.key.organization.label.abb
{ type$ "manual" =
'author.key.organization.label.abb
'author.key.label.abb
if$
}
if$
}
if$
'alabel :=
jecon.debug #0 = not
{ "alabel = ``\texttt{" write$
alabel write$
"}''\\" write$
newline$
}
'skip$
if$
}
FUNCTION {sort.format.title}
{ 't :=
"A " #2
"An " #3
"The " #4 t chop.word
chop.word
chop.word
sortify
#1 global.max$ substring$
}
FUNCTION {author.organization.sort}
{ author empty$
{ organization empty$
{ key empty$
{ "to sort, need author, organization, or key in " cite$ * warning$
""
}
{ key sortify }
if$
}
{ "The " #4 organization chop.word sortify }
if$
}
{ author sort.format.names }
if$
}
FUNCTION {editor.organization.sort}
{ editor empty$
{ organization empty$
{ key empty$
{ "to sort, need editor, organization, or key in " cite$ * warning$
""
}
{ key sortify }
if$
}
{ "The " #4 organization chop.word sortify }
if$
}
{ editor sort.format.names }
if$
}
FUNCTION {add.zero.to.number}
{ 's :=
s text.length$ #1 =
{ "00" s * }
{ s text.length$ #2 =
{ "0" s * }
{ s }
if$
}
if$
}
FUNCTION {bst.sort.entry.type.order}
{ 'item.type :=
item.type "article" =
{ "01" }
{ item.type "book" =
{ "02" }
{ item.type "booklet" =
{ "03" }
{ item.type "comment" =
{ "04" }
{ item.type "conference" =
{ "05" }
{ item.type "inbook" =
{ "06" }
{ item.type "incollection" =
{ "07" }
{ item.type "inproceedings" =
{ "08" }
{ item.type "manual" =
{ "09" }
{ item.type "masterthesis" =
{ "10" }
{ item.type "misc" =
{ "11" }
{ item.type "phdthesis" =
{ "12" }
{ item.type "proceedings" =
{ "13" }
{ item.type "techreport" =
{ "14" }
{ item.type "unpublished" =
{ "15" }
{ "16" }
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
if$
}
FUNCTION {presort.one}
{
calc.cyear
pop$
""
sort.label.abb *
" "
bst.no.sort #0 = not
{ * order.cited int.to.str$ add.zero.to.number * " " * }
{ * " " * }
if$
title is.kanji.str$
{ bst.mixed.order #0 =
{ "" }
{ " " }
if$
}
{ " " }
if$
"" *
bst.sort.entry.type #0 = not
{ type$ bst.sort.entry.type.order * " " * }
'skip$
if$
absorder empty$
{ "/// " * }
{ bst.notuse.absorder.field #0 =
{ absorder "999" =
{ "zzz " * }
{ absorder add.zero.to.number "000" =
{ "/// " * }
{ absorder add.zero.to.number * " " * }
if$
}
if$
}
{ "/// " * }
if$
}
if$
" " *
order empty$
{ "/// " * }
{ bst.notuse.order.field #0 =
{ order "999" =
{ "zzz " * }
{ order add.zero.to.number "000" =
{ "/// " * }
{ order add.zero.to.number * " " * }
if$
}
if$
}
{ "/// " * }
if$
}
if$
month empty$
{ * "/// " * }
{ month "999" =
{ * month add.zero.to.number * "zzz " * }
{ month add.zero.to.number "000" =
{ * month add.zero.to.number * "/// " * }
{ * month add.zero.to.number * " " * }
if$
}
if$
}
if$
title field.or.null sort.format.title
*
#1 entry.max$ substring$
'sort.key$ :=
jecon.debug #0 = not
{ "\verb|sort.key$| = ``\texttt{" write$
sort.key$ write$
"}''\\" write$
newline$
}
'skip$
if$
}
FUNCTION {presort.two}
{
bst.no.sort #0 = not
{ order.cited int.to.str$ add.zero.to.number " " * }
{ "" }
if$
bst.sort.year #0 = not
{ is.kanji.entry.two
{ year convert.year * }
{ year convert.year * }
if$
}
'skip$
if$
bst.sort.entry.type #0 = not
{ type$ bst.sort.entry.type.order * " " * }
'skip$
if$
absorder empty$
{ "/// " * }
{ bst.notuse.absorder.field #0 =
{ absorder "999" =
{ "zzz " * }
{ absorder add.zero.to.number "000" =
{ "/// " * }
{ absorder add.zero.to.number * " " * }
if$
}
if$
}
{ "/// " * }
if$
}
if$
" " *
sort.label.abb *
" " *
title is.kanji.str$
{ bst.mixed.order #0 =
{ "" }
{ " " }
if$
}
{ " " }
if$
order empty$
{ "/// " * }
{ bst.notuse.order.field #0 =
{ order "999" =
{ "zzz " * }
{ order add.zero.to.number "000" =
{ "/// " * }
{ order add.zero.to.number * " " * }
if$
}
if$
}
{ "/// " * }
if$
}
if$
month empty$
{ * "/// " * }
{ month "999" =
{ * month add.zero.to.number * "zzz " * }
{ month add.zero.to.number "000" =
{ * month add.zero.to.number * "/// " * }
{ * month add.zero.to.number * " " * }
if$
}
if$
}
if$
title field.or.null sort.format.title
*
#1 entry.max$ substring$
'sort.key$ :=
jecon.debug #0 = not
{ "\verb|sort.key$| = ``\texttt{" write$
sort.key$ write$
"}''\\" write$
newline$
}
'skip$
if$
}
FUNCTION {calc.alabel.mess}
{ jecon.debug #0 = not
{ "\textbf{Iteration of calc.alabel}\\" write$
newline$ }
'skip$
if$
}
FUNCTION {calc.flabel.mess}
{ jecon.debug #0 = not
{ "\textbf{Iteration of calc.flabel}\\" write$
newline$ }
'skip$
if$
}
FUNCTION {calc.sort.label.abb.mess}
{ jecon.debug #0 = not
{ "\textbf{Iteration of calc.sort.label.abb}\\" write$
newline$ }
'skip$
if$
}
FUNCTION {presort.one.mess}
{ jecon.debug #0 = not
{ "\textbf{Iteration of presort.one (ソート1回目)}\\" write$
newline$ }
'skip$
if$
}
FUNCTION {presort.two.mess}
{ jecon.debug #0 = not
{ "\textbf{Iteration of presort.two (ソート2回目)}\\" write$
newline$ }
'skip$
if$
}
EXECUTE {calc.alabel.mess}
ITERATE {calc.alabel}
EXECUTE {calc.flabel.mess}
ITERATE {calc.flabel}
EXECUTE {calc.sort.label.abb.mess}
ITERATE {calc.sort.label.abb}
EXECUTE {presort.one.mess}
ITERATE {presort.one}
SORT
FUNCTION {forward.pass}
{ bst.use.bysame #0 =
{ last.sort.label sort.label.abb =
{ last.extra.num #1 + 'last.extra.num :=
last.extra.num int.to.chr$ 'extra.label :=
}
{ "a" chr.to.int$ 'last.extra.num :=
"" 'extra.label :=
sort.label.abb 'last.sort.label :=
}
if$
}
{ last.sort.label sort.label.abb =
{ last.extra.num #1 + 'last.extra.num :=
last.extra.num int.to.chr$ 'extra.label :=
}
{ "a" chr.to.int$ 'last.extra.num :=
"" 'extra.label :=
sort.label.abb 'last.sort.label :=
}
if$
author empty$
{ editor empty$
{ "" }
'format.editors
if$
}
'format.authors
if$
'this.author :=
this.author prev.author =
{ "bysame" 'extra.label.bysame := }
{ this.author "" =
{ "abcxyz" }
'this.author
if$
'prev.author :=
}
if$
}
if$
}
FUNCTION {reverse.pass}
{ next.extra "b" =
{ "a" 'extra.label := }
'skip$
if$
extra.label empty$ not
{ cyear extra.label * }
{ cyear "" * }
if$
"" field.or.null *
'cyear :=
extra.label 'next.extra :=
}
ITERATE {forward.pass}
REVERSE {reverse.pass}
EXECUTE {presort.two.mess}
ITERATE {presort.two}
SORT
FUNCTION{punctuation}
{
"
"
"
"
"
"
"
newline$
}
EXECUTE {punctuation}
FUNCTION {begin.bib}
{
preamble$ empty$
'skip$
{ preamble$ write$ newline$ }
if$
bst.use.bysame #0 =
'skip$
{ "
"\ifx\undefined\bysame" write$ newline$
"\newcommand{\bysame}{" bst.bysame.definition * "}" *
write$ newline$
"\fi" write$ newline$ newline$ }
if$
bst.kansuji.jp #0 =
'skip$
{ "
"\ifx\undefined\tatebo" write$ newline$
"\newcommand{\tatebo}{" bst.tatebo.definition * "}" *
write$ newline$
"\fi" write$ newline$ newline$ }
if$
bst.use.number.index #0 =
'skip$
{ bst.number.index.digit "1" =
{ bst.number.index.bibhang.one }
{ bst.number.index.digit "2" =
{ bst.number.index.bibhang.ten }
{ bst.number.index.bibhang.hund }
if$
}
if$
'hang :=
"
"\ifx\undefined\bibhang" write$ newline$
"\relax" write$ newline$
"\else" write$ newline$
"\setlength{\bibhang}{"
hang * "}" * write$ newline$
"\fi" write$ newline$ newline$
}
if$
bst.thebibliography.begin
newline$
#0 'index :=
}
FUNCTION {end.bib}
{
newline$
bst.thebibliography.end
newline$
}
EXECUTE {begin.bib}
EXECUTE {init.state.consts}
ITERATE {call.type$}
EXECUTE {end.bib}