diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/gbt7714/gbt7714.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/gbt7714/gbt7714.sty | 63 |
1 files changed, 47 insertions, 16 deletions
diff --git a/Master/texmf-dist/tex/latex/gbt7714/gbt7714.sty b/Master/texmf-dist/tex/latex/gbt7714/gbt7714.sty index 7cb80db925a..c80beadadc5 100644 --- a/Master/texmf-dist/tex/latex/gbt7714/gbt7714.sty +++ b/Master/texmf-dist/tex/latex/gbt7714/gbt7714.sty @@ -8,9 +8,9 @@ %% ------------------------------------------------------------------- %% GB/T 7714—2015 BibTeX Style %% https://github.com/CTeX-org/gbt7714-bibtex-style -%% Version: 2020/12/17 v2.1 +%% Version: 2021/06/20 v2.1.2 %% ------------------------------------------------------------------- -%% Copyright (C) 2016-2020 by Zeping Lee <zepinglee AT gmail.com> +%% Copyright (C) 2016—2021 by Zeping Lee <zepinglee AT gmail.com> %% ------------------------------------------------------------------- %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c @@ -18,11 +18,11 @@ %% The latest version of this license is in %% https://www.latex-project.org/lppl.txt %% and version 1.3c or later is part of all distributions of LaTeX -%% version 2005/12/01 or later. +%% version 2008 or later. %% ------------------------------------------------------------------- \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{gbt7714} - [2020/12/17 v2.1 GB/T 7714—2015 BibTeX Style] + [2021/06/20 v2.1.2 GB/T 7714—2015 BibTeX Style] \newif\ifgbt@legacy@interface \newif\ifgbt@mmxv \newif\ifgbt@numerical @@ -57,11 +57,11 @@ \gbt@legacy@interfacetrue \gbt@numericalfalse } -\PassOptionsToPackage{compress}{natbib} \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{natbib}} \ProcessOptions\relax \RequirePackage{natbib} \RequirePackage{url} +\def\NAT@cmprs{\@ne} \renewcommand\newblock{\space} \newcommand\bibstyle@super{\bibpunct{[}{]}{,}{s}{,}{\textsuperscript{,}}} \newcommand\bibstyle@numbers{\bibpunct{[}{]}{,}{n}{,}{,}} @@ -71,16 +71,44 @@ \@namedef{bibstyle@gbt7714-author-year}{\bibstyle@authoryear} \@namedef{bibstyle@gbt7714-2005-numerical}{\bibstyle@super} \@namedef{bibstyle@gbt7714-2005-author-year}{\bibstyle@authoryear} -\renewcommand\NAT@citesuper[3]{\ifNAT@swa - \if*#2*\else#2\NAT@spacechar\fi - % \unskip\kern\p@\textsuperscript{\NAT@@open#1\NAT@@close}% - % \if*#3*\else\NAT@spacechar#3\fi\else #1\fi\endgroup} - \unskip\kern\p@\textsuperscript{\NAT@@open#1\NAT@@close\if*#3*\else#3\fi}% - \else #1\fi\endgroup} -\renewcommand\NAT@citenum% - [3]{\ifNAT@swa\NAT@@open\if*#2*\else#2\NAT@spacechar\fi - % #1\if*#3*\else\NAT@cmt#3\fi\NAT@@close\else#1\fi\endgroup} - #1\NAT@@close\textsuperscript{\if*#3*\else#3\fi}\else#1\fi\endgroup} +\renewcommand\NAT@citesuper[3]{% + \ifNAT@swa + \if*#2*\else + #2\NAT@spacechar + \fi + % \unskip\kern\p@\textsuperscript{\NAT@@open#1\NAT@@close}% + % \if*#3*\else\NAT@spacechar#3\fi\else #1\fi\endgroup} + \unskip\kern\p@ + \textsuperscript{% + \NAT@@open + #1% + \NAT@@close + \if*#3*\else + #3% + \fi + }% + \kern\p@ + \else + #1% + \fi + \endgroup +} +\renewcommand\NAT@citenum[3]{% + \ifNAT@swa + \NAT@@open + \if*#2*\else + #2\NAT@spacechar + \fi + % #1\if*#3*\else\NAT@cmt#3\fi\NAT@@close\else#1\fi\endgroup} + #1\NAT@@close + \if*#3*\else + \textsuperscript{#3}% + \fi + \else + #1% + \fi + \endgroup +} \def\NAT@citexnum[#1][#2]#3{% \NAT@reset@parser \NAT@sort@cites{#3}% @@ -161,8 +189,11 @@ % }{}% \NAT@mbox{\NAT@@close}% \@ifnum{\NAT@ctype=\z@}{% - \if*#2*\else\textsuperscript{#2}\fi + \if*#2*\else + \textsuperscript{#2}% + \fi }{}% + \NAT@super@kern \fi }{#1}{#2}% }% |