diff options
author | Karl Berry <karl@freefriends.org> | 2022-03-19 20:02:45 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-03-19 20:02:45 +0000 |
commit | 89104bb74c1962cf054486be01c1f2180591dec4 (patch) | |
tree | db51d84db93c6c0707828fa344df992556a000ce /Master/texmf-dist/bibtex | |
parent | eba7407f52d9f6595fb0d1dd04875d2ee79f1922 (diff) |
thuthesis (18mar22)
git-svn-id: svn://tug.org/texlive/trunk@62809 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/bibtex')
3 files changed, 395 insertions, 194 deletions
diff --git a/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-author-year.bst b/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-author-year.bst index d25269b8e34..514368e842d 100644 --- a/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-author-year.bst +++ b/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-author-year.bst @@ -4,11 +4,11 @@ %% %% The original source files were: %% -%% gbt7714.dtx (with options: `2015,thu,authoryear') +%% gbt7714.dtx (with options: `2015,thu,author-year') %% ------------------------------------------------------------------- %% GB/T 7714—2015 BibTeX Style -%% https://github.com/CTeX-org/gbt7714-bibtex-style -%% Version: 2021/04/03 v2.1.1 +%% https://github.com/zepinglee/gbt7714-bibtex-style +%% Version: 2021/12/08 v2.1.3 %% ------------------------------------------------------------------- %% Copyright (C) 2016—2021 by Zeping Lee <zepinglee AT gmail.com> %% ------------------------------------------------------------------- @@ -29,9 +29,11 @@ INTEGERS { terms.in.macro year.after.author period.after.author + italic.book.title sentence.case.title link.title title.in.journal + show.patent.country show.mark space.before.mark show.medium.type @@ -43,12 +45,14 @@ INTEGERS { show.missing.address.publisher space.before.pages only.start.page + wave.dash.in.pages show.urldate show.url show.doi show.preprint show.note show.english.translation + end.with.period lang.zh.order lang.ja.order lang.en.order @@ -66,9 +70,11 @@ FUNCTION {load.config} #0 'terms.in.macro := #1 'year.after.author := #0 'period.after.author := + #0 'italic.book.title := #1 'sentence.case.title := #0 'link.title := #1 'title.in.journal := + #1 'show.patent.country := #1 'show.mark := #0 'space.before.mark := #1 'show.medium.type := @@ -80,12 +86,14 @@ FUNCTION {load.config} #0 'show.missing.address.publisher := #1 'space.before.pages := #0 'only.start.page := + #0 'wave.dash.in.pages := #1 'show.urldate := #1 'show.url := #1 'show.doi := - #0 'show.preprint := + #1 'show.preprint := #0 'show.note := #0 'show.english.translation := + #1 'end.with.period := #1 'lang.zh.order := #2 'lang.ja.order := #3 'lang.en.order := @@ -341,7 +349,10 @@ FUNCTION {output.check} } FUNCTION {fin.entry} -{ add.period$ +{ end.with.period + 'add.period$ + 'skip$ + if$ write$ show.english.translation entry.lang lang.zh = and { ")" @@ -428,10 +439,18 @@ FUNCTION {field.or.null} if$ } -FUNCTION {italicize} +FUNCTION {emphasize} { duplicate$ empty$ { pop$ "" } - { "\textit{" swap$ * "}" * } + { "\emph{" swap$ * "}" * } + if$ +} + +FUNCTION {format.btitle} +{ italic.book.title + entry.lang lang.en = and + 'emphasize + 'skip$ if$ } @@ -566,7 +585,7 @@ FUNCTION {format.name} { bbl.et.al } { t get.str.lang 'name.lang := name.lang lang.en = - { t #1 "{vv~}{ll}{~f{~}}" format.name$ + { t #1 "{vv~}{ll}{ f{~}}" format.name$ uppercase.name { "u" change.case$ } 'skip$ @@ -756,7 +775,7 @@ FUNCTION {add.link} { url empty$ not { "\href{" url * "}{" * swap$ * "}" * } { doi empty$ not - { "\href{http://dx.doi.org/" doi * "}{" * swap$ * "}" * } + { "\href{https://doi.org/" doi * "}{" * swap$ * "}" * } 'skip$ if$ } @@ -772,7 +791,25 @@ FUNCTION {format.title} 'skip$ if$ entry.numbered number empty$ not and - { bbl.colon * number * } + { bbl.colon * + type$ "patent" = show.patent.country and + { address empty$ not + { address * ", " * } + { location empty$ not + { location * ", " * } + { entry.lang lang.zh = + { "中国" * ", " * } + 'skip$ + if$ + } + if$ + } + if$ + } + 'skip$ + if$ + number * + } 'skip$ if$ link.title @@ -917,6 +954,7 @@ FUNCTION {format.series.vol.num.title} } { format.title.vol.num } if$ + format.btitle link.title 'add.link 'skip$ @@ -948,6 +986,7 @@ FUNCTION {format.series.vol.num.booktitle} } { format.booktitle.vol.num } if$ + format.btitle in.booktitle { duplicate$ empty$ not entry.lang lang.en = and { "In: " swap$ * } @@ -989,16 +1028,15 @@ FUNCTION {abbreviate} if$ } -FUNCTION {format.journal} -{ "" - short.journal +FUNCTION {get.journal.title} +{ short.journal { shortjournal empty$ not - { shortjournal * } + { shortjournal } { journal empty$ not - { journal * abbreviate } + { journal abbreviate } { journaltitle empty$ not - { journaltitle * abbreviate } - 'skip$ + { journaltitle abbreviate } + { "" } if$ } if$ @@ -1006,18 +1044,33 @@ FUNCTION {format.journal} if$ } { journal empty$ not - { journal * } + { journal } { journaltitle empty$ not - { journaltitle * } - 'skip$ + { journaltitle } + { shortjournal empty$ not + { shortjournal } + { "" } + if$ + } if$ } if$ } if$ +} + +FUNCTION {check.arxiv.preprint} +{ #1 #5 substring$ "l" change.case$ "arxiv" = + { #1 } + { #0 } + if$ +} + +FUNCTION {format.journal} +{ get.journal.title duplicate$ empty$ not { italic.journal entry.lang lang.en = and - 'italicize + 'emphasize 'skip$ if$ } @@ -1092,7 +1145,7 @@ FUNCTION {format.edition} { edition change.sentence.case 's := s "Revised" = s "Revised edition" = or { "Rev. ed." } - { s " ed." *} + { s " ed." * } if$ } { edition } @@ -1282,11 +1335,16 @@ FUNCTION {format.periodical.year} } FUNCTION {format.date} -{ type$ "patent" = type$ "newspaper" = or - date empty$ not and - { date } - { year field.or.null - extra.label * +{ date empty$ not + { type$ "patent" = type$ "newspaper" = or + { date } + { format.year } + if$ + } + { year empty$ not + { format.year } + { "" } + if$ } if$ } @@ -1299,9 +1357,9 @@ FUNCTION {format.editdate} } FUNCTION {format.urldate} -{ urldate empty$ not - show.urldate show.url and is.pure.electronic or and - url empty$ not and +{ show.urldate show.url and entry.url empty$ not and + is.pure.electronic or + urldate empty$ not and { "\allowbreak[" urldate * "]" * } { "" } if$ @@ -1312,7 +1370,10 @@ FUNCTION {hyphenate} "" { t empty$ not } { t #1 #1 substring$ "-" = - { "-" * + { wave.dash.in.pages + { "~" * } + { "-" * } + if$ { t #1 #1 substring$ "-" = } { t #2 global.max$ substring$ 't := } while$ @@ -1432,12 +1493,9 @@ FUNCTION {check.url} if$ } -FUNCTION {format.url} -{ entry.url -} - FUNCTION {output.url} -{ entry.url empty$ not +{ show.url is.pure.electronic or + entry.url empty$ not and { new.block entry.url output } @@ -1538,9 +1596,9 @@ FUNCTION {check.electronic} } FUNCTION {format.eprint} -{ eprinttype empty$ not - { eprinttype } - { archivePrefix empty$ not +{ archivePrefix empty$ not + { archivePrefix } + { eprinttype empty$ not { archivePrefix } { "" } if$ @@ -1731,7 +1789,7 @@ FUNCTION {periodical} fin.entry } -FUNCTION {article} +FUNCTION {journal.article} { output.bibitem output.translation format.authors output @@ -1865,7 +1923,7 @@ FUNCTION {preprint} new.block title.in.journal { format.series.vol.num.title "title" output.check - "Z" set.entry.mark + "A" set.entry.mark format.mark "" output.after new.block } @@ -1875,13 +1933,18 @@ FUNCTION {preprint} new.sentence format.edition output new.block - output.eprint year.after.author not - { format.year "year" output.check } + { date empty$ + { format.date output } + 'skip$ + if$ + } 'skip$ if$ format.pages bbl.pages.colon output.after + format.editdate "" output.after format.urldate "" output.after + output.eprint output.url new.block format.note output @@ -1889,13 +1952,19 @@ FUNCTION {preprint} } FUNCTION {misc} -{ journal empty$ not - 'article - { booktitle empty$ not +{ get.journal.title + duplicate$ empty$ not + { check.arxiv.preprint + 'preprint + 'journal.article + if$ + } + { pop$ + booktitle empty$ not 'incollection { publisher empty$ not 'monograph - { eprint empty$ not show.preprint and + { eprint empty$ not archivePrefix empty$ not or 'preprint { entry.is.electronic 'electronic @@ -1920,6 +1989,8 @@ FUNCTION {archive} misc } +FUNCTION {article} { misc } + FUNCTION {book} { monograph } FUNCTION {booklet} { book } @@ -1948,6 +2019,8 @@ FUNCTION {inproceedings} FUNCTION {conference} { inproceedings } +FUNCTION {legislation} { archive } + FUNCTION {map} { "CM" set.entry.mark misc @@ -2407,25 +2480,42 @@ FUNCTION {presort} 'sort.key$ := } -STRINGS { longest.label last.label next.extra } +STRINGS { longest.label last.label next.extra last.extra.label } -INTEGERS { longest.label.width last.extra.num number.label } +INTEGERS { longest.label.width number.label } FUNCTION {initialize.longest.label} { "" 'longest.label := #0 int.to.chr$ 'last.label := "" 'next.extra := #0 'longest.label.width := - #0 'last.extra.num := #0 'number.label := + "" 'last.extra.label := } FUNCTION {forward.pass} -{ last.label short.label = - { last.extra.num #1 + 'last.extra.num := - last.extra.num int.to.chr$ 'extra.label := +{ + last.label short.label = + { "" 'extra.label := + last.extra.label text.length$ 'charptr := + { last.extra.label charptr #1 substring$ "z" = + charptr #0 > and + } + { "a" extra.label * 'extra.label := + charptr #1 - 'charptr := + } + while$ + charptr #0 > + { last.extra.label charptr #1 substring$ chr.to.int$ #1 + int.to.chr$ + extra.label * 'extra.label := + last.extra.label #1 charptr #1 - substring$ + extra.label * 'extra.label := + } + { "a" extra.label * 'extra.label := } + if$ + extra.label 'last.extra.label := } - { "a" chr.to.int$ 'last.extra.num := + { "a" 'last.extra.label := "" 'extra.label := short.label 'last.label := } @@ -2434,7 +2524,8 @@ FUNCTION {forward.pass} } FUNCTION {reverse.pass} -{ next.extra "b" = +{ + next.extra "b" = { "a" 'extra.label := } 'skip$ if$ diff --git a/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-bachelor.bst b/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-bachelor.bst index 5c08210cb3f..78c81e628be 100644 --- a/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-bachelor.bst +++ b/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-bachelor.bst @@ -4,11 +4,11 @@ %% %% The original source files were: %% -%% gbt7714.dtx (with options: `2015,numerical,noslsn') +%% gbt7714.dtx (with options: `2015,numerical') %% ------------------------------------------------------------------- %% GB/T 7714—2015 BibTeX Style -%% https://github.com/CTeX-org/gbt7714-bibtex-style -%% Version: 2021/04/03 v2.1.1 +%% https://github.com/zepinglee/gbt7714-bibtex-style +%% Version: 2021/12/08 v2.1.3 %% ------------------------------------------------------------------- %% Copyright (C) 2016—2021 by Zeping Lee <zepinglee AT gmail.com> %% ------------------------------------------------------------------- @@ -29,9 +29,11 @@ INTEGERS { terms.in.macro year.after.author period.after.author + italic.book.title sentence.case.title link.title title.in.journal + show.patent.country show.mark space.before.mark show.medium.type @@ -43,12 +45,14 @@ INTEGERS { show.missing.address.publisher space.before.pages only.start.page + wave.dash.in.pages show.urldate show.url show.doi show.preprint show.note show.english.translation + end.with.period } FUNCTION {load.config} @@ -61,9 +65,11 @@ FUNCTION {load.config} #0 'terms.in.macro := #0 'year.after.author := #1 'period.after.author := + #0 'italic.book.title := #1 'sentence.case.title := #0 'link.title := #1 'title.in.journal := + #0 'show.patent.country := #1 'show.mark := #0 'space.before.mark := #1 'show.medium.type := @@ -75,12 +81,14 @@ FUNCTION {load.config} #0 'show.missing.address.publisher := #1 'space.before.pages := #0 'only.start.page := + #0 'wave.dash.in.pages := #1 'show.urldate := #1 'show.url := #1 'show.doi := - #0 'show.preprint := + #1 'show.preprint := #0 'show.note := #0 'show.english.translation := + #1 'end.with.period := } ENTRY @@ -331,7 +339,10 @@ FUNCTION {output.check} } FUNCTION {fin.entry} -{ add.period$ +{ end.with.period + 'add.period$ + 'skip$ + if$ write$ show.english.translation entry.lang lang.zh = and { ")" @@ -418,10 +429,18 @@ FUNCTION {field.or.null} if$ } -FUNCTION {italicize} +FUNCTION {emphasize} { duplicate$ empty$ { pop$ "" } - { "\textit{" swap$ * "}" * } + { "\emph{" swap$ * "}" * } + if$ +} + +FUNCTION {format.btitle} +{ italic.book.title + entry.lang lang.en = and + 'emphasize + 'skip$ if$ } @@ -556,7 +575,7 @@ FUNCTION {format.name} { bbl.et.al } { t get.str.lang 'name.lang := name.lang lang.en = - { t #1 "{vv~}{ll}{~f{~}}" format.name$ + { t #1 "{vv~}{ll}{ f{~}}" format.name$ uppercase.name { "u" change.case$ } 'skip$ @@ -746,7 +765,7 @@ FUNCTION {add.link} { url empty$ not { "\href{" url * "}{" * swap$ * "}" * } { doi empty$ not - { "\href{http://dx.doi.org/" doi * "}{" * swap$ * "}" * } + { "\href{https://doi.org/" doi * "}{" * swap$ * "}" * } 'skip$ if$ } @@ -762,7 +781,25 @@ FUNCTION {format.title} 'skip$ if$ entry.numbered number empty$ not and - { bbl.colon * number * } + { bbl.colon * + type$ "patent" = show.patent.country and + { address empty$ not + { address * ", " * } + { location empty$ not + { location * ", " * } + { entry.lang lang.zh = + { "中国" * ", " * } + 'skip$ + if$ + } + if$ + } + if$ + } + 'skip$ + if$ + number * + } 'skip$ if$ link.title @@ -907,6 +944,7 @@ FUNCTION {format.series.vol.num.title} } { format.title.vol.num } if$ + format.btitle link.title 'add.link 'skip$ @@ -938,6 +976,7 @@ FUNCTION {format.series.vol.num.booktitle} } { format.booktitle.vol.num } if$ + format.btitle in.booktitle { duplicate$ empty$ not entry.lang lang.en = and { "In: " swap$ * } @@ -979,16 +1018,15 @@ FUNCTION {abbreviate} if$ } -FUNCTION {format.journal} -{ "" - short.journal +FUNCTION {get.journal.title} +{ short.journal { shortjournal empty$ not - { shortjournal * } + { shortjournal } { journal empty$ not - { journal * abbreviate } + { journal abbreviate } { journaltitle empty$ not - { journaltitle * abbreviate } - 'skip$ + { journaltitle abbreviate } + { "" } if$ } if$ @@ -996,18 +1034,33 @@ FUNCTION {format.journal} if$ } { journal empty$ not - { journal * } + { journal } { journaltitle empty$ not - { journaltitle * } - 'skip$ + { journaltitle } + { shortjournal empty$ not + { shortjournal } + { "" } + if$ + } if$ } if$ } if$ +} + +FUNCTION {check.arxiv.preprint} +{ #1 #5 substring$ "l" change.case$ "arxiv" = + { #1 } + { #0 } + if$ +} + +FUNCTION {format.journal} +{ get.journal.title duplicate$ empty$ not { italic.journal entry.lang lang.en = and - 'italicize + 'emphasize 'skip$ if$ } @@ -1082,7 +1135,7 @@ FUNCTION {format.edition} { edition change.sentence.case 's := s "Revised" = s "Revised edition" = or { "Rev. ed." } - { s " ed." *} + { s " ed." * } if$ } { edition } @@ -1272,11 +1325,16 @@ FUNCTION {format.periodical.year} } FUNCTION {format.date} -{ type$ "patent" = type$ "newspaper" = or - date empty$ not and - { date } - { year field.or.null - extra.label * +{ date empty$ not + { type$ "patent" = type$ "newspaper" = or + { date } + { format.year } + if$ + } + { year empty$ not + { format.year } + { "" } + if$ } if$ } @@ -1289,9 +1347,9 @@ FUNCTION {format.editdate} } FUNCTION {format.urldate} -{ urldate empty$ not - show.urldate show.url and is.pure.electronic or and - url empty$ not and +{ show.urldate show.url and entry.url empty$ not and + is.pure.electronic or + urldate empty$ not and { "\allowbreak[" urldate * "]" * } { "" } if$ @@ -1302,7 +1360,10 @@ FUNCTION {hyphenate} "" { t empty$ not } { t #1 #1 substring$ "-" = - { "-" * + { wave.dash.in.pages + { "~" * } + { "-" * } + if$ { t #1 #1 substring$ "-" = } { t #2 global.max$ substring$ 't := } while$ @@ -1422,12 +1483,9 @@ FUNCTION {check.url} if$ } -FUNCTION {format.url} -{ entry.url -} - FUNCTION {output.url} -{ entry.url empty$ not +{ show.url is.pure.electronic or + entry.url empty$ not and { new.block entry.url output } @@ -1528,9 +1586,9 @@ FUNCTION {check.electronic} } FUNCTION {format.eprint} -{ eprinttype empty$ not - { eprinttype } - { archivePrefix empty$ not +{ archivePrefix empty$ not + { archivePrefix } + { eprinttype empty$ not { archivePrefix } { "" } if$ @@ -1721,7 +1779,7 @@ FUNCTION {periodical} fin.entry } -FUNCTION {article} +FUNCTION {journal.article} { output.bibitem output.translation format.authors output @@ -1855,7 +1913,7 @@ FUNCTION {preprint} new.block title.in.journal { format.series.vol.num.title "title" output.check - "Z" set.entry.mark + "A" set.entry.mark format.mark "" output.after new.block } @@ -1865,13 +1923,18 @@ FUNCTION {preprint} new.sentence format.edition output new.block - output.eprint year.after.author not - { format.year "year" output.check } + { date empty$ + { format.date output } + 'skip$ + if$ + } 'skip$ if$ format.pages bbl.pages.colon output.after + format.editdate "" output.after format.urldate "" output.after + output.eprint output.url new.block format.note output @@ -1879,13 +1942,19 @@ FUNCTION {preprint} } FUNCTION {misc} -{ journal empty$ not - 'article - { booktitle empty$ not +{ get.journal.title + duplicate$ empty$ not + { check.arxiv.preprint + 'preprint + 'journal.article + if$ + } + { pop$ + booktitle empty$ not 'incollection { publisher empty$ not 'monograph - { eprint empty$ not show.preprint and + { eprint empty$ not archivePrefix empty$ not or 'preprint { entry.is.electronic 'electronic @@ -1910,6 +1979,8 @@ FUNCTION {archive} misc } +FUNCTION {article} { misc } + FUNCTION {book} { monograph } FUNCTION {booklet} { book } @@ -1938,6 +2009,8 @@ FUNCTION {inproceedings} FUNCTION {conference} { inproceedings } +FUNCTION {legislation} { archive } + FUNCTION {map} { "CM" set.entry.mark misc @@ -2248,44 +2321,26 @@ FUNCTION {presort} 'sort.key$ := } -STRINGS { longest.label last.label next.extra } +STRINGS { longest.label last.label next.extra last.extra.label } -INTEGERS { longest.label.width last.extra.num number.label } +INTEGERS { longest.label.width number.label } FUNCTION {initialize.longest.label} { "" 'longest.label := #0 int.to.chr$ 'last.label := "" 'next.extra := #0 'longest.label.width := - #0 'last.extra.num := #0 'number.label := + "" 'last.extra.label := } FUNCTION {forward.pass} -{ last.label short.label = - { last.extra.num #1 + 'last.extra.num := - last.extra.num int.to.chr$ 'extra.label := - } - { "a" chr.to.int$ 'last.extra.num := - "" 'extra.label := - short.label 'last.label := - } - if$ +{ number.label #1 + 'number.label := } FUNCTION {reverse.pass} -{ next.extra "b" = - { "a" 'extra.label := } - 'skip$ - if$ - extra.label 'next.extra := - extra.label - duplicate$ empty$ - 'skip$ - { "{\natexlab{" swap$ * "}}" * } - if$ - 'extra.label := +{ label extra.label * 'label := } diff --git a/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-numeric.bst b/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-numeric.bst index 9f57d5ed57d..0b41d731401 100644 --- a/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-numeric.bst +++ b/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-numeric.bst @@ -7,8 +7,8 @@ %% gbt7714.dtx (with options: `2015,thu,numerical') %% ------------------------------------------------------------------- %% GB/T 7714—2015 BibTeX Style -%% https://github.com/CTeX-org/gbt7714-bibtex-style -%% Version: 2021/04/03 v2.1.1 +%% https://github.com/zepinglee/gbt7714-bibtex-style +%% Version: 2021/12/08 v2.1.3 %% ------------------------------------------------------------------- %% Copyright (C) 2016—2021 by Zeping Lee <zepinglee AT gmail.com> %% ------------------------------------------------------------------- @@ -29,9 +29,11 @@ INTEGERS { terms.in.macro year.after.author period.after.author + italic.book.title sentence.case.title link.title title.in.journal + show.patent.country show.mark space.before.mark show.medium.type @@ -43,12 +45,14 @@ INTEGERS { show.missing.address.publisher space.before.pages only.start.page + wave.dash.in.pages show.urldate show.url show.doi show.preprint show.note show.english.translation + end.with.period } FUNCTION {load.config} @@ -61,9 +65,11 @@ FUNCTION {load.config} #0 'terms.in.macro := #0 'year.after.author := #1 'period.after.author := + #0 'italic.book.title := #1 'sentence.case.title := #0 'link.title := #1 'title.in.journal := + #1 'show.patent.country := #1 'show.mark := #0 'space.before.mark := #1 'show.medium.type := @@ -75,12 +81,14 @@ FUNCTION {load.config} #0 'show.missing.address.publisher := #1 'space.before.pages := #0 'only.start.page := + #0 'wave.dash.in.pages := #1 'show.urldate := #1 'show.url := #1 'show.doi := - #0 'show.preprint := + #1 'show.preprint := #0 'show.note := #0 'show.english.translation := + #1 'end.with.period := } ENTRY @@ -331,7 +339,10 @@ FUNCTION {output.check} } FUNCTION {fin.entry} -{ add.period$ +{ end.with.period + 'add.period$ + 'skip$ + if$ write$ show.english.translation entry.lang lang.zh = and { ")" @@ -418,10 +429,18 @@ FUNCTION {field.or.null} if$ } -FUNCTION {italicize} +FUNCTION {emphasize} { duplicate$ empty$ { pop$ "" } - { "\textit{" swap$ * "}" * } + { "\emph{" swap$ * "}" * } + if$ +} + +FUNCTION {format.btitle} +{ italic.book.title + entry.lang lang.en = and + 'emphasize + 'skip$ if$ } @@ -556,7 +575,7 @@ FUNCTION {format.name} { bbl.et.al } { t get.str.lang 'name.lang := name.lang lang.en = - { t #1 "{vv~}{ll}{~f{~}}" format.name$ + { t #1 "{vv~}{ll}{ f{~}}" format.name$ uppercase.name { "u" change.case$ } 'skip$ @@ -746,7 +765,7 @@ FUNCTION {add.link} { url empty$ not { "\href{" url * "}{" * swap$ * "}" * } { doi empty$ not - { "\href{http://dx.doi.org/" doi * "}{" * swap$ * "}" * } + { "\href{https://doi.org/" doi * "}{" * swap$ * "}" * } 'skip$ if$ } @@ -762,7 +781,25 @@ FUNCTION {format.title} 'skip$ if$ entry.numbered number empty$ not and - { bbl.colon * number * } + { bbl.colon * + type$ "patent" = show.patent.country and + { address empty$ not + { address * ", " * } + { location empty$ not + { location * ", " * } + { entry.lang lang.zh = + { "中国" * ", " * } + 'skip$ + if$ + } + if$ + } + if$ + } + 'skip$ + if$ + number * + } 'skip$ if$ link.title @@ -907,6 +944,7 @@ FUNCTION {format.series.vol.num.title} } { format.title.vol.num } if$ + format.btitle link.title 'add.link 'skip$ @@ -938,6 +976,7 @@ FUNCTION {format.series.vol.num.booktitle} } { format.booktitle.vol.num } if$ + format.btitle in.booktitle { duplicate$ empty$ not entry.lang lang.en = and { "In: " swap$ * } @@ -979,16 +1018,15 @@ FUNCTION {abbreviate} if$ } -FUNCTION {format.journal} -{ "" - short.journal +FUNCTION {get.journal.title} +{ short.journal { shortjournal empty$ not - { shortjournal * } + { shortjournal } { journal empty$ not - { journal * abbreviate } + { journal abbreviate } { journaltitle empty$ not - { journaltitle * abbreviate } - 'skip$ + { journaltitle abbreviate } + { "" } if$ } if$ @@ -996,18 +1034,33 @@ FUNCTION {format.journal} if$ } { journal empty$ not - { journal * } + { journal } { journaltitle empty$ not - { journaltitle * } - 'skip$ + { journaltitle } + { shortjournal empty$ not + { shortjournal } + { "" } + if$ + } if$ } if$ } if$ +} + +FUNCTION {check.arxiv.preprint} +{ #1 #5 substring$ "l" change.case$ "arxiv" = + { #1 } + { #0 } + if$ +} + +FUNCTION {format.journal} +{ get.journal.title duplicate$ empty$ not { italic.journal entry.lang lang.en = and - 'italicize + 'emphasize 'skip$ if$ } @@ -1082,7 +1135,7 @@ FUNCTION {format.edition} { edition change.sentence.case 's := s "Revised" = s "Revised edition" = or { "Rev. ed." } - { s " ed." *} + { s " ed." * } if$ } { edition } @@ -1272,11 +1325,16 @@ FUNCTION {format.periodical.year} } FUNCTION {format.date} -{ type$ "patent" = type$ "newspaper" = or - date empty$ not and - { date } - { year field.or.null - extra.label * +{ date empty$ not + { type$ "patent" = type$ "newspaper" = or + { date } + { format.year } + if$ + } + { year empty$ not + { format.year } + { "" } + if$ } if$ } @@ -1289,9 +1347,9 @@ FUNCTION {format.editdate} } FUNCTION {format.urldate} -{ urldate empty$ not - show.urldate show.url and is.pure.electronic or and - url empty$ not and +{ show.urldate show.url and entry.url empty$ not and + is.pure.electronic or + urldate empty$ not and { "\allowbreak[" urldate * "]" * } { "" } if$ @@ -1302,7 +1360,10 @@ FUNCTION {hyphenate} "" { t empty$ not } { t #1 #1 substring$ "-" = - { "-" * + { wave.dash.in.pages + { "~" * } + { "-" * } + if$ { t #1 #1 substring$ "-" = } { t #2 global.max$ substring$ 't := } while$ @@ -1422,12 +1483,9 @@ FUNCTION {check.url} if$ } -FUNCTION {format.url} -{ entry.url -} - FUNCTION {output.url} -{ entry.url empty$ not +{ show.url is.pure.electronic or + entry.url empty$ not and { new.block entry.url output } @@ -1528,9 +1586,9 @@ FUNCTION {check.electronic} } FUNCTION {format.eprint} -{ eprinttype empty$ not - { eprinttype } - { archivePrefix empty$ not +{ archivePrefix empty$ not + { archivePrefix } + { eprinttype empty$ not { archivePrefix } { "" } if$ @@ -1721,7 +1779,7 @@ FUNCTION {periodical} fin.entry } -FUNCTION {article} +FUNCTION {journal.article} { output.bibitem output.translation format.authors output @@ -1855,7 +1913,7 @@ FUNCTION {preprint} new.block title.in.journal { format.series.vol.num.title "title" output.check - "Z" set.entry.mark + "A" set.entry.mark format.mark "" output.after new.block } @@ -1865,13 +1923,18 @@ FUNCTION {preprint} new.sentence format.edition output new.block - output.eprint year.after.author not - { format.year "year" output.check } + { date empty$ + { format.date output } + 'skip$ + if$ + } 'skip$ if$ format.pages bbl.pages.colon output.after + format.editdate "" output.after format.urldate "" output.after + output.eprint output.url new.block format.note output @@ -1879,13 +1942,19 @@ FUNCTION {preprint} } FUNCTION {misc} -{ journal empty$ not - 'article - { booktitle empty$ not +{ get.journal.title + duplicate$ empty$ not + { check.arxiv.preprint + 'preprint + 'journal.article + if$ + } + { pop$ + booktitle empty$ not 'incollection { publisher empty$ not 'monograph - { eprint empty$ not show.preprint and + { eprint empty$ not archivePrefix empty$ not or 'preprint { entry.is.electronic 'electronic @@ -1910,6 +1979,8 @@ FUNCTION {archive} misc } +FUNCTION {article} { misc } + FUNCTION {book} { monograph } FUNCTION {booklet} { book } @@ -1938,6 +2009,8 @@ FUNCTION {inproceedings} FUNCTION {conference} { inproceedings } +FUNCTION {legislation} { archive } + FUNCTION {map} { "CM" set.entry.mark misc @@ -2248,44 +2321,26 @@ FUNCTION {presort} 'sort.key$ := } -STRINGS { longest.label last.label next.extra } +STRINGS { longest.label last.label next.extra last.extra.label } -INTEGERS { longest.label.width last.extra.num number.label } +INTEGERS { longest.label.width number.label } FUNCTION {initialize.longest.label} { "" 'longest.label := #0 int.to.chr$ 'last.label := "" 'next.extra := #0 'longest.label.width := - #0 'last.extra.num := #0 'number.label := + "" 'last.extra.label := } FUNCTION {forward.pass} -{ last.label short.label = - { last.extra.num #1 + 'last.extra.num := - last.extra.num int.to.chr$ 'extra.label := - } - { "a" chr.to.int$ 'last.extra.num := - "" 'extra.label := - short.label 'last.label := - } - if$ +{ number.label #1 + 'number.label := } FUNCTION {reverse.pass} -{ next.extra "b" = - { "a" 'extra.label := } - 'skip$ - if$ - extra.label 'next.extra := - extra.label - duplicate$ empty$ - 'skip$ - { "{\natexlab{" swap$ * "}}" * } - if$ - 'extra.label := +{ label extra.label * 'label := } |