diff options
author | Karl Berry <karl@freefriends.org> | 2020-03-14 20:39:01 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-03-14 20:39:01 +0000 |
commit | 8f355f2ef89606139b19478647af702523f7d9e7 (patch) | |
tree | 3fd372bc702fa67ca8d45760aab8f42cf1b3bc1b /Master | |
parent | 75992f7fdc6967d0d67027de3074560ca24878ff (diff) |
gbt7714 (14mar20)
git-svn-id: svn://tug.org/texlive/trunk@54293 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-author-year.bst | 181 | ||||
-rw-r--r-- | Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-numerical.bst | 181 | ||||
-rw-r--r-- | Master/texmf-dist/doc/bibtex/gbt7714/README.md | 6 | ||||
-rw-r--r-- | Master/texmf-dist/doc/bibtex/gbt7714/gbt7714.pdf | bin | 337101 -> 344133 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/bibtex/gbt7714/gbt7714.dtx | 284 | ||||
-rw-r--r-- | Master/texmf-dist/source/bibtex/gbt7714/gbt7714.ins | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/gbt7714/gbt7714.sty | 7 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tlpkg-ctan-check | 2 | ||||
-rwxr-xr-x | Master/tlpkg/libexec/ctan2tds | 1 |
9 files changed, 544 insertions, 120 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 40757392523..65cc492ee71 100644 --- a/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-author-year.bst +++ b/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-author-year.bst @@ -8,7 +8,7 @@ %% ------------------------------------------------------------------- %% GB/T 7714-2015 BibTeX Style %% https://github.com/CTeX-org/gbt7714-bibtex-style -%% Version: 2020/03/04 v2.0 +%% Version: 2020/03/14 v2.0.1 %% ------------------------------------------------------------------- %% Copyright (C) 2016-2020 by Zeping Lee <zepinglee AT gmail.com> %% ------------------------------------------------------------------- @@ -26,16 +26,21 @@ INTEGERS { period.between.author.year sentence.case.title link.title + title.in.journal show.mark show.medium.type slash.for.extraction in.booktitle - italic.jounal + abbreviate.journal + italic.journal bold.journal.volume show.missing.address.publisher + space.before.pages + only.start.page show.url show.doi show.note + show.english.translation lang.zh.order lang.ja.order lang.en.order @@ -50,16 +55,21 @@ FUNCTION {load.config} #0 'period.between.author.year := #1 'sentence.case.title := #0 'link.title := + #1 'title.in.journal := #1 'show.mark := #1 'show.medium.type := #1 'slash.for.extraction := #0 'in.booktitle := - #0 'italic.jounal := + #0 'abbreviate.journal := + #0 'italic.journal := #0 'bold.journal.volume := #1 'show.missing.address.publisher := + #0 'space.before.pages := + #0 'only.start.page := #1 'show.url := #1 'show.doi := #0 'show.note := + #0 'show.english.translation := #1 'lang.zh.order := #2 'lang.ja.order := #3 'lang.en.order := @@ -91,6 +101,7 @@ ENTRY series title translator + translation url urldate volume @@ -272,6 +283,12 @@ FUNCTION {output.check} FUNCTION {fin.entry} { add.period$ write$ + show.english.translation entry.lang lang.zh = and + { ")" + write$ + } + 'skip$ + if$ newline$ } @@ -863,12 +880,51 @@ FUNCTION {format.series.vol.num.booktitle} if$ } -FUNCTION {format.journal} -{ journal - italic.jounal entry.lang lang.en = and - 'italicize +FUNCTION {remove.period} +{ 't := + "" 's := + { t empty$ not } + { t #1 #1 substring$ 'tmp.str := + tmp.str "." = not + { s tmp.str * 's := } + 'skip$ + if$ + t #2 global.max$ substring$ 't := + } + while$ + s +} + +FUNCTION {abbreviate} +{ remove.period + 't := + t "l" change.case$ 's := + "" + s "physical review letters" = + { "Phys Rev Lett" } 'skip$ if$ + 's := + s empty$ + { t } + { pop$ s } + if$ +} + +FUNCTION {format.journal} +{ journal empty$ not + { journal + abbreviate.journal + 'abbreviate + 'skip$ + if$ + italic.journal entry.lang lang.en = and + 'italicize + 'skip$ + if$ + } + { "" } + if$ } FUNCTION {set.entry.mark} @@ -1107,7 +1163,12 @@ FUNCTION {hyphenate} FUNCTION {format.pages} { pages empty$ { "" } - { pages hyphenate } + { pages + only.start.page + 'extract.before.dash + 'hyphenate + if$ + } if$ } @@ -1132,7 +1193,12 @@ FUNCTION {format.journal.number} FUNCTION {format.journal.pages} { pages empty$ { "" } - { ":\penalty0 " pages hyphenate * } + { space.before.pages + { ": " } + { ":\penalty0 " } + if$ + format.pages * + } if$ } @@ -1204,9 +1270,15 @@ FUNCTION {check.url} } FUNCTION {format.url} +{ entry.url +} + +FUNCTION {output.url} { entry.url empty$ not - { new.block entry.url } - { "" } + { new.block + entry.url output + } + 'skip$ if$ } @@ -1240,7 +1312,7 @@ FUNCTION {is.in.url} FUNCTION {format.doi} { "" - doi empty$ not show.doi and + doi empty$ not { "" 's := doi 't := #0 'numnames := @@ -1268,11 +1340,16 @@ FUNCTION {format.doi} t #2 global.max$ substring$ 't := } while$ - 's := - s empty$ not - { new.block s } - { "" } - if$ + } + 'skip$ + if$ +} + +FUNCTION {output.doi} +{ doi empty$ not show.doi and + show.english.translation entry.lang lang.zh = and not and + { new.block + format.doi output } 'skip$ if$ @@ -1304,6 +1381,30 @@ FUNCTION {format.note} if$ } +FUNCTION {output.translation} +{ show.english.translation entry.lang lang.zh = and + { translation empty$ not + { translation } + { "[English translation missing!]" } + if$ + " (in Chinese)" * output + write$ + format.doi duplicate$ empty$ not + { newline$ + write$ + } + 'pop$ + if$ + " \\" write$ + newline$ + "(" write$ + "" + before.all 'output.state := + } + 'skip$ + if$ +} + FUNCTION {empty.misc.check} { author empty$ title empty$ year empty$ @@ -1316,6 +1417,7 @@ FUNCTION {empty.misc.check} FUNCTION {monograph} { output.bibitem + output.translation author empty$ not { format.authors } { editor empty$ not @@ -1344,8 +1446,8 @@ FUNCTION {monograph} format.address.publisher output format.pages bbl.colon output.after format.urldate "" output.after - format.url output - format.doi output + output.url + output.doi new.block format.note output fin.entry @@ -1353,6 +1455,7 @@ FUNCTION {monograph} FUNCTION {incollection} { output.bibitem + output.translation format.authors output author format.key output period.between.author.year @@ -1376,8 +1479,8 @@ FUNCTION {incollection} format.address.publisher output format.pages bbl.colon output.after format.urldate "" output.after - format.url output - format.doi output + output.url + output.doi new.block format.note output fin.entry @@ -1385,6 +1488,7 @@ FUNCTION {incollection} FUNCTION {periodical} { output.bibitem + output.translation format.authors output author format.key output period.between.author.year @@ -1401,8 +1505,8 @@ FUNCTION {periodical} new.block format.address.publisher output format.urldate "" output.after - format.url output - format.doi output + output.url + output.doi new.block format.note output fin.entry @@ -1410,6 +1514,7 @@ FUNCTION {periodical} FUNCTION {article} { output.bibitem + output.translation format.authors output author format.key output period.between.author.year @@ -1418,17 +1523,21 @@ FUNCTION {article} if$ format.year "year" output.check new.block - format.title "title" output.check - "J" set.entry.mark - format.mark "" output.after - new.block + title.in.journal + { format.title "title" output.check + "J" set.entry.mark + format.mark "" output.after + new.block + } + 'skip$ + if$ format.journal "journal" output.check format.journal.volume output format.journal.number "" output.after format.journal.pages "" output.after format.urldate "" output.after - format.url output - format.doi output + output.url + output.doi new.block format.note output fin.entry @@ -1436,6 +1545,7 @@ FUNCTION {article} FUNCTION {patent} { output.bibitem + output.translation format.authors output author format.key output period.between.author.year @@ -1450,8 +1560,8 @@ FUNCTION {patent} new.block format.date "year" output.check format.urldate "" output.after - format.url output - format.doi output + output.url + output.doi new.block format.note output fin.entry @@ -1461,6 +1571,7 @@ FUNCTION {electronic} { #1 #1 check.electronic #1 'entry.is.electronic := output.bibitem + output.translation format.authors output author format.key output period.between.author.year @@ -1477,8 +1588,8 @@ FUNCTION {electronic} format.pages bbl.colon output.after format.editdate "" output.after format.urldate "" output.after - format.url output - format.doi output + output.url + output.doi new.block format.note output fin.entry @@ -2008,9 +2119,9 @@ FUNCTION {begin.bib} show.doi { "\expandafter\ifx\csname href\endcsname\relax" write$ newline$ - " \def\doi#1{#1}\else" + " \DeclareUrlCommand\doi{\urlstyle{rm}}\else" write$ newline$ - " \def\doi#1{\href{https://doi.org/#1}{#1}}\fi" + " \providecommand\doi[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}}\fi" write$ newline$ } 'skip$ diff --git a/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-numerical.bst b/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-numerical.bst index 8fdb37194dc..c8424d0242d 100644 --- a/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-numerical.bst +++ b/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-numerical.bst @@ -8,7 +8,7 @@ %% ------------------------------------------------------------------- %% GB/T 7714-2015 BibTeX Style %% https://github.com/CTeX-org/gbt7714-bibtex-style -%% Version: 2020/03/04 v2.0 +%% Version: 2020/03/14 v2.0.1 %% ------------------------------------------------------------------- %% Copyright (C) 2016-2020 by Zeping Lee <zepinglee AT gmail.com> %% ------------------------------------------------------------------- @@ -26,16 +26,21 @@ INTEGERS { period.between.author.year sentence.case.title link.title + title.in.journal show.mark show.medium.type slash.for.extraction in.booktitle - italic.jounal + abbreviate.journal + italic.journal bold.journal.volume show.missing.address.publisher + space.before.pages + only.start.page show.url show.doi show.note + show.english.translation } FUNCTION {load.config} @@ -44,16 +49,21 @@ FUNCTION {load.config} #3 'max.num.authors := #1 'sentence.case.title := #0 'link.title := + #1 'title.in.journal := #1 'show.mark := #1 'show.medium.type := #1 'slash.for.extraction := #0 'in.booktitle := - #0 'italic.jounal := + #0 'abbreviate.journal := + #0 'italic.journal := #0 'bold.journal.volume := #1 'show.missing.address.publisher := + #0 'space.before.pages := + #0 'only.start.page := #1 'show.url := #1 'show.doi := #0 'show.note := + #0 'show.english.translation := } ENTRY @@ -80,6 +90,7 @@ ENTRY series title translator + translation url urldate volume @@ -261,6 +272,12 @@ FUNCTION {output.check} FUNCTION {fin.entry} { add.period$ write$ + show.english.translation entry.lang lang.zh = and + { ")" + write$ + } + 'skip$ + if$ newline$ } @@ -852,12 +869,51 @@ FUNCTION {format.series.vol.num.booktitle} if$ } -FUNCTION {format.journal} -{ journal - italic.jounal entry.lang lang.en = and - 'italicize +FUNCTION {remove.period} +{ 't := + "" 's := + { t empty$ not } + { t #1 #1 substring$ 'tmp.str := + tmp.str "." = not + { s tmp.str * 's := } + 'skip$ + if$ + t #2 global.max$ substring$ 't := + } + while$ + s +} + +FUNCTION {abbreviate} +{ remove.period + 't := + t "l" change.case$ 's := + "" + s "physical review letters" = + { "Phys Rev Lett" } 'skip$ if$ + 's := + s empty$ + { t } + { pop$ s } + if$ +} + +FUNCTION {format.journal} +{ journal empty$ not + { journal + abbreviate.journal + 'abbreviate + 'skip$ + if$ + italic.journal entry.lang lang.en = and + 'italicize + 'skip$ + if$ + } + { "" } + if$ } FUNCTION {set.entry.mark} @@ -1096,7 +1152,12 @@ FUNCTION {hyphenate} FUNCTION {format.pages} { pages empty$ { "" } - { pages hyphenate } + { pages + only.start.page + 'extract.before.dash + 'hyphenate + if$ + } if$ } @@ -1121,7 +1182,12 @@ FUNCTION {format.journal.number} FUNCTION {format.journal.pages} { pages empty$ { "" } - { ":\penalty0 " pages hyphenate * } + { space.before.pages + { ": " } + { ":\penalty0 " } + if$ + format.pages * + } if$ } @@ -1193,9 +1259,15 @@ FUNCTION {check.url} } FUNCTION {format.url} +{ entry.url +} + +FUNCTION {output.url} { entry.url empty$ not - { new.block entry.url } - { "" } + { new.block + entry.url output + } + 'skip$ if$ } @@ -1229,7 +1301,7 @@ FUNCTION {is.in.url} FUNCTION {format.doi} { "" - doi empty$ not show.doi and + doi empty$ not { "" 's := doi 't := #0 'numnames := @@ -1257,11 +1329,16 @@ FUNCTION {format.doi} t #2 global.max$ substring$ 't := } while$ - 's := - s empty$ not - { new.block s } - { "" } - if$ + } + 'skip$ + if$ +} + +FUNCTION {output.doi} +{ doi empty$ not show.doi and + show.english.translation entry.lang lang.zh = and not and + { new.block + format.doi output } 'skip$ if$ @@ -1293,6 +1370,30 @@ FUNCTION {format.note} if$ } +FUNCTION {output.translation} +{ show.english.translation entry.lang lang.zh = and + { translation empty$ not + { translation } + { "[English translation missing!]" } + if$ + " (in Chinese)" * output + write$ + format.doi duplicate$ empty$ not + { newline$ + write$ + } + 'pop$ + if$ + " \\" write$ + newline$ + "(" write$ + "" + before.all 'output.state := + } + 'skip$ + if$ +} + FUNCTION {empty.misc.check} { author empty$ title empty$ year empty$ @@ -1305,6 +1406,7 @@ FUNCTION {empty.misc.check} FUNCTION {monograph} { output.bibitem + output.translation author empty$ not { format.authors } { editor empty$ not @@ -1329,8 +1431,8 @@ FUNCTION {monograph} format.year "year" output.check format.pages bbl.colon output.after format.urldate "" output.after - format.url output - format.doi output + output.url + output.doi new.block format.note output fin.entry @@ -1338,6 +1440,7 @@ FUNCTION {monograph} FUNCTION {incollection} { output.bibitem + output.translation format.authors output author format.key output new.block @@ -1357,8 +1460,8 @@ FUNCTION {incollection} format.year "year" output.check format.pages bbl.colon output.after format.urldate "" output.after - format.url output - format.doi output + output.url + output.doi new.block format.note output fin.entry @@ -1366,6 +1469,7 @@ FUNCTION {incollection} FUNCTION {periodical} { output.bibitem + output.translation format.authors output author format.key output new.block @@ -1378,8 +1482,8 @@ FUNCTION {periodical} format.address.publisher output format.date "year" output.check format.urldate "" output.after - format.url output - format.doi output + output.url + output.doi new.block format.note output fin.entry @@ -1387,21 +1491,26 @@ FUNCTION {periodical} FUNCTION {article} { output.bibitem + output.translation format.authors output author format.key output new.block - format.title "title" output.check - "J" set.entry.mark - format.mark "" output.after - new.block + title.in.journal + { format.title "title" output.check + "J" set.entry.mark + format.mark "" output.after + new.block + } + 'skip$ + if$ format.journal "journal" output.check format.date "year" output.check format.journal.volume output format.journal.number "" output.after format.journal.pages "" output.after format.urldate "" output.after - format.url output - format.doi output + output.url + output.doi new.block format.note output fin.entry @@ -1409,6 +1518,7 @@ FUNCTION {article} FUNCTION {patent} { output.bibitem + output.translation format.authors output author format.key output new.block @@ -1418,8 +1528,8 @@ FUNCTION {patent} new.block format.date "year" output.check format.urldate "" output.after - format.url output - format.doi output + output.url + output.doi new.block format.note output fin.entry @@ -1429,6 +1539,7 @@ FUNCTION {electronic} { #1 #1 check.electronic #1 'entry.is.electronic := output.bibitem + output.translation format.authors output author format.key output new.block @@ -1444,8 +1555,8 @@ FUNCTION {electronic} format.pages bbl.colon output.after format.editdate "" output.after format.urldate "" output.after - format.url output - format.doi output + output.url + output.doi new.block format.note output fin.entry @@ -1829,9 +1940,9 @@ FUNCTION {begin.bib} show.doi { "\expandafter\ifx\csname href\endcsname\relax" write$ newline$ - " \def\doi#1{#1}\else" + " \DeclareUrlCommand\doi{\urlstyle{rm}}\else" write$ newline$ - " \def\doi#1{\href{https://doi.org/#1}{#1}}\fi" + " \providecommand\doi[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}}\fi" write$ newline$ } 'skip$ diff --git a/Master/texmf-dist/doc/bibtex/gbt7714/README.md b/Master/texmf-dist/doc/bibtex/gbt7714/README.md index 7afe22f3b7a..149708f8a72 100644 --- a/Master/texmf-dist/doc/bibtex/gbt7714/README.md +++ b/Master/texmf-dist/doc/bibtex/gbt7714/README.md @@ -18,7 +18,7 @@ and English) for each biblilography entry. - Homepage: https://github.com/CTeX-org/gbt7714-bibtex-style - Maintainer: Zeping Lee -- Email: zeinglee AT gmail DOT com +- Email: zepinglee AT gmail DOT com - License: LaTeX Project Public License 1.3c or later ## 新特性 @@ -147,6 +147,6 @@ and English) for each biblilography entry. - 胡振震 [hushidong/biblatex-gb7714-2015](https://github.com/hushidong/biblatex-gb7714-2015) - 沈周 [szsdk/biblatex-gbt77142005](https://github.com/szsdk/biblatex-gbt77142005) - 胡海星 [Haixing-Hu/GBT7714-2005-BibTeX-Style](https://github.com/Haixing-Hu/GBT7714-2005-BibTeX-Style) -- 李志奇 [基于biblatex的符合GBT7714-2005的中文文献生成工具](http://bbs.ctex.org/forum.php?mod=viewthread&tid=74474) +- 李志奇 [基于biblatex的符合GBT7714-2005的中文文献生成工具](http://bbs.ctex.org/forum.php?mod=viewthread&tid=74474) (not accessible) - Casper Ti. Vector [CasperVector/biblatex-caspervector](https://github.com/CasperVector/biblatex-caspervector) -- 吴凯 [发布GBT7714-2005.bst version1 Beta版](http://bbs.ctex.org/forum.php?mod=viewthread&tid=33591) +- 吴凯 [发布GBT7714-2005.bst version1 Beta版](http://bbs.ctex.org/forum.php?mod=viewthread&tid=33591) (not accessible) diff --git a/Master/texmf-dist/doc/bibtex/gbt7714/gbt7714.pdf b/Master/texmf-dist/doc/bibtex/gbt7714/gbt7714.pdf Binary files differindex 0b2e6e9a5e2..fd9f17de94a 100644 --- a/Master/texmf-dist/doc/bibtex/gbt7714/gbt7714.pdf +++ b/Master/texmf-dist/doc/bibtex/gbt7714/gbt7714.pdf diff --git a/Master/texmf-dist/source/bibtex/gbt7714/gbt7714.dtx b/Master/texmf-dist/source/bibtex/gbt7714/gbt7714.dtx index 57254acc42b..e42938874cd 100644 --- a/Master/texmf-dist/source/bibtex/gbt7714/gbt7714.dtx +++ b/Master/texmf-dist/source/bibtex/gbt7714/gbt7714.dtx @@ -17,7 +17,7 @@ % \iffalse %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] %<package>\ProvidesPackage{gbt7714} -%<package> [2020/03/04 v2.0 GB/T 7714-2015 BibTeX Style] +%<package> [2020/03/14 v2.0.1 GB/T 7714-2015 BibTeX Style] % %<*driver> \documentclass[a4paper]{ltxdoc} @@ -285,10 +285,13 @@ % period.between.author.year & |#0| & 著者和年份之间使用句点连接 \\ % sentence.case.title & |#1| & 将西文的题名转为 sentence case \\ % link.title & |#0| & 在题名上添加 url 的超链接 \\ +% title.in.journal & |#1| & 期刊是否显示标题 \\ % show.mark & |#1| & 显示文献类型标识 \\ % show.medium.type & |#1| & 显示载体类型标识 \\ -% italic.jounal & |#0| & 西文期刊名使用斜体 \\ +% italic.journal & |#0| & 西文期刊名使用斜体 \\ % show.missing.address.publisher & |#1| & 出版项缺失时显示“出版者不详” \\ +% space.before.pages & |#0| & 页码前有空白 \\ +% only.start.page & |#0| & 只显示起始页码 \\ % show.url & |#1| & 显示 url \\ % show.doi & |#1| & 显示 doi \\ % show.note & |#0| & 显示 note 域的信息 \\ @@ -363,14 +366,16 @@ % 吴凯. % \newblock 发布GBT7714-2005.bst version1 Beta版\allowbreak[EB/OL]. % \newblock 2006. -% \newblock \url{http://bbs.ctex.org/forum.php?mod=viewthread&tid=33591}. +% \newblock \url{http://bbs.ctex.org/forum.php?mod=viewthread&tid=33591} +% (not accessible). % % \bibitem[李志奇(2013)]{lqz2013} % 李志奇. % \newblock % 基于biblatex的符合GBT7714-2005的中文文献生成工具\allowbreak[EB/OL]. % \newblock 2013. -% \newblock \url{http://bbs.ctex.org/forum.php?mod=viewthread&tid=74474}. +% \newblock \url{http://bbs.ctex.org/forum.php?mod=viewthread&tid=74474} +% (not accessible). % % \bibitem[胡海星(2013)]{hhx2013} % 胡海星. @@ -422,8 +427,6 @@ \newcommand\gbt@obselete@option[1]{% \PackageWarning{gbt7714}{The option "#1" is obselete}% } -\DeclareOption{authoryear}{} - \DeclareOption{2015}{% \gbt@obselete@option{2015}% \gbt@legacy@interfacetrue @@ -469,6 +472,7 @@ % 定义接口切换引用文献的标注法,可用 \cs{citestyle} 调用 \opt{numerical} % 或 \opt{authoryear},参见 \pkg{natbib}。 % \begin{macrocode} +\renewcommand\newblock{\space} \newcommand\bibstyle@super{\bibpunct{[}{]}{,}{s}{,}{\textsuperscript{,}}} \newcommand\bibstyle@numbers{\bibpunct{[}{]}{,}{n}{,}{,}} \newcommand\bibstyle@authoryear{\bibpunct{(}{)}{;}{a}{,}{,}} @@ -778,16 +782,21 @@ INTEGERS { period.between.author.year sentence.case.title link.title + title.in.journal show.mark show.medium.type slash.for.extraction in.booktitle - italic.jounal + abbreviate.journal + italic.journal bold.journal.volume show.missing.address.publisher + space.before.pages + only.start.page show.url show.doi show.note + show.english.translation %<*authoryear> lang.zh.order lang.ja.order @@ -849,6 +858,16 @@ FUNCTION {load.config} %</linktitle> % \end{macrocode} % +% 期刊是否含标题: +% \begin{macrocode} +%<*!title-in-journal&!npr> + #1 'title.in.journal := +%</!title-in-journal&!npr> +%<*title-in-journal|npr> + #0 'title.in.journal := +%</title-in-journal|npr> +% \end{macrocode} +% % 著录文献类型标识(比如“[M/OL]“): % \begin{macrocode} #1 'show.mark := @@ -878,11 +897,21 @@ FUNCTION {load.config} #0 'in.booktitle := % \end{macrocode} % +% 期刊名使用缩写: +% \begin{macrocode} +%<*!abbreviate-journal&!npr> + #0 'abbreviate.journal := +%</!abbreviate-journal&!npr> +%<*abbreviate-journal|npr> + #1 'abbreviate.journal := +%</abbreviate-journal|npr> +% \end{macrocode} +% % 期刊名使用斜体: % \begin{macrocode} - #0 'italic.jounal := + #0 'italic.journal := %<*italicjournal> - #1 'italic.jounal := + #1 'italic.journal := %</italicjournal> % \end{macrocode} % @@ -901,6 +930,26 @@ FUNCTION {load.config} %</noslsn|thu|ustc> % \end{macrocode} % +% 页码是否只含起始页: +% \begin{macrocode} +%<*!space-begore-pages&!npr> + #0 'space.before.pages := +%</!space-begore-pages&!npr> +%<*space-begore-pages|npr> + #1 'space.before.pages := +%</space-begore-pages|npr> +% \end{macrocode} +% +% 页码前是否有空白: +% \begin{macrocode} +%<*!only-start-page&!npr> + #0 'only.start.page := +%</!only-start-page&!npr> +%<*only-start-page|npr> + #1 'only.start.page := +%</only-start-page|npr> +% \end{macrocode} +% % 是否著录 URL: % \begin{macrocode} #1 'show.url := @@ -924,6 +973,16 @@ FUNCTION {load.config} #0 'show.note := % \end{macrocode} % +% 中文文献是否显示英文翻译 +% \begin{macrocode} +%<*!show-english-translation&!npr> + #0 'show.english.translation := +%</!show-english-translation&!npr> +%<*show-english-translation|npr> + #1 'show.english.translation := +%</show-english-translation|npr> +% \end{macrocode} +% % 参考文献表按照“著者-出版年”组织时,各个文种的顺序: % \begin{macrocode} %<*authoryear> @@ -970,6 +1029,7 @@ ENTRY series title translator + translation url urldate volume @@ -1346,6 +1406,12 @@ FUNCTION {output.check} FUNCTION {fin.entry} { add.period$ write$ + show.english.translation entry.lang lang.zh = and + { ")" + write$ + } + 'skip$ + if$ newline$ } @@ -2156,12 +2222,93 @@ FUNCTION {format.series.vol.num.booktitle} if$ } -FUNCTION {format.journal} -{ journal - italic.jounal entry.lang lang.en = and - 'italicize +FUNCTION {remove.period} +{ 't := + "" 's := + { t empty$ not } + { t #1 #1 substring$ 'tmp.str := + tmp.str "." = not + { s tmp.str * 's := } + 'skip$ + if$ + t #2 global.max$ substring$ 't := + } + while$ + s +} + +FUNCTION {abbreviate} +{ remove.period + 't := + t "l" change.case$ 's := + "" + s "physical review letters" = + { "Phys Rev Lett" } + 'skip$ + if$ +%<*npr> + s "china physics c" = + { "Chin Phys C" } + 'skip$ + if$ + s "chinese physics letters" = + { "Chin Phys Lett" } + 'skip$ + if$ + s "nuclear instruments and methods in physics research section a" = + { "Nucl Instr and Meth A" } + 'skip$ + if$ + s "nuclear instruments and methods in physics research section a: accelerators, spectrometers, detectors and associated equipment" = + { "Nucl Instr and Meth A" } + 'skip$ + if$ + s "nuclear instruments and methods in physics research section b" = + { "Nucl Instr and Meth B" } + 'skip$ + if$ + s "nuclear instruments and methods in physics research section b: beam interactions with materials and atoms" = + { "Nucl Instr and Meth B" } + 'skip$ + if$ + s "physical review c" = + { "Phys Rev C" } + 'skip$ + if$ + s "physical review d" = + { "Phys Rev D" } 'skip$ if$ + s "physical review e" = + { "Phys Rev E" } + 'skip$ + if$ + s "physics letters b" = + { "Phys Lett B" } + 'skip$ + if$ +%</npr> + 's := + s empty$ + { t } + { pop$ s } + if$ +} + +FUNCTION {format.journal} +{ journal empty$ not + { journal + abbreviate.journal + 'abbreviate + 'skip$ + if$ + italic.journal entry.lang lang.en = and + 'italicize + 'skip$ + if$ + } + { "" } + if$ } % \end{macrocode} @@ -2508,7 +2655,12 @@ FUNCTION {hyphenate} FUNCTION {format.pages} { pages empty$ { "" } - { pages hyphenate } + { pages + only.start.page + 'extract.before.dash + 'hyphenate + if$ + } if$ } @@ -2541,7 +2693,12 @@ FUNCTION {format.journal.number} FUNCTION {format.journal.pages} { pages empty$ { "" } - { ":\penalty0 " pages hyphenate * } + { space.before.pages + { ": " } + { ":\penalty0 " } + if$ + format.pages * + } if$ } @@ -2623,9 +2780,15 @@ FUNCTION {check.url} } FUNCTION {format.url} +{ entry.url +} + +FUNCTION {output.url} { entry.url empty$ not - { new.block entry.url } - { "" } + { new.block + entry.url output + } + 'skip$ if$ } @@ -2663,7 +2826,7 @@ FUNCTION {is.in.url} FUNCTION {format.doi} { "" - doi empty$ not show.doi and + doi empty$ not { "" 's := doi 't := #0 'numnames := @@ -2691,11 +2854,16 @@ FUNCTION {format.doi} t #2 global.max$ substring$ 't := } while$ - 's := - s empty$ not - { new.block s } - { "" } - if$ + } + 'skip$ + if$ +} + +FUNCTION {output.doi} +{ doi empty$ not show.doi and + show.english.translation entry.lang lang.zh = and not and + { new.block + format.doi output } 'skip$ if$ @@ -2727,6 +2895,30 @@ FUNCTION {format.note} if$ } +FUNCTION {output.translation} +{ show.english.translation entry.lang lang.zh = and + { translation empty$ not + { translation } + { "[English translation missing!]" } + if$ + " (in Chinese)" * output + write$ + format.doi duplicate$ empty$ not + { newline$ + write$ + } + 'pop$ + if$ + " \\" write$ + newline$ + "(" write$ + "" + before.all 'output.state := + } + 'skip$ + if$ +} + % \end{macrocode} % % The function empty.misc.check complains if all six fields are empty, and @@ -2760,6 +2952,7 @@ FUNCTION {empty.misc.check} % \begin{macrocode} FUNCTION {monograph} { output.bibitem + output.translation author empty$ not { format.authors } { editor empty$ not @@ -2798,8 +2991,8 @@ FUNCTION {monograph} %</numerical> format.pages bbl.colon output.after format.urldate "" output.after - format.url output - format.doi output + output.url + output.doi new.block format.note output fin.entry @@ -2820,6 +3013,7 @@ FUNCTION {monograph} % \begin{macrocode} FUNCTION {incollection} { output.bibitem + output.translation format.authors output author format.key output %<*authoryear> @@ -2848,8 +3042,8 @@ FUNCTION {incollection} %</numerical> format.pages bbl.colon output.after format.urldate "" output.after - format.url output - format.doi output + output.url + output.doi new.block format.note output fin.entry @@ -2862,6 +3056,7 @@ FUNCTION {incollection} % \begin{macrocode} FUNCTION {periodical} { output.bibitem + output.translation format.authors output author format.key output %<*authoryear> @@ -2883,8 +3078,8 @@ FUNCTION {periodical} format.date "year" output.check %</numerical> format.urldate "" output.after - format.url output - format.doi output + output.url + output.doi new.block format.note output fin.entry @@ -2906,6 +3101,7 @@ FUNCTION {periodical} % \begin{macrocode} FUNCTION {article} { output.bibitem + output.translation format.authors output author format.key output %<*authoryear> @@ -2916,10 +3112,14 @@ FUNCTION {article} format.year "year" output.check %</authoryear> new.block - format.title "title" output.check - "J" set.entry.mark - format.mark "" output.after - new.block + title.in.journal + { format.title "title" output.check + "J" set.entry.mark + format.mark "" output.after + new.block + } + 'skip$ + if$ format.journal "journal" output.check %<*numerical> format.date "year" output.check @@ -2928,8 +3128,8 @@ FUNCTION {article} format.journal.number "" output.after format.journal.pages "" output.after format.urldate "" output.after - format.url output - format.doi output + output.url + output.doi new.block format.note output fin.entry @@ -2943,6 +3143,7 @@ FUNCTION {article} % \begin{macrocode} FUNCTION {patent} { output.bibitem + output.translation format.authors output author format.key output %<*authoryear> @@ -2959,8 +3160,8 @@ FUNCTION {patent} new.block format.date "year" output.check format.urldate "" output.after - format.url output - format.doi output + output.url + output.doi new.block format.note output fin.entry @@ -2974,6 +3175,7 @@ FUNCTION {electronic} { #1 #1 check.electronic #1 'entry.is.electronic := output.bibitem + output.translation format.authors output author format.key output %<*authoryear> @@ -2998,8 +3200,8 @@ FUNCTION {electronic} format.pages bbl.colon output.after format.editdate "" output.after format.urldate "" output.after - format.url output - format.doi output + output.url + output.doi new.block format.note output fin.entry @@ -3928,9 +4130,9 @@ FUNCTION {begin.bib} show.doi { "\expandafter\ifx\csname href\endcsname\relax" write$ newline$ - " \def\doi#1{#1}\else" + " \DeclareUrlCommand\doi{\urlstyle{rm}}\else" write$ newline$ - " \def\doi#1{\href{https://doi.org/#1}{#1}}\fi" + " \providecommand\doi[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}}\fi" write$ newline$ } 'skip$ diff --git a/Master/texmf-dist/source/bibtex/gbt7714/gbt7714.ins b/Master/texmf-dist/source/bibtex/gbt7714/gbt7714.ins index a2161d12a85..5d0ba5e3498 100644 --- a/Master/texmf-dist/source/bibtex/gbt7714/gbt7714.ins +++ b/Master/texmf-dist/source/bibtex/gbt7714/gbt7714.ins @@ -5,7 +5,7 @@ ------------------------------------------------------------------- GB/T 7714-2015 BibTeX Style https://github.com/CTeX-org/gbt7714-bibtex-style -Version: 2020/03/04 v2.0 +Version: 2020/03/14 v2.0.1 ------------------------------------------------------------------- Copyright (C) 2016-\the\year by Zeping Lee <zepinglee AT gmail.com> ------------------------------------------------------------------- diff --git a/Master/texmf-dist/tex/latex/gbt7714/gbt7714.sty b/Master/texmf-dist/tex/latex/gbt7714/gbt7714.sty index 92d2e5ed6b3..fd7fe5c0941 100644 --- a/Master/texmf-dist/tex/latex/gbt7714/gbt7714.sty +++ b/Master/texmf-dist/tex/latex/gbt7714/gbt7714.sty @@ -8,7 +8,7 @@ %% ------------------------------------------------------------------- %% GB/T 7714-2015 BibTeX Style %% https://github.com/CTeX-org/gbt7714-bibtex-style -%% Version: 2020/03/04 v2.0 +%% Version: 2020/03/14 v2.0.1 %% ------------------------------------------------------------------- %% Copyright (C) 2016-2020 by Zeping Lee <zepinglee AT gmail.com> %% ------------------------------------------------------------------- @@ -22,7 +22,7 @@ %% ------------------------------------------------------------------- \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{gbt7714} - [2020/03/04 v2.0 GB/T 7714-2015 BibTeX Style] + [2020/03/14 v2.0.1 GB/T 7714-2015 BibTeX Style] \newif\ifgbt@legacy@interface \newif\ifgbt@mmxv \newif\ifgbt@numerical @@ -30,8 +30,6 @@ \newcommand\gbt@obselete@option[1]{% \PackageWarning{gbt7714}{The option "#1" is obselete}% } -\DeclareOption{authoryear}{} - \DeclareOption{2015}{% \gbt@obselete@option{2015}% \gbt@legacy@interfacetrue @@ -63,6 +61,7 @@ \ProcessOptions\relax \RequirePackage[compress]{natbib} \RequirePackage{url} +\renewcommand\newblock{\space} \newcommand\bibstyle@super{\bibpunct{[}{]}{,}{s}{,}{\textsuperscript{,}}} \newcommand\bibstyle@numbers{\bibpunct{[}{]}{,}{n}{,}{,}} \newcommand\bibstyle@authoryear{\bibpunct{(}{)}{;}{a}{,}{,}} diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index 3d18bf7987d..a4c44963b58 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -450,7 +450,7 @@ my @TLP_working = qw( lstaddons lstbayes lstfiracode lt3graph ltablex ltabptch ltb2bib ltxcmds ltxdockit ltxfileinfo ltxguidex ltximg ltxkeys ltxmisc ltxnew ltxtools - lua-alt-getopt lua-check-hyphen lua-visual-debug + lua-alt-getopt lua-check-hyphen lua-ul lua-visual-debug lua2dox luabibentry luabidi luacode luacolor luahyphenrules luaimageembed luaindex luainputenc luaintro lualatex-doc lualatex-doc-de lualatex-math lualatex-truncate lualibs diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds index e886c1e47f8..d34bcb679a4 100755 --- a/Master/tlpkg/libexec/ctan2tds +++ b/Master/tlpkg/libexec/ctan2tds @@ -2779,6 +2779,7 @@ my $core_latex = "$Master/texmf-dist/tex/latex"; 'listings' => 'latex', # requires interaction 'lmake' => 'latex', # requires interaction 'lni' => 'tex --8bit', + 'lua-ul' => 'tex', 'luaindex' => 'lualatex --shell-escape', 'luatexja' => 'lualatex', 'mandi' => 'pdflatex-preserve-pdf', |