From 03edc188c852d76ccf08759e0c334228f5f37c9f Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Tue, 9 Jun 2020 03:01:30 +0000 Subject: CTAN sync 202006090301 --- biblio/bibtex/contrib/gbt7714/CHANGELOG.md | 118 ++++++++++++++++ biblio/bibtex/contrib/gbt7714/README.md | 4 +- biblio/bibtex/contrib/gbt7714/gbt7714.dtx | 214 +++++++++++++++++++++-------- biblio/bibtex/contrib/gbt7714/gbt7714.ins | 4 +- biblio/bibtex/contrib/gbt7714/gbt7714.pdf | Bin 344133 -> 342504 bytes 5 files changed, 281 insertions(+), 59 deletions(-) create mode 100644 biblio/bibtex/contrib/gbt7714/CHANGELOG.md (limited to 'biblio') diff --git a/biblio/bibtex/contrib/gbt7714/CHANGELOG.md b/biblio/bibtex/contrib/gbt7714/CHANGELOG.md new file mode 100644 index 0000000000..8267a43347 --- /dev/null +++ b/biblio/bibtex/contrib/gbt7714/CHANGELOG.md @@ -0,0 +1,118 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). + +## [Unreleased] + +## [v2.0.2] - 2020-06-08 +### Changed +- 期刊的页码前默认有空格(#62) + +### Added +- 支持预印本(preprint)文献类型 + +## [v2.0.1] - 2020-03-14 +### Added +- 新增选项 `only.start.page` +- 增加选项 `title.in.journal` +- 增加选项 `abbreviate.journal` +- 增加选项 `show.english.translation` + +### Fixed +- 修正 DOI 中含有下划线的问题 + +## [v2.0] - 2020-03-04 +### Changed +- 需要用户在主文档使用 `\bibliographystyle` 命令 +- 更改 `bst` 文件名为 `-numerical` 和 `-author-year` +- 不再默认对顺序编码制的引用标注进行排序 + +### Added +- 兼容 `chapterbib` 宏包(#48) + +## [v1.1.2] - 2019-11-20 +### Changed +- 不再依赖 `etoolbox` + +### Fixed +- 修正与 `newtx` 冲突([#42](https://github.com/CTeX-org/gbt7714-bibtex-style/issues/42)) + +## [v1.1.1] - 2019-03-21 +### Added +- 允许自定义文种的顺序 + +## [v1.1] - 2019-01-02 +### Added +- 允许自定义“et al” + +### Changed +- 修正 series 的 bug + +## [v1.0.9] - 2018-08-05 +### Added +- 增加选项在题名添加超链接 + +### Changed +- 不再转换题名 volume 的大小写 +- 修正不显示 url 的选项 + +## [v1.0.8] - 2018-06-23 +### Added +- 新增接口供用户自定义样式 +- 支持 howpublished 中的 url + +### Changed +- 使用 `xurl` 的方法改进 URL 断行 +- 使用“~”连接英文姓名 + +## [v1.0.7] - 2018-05-12 +### Changed +- 修正了检测 Unicode 语言 + +## [v1.0.6] - 2018-05-10 +### Changed +- 文献列表的数字标签左对齐 +- 不再处理中文标题的英文单词的大小写 + +## [v1.0.5] - 2018-04-18 +### Added +- 允许著录多个 DOI + +## [v1.0.4] - 2018-04-12 +### Changed +- 页码的连接号由 en dash 改为 hyphen + +## [v1.0.3] - 2018-03-29 +### Changed +- 顺序编码制连续两个文献引用之间使用连接号 + +## [v1.0.2] - 2018-03-16 +### Changed +- 正确识别姓名中的“others” + +## [v1.0.1] - 2018-03-09 +### Changed +- 著者出版年制的文献引用不再排序 + +## [v1.0] - 2018-01-01 +### Changed +- Initial release. + +[Unreleased]: https://github.com/CTeX-org/gbt7714-bibtex-style/compare/v2.0.2...HEAD +[v2.0.2]: https://github.com/CTeX-org/gbt7714-bibtex-style/compare/v2.0.1...v2.0.2 +[v2.0.1]: https://github.com/CTeX-org/gbt7714-bibtex-style/compare/v2.0...v2.0.1 +[v2.0]: https://github.com/CTeX-org/gbt7714-bibtex-style/compare/v1.1.2...v2.0 +[v1.1.2]: https://github.com/CTeX-org/gbt7714-bibtex-style/compare/v1.1.1...v1.1.2 +[v1.1.1]: https://github.com/CTeX-org/gbt7714-bibtex-style/compare/v1.1...v1.1.1 +[v1.1]: https://github.com/CTeX-org/gbt7714-bibtex-style/compare/v1.0.9...v1.1 +[v1.0.9]: https://github.com/CTeX-org/gbt7714-bibtex-style/compare/v1.0.8...v1.0.9 +[v1.0.8]: https://github.com/CTeX-org/gbt7714-bibtex-style/compare/v1.0.7...v1.0.8 +[v1.0.7]: https://github.com/CTeX-org/gbt7714-bibtex-style/compare/v1.0.6...v1.0.7 +[v1.0.6]: https://github.com/CTeX-org/gbt7714-bibtex-style/compare/v1.0.5...v1.0.6 +[v1.0.5]: https://github.com/CTeX-org/gbt7714-bibtex-style/compare/v1.0.4...v1.0.5 +[v1.0.4]: https://github.com/CTeX-org/gbt7714-bibtex-style/compare/v1.0.3...v1.0.4 +[v1.0.3]: https://github.com/CTeX-org/gbt7714-bibtex-style/compare/v1.0.2...v1.0.3 +[v1.0.2]: https://github.com/CTeX-org/gbt7714-bibtex-style/compare/v1.0.1...v1.0.2 +[v1.0.1]: https://github.com/CTeX-org/gbt7714-bibtex-style/compare/v1.0...v1.0.1 +[v1.0]: https://github.com/CTeX-org/gbt7714-bibtex-style/releases/tag/v1.0 diff --git a/biblio/bibtex/contrib/gbt7714/README.md b/biblio/bibtex/contrib/gbt7714/README.md index 149708f8a7..c582de0357 100644 --- a/biblio/bibtex/contrib/gbt7714/README.md +++ b/biblio/bibtex/contrib/gbt7714/README.md @@ -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) (not accessible) +- 李志奇 基于biblatex的符合GBT7714-2005的中文文献生成工具 - 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) (not accessible) +- 吴凯 发布GBT7714-2005.bst version1 Beta版 diff --git a/biblio/bibtex/contrib/gbt7714/gbt7714.dtx b/biblio/bibtex/contrib/gbt7714/gbt7714.dtx index e42938874c..d5a7794538 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/14 v2.0.1 GB/T 7714-2015 BibTeX Style] +% [2020/06/08 v2.0.2 GB/T 7714-2015 BibTeX Style] % %<*driver> \documentclass[a4paper]{ltxdoc} @@ -290,10 +290,10 @@ % show.medium.type & |#1| & 显示载体类型标识 \\ % 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.preprint & |#0| & 显示预印本 \\ % show.note & |#0| & 显示 note 域的信息 \\ % \bottomrule % \end{tabular} @@ -366,16 +366,14 @@ % 吴凯. % \newblock 发布GBT7714-2005.bst version1 Beta版\allowbreak[EB/OL]. % \newblock 2006. -% \newblock \url{http://bbs.ctex.org/forum.php?mod=viewthread&tid=33591} -% (not accessible). +% \newblock CTeX 论坛(已关闭). % % \bibitem[李志奇(2013)]{lqz2013} % 李志奇. % \newblock % 基于biblatex的符合GBT7714-2005的中文文献生成工具\allowbreak[EB/OL]. % \newblock 2013. -% \newblock \url{http://bbs.ctex.org/forum.php?mod=viewthread&tid=74474} -% (not accessible). +% \newblock CTeX 论坛(已关闭). % % \bibitem[胡海星(2013)]{hhx2013} % 胡海星. @@ -424,33 +422,33 @@ \newif\ifgbt@mmxv \newif\ifgbt@numerical \newif\ifgbt@super -\newcommand\gbt@obselete@option[1]{% - \PackageWarning{gbt7714}{The option "#1" is obselete}% +\newcommand\gbt@obsolete@option[1]{% + \PackageWarning{gbt7714}{The option "#1" is obsolete}% } \DeclareOption{2015}{% - \gbt@obselete@option{2015}% + \gbt@obsolete@option{2015}% \gbt@legacy@interfacetrue \gbt@mmxvtrue } \DeclareOption{2005}{% - \gbt@obselete@option{2005}% + \gbt@obsolete@option{2005}% \gbt@legacy@interfacetrue \gbt@mmxvfalse } \DeclareOption{super}{% - \gbt@obselete@option{super}% + \gbt@obsolete@option{super}% \gbt@legacy@interfacetrue \gbt@numericaltrue \gbt@supertrue } \DeclareOption{numbers}{% - \gbt@obselete@option{numbers}% + \gbt@obsolete@option{numbers}% \gbt@legacy@interfacetrue \gbt@numericaltrue \gbt@superfalse } \DeclareOption{authoryear}{% - \gbt@obselete@option{authoryear}% + \gbt@obsolete@option{authoryear}% \gbt@legacy@interfacetrue \gbt@numericalfalse } @@ -791,10 +789,10 @@ INTEGERS { italic.journal bold.journal.volume show.missing.address.publisher - space.before.pages only.start.page show.url show.doi + show.preprint show.note show.english.translation %<*authoryear> @@ -843,7 +841,9 @@ FUNCTION {load.config} % \end{macrocode} % % 英文标题转为 sentence case (句首字母大写,其余小写): +%<*!nosentencecase> % \begin{macrocode} +% #1 'sentence.case.title := %<*nosentencecase> #0 'sentence.case.title := @@ -852,7 +852,9 @@ FUNCTION {load.config} % % 在标题添加超链接: % \begin{macrocode} +%<*!linktitle> #0 'link.title := +% %<*linktitle> #1 'link.title := % @@ -870,7 +872,9 @@ FUNCTION {load.config} % % 著录文献类型标识(比如“[M/OL]“): % \begin{macrocode} +%<*!nomark> #1 'show.mark := +% %<*nomark> #0 'show.mark := % @@ -878,7 +882,9 @@ FUNCTION {load.config} % % 是否显示载体类型标识(比如“/OL“): % \begin{macrocode} +%<*!no.medium.type> #1 'show.medium.type := +% %<*no.medium.type> #0 'show.medium.type := % @@ -886,7 +892,9 @@ FUNCTION {load.config} % % 使用“//”表示析出文献 % \begin{macrocode} +%<*!noslash> #1 'slash.for.extraction := +% %<*noslash> #0 'slash.for.extraction := % @@ -909,7 +917,9 @@ FUNCTION {load.config} % % 期刊名使用斜体: % \begin{macrocode} +%<*!italicjournal> #0 'italic.journal := +% %<*italicjournal> #1 'italic.journal := % @@ -922,26 +932,16 @@ FUNCTION {load.config} % % 无出版地或出版者时,著录“出版地不详”,“出版者不详”,“S.l.” 或 “s.n.”: % \begin{macrocode} -%<*!noslsn&!thu&!ustc> +%<*!noslsn&!thu&!ustc&!npr> #1 'show.missing.address.publisher := -% -%<*noslsn|thu|ustc> +% +%<*noslsn|thu|ustc|npr> #0 'show.missing.address.publisher := -% +% % \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 := % @@ -952,7 +952,9 @@ FUNCTION {load.config} % % 是否著录 URL: % \begin{macrocode} +%<*!nourl> #1 'show.url := +% %<*nourl> #0 'show.url := % @@ -968,6 +970,16 @@ FUNCTION {load.config} % % \end{macrocode} % +% 是否著录 e-print: +% \begin{macrocode} +%<*!preprint&!npr> + #0 'show.preprint := +% +%<*preprint|npr> + #1 'show.preprint := +% +% \end{macrocode} +% % 在每一条文献最后输出注释(note)的内容: % \begin{macrocode} #0 'show.note := @@ -1007,12 +1019,14 @@ FUNCTION {load.config} % \begin{macrocode} ENTRY { address + archivePrefix author booktitle date doi edition editor + eprint howpublished institution journal @@ -1028,8 +1042,8 @@ ENTRY school series title - translator translation + translator url urldate volume @@ -1768,15 +1782,20 @@ FUNCTION {format.names} { 's := #1 'nameptr := s num.names$ 'numnames := + "" numnames 'namesleft := { namesleft #0 > } { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't := + nameptr #1 > + { ", " * } + 'skip$ + if$ nameptr max.num.authors > - { bbl.et.al + { bbl.et.al * #1 'namesleft := } { t "others" = - { bbl.et.al } + { bbl.et.al * } { t get.str.lang 'name.lang := name.lang lang.en = { t #1 "{vv~}{ll}{~f{~}}" format.name$ @@ -1788,14 +1807,11 @@ FUNCTION {format.names} } { t #1 "{ll}{ff}" format.name$ } if$ + * } if$ } if$ - nameptr #1 > - { ", " swap$ * * } - 'skip$ - if$ nameptr #1 + 'nameptr := namesleft #1 - 'namesleft := } @@ -2653,6 +2669,13 @@ FUNCTION {hyphenate} % Other functions that use this should keep that in mind. % \begin{macrocode} FUNCTION {format.pages} +{ pages empty$ + { "" } + { pages hyphenate } + if$ +} + +FUNCTION {format.extracted.pages} { pages empty$ { "" } { pages @@ -2693,11 +2716,8 @@ FUNCTION {format.journal.number} FUNCTION {format.journal.pages} { pages empty$ { "" } - { space.before.pages - { ": " } - { ":\penalty0 " } - if$ - format.pages * + { ": " + format.extracted.pages * } if$ } @@ -2888,6 +2908,27 @@ FUNCTION {check.electronic} if$ } +FUNCTION {format.eprint} +{ "" + archivePrefix empty$ not + { archivePrefix * ": " * + "\eprint{https://" * + archivePrefix "l" change.case$ * ".org/abs/" * eprint * "}{" * + eprint * "}" * + } + { eprint } + if$ +} + +FUNCTION {output.eprint} +{ show.preprint eprint empty$ not and + { new.block + format.eprint output + } + 'skip$ + if$ +} + FUNCTION {format.note} { note empty$ not show.note and { note } @@ -3040,7 +3081,7 @@ FUNCTION {incollection} %<*numerical> format.year "year" output.check % - format.pages bbl.colon output.after + format.extracted.pages bbl.colon output.after format.urldate "" output.after output.url output.doi @@ -3207,6 +3248,62 @@ FUNCTION {electronic} fin.entry } +% \end{macrocode} +% +% \subsubsection{预印本} +% +% \begin{macrocode} +FUNCTION {preprint} +{ output.bibitem + output.translation + author empty$ not + { format.authors } + { editor empty$ not + { format.editors } + { "empty author and editor in " cite$ * warning$ +%<*authoryear> + bbl.anonymous +% +%<*numerical> + "" +% + } + if$ + } + if$ + output +%<*authoryear> + period.between.author.year + 'new.sentence + 'skip$ + if$ + format.year "year" output.check +% + new.block + title.in.journal + { format.series.vol.num.title "title" output.check + "Z" set.entry.mark + format.mark "" output.after + new.block + } + 'skip$ + if$ + format.translators output + new.sentence + format.edition output + new.block + output.eprint +%<*numerical> + format.year "year" output.check +% + format.pages bbl.colon output.after + format.urldate "" output.after + output.url + new.block + format.note output + fin.entry +} + % \end{macrocode} % % \subsubsection{其他文献类型} @@ -3226,10 +3323,14 @@ FUNCTION {misc} 'incollection { publisher empty$ not 'monograph - { entry.is.electronic - 'electronic - { "Z" set.entry.mark - monograph + { eprint empty$ not show.preprint and + 'preprint + { entry.is.electronic + 'electronic + { "Z" set.entry.mark + monograph + } + if$ } if$ } @@ -3436,10 +3537,7 @@ FUNCTION {techreport} % % Optional: month, year % \begin{macrocode} -FUNCTION {unpublished} -{ "Z" set.entry.mark - misc -} +FUNCTION {unpublished} { misc } % \end{macrocode} % @@ -4127,17 +4225,21 @@ FUNCTION {begin.bib} write$ newline$ " \urlstyle{same}\fi" write$ newline$ - show.doi - { "\expandafter\ifx\csname href\endcsname\relax" + "\expandafter\ifx\csname href\endcsname\relax" + write$ newline$ + " \DeclareUrlCommand\doi{\urlstyle{rm}}" + write$ newline$ + " \def\eprint#1#2{#2}" write$ newline$ - " \DeclareUrlCommand\doi{\urlstyle{rm}}\else" + "\else" + write$ newline$ + " \def\doi#1{\href{https://doi.org/#1}{\nolinkurl{#1}}}" + write$ newline$ + " \let\eprint\href" write$ newline$ - " \providecommand\doi[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}}\fi" + "\fi" write$ newline$ } - 'skip$ - if$ -} % \end{macrocode} % diff --git a/biblio/bibtex/contrib/gbt7714/gbt7714.ins b/biblio/bibtex/contrib/gbt7714/gbt7714.ins index 5d0ba5e349..96bd21230b 100644 --- a/biblio/bibtex/contrib/gbt7714/gbt7714.ins +++ b/biblio/bibtex/contrib/gbt7714/gbt7714.ins @@ -1,3 +1,5 @@ +% !TeX encoding = UTF-8 +% !TeX program = xetex \input docstrip.tex \keepsilent \askforoverwritefalse @@ -5,7 +7,7 @@ ------------------------------------------------------------------- GB/T 7714-2015 BibTeX Style https://github.com/CTeX-org/gbt7714-bibtex-style -Version: 2020/03/14 v2.0.1 +Version: 2020/06/08 v2.0.2 ------------------------------------------------------------------- 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 fd9f17de94..f8259fe5c8 100644 Binary files a/biblio/bibtex/contrib/gbt7714/gbt7714.pdf and b/biblio/bibtex/contrib/gbt7714/gbt7714.pdf differ -- cgit v1.2.3