summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/bibtex/gbt7714
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-06-08 21:18:36 +0000
committerKarl Berry <karl@freefriends.org>2020-06-08 21:18:36 +0000
commit520fec3063ffc0dc67fa9bc435e18770dc071729 (patch)
treebfff3493447d9848d6a7708df6d4bbabc19957c5 /Master/texmf-dist/source/bibtex/gbt7714
parentd43d80f432c70fb2110bdcfb2cdd335858a5b2c7 (diff)
gbt7714 (8jun20)
git-svn-id: svn://tug.org/texlive/trunk@55482 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/bibtex/gbt7714')
-rw-r--r--Master/texmf-dist/source/bibtex/gbt7714/gbt7714.dtx214
-rw-r--r--Master/texmf-dist/source/bibtex/gbt7714/gbt7714.ins4
2 files changed, 161 insertions, 57 deletions
diff --git a/Master/texmf-dist/source/bibtex/gbt7714/gbt7714.dtx b/Master/texmf-dist/source/bibtex/gbt7714/gbt7714.dtx
index e42938874cd..d5a77945386 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/14 v2.0.1 GB/T 7714-2015 BibTeX Style]
+%<package> [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}
+%</!nosentencecase>
#1 'sentence.case.title :=
%<*nosentencecase>
#0 'sentence.case.title :=
@@ -852,7 +852,9 @@ FUNCTION {load.config}
%
% 在标题添加超链接:
% \begin{macrocode}
+%<*!linktitle>
#0 'link.title :=
+%</!linktitle>
%<*linktitle>
#1 'link.title :=
%</linktitle>
@@ -870,7 +872,9 @@ FUNCTION {load.config}
%
% 著录文献类型标识(比如“[M/OL]“):
% \begin{macrocode}
+%<*!nomark>
#1 'show.mark :=
+%</!nomark>
%<*nomark>
#0 'show.mark :=
%</nomark>
@@ -878,7 +882,9 @@ FUNCTION {load.config}
%
% 是否显示载体类型标识(比如“/OL“):
% \begin{macrocode}
+%<*!no.medium.type>
#1 'show.medium.type :=
+%</!no.medium.type>
%<*no.medium.type>
#0 'show.medium.type :=
%</no.medium.type>
@@ -886,7 +892,9 @@ FUNCTION {load.config}
%
% 使用“//”表示析出文献
% \begin{macrocode}
+%<*!noslash>
#1 'slash.for.extraction :=
+%</!noslash>
%<*noslash>
#0 'slash.for.extraction :=
%</noslash>
@@ -909,7 +917,9 @@ FUNCTION {load.config}
%
% 期刊名使用斜体:
% \begin{macrocode}
+%<*!italicjournal>
#0 'italic.journal :=
+%</!italicjournal>
%<*italicjournal>
#1 'italic.journal :=
%</italicjournal>
@@ -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>
+%</!noslsn&!thu&!ustc&!npr>
+%<*noslsn|thu|ustc|npr>
#0 'show.missing.address.publisher :=
-%</noslsn|thu|ustc>
+%</noslsn|thu|ustc|npr>
% \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>
@@ -952,7 +952,9 @@ FUNCTION {load.config}
%
% 是否著录 URL:
% \begin{macrocode}
+%<*!nourl>
#1 'show.url :=
+%</!nourl>
%<*nourl>
#0 'show.url :=
%</nourl>
@@ -968,6 +970,16 @@ FUNCTION {load.config}
%</nodoi|2005>
% \end{macrocode}
%
+% 是否著录 e-print:
+% \begin{macrocode}
+%<*!preprint&!npr>
+ #0 'show.preprint :=
+%</!preprint&!npr>
+%<*preprint|npr>
+ #1 'show.preprint :=
+%</preprint|npr>
+% \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 :=
}
@@ -2655,6 +2671,13 @@ FUNCTION {hyphenate}
FUNCTION {format.pages}
{ pages empty$
{ "" }
+ { pages hyphenate }
+ if$
+}
+
+FUNCTION {format.extracted.pages}
+{ pages empty$
+ { "" }
{ pages
only.start.page
'extract.before.dash
@@ -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
%</numerical>
- format.pages bbl.colon output.after
+ format.extracted.pages bbl.colon output.after
format.urldate "" output.after
output.url
output.doi
@@ -3209,6 +3250,62 @@ FUNCTION {electronic}
% \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
+%</authoryear>
+%<*numerical>
+ ""
+%</numerical>
+ }
+ if$
+ }
+ if$
+ output
+%<*authoryear>
+ period.between.author.year
+ 'new.sentence
+ 'skip$
+ if$
+ format.year "year" output.check
+%</authoryear>
+ 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
+%</numerical>
+ format.pages bbl.colon output.after
+ format.urldate "" output.after
+ output.url
+ new.block
+ format.note output
+ fin.entry
+}
+
+% \end{macrocode}
+%
% \subsubsection{其他文献类型}
%
% A misc is something that doesn't fit elsewhere.
@@ -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/Master/texmf-dist/source/bibtex/gbt7714/gbt7714.ins b/Master/texmf-dist/source/bibtex/gbt7714/gbt7714.ins
index 5d0ba5e3498..96bd21230b0 100644
--- a/Master/texmf-dist/source/bibtex/gbt7714/gbt7714.ins
+++ b/Master/texmf-dist/source/bibtex/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 <zepinglee AT gmail.com>
-------------------------------------------------------------------