diff options
Diffstat (limited to 'Master/texmf-dist/bibtex/bst')
-rw-r--r-- | Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-author-year.bst | 142 | ||||
-rw-r--r-- | Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-numerical.bst | 140 |
2 files changed, 161 insertions, 121 deletions
diff --git a/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-author-year.bst b/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-author-year.bst index ed3fc4b811b..76138dd215e 100644 --- a/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-author-year.bst +++ b/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-author-year.bst @@ -4,13 +4,13 @@ %% %% The original source files were: %% -%% gbt7714.dtx (with options: `2015,authoryear') +%% gbt7714.dtx (with options: `2015,author-year') %% ------------------------------------------------------------------- %% GB/T 7714—2015 BibTeX Style %% https://github.com/CTeX-org/gbt7714-bibtex-style -%% Version: 2020/12/17 v2.1 +%% Version: 2021/06/20 v2.1.2 %% ------------------------------------------------------------------- -%% Copyright (C) 2016-2020 by Zeping Lee <zepinglee AT gmail.com> +%% Copyright (C) 2016—2021 by Zeping Lee <zepinglee AT gmail.com> %% ------------------------------------------------------------------- %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c @@ -18,7 +18,7 @@ %% The latest version of this license is in %% https://www.latex-project.org/lppl.txt %% and version 1.3c or later is part of all distributions of LaTeX -%% version 2005/12/01 or later. +%% version 2008 or later. %% ------------------------------------------------------------------- INTEGERS { citation.et.al.min @@ -29,10 +29,12 @@ INTEGERS { terms.in.macro year.after.author period.after.author + italic.book.title sentence.case.title link.title title.in.journal show.mark + space.before.mark show.medium.type slash.for.extraction in.booktitle @@ -42,12 +44,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 @@ -65,25 +69,29 @@ 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.mark := + #0 'space.before.mark := #1 'show.medium.type := #1 'slash.for.extraction := #0 'in.booktitle := #0 'short.journal := #0 'italic.journal := #0 'bold.journal.volume := - #1 'show.missing.address.publisher := + #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 := #0 'show.note := #0 'show.english.translation := + #1 'end.with.period := #1 'lang.zh.order := #2 'lang.ja.order := #3 'lang.en.order := @@ -248,6 +256,22 @@ FUNCTION {or} if$ } +STRINGS { x y } + +FUNCTION {contains} +{ 'y := + 'x := + y text.length$ 'len := + x text.length$ len - #1 + 'charptr := + { charptr #0 > + x charptr len substring$ y = not + and + } + { charptr #1 - 'charptr := } + while$ + charptr #0 > +} + STRINGS { s t } FUNCTION {output.nonnull} @@ -323,7 +347,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 { ")" @@ -410,10 +437,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$ } @@ -548,7 +583,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$ @@ -711,17 +746,13 @@ FUNCTION {output.bibitem} "\bibitem[" write$ label ")" * make.full.names duplicate$ short.list = - { pop$ } - { * } - if$ - 's := - s text.length$ 'charptr := - { charptr #0 > s charptr #1 substring$ "[" = not and } - { charptr #1 - 'charptr := } - while$ - charptr #0 > - { "{" s * "}" * } - { s } + { pop$ } + { duplicate$ "]" contains + { "{" swap$ * "}" * } + 'skip$ + if$ + * + } if$ "]{" * write$ cite$ write$ @@ -903,6 +934,7 @@ FUNCTION {format.series.vol.num.title} } { format.title.vol.num } if$ + format.btitle link.title 'add.link 'skip$ @@ -934,6 +966,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$ * } @@ -1003,7 +1036,7 @@ FUNCTION {format.journal} if$ duplicate$ empty$ not { italic.journal entry.lang lang.en = and - 'italicize + 'emphasize 'skip$ if$ } @@ -1038,7 +1071,11 @@ FUNCTION {format.mark} 'skip$ if$ 'entry.mark := - "[" entry.mark * "]" * + space.before.mark + { " " } + { "\allowbreak" } + if$ + "[" * entry.mark * "]" * } { "" } if$ @@ -1180,21 +1217,6 @@ FUNCTION {extract.after.dash} if$ } -FUNCTION {contains.dash} -{ duplicate$ empty$ - { pop$ #0 } - { 's := - { s empty$ not - s #1 #1 substring$ "-" = not - and - } - { s #2 global.max$ substring$ 's := } - while$ - s empty$ not - } - if$ -} - FUNCTION {extract.before.slash} { duplicate$ empty$ { pop$ "" } @@ -1239,23 +1261,6 @@ FUNCTION {extract.after.slash} if$ } -FUNCTION {contains.slash} -{ duplicate$ empty$ - { pop$ #0 } - { 's := - { s empty$ not - s #1 #1 substring$ "-" = not - and - s #1 #1 substring$ "/" = not - and - } - { s #2 global.max$ substring$ 's := } - while$ - s empty$ not - } - if$ -} - FUNCTION {format.year} { year empty$ not { year extract.before.slash extra.label * } @@ -1296,11 +1301,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$ } @@ -1326,7 +1336,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$ @@ -2216,7 +2229,10 @@ FUNCTION {calc.short.authors} FUNCTION {calc.label} { calc.short.authors - short.list + short.list "]" contains + { "{" short.list * "}" * } + { short.list } + if$ "(" * format.year duplicate$ empty$ @@ -2224,6 +2240,10 @@ FUNCTION {calc.label} { pop$ "" } 'skip$ if$ + duplicate$ "]" contains + { "{" swap$ * "}" * } + 'skip$ + if$ * 'label := short.label diff --git a/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-numerical.bst b/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-numerical.bst index 5b487f5ba15..634510cedc1 100644 --- a/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-numerical.bst +++ b/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-numerical.bst @@ -8,9 +8,9 @@ %% ------------------------------------------------------------------- %% GB/T 7714—2015 BibTeX Style %% https://github.com/CTeX-org/gbt7714-bibtex-style -%% Version: 2020/12/17 v2.1 +%% Version: 2021/06/20 v2.1.2 %% ------------------------------------------------------------------- -%% Copyright (C) 2016-2020 by Zeping Lee <zepinglee AT gmail.com> +%% Copyright (C) 2016—2021 by Zeping Lee <zepinglee AT gmail.com> %% ------------------------------------------------------------------- %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c @@ -18,7 +18,7 @@ %% The latest version of this license is in %% https://www.latex-project.org/lppl.txt %% and version 1.3c or later is part of all distributions of LaTeX -%% version 2005/12/01 or later. +%% version 2008 or later. %% ------------------------------------------------------------------- INTEGERS { citation.et.al.min @@ -29,10 +29,12 @@ INTEGERS { terms.in.macro year.after.author period.after.author + italic.book.title sentence.case.title link.title title.in.journal show.mark + space.before.mark show.medium.type slash.for.extraction in.booktitle @@ -42,12 +44,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} @@ -60,25 +64,29 @@ 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.mark := + #0 'space.before.mark := #1 'show.medium.type := #1 'slash.for.extraction := #0 'in.booktitle := #0 'short.journal := #0 'italic.journal := #0 'bold.journal.volume := - #1 'show.missing.address.publisher := + #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 := #0 'show.note := #0 'show.english.translation := + #1 'end.with.period := } ENTRY @@ -238,6 +246,22 @@ FUNCTION {or} if$ } +STRINGS { x y } + +FUNCTION {contains} +{ 'y := + 'x := + y text.length$ 'len := + x text.length$ len - #1 + 'charptr := + { charptr #0 > + x charptr len substring$ y = not + and + } + { charptr #1 - 'charptr := } + while$ + charptr #0 > +} + STRINGS { s t } FUNCTION {output.nonnull} @@ -313,7 +337,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 { ")" @@ -400,10 +427,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$ } @@ -538,7 +573,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$ @@ -701,17 +736,13 @@ FUNCTION {output.bibitem} "\bibitem[" write$ label ")" * make.full.names duplicate$ short.list = - { pop$ } - { * } - if$ - 's := - s text.length$ 'charptr := - { charptr #0 > s charptr #1 substring$ "[" = not and } - { charptr #1 - 'charptr := } - while$ - charptr #0 > - { "{" s * "}" * } - { s } + { pop$ } + { duplicate$ "]" contains + { "{" swap$ * "}" * } + 'skip$ + if$ + * + } if$ "]{" * write$ cite$ write$ @@ -893,6 +924,7 @@ FUNCTION {format.series.vol.num.title} } { format.title.vol.num } if$ + format.btitle link.title 'add.link 'skip$ @@ -924,6 +956,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$ * } @@ -993,7 +1026,7 @@ FUNCTION {format.journal} if$ duplicate$ empty$ not { italic.journal entry.lang lang.en = and - 'italicize + 'emphasize 'skip$ if$ } @@ -1028,7 +1061,11 @@ FUNCTION {format.mark} 'skip$ if$ 'entry.mark := - "[" entry.mark * "]" * + space.before.mark + { " " } + { "\allowbreak" } + if$ + "[" * entry.mark * "]" * } { "" } if$ @@ -1170,21 +1207,6 @@ FUNCTION {extract.after.dash} if$ } -FUNCTION {contains.dash} -{ duplicate$ empty$ - { pop$ #0 } - { 's := - { s empty$ not - s #1 #1 substring$ "-" = not - and - } - { s #2 global.max$ substring$ 's := } - while$ - s empty$ not - } - if$ -} - FUNCTION {extract.before.slash} { duplicate$ empty$ { pop$ "" } @@ -1229,23 +1251,6 @@ FUNCTION {extract.after.slash} if$ } -FUNCTION {contains.slash} -{ duplicate$ empty$ - { pop$ #0 } - { 's := - { s empty$ not - s #1 #1 substring$ "-" = not - and - s #1 #1 substring$ "/" = not - and - } - { s #2 global.max$ substring$ 's := } - while$ - s empty$ not - } - if$ -} - FUNCTION {format.year} { year empty$ not { year extract.before.slash extra.label * } @@ -1286,11 +1291,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$ } @@ -1316,7 +1326,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$ @@ -2206,7 +2219,10 @@ FUNCTION {calc.short.authors} FUNCTION {calc.label} { calc.short.authors - short.list + short.list "]" contains + { "{" short.list * "}" * } + { short.list } + if$ "(" * format.year duplicate$ empty$ @@ -2214,6 +2230,10 @@ FUNCTION {calc.label} { pop$ "" } 'skip$ if$ + duplicate$ "]" contains + { "{" swap$ * "}" * } + 'skip$ + if$ * 'label := short.label |