summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-bachelor.bst
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-bachelor.bst')
-rw-r--r--Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-bachelor.bst77
1 files changed, 32 insertions, 45 deletions
diff --git a/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-bachelor.bst b/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-bachelor.bst
index 1dd06bb8871..5c08210cb3f 100644
--- a/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-bachelor.bst
+++ b/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-bachelor.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>
%% -------------------------------------------------------------------
@@ -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