summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-numeric.bst
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2021-04-05 01:43:33 +0000
committerNorbert Preining <preining@logic.at>2021-04-05 01:43:33 +0000
commita0c34b582e3f057d294123f01f48c36394602785 (patch)
tree8860ec4f46c34d0e188d0b02fa6d654a4d2c12a5 /Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-numeric.bst
parent2e5fcbba355cdc61c85c2d0c67db185c51d462f0 (diff)
thuthesis (5apr21)
git-svn-id: svn://tug.org/texlive/trunk@58750 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-numeric.bst')
-rw-r--r--Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-numeric.bst79
1 files changed, 33 insertions, 46 deletions
diff --git a/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-numeric.bst b/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-numeric.bst
index 6c1eaa63d78..9f57d5ed57d 100644
--- a/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-numeric.bst
+++ b/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-numeric.bst
@@ -8,7 +8,7 @@
%% -------------------------------------------------------------------
%% GB/T 7714—2015 BibTeX Style
%% https://github.com/CTeX-org/gbt7714-bibtex-style
-%% Version: 2020/12/17 v2.1
+%% Version: 2021/04/03 v2.1.1
%% -------------------------------------------------------------------
%% Copyright (C) 2016—2021 by Zeping Lee <zepinglee AT gmail.com>
%% -------------------------------------------------------------------
@@ -73,7 +73,7 @@ FUNCTION {load.config}
#0 'italic.journal :=
#0 'bold.journal.volume :=
#0 'show.missing.address.publisher :=
- #0 'space.before.pages :=
+ #1 'space.before.pages :=
#0 'only.start.page :=
#1 'show.urldate :=
#1 'show.url :=
@@ -240,6 +240,22 @@ FUNCTION {or}
if$
}
+STRINGS { x y }
+
+FUNCTION {contains}
+{ 'y :=
+ 'x :=
+ y text.length$ 'len :=
+ x text.length$ len - #1 + 'charptr :=
+ { charptr #0 >
+ x charptr len substring$ y = not
+ and
+ }
+ { charptr #1 - 'charptr := }
+ while$
+ charptr #0 >
+}
+
STRINGS { s t }
FUNCTION {output.nonnull}
@@ -703,17 +719,13 @@ FUNCTION {output.bibitem}
"\bibitem[" write$
label ")" *
make.full.names duplicate$ short.list =
- { pop$ }
- { * }
- if$
- 's :=
- s text.length$ 'charptr :=
- { charptr #0 > s charptr #1 substring$ "[" = not and }
- { charptr #1 - 'charptr := }
- while$
- charptr #0 >
- { "{" s * "}" * }
- { s }
+ { pop$ }
+ { duplicate$ "]" contains
+ { "{" swap$ * "}" * }
+ 'skip$
+ if$
+ *
+ }
if$
"]{" * write$
cite$ write$
@@ -1176,21 +1188,6 @@ FUNCTION {extract.after.dash}
if$
}
-FUNCTION {contains.dash}
-{ duplicate$ empty$
- { pop$ #0 }
- { 's :=
- { s empty$ not
- s #1 #1 substring$ "-" = not
- and
- }
- { s #2 global.max$ substring$ 's := }
- while$
- s empty$ not
- }
- if$
-}
-
FUNCTION {extract.before.slash}
{ duplicate$ empty$
{ pop$ "" }
@@ -1235,23 +1232,6 @@ FUNCTION {extract.after.slash}
if$
}
-FUNCTION {contains.slash}
-{ duplicate$ empty$
- { pop$ #0 }
- { 's :=
- { s empty$ not
- s #1 #1 substring$ "-" = not
- and
- s #1 #1 substring$ "/" = not
- and
- }
- { s #2 global.max$ substring$ 's := }
- while$
- s empty$ not
- }
- if$
-}
-
FUNCTION {format.year}
{ year empty$ not
{ year extract.before.slash extra.label * }
@@ -2212,7 +2192,10 @@ FUNCTION {calc.short.authors}
FUNCTION {calc.label}
{ calc.short.authors
- short.list
+ short.list "]" contains
+ { "{" short.list * "}" * }
+ { short.list }
+ if$
"("
*
format.year duplicate$ empty$
@@ -2220,6 +2203,10 @@ FUNCTION {calc.label}
{ pop$ "" }
'skip$
if$
+ duplicate$ "]" contains
+ { "{" swap$ * "}" * }
+ 'skip$
+ if$
*
'label :=
short.label