summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-11-20 22:08:43 +0000
committerKarl Berry <karl@freefriends.org>2019-11-20 22:08:43 +0000
commit7ec36f11bad5dae3f22b46e998e0c8e1bf51d104 (patch)
tree0a91248a235079ea952924b700dbbe9d11932808 /Master/texmf-dist/source
parent2da276ab3ca942ae3f8dae911bee020c3f84811f (diff)
gbt7714 (20nov19)
git-svn-id: svn://tug.org/texlive/trunk@52870 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/bibtex/gbt7714/gbt7714.dtx401
1 files changed, 253 insertions, 148 deletions
diff --git a/Master/texmf-dist/source/bibtex/gbt7714/gbt7714.dtx b/Master/texmf-dist/source/bibtex/gbt7714/gbt7714.dtx
index cfadbd888b3..4721ba99d62 100644
--- a/Master/texmf-dist/source/bibtex/gbt7714/gbt7714.dtx
+++ b/Master/texmf-dist/source/bibtex/gbt7714/gbt7714.dtx
@@ -22,11 +22,13 @@
%</internal>
%<*install>
\input docstrip.tex
+\keepsilent
+\askforoverwritefalse
\preamble
-------------------------------------------------------------------
GB/T 7714-2015 BibTeX Style
https://github.com/CTeX-org/gbt7714-bibtex-style
-Version: 2019/03/21 v1.1.1
+Version: 2019/11/20 v1.1.2
-------------------------------------------------------------------
Copyright (C) 2016-\the\year by Zeping Lee <zepinglee AT gmail.com>
-------------------------------------------------------------------
@@ -39,34 +41,11 @@ and version 1.3c or later is part of all distributions of LaTeX
version 2005/12/01 or later.
-------------------------------------------------------------------
\endpreamble
-\keepsilent
-\askforoverwritefalse
\nopostamble
\generate{
\file{\jobname.sty}{\from{\jobname.dtx}{package}}
\file{\jobname-plain.bst}{\from{\jobname.dtx}{2015,authoryear}}
\file{\jobname-unsrt.bst}{\from{\jobname.dtx}{2015,numerical}}
- \file{versions/2005/\jobname-2005-plain.bst}{
- \from{\jobname.dtx}{2005,authoryear}
- }
- \file{versions/2005/\jobname-2005-unsrt.bst}{
- \from{\jobname.dtx}{2005,numerical}
- }
- \file{versions/thu/thuthesis-author-year.bst}{
- \from{\jobname.dtx}{thu,2005,authoryear}}
- \file{versions/thu/thuthesis-numeric.bst}{
- \from{\jobname.dtx}{thu,2005,numerical}}
- \file{versions/thu/thuthesis-bachelor.bst}{
- \from{\jobname.dtx}{2015,numerical}}
- \file{versions/ustc/ustcthesis-authoryear.bst}{
- \from{\jobname.dtx}{ustc,2015,authoryear}
- }
- \file{versions/ustc/ustcthesis-numerical.bst}{
- \from{\jobname.dtx}{ustc,2015,numerical}
- }
- \file{versions/ustc/ustcthesis-bachelor.bst}{
- \from{\jobname.dtx}{ustc,2015,numerical,nouppercase,nomark,italicjournal}
- }
}
\endbatchfile
%</install>
@@ -79,7 +58,7 @@ version 2005/12/01 or later.
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{gbt7714}
%<*package>
- [2019/03/21 v1.1.1 GB/T 7714-2015 BibTeX Style]
+ [2019/11/20 v1.1.2 GB/T 7714-2015 BibTeX Style]
%</package>
%
%<*driver>
@@ -129,27 +108,9 @@ version 2005/12/01 or later.
\itemsep\z@}
\let\@listI\@listi
\@listi
-\renewcommand\glossaryname{版本历史}
-\GlossaryPrologue{\section*{\glossaryname}}
-\renewcommand*{\changes@}[3]{%
- \protected@edef\@tempa{%
- \noexpand\glossary{#1 (#2)\levelchar
- \ifx\saved@macroname\@empty
- \space\actualchar\generalname
- \else
- \expandafter\@gobble\saved@macroname
- \actualchar
- \string\verb\quotechar*\verbatimchar\saved@macroname\verbatimchar
- \fi
- :\levelchar #3}}%
- \@tempa
- \endgroup
- \@esphack
-}
\makeatother
\EnableCrossrefs
\CodelineIndex
-\RecordChanges
% \OnlyDescription
\begin{document}
@@ -167,7 +128,6 @@ version 2005/12/01 or later.
% \date{\filedate\qquad\fileversion}
% \maketitle
%
-% \changes{v1.0}{2018/01/01}{Initial release.}
%
%
% \begin{abstract}
@@ -477,8 +437,6 @@ version 2005/12/01 or later.
% \end{thebibliography}
%
%
-% \linespread{1.3}
-% \PrintChanges
%
%
% \clearpage
@@ -504,13 +462,11 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% 只在顺序编码时使用 \opt{sort\&compress}。
-% \changes{v1.0.1}{2018/03/09}{著者出版年制的文献引用不再排序}
% \begin{macrocode}
\if@gbt@numerical
\PassOptionsToPackage{sort&compress}{natbib}
\fi
\RequirePackage{natbib}
-\RequirePackage{etoolbox}
\RequirePackage{url}
% \end{macrocode}
%
@@ -529,25 +485,26 @@ version 2005/12/01 or later.
% 这个仅用于\pkg{chapterbib}。
% \begin{macrocode}
\newcommand\gbtbibstyle[1]{%
- \ifstrequal{#1}{numerical}{%
- \if@gbt@mmxv
- \bibliographystyle{gbt7714-unsrt}%
- \else
- \bibliographystyle{gbt7714-2005-unsrt}%
- \fi
+ \@ifundefined{gbt@bib@#1}{%
+ \PackageError{gbt7714}{Invalid argument #1}{}%
}{%
- \ifstrequal{#1}{authoryear}{%
- \if@gbt@mmxv
- \bibliographystyle{gbt7714-plain}%
- \else
- \bibliographystyle{gbt7714-2005-plain}%
- \fi
- }{%
- \PackageError{gbt7714}{Unknown argument #1.}%
- {It should be `numerical' or `authoryear'.}%
- }%
+ \@nameuse{gbt@bib@#1}
}%
}
+\newcommand\gbt@bib@numerical{%
+ \if@gbt@mmxv
+ \bibliographystyle{gbt7714-unsrt}%
+ \else
+ \bibliographystyle{gbt7714-2005-unsrt}%
+ \fi
+}
+\newcommand\gbt@bib@authoryear{%
+ \if@gbt@mmxv
+ \bibliographystyle{gbt7714-plain}%
+ \else
+ \bibliographystyle{gbt7714-2005-plain}%
+ \fi
+}
% \end{macrocode}
% \end{macro}
%
@@ -568,23 +525,107 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \begin{macro}{\cite}
-% 下面修改 \pkg{natbib} 的引用格式,主要是将页码写在上标位置。
+% 下面修改 \pkg{natbib} 的引用格式,将页码写在上标位置。
+% 为了减少依赖的宏包,这里直接重定义命令不使用 \cs{patchcmd}。
+%
% Numerical 模式的 \cs{citet} 的页码:
% \begin{macrocode}
-\newcommand\gbt@patchfailure[1]{%
- \PackageError{gbt7714}{Failed to patch command \protect#1}{}%
-}
-\patchcmd{\NAT@citexnum}{%
- \@ifnum{\NAT@ctype=\z@}{%
- \if*#2*\else\NAT@cmt#2\fi
- }{}%
- \NAT@mbox{\NAT@@close}%
-}{%
- \NAT@mbox{\NAT@@close}%
- \@ifnum{\NAT@ctype=\z@}{%
- \if*#2*\else\textsuperscript{#2}\fi
- }{}%
-}{}{\gbt@patchfailure{\NAT@citexnum}}
+\def\NAT@citexnum[#1][#2]#3{%
+ \NAT@reset@parser
+ \NAT@sort@cites{#3}%
+ \NAT@reset@citea
+ \@cite{\def\NAT@num{-1}\let\NAT@last@yr\relax\let\NAT@nm\@empty
+ \@for\@citeb:=\NAT@cite@list\do
+ {\@safe@activestrue
+ \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
+ \@safe@activesfalse
+ \@ifundefined{b@\@citeb\@extra@b@citeb}{%
+ {\reset@font\bfseries?}
+ \NAT@citeundefined\PackageWarning{natbib}%
+ {Citation `\@citeb' on page \thepage \space undefined}}%
+ {\let\NAT@last@num\NAT@num\let\NAT@last@nm\NAT@nm
+ \NAT@parse{\@citeb}%
+ \ifNAT@longnames\@ifundefined{bv@\@citeb\@extra@b@citeb}{%
+ \let\NAT@name=\NAT@all@names
+ \global\@namedef{bv@\@citeb\@extra@b@citeb}{}}{}%
+ \fi
+ \ifNAT@full\let\NAT@nm\NAT@all@names\else
+ \let\NAT@nm\NAT@name\fi
+ \ifNAT@swa
+ \@ifnum{\NAT@ctype>\@ne}{%
+ \@citea
+ \NAT@hyper@{\@ifnum{\NAT@ctype=\tw@}{\NAT@test{\NAT@ctype}}{\NAT@alias}}%
+ }{%
+ \@ifnum{\NAT@cmprs>\z@}{%
+ \NAT@ifcat@num\NAT@num
+ {\let\NAT@nm=\NAT@num}%
+ {\def\NAT@nm{-2}}%
+ \NAT@ifcat@num\NAT@last@num
+ {\@tempcnta=\NAT@last@num\relax}%
+ {\@tempcnta\m@ne}%
+ \@ifnum{\NAT@nm=\@tempcnta}{%
+ \@ifnum{\NAT@merge>\@ne}{}{\NAT@last@yr@mbox}%
+ }{%
+ \advance\@tempcnta by\@ne
+ \@ifnum{\NAT@nm=\@tempcnta}{%
+% \end{macrocode}
+%
+% 在顺序编码制下,\pkg{natbib} 只有在三个以上连续文献引用才会使用连接号,
+% 这里修改为允许两个引用使用连接号。
+% \changes{v1.0.3}{2018/03/29}{顺序编码制连续两个文献引用之间使用连接号}
+% \changes{v1.0.4}{2018/04/12}{页码的连接号由 en dash 改为 hyphen}
+% \begin{macrocode}
+ % \ifx\NAT@last@yr\relax
+ % \def@NAT@last@yr{\@citea}%
+ % \else
+ % \def@NAT@last@yr{--\NAT@penalty}%
+ % \fi
+ \def@NAT@last@yr{-\NAT@penalty}%
+ }{%
+ \NAT@last@yr@mbox
+ }%
+ }%
+ }{%
+ \@tempswatrue
+ \@ifnum{\NAT@merge>\@ne}{\@ifnum{\NAT@last@num=\NAT@num\relax}{\@tempswafalse}{}}{}%
+ \if@tempswa\NAT@citea@mbox\fi
+ }%
+ }%
+ \NAT@def@citea
+ \else
+ \ifcase\NAT@ctype
+ \ifx\NAT@last@nm\NAT@nm \NAT@yrsep\NAT@penalty\NAT@space\else
+ \@citea \NAT@test{\@ne}\NAT@spacechar\NAT@mbox{\NAT@super@kern\NAT@@open}%
+ \fi
+ \if*#1*\else#1\NAT@spacechar\fi
+ \NAT@mbox{\NAT@hyper@{{\citenumfont{\NAT@num}}}}%
+ \NAT@def@citea@box
+ \or
+ \NAT@hyper@citea@space{\NAT@test{\NAT@ctype}}%
+ \or
+ \NAT@hyper@citea@space{\NAT@test{\NAT@ctype}}%
+ \or
+ \NAT@hyper@citea@space\NAT@alias
+ \fi
+ \fi
+ }%
+ }%
+ \@ifnum{\NAT@cmprs>\z@}{\NAT@last@yr}{}%
+ \ifNAT@swa\else
+% \end{macrocode}
+%
+% 将页码放在括号外边,并且置于上标。
+% \begin{macrocode}
+ % \@ifnum{\NAT@ctype=\z@}{%
+ % \if*#2*\else\NAT@cmt#2\fi
+ % }{}%
+ \NAT@mbox{\NAT@@close}%
+ \@ifnum{\NAT@ctype=\z@}{%
+ \if*#2*\else\textsuperscript{#2}\fi
+ }{}%
+ \fi
+ }{#1}{#2}%
+}%
% \end{macrocode}
%
% Numerical 模式的 \cs{citep} 的页码:
@@ -597,13 +638,102 @@ version 2005/12/01 or later.
%
% Author-year 模式的 \cs{citet} 的页码:
% \begin{macrocode}
-\patchcmd{\NAT@citex}{%
- \if*#2*\else\NAT@cmt#2\fi
- \if\relax\NAT@date\relax\else\NAT@@close\fi
-}{%
- \if\relax\NAT@date\relax\else\NAT@@close\fi
- \if*#2*\else\textsuperscript{#2}\fi
-}{}{\gbt@patchfailure{\NAT@citex}}
+\def\NAT@citex%
+ [#1][#2]#3{%
+ \NAT@reset@parser
+ \NAT@sort@cites{#3}%
+ \NAT@reset@citea
+ \@cite{\let\NAT@nm\@empty\let\NAT@year\@empty
+ \@for\@citeb:=\NAT@cite@list\do
+ {\@safe@activestrue
+ \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
+ \@safe@activesfalse
+ \@ifundefined{b@\@citeb\@extra@b@citeb}{\@citea%
+ {\reset@font\bfseries ?}\NAT@citeundefined
+ \PackageWarning{natbib}%
+ {Citation `\@citeb' on page \thepage \space undefined}\def\NAT@date{}}%
+ {\let\NAT@last@nm=\NAT@nm\let\NAT@last@yr=\NAT@year
+ \NAT@parse{\@citeb}%
+ \ifNAT@longnames\@ifundefined{bv@\@citeb\@extra@b@citeb}{%
+ \let\NAT@name=\NAT@all@names
+ \global\@namedef{bv@\@citeb\@extra@b@citeb}{}}{}%
+ \fi
+ \ifNAT@full\let\NAT@nm\NAT@all@names\else
+ \let\NAT@nm\NAT@name\fi
+ \ifNAT@swa\ifcase\NAT@ctype
+ \if\relax\NAT@date\relax
+ \@citea\NAT@hyper@{\NAT@nmfmt{\NAT@nm}\NAT@date}%
+ \else
+ \ifx\NAT@last@nm\NAT@nm\NAT@yrsep
+ \ifx\NAT@last@yr\NAT@year
+ \def\NAT@temp{{?}}%
+ \ifx\NAT@temp\NAT@exlab\PackageWarningNoLine{natbib}%
+ {Multiple citation on page \thepage: same authors and
+ year\MessageBreak without distinguishing extra
+ letter,\MessageBreak appears as question mark}\fi
+ \NAT@hyper@{\NAT@exlab}%
+ \else\unskip\NAT@spacechar
+ \NAT@hyper@{\NAT@date}%
+ \fi
+ \else
+ \@citea\NAT@hyper@{%
+ \NAT@nmfmt{\NAT@nm}%
+ \hyper@natlinkbreak{%
+ \NAT@aysep\NAT@spacechar}{\@citeb\@extra@b@citeb
+ }%
+ \NAT@date
+ }%
+ \fi
+ \fi
+ \or\@citea\NAT@hyper@{\NAT@nmfmt{\NAT@nm}}%
+ \or\@citea\NAT@hyper@{\NAT@date}%
+ \or\@citea\NAT@hyper@{\NAT@alias}%
+ \fi \NAT@def@citea
+ \else
+ \ifcase\NAT@ctype
+ \if\relax\NAT@date\relax
+ \@citea\NAT@hyper@{\NAT@nmfmt{\NAT@nm}}%
+ \else
+ \ifx\NAT@last@nm\NAT@nm\NAT@yrsep
+ \ifx\NAT@last@yr\NAT@year
+ \def\NAT@temp{{?}}%
+ \ifx\NAT@temp\NAT@exlab\PackageWarningNoLine{natbib}%
+ {Multiple citation on page \thepage: same authors and
+ year\MessageBreak without distinguishing extra
+ letter,\MessageBreak appears as question mark}\fi
+ \NAT@hyper@{\NAT@exlab}%
+ \else
+ \unskip\NAT@spacechar
+ \NAT@hyper@{\NAT@date}%
+ \fi
+ \else
+ \@citea\NAT@hyper@{%
+ \NAT@nmfmt{\NAT@nm}%
+ \hyper@natlinkbreak{\NAT@spacechar\NAT@@open\if*#1*\else#1\NAT@spacechar\fi}%
+ {\@citeb\@extra@b@citeb}%
+ \NAT@date
+ }%
+ \fi
+ \fi
+ \or\@citea\NAT@hyper@{\NAT@nmfmt{\NAT@nm}}%
+ \or\@citea\NAT@hyper@{\NAT@date}%
+ \or\@citea\NAT@hyper@{\NAT@alias}%
+ \fi
+ \if\relax\NAT@date\relax
+ \NAT@def@citea
+ \else
+ \NAT@def@citea@close
+ \fi
+ \fi
+ }}\ifNAT@swa\else
+% \end{macrocode}
+%
+% 将页码放在括号外边,并且置于上标。
+% \begin{macrocode}
+ % \if*#2*\else\NAT@cmt#2\fi
+ \if\relax\NAT@date\relax\else\NAT@@close\fi
+ \if*#2*\else\textsuperscript{#2}\fi
+ \fi}{#1}{#2}}
% \end{macrocode}
%
% Author-year 模式的 \cs{citep} 的页码:
@@ -612,27 +742,10 @@ version 2005/12/01 or later.
[3]{\ifNAT@swa\NAT@@open\if*#2*\else#2\NAT@spacechar\fi
#1\NAT@@close\if*#3*\else\textsuperscript{#3}\fi\else#1\fi\endgroup}
% \end{macrocode}
-%
-% 在顺序编码制下,\pkg{natbib} 只有在三个以上连续文献引用才会使用连接号,
-% 这里修改为允许两个引用使用连接号。
-% \changes{v1.0.3}{2018/03/29}{顺序编码制连续两个文献引用之间使用连接号}
-% \changes{v1.0.4}{2018/04/12}{页码的连接号由 en dash 改为 hyphen}
-% \begin{macrocode}
-\patchcmd{\NAT@citexnum}{%
- \ifx\NAT@last@yr\relax
- \def@NAT@last@yr{\@citea}%
- \else
- \def@NAT@last@yr{--\NAT@penalty}%
- \fi
-}{%
- \def@NAT@last@yr{-\NAT@penalty}%
-}{}{\gbt@patchfailure{\NAT@citexnum}}
-% \end{macrocode}
% \end{macro}
%
% \begin{environment}{thebibliography}
% 参考文献列表的标签左对齐
-% \changes{v1.0.6}{2018/05/10}{文献列表的数字标签左对齐}
% \begin{macrocode}
\renewcommand\@biblabel[1]{[#1]\hfill}
% \end{macrocode}
@@ -640,16 +753,14 @@ version 2005/12/01 or later.
%
% \begin{macro}{\url}
% 使用 \pkg{xurl} 宏包的方法,增加 URL 可断行的位置。
-% \changes{v1.0.8}{2018/06/23}{使用 \pkg{xurl} 的方法改进 URL 断行}
-% \begin{macrocode}
-\def\UrlBreaks{%
- \do\/%
- \do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j\do\k\do\l%
- \do\m\do\n\do\o\do\p\do\q\do\r\do\s\do\t\do\u\do\v\do\w\do\x\do\y\do\z%
- \do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L%
- \do\M\do\N\do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V\do\W\do\X\do\Y\do\Z%
- \do0\do1\do2\do3\do4\do5\do6\do7\do8\do9\do=\do/\do.\do:%
- \do\*\do\-\do\~\do\'\do\"\do\-}
+% \begin{macrocode}
+\g@addto@macro\UrlBreaks{%
+ \do0\do1\do2\do3\do4\do5\do6\do7\do8\do9%
+ \do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L\do\M
+ \do\N\do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V\do\W\do\X\do\Y\do\Z
+ \do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j\do\k\do\l\do\m
+ \do\n\do\o\do\p\do\q\do\r\do\s\do\t\do\u\do\v\do\w\do\x\do\y\do\z
+}
\Urlmuskip=0mu plus 0.1mu
%</package>
% \end{macrocode}
@@ -667,7 +778,6 @@ version 2005/12/01 or later.
% \begin{environment}{bst}
% 这里定义了一些变量用于定制样式,
% 可以在下面的 |load.config| 函数中选择是否启用。
-% \changes{v1.0.8}{2018/06/23}{新增接口供用户自定义样式}
% \begin{macrocode}
%<*authoryear|numerical>
INTEGERS {
@@ -705,7 +815,9 @@ FUNCTION {load.config}
%
% 英文姓名转为全大写:
% \begin{macrocode}
+%<*!nouppercase&!thu>
#1 'uppercase.name :=
+%</!nouppercase&!thu>
%<*nouppercase|thu>
#0 'uppercase.name :=
%</nouppercase|thu>
@@ -719,7 +831,9 @@ FUNCTION {load.config}
% 采用著者-出版年制时,作者姓名与年份之间使用句点连接:
% \begin{macrocode}
%<*authoryear>
+%<*!period&!2005&!ustc>
#0 'period.between.author.year :=
+%</!period&!2005&!ustc>
%<*period|2005|ustc>
#1 'period.between.author.year :=
%</period|2005|ustc>
@@ -778,10 +892,12 @@ FUNCTION {load.config}
%
% 无出版地或出版者时,著录“出版地不详”,“出版者不详”,“S.l.” 或 “s.n.”:
% \begin{macrocode}
+%<*!noslsn&!thu&!ustc>
#1 'show.missing.address.publisher :=
-%<*noslsn|ustc>
+%</!noslsn&!thu&!ustc>
+%<*noslsn|thu|ustc>
#0 'show.missing.address.publisher :=
-%</noslsn|ustc>
+%</noslsn|thu|ustc>
% \end{macrocode}
%
% 是否著录 URL:
@@ -794,7 +910,9 @@ FUNCTION {load.config}
%
% 是否著录 DOI:
% \begin{macrocode}
+%<*!nodoi&!2005>
#1 'show.doi :=
+%</!nodoi&!2005>
%<*nodoi|2005>
#0 'show.doi :=
%</nodoi|2005>
@@ -805,7 +923,6 @@ FUNCTION {load.config}
#0 'show.note :=
% \end{macrocode}
%
-% \changes{v1.1.1}{2019/03/21}{允许自定义文种的顺序}
% 参考文献表按照“著者-出版年”组织时,各个文种的顺序:
% \begin{macrocode}
%<*authoryear>
@@ -1047,7 +1164,6 @@ FUNCTION {init.state.consts}
% \end{macrocode}
%
% 下面是一些常量的定义
-% \changes{v1.1}{2019/01/02}{允许自定义“et al”}
% \begin{macrocode}
FUNCTION {bbl.anonymous}
{ entry.lang lang.zh =
@@ -1090,7 +1206,12 @@ FUNCTION {bbl.wide.space} { "\quad " }
FUNCTION {bbl.wide.space} { "\ " }
%</2005>
+%<*!thu>
FUNCTION {bbl.slash} { "//\allowbreak " }
+%</!thu>
+%<*thu>
+FUNCTION {bbl.slash} { " // " }
+%</thu>
FUNCTION {bbl.sine.loco}
{ entry.lang lang.zh =
@@ -1220,21 +1341,9 @@ FUNCTION {output.check}
%
% This function finishes all entries.
%
-% Tsinghua requires no period at the end of book-like entries.
% \begin{macrocode}
FUNCTION {fin.entry}
-%<*!thu>
{ add.period$
-%</!thu>
-%<*thu>
-{ type$ "book" =
- type$ "inbook" = or
- type$ "incollection" = or
- type$ "collection" = or
- 'skip$
- 'add.period$
- if$
-%</thu>
write$
newline$
}
@@ -1376,7 +1485,6 @@ FUNCTION {italicize}
% \end{macrocode}
%
% \subsubsection{Detect Language}
-% \changes{v1.0.7}{2018/05/12}{修正了检测 Unicode 语言}
% \begin{macrocode}
INTEGERS { byte second.byte }
@@ -1586,8 +1694,6 @@ FUNCTION {set.entry.numbered}
%
% Other formatting functions are similar, so no "comment version" will be
% given for them.
-% \changes{v1.0.2}{2018/03/16}{正确识别姓名中的“others”}
-% \changes{v1.0.8}{2018/06/23}{使用“\textasciitilde”连接英文姓名}
% \begin{macrocode}
INTEGERS { nameptr namesleft numnames name.lang }
@@ -1752,19 +1858,15 @@ FUNCTION {make.full.names}
FUNCTION {output.bibitem}
{ newline$
"\bibitem[" write$
- label write$
- ")" make.full.names duplicate$ short.list =
+ label ")" *
+ make.full.names duplicate$ short.list =
{ pop$ }
{ * }
if$
's :=
s text.length$ 'charptr :=
- { charptr #0 > }
- { s charptr #1 substring$ "]" =
- { #0 'charptr := }
- { charptr #1 - 'charptr := }
- if$
- }
+ { charptr #0 > s charptr #1 substring$ "[" = not and }
+ { charptr #1 - 'charptr := }
while$
charptr #0 >
{ "{" s * "}" * }
@@ -1787,9 +1889,6 @@ FUNCTION {output.bibitem}
% and except for the first one after a colon (followed by whitespace)),
% and hope the user has brace-surrounded words that need to stay capitilized;
% for some styles, however, we leave it as it is in the database.
-% \changes{v1.0.6}{2018/05/10}{不再处理中文标题的英文单词的大小写}
-% \changes{v1.0.9}{2018/08/05}{不再转换题名 volume 的大小写}
-% \changes{v1.0.9}{2018/08/05}{增加选项在题名添加超链接}
% \begin{macrocode}
FUNCTION {change.sentence.case}
{ entry.lang lang.en =
@@ -2033,7 +2132,6 @@ FUNCTION {format.booktitle.vol.num}
% \end{macrocode}
%
-% \changes{v1.1}{2019/01/02}{修正 series 的 bug}
% \begin{macrocode}
FUNCTION {format.series.vol.num.booktitle}
{ format.volume.number 's :=
@@ -2083,6 +2181,11 @@ FUNCTION {set.entry.mark}
FUNCTION {format.mark}
{ show.mark
+%<*thu>
+ type$ "phdthesis" = type$ "mastersthesis" = or type$ "patent" = or
+ medium empty$ not or entry.is.electronic or
+ and
+%</thu>
{ medium empty$ not
{ entry.mark "/" * medium * 'entry.mark := }
{ entry.is.electronic
@@ -2091,7 +2194,12 @@ FUNCTION {format.mark}
if$
}
if$
+%<*!thu>
"\allowbreak[" entry.mark * "]" *
+%</!thu>
+%<*thu>
+ " [" entry.mark * "]" *
+%</thu>
}
{ "" }
if$
@@ -2477,7 +2585,6 @@ FUNCTION {format.periodical.year.volume.number}
% \subsubsection{Format url and doi}
%
% 传统的 \BibTeX{} 习惯使用 howpublished 著录 url,这里提供支持。
-% \changes{v1.0.8}{2018/06/23}{支持 howpublished 中的 url}
% \begin{macrocode}
FUNCTION {check.url}
{ url empty$ not
@@ -2518,7 +2625,6 @@ FUNCTION {format.url}
% \end{macrocode}
%
% 需要检测 DOI 是否已经包含在 URL 中。
-% \changes{v1.0.5}{2018/04/18}{允许著录多个 DOI}
% \begin{macrocode}
FUNCTION {check.doi}
{ doi empty$ not
@@ -2903,7 +3009,6 @@ FUNCTION {electronic}
% Optional: author, title, howpublished, month, year, note
%
% Misc 用来自动判断类型。
-% \changes{v1.0.9}{2018/08/05}{修正不显示 url 的选项}
% \begin{macrocode}
FUNCTION {misc}
{ journal empty$ not