From 87cddce361c3b477029d13b27bdaa57190b2d74b Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sun, 15 Mar 2020 03:01:24 +0000 Subject: CTAN sync 202003150301 --- biblio/bibtex/contrib/gbt7714/README.md | 6 +- biblio/bibtex/contrib/gbt7714/gbt7714.dtx | 284 +++++++++++++++++++++++++----- biblio/bibtex/contrib/gbt7714/gbt7714.ins | 2 +- biblio/bibtex/contrib/gbt7714/gbt7714.pdf | Bin 337101 -> 344133 bytes 4 files changed, 247 insertions(+), 45 deletions(-) (limited to 'biblio') diff --git a/biblio/bibtex/contrib/gbt7714/README.md b/biblio/bibtex/contrib/gbt7714/README.md index 7afe22f3b7..149708f8a7 100644 --- a/biblio/bibtex/contrib/gbt7714/README.md +++ b/biblio/bibtex/contrib/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/biblio/bibtex/contrib/gbt7714/gbt7714.dtx b/biblio/bibtex/contrib/gbt7714/gbt7714.dtx index 57254acc42..e42938874c 100644 --- a/biblio/bibtex/contrib/gbt7714/gbt7714.dtx +++ b/biblio/bibtex/contrib/gbt7714/gbt7714.dtx @@ -17,7 +17,7 @@ % \iffalse %\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] % %<*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} % % \end{macrocode} % +% 期刊是否含标题: +% \begin{macrocode} +%<*!title-in-journal&!npr> + #1 'title.in.journal := +% +%<*title-in-journal|npr> + #0 'title.in.journal := +% +% \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> + #1 'abbreviate.journal := +% +% \end{macrocode} +% % 期刊名使用斜体: % \begin{macrocode} - #0 'italic.jounal := + #0 'italic.journal := %<*italicjournal> - #1 'italic.jounal := + #1 'italic.journal := % % \end{macrocode} % @@ -901,6 +930,26 @@ FUNCTION {load.config} % % \end{macrocode} % +% 页码是否只含起始页: +% \begin{macrocode} +%<*!space-begore-pages&!npr> + #0 'space.before.pages := +% +%<*space-begore-pages|npr> + #1 'space.before.pages := +% +% \end{macrocode} +% +% 页码前是否有空白: +% \begin{macrocode} +%<*!only-start-page&!npr> + #0 'only.start.page := +% +%<*only-start-page|npr> + #1 'only.start.page := +% +% \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> + #1 'show.english.translation := +% +% \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$ +% + '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} % 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} % 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 % 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 % 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/biblio/bibtex/contrib/gbt7714/gbt7714.ins b/biblio/bibtex/contrib/gbt7714/gbt7714.ins index a2161d12a8..5d0ba5e349 100644 --- a/biblio/bibtex/contrib/gbt7714/gbt7714.ins +++ b/biblio/bibtex/contrib/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 ------------------------------------------------------------------- diff --git a/biblio/bibtex/contrib/gbt7714/gbt7714.pdf b/biblio/bibtex/contrib/gbt7714/gbt7714.pdf index 0b2e6e9a5e..fd9f17de94 100644 Binary files a/biblio/bibtex/contrib/gbt7714/gbt7714.pdf and b/biblio/bibtex/contrib/gbt7714/gbt7714.pdf differ -- cgit v1.2.3