summaryrefslogtreecommitdiff
path: root/biblio/bibtex/contrib/econ-bst/econ-jie.bst
diff options
context:
space:
mode:
Diffstat (limited to 'biblio/bibtex/contrib/econ-bst/econ-jie.bst')
-rw-r--r--biblio/bibtex/contrib/econ-bst/econ-jie.bst202
1 files changed, 134 insertions, 68 deletions
diff --git a/biblio/bibtex/contrib/econ-bst/econ-jie.bst b/biblio/bibtex/contrib/econ-bst/econ-jie.bst
index 06a2cfbe50..f151baaed0 100644
--- a/biblio/bibtex/contrib/econ-bst/econ-jie.bst
+++ b/biblio/bibtex/contrib/econ-bst/econ-jie.bst
@@ -4,7 +4,7 @@
% Maintainer: Shiro Takeda
% Copyright (C) 2001-2018 Shiro Takeda
% First-written: <2007/07/28>
-% Version: 2.7
+% Version: 3.1
% Keywords: TeX, BibTeX, bst
% URL: https://github.com/ShiroTakeda/econ-bst
@@ -31,7 +31,7 @@
% For changelogs, see CHANGES.txt file.
% version number
-FUNCTION {econ.version} { "2.7" }
+FUNCTION {econ.version} { "3.1" }
% File name
FUNCTION {econ.file} { "econ-jie.bst" }
@@ -47,7 +47,7 @@ ENTRY
institution journal key month note number organization pages publisher
school series title type url volume year
% Fields specific to econ.bst
- order absorder nameorder
+ order absorder nameorder sortname
}
% Definition of entry variable. The entry variable is a variable which has
@@ -311,10 +311,18 @@ FUNCTION {bst.cite.and.nameorder}
FUNCTION {bst.and.others.num}
{ #3 } % If the number of authors is greater or equal to three (default).
-% If the number of authors is greater or equal to bst.max.author.num, only
-% first author is listed and other authors' names are abbreviated as "et al.".
+% If the number of authors is greater than N1, only the first N2 authors are
+% displayed in the reference part (and other authors' names are omitted by "et
+% al".
+%
+% The following function determines the value of N1.
FUNCTION {bst.max.author.num}
-{ #12 } % If the number of authors is greater or equal to 12 (default).
+{ #8 } % (default).
+
+% The following function determines the value of N2.
+FUNCTION {bst.max.author.num.display}
+{ #3 } % (default).
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -728,7 +736,7 @@ FUNCTION {bst.doi.post}
% #2 -> Only DOI field is displayed
%
FUNCTION {bst.url.doi}
-% { #0 } % (default) -> Both fields are displayed
+% { #0 } % -> Both fields are displayed
% { #1 } % -> Only URL field is displayed
{ #2 } % (default) --> Only DOI field is displayed
@@ -825,7 +833,7 @@ STRINGS { item.type }
STRINGS { tempa tempb }
%% Integer global variables:
-INTEGERS { nameptr namesleft numnames name.num }
+INTEGERS { nameptr namesleft numnames name.num numtrunc }
INTEGERS { multiresult }
INTEGERS { index }
INTEGERS { len }
@@ -1185,6 +1193,11 @@ FUNCTION {bst.and.others.output}
%%% author and editor
+% nameptr: author number
+% numnames: the total number of authors
+% namesleft: the number of authors which have not been processed.
+% numtrunc: bst.max.author.num.display
+
%%% name
FUNCTION {format.names}
{ 's :=
@@ -1193,11 +1206,20 @@ FUNCTION {format.names}
% Set the number of authors to numnames.
s num.names$ 'numnames :=
numnames 'namesleft :=
- % Repeat if namesleft > 0
+
+ numnames bst.max.author.num >
+ % If numnames > bst.max.author.num
+ { bst.max.author.num.display 'numtrunc := }
+ { #0 'numtrunc := }
+ if$
+
+ % Repeat if namesleft > 0 ---- Repeat from here
{ namesleft #0 > }
- { nameptr #1 =
- % First author
+ {
+ % Block A starts
+ nameptr #1 =
+ % A-1: If the author is the 1st author
{ bst.author.name #0 =
bst.author.name #1 =
or
@@ -1213,7 +1235,7 @@ FUNCTION {format.names}
}
if$
}
- % The second or later authors
+ % A-2: If the author is the second or later authors (not the 1st author).
{ bst.author.name #0 =
bst.author.name #2 =
or
@@ -1230,27 +1252,49 @@ FUNCTION {format.names}
if$
}
if$
+ % Block A ends
+ % Block B starts
nameptr #1 >
- % The second or later authors
- { numnames bst.max.author.num >
- { bst.and.others *
- #1 'namesleft := }
- { nameorder.temp "random" =
- bst.use.nameorder #0 = not and
- { bst.and.nameorder * t * }
- { namesleft #1 >
- % More than one authors left
- { ", " * t * }
- % Only one author left
- { t "others" =
- { bst.and.others.output * }
- { numnames #2 =
- % Entry with two authors
- { bst.and * t * }
- { bst.ands * t * }
- if$
- }
+
+ % B-1: If the author is the second or later authors
+ {
+
+ nameptr #1 - numtrunc =
+ % If nameptr - 1 = numtrunc
+ { #1 'namesleft :=
+ "others" 't := }
+ 'skip$
+ if$
+
+ % If numnames <= bst.max.author.num
+ nameorder.temp "random" =
+ bst.use.nameorder #0 = not and
+
+ % If random ordering is used
+ { bst.and.nameorder * t * }
+
+ % If random ordering is not used
+ { namesleft #1 >
+
+ % If more than one authors are left
+ { ", " * t * }
+
+ % If the author is the last author.
+ { t "others" =
+
+ % If the name is "others"
+ { bst.and.others.output * }
+
+ % If the name is not "others"
+ { numnames #2 =
+
+ % If the entry have two authors
+ { bst.and * t * }
+
+ % If the entry have more than two authors
+ { bst.ands * t * }
+
if$
}
if$
@@ -1259,12 +1303,17 @@ FUNCTION {format.names}
}
if$
}
+
+ % When the author is the first author.
't
if$
+ % Block B ends
+
nameptr #1 + 'nameptr :=
namesleft #1 - 'namesleft :=
+
}
- while$
+ while$ % ---- Repeat until here
}
% remove successive periods (commas) from author
@@ -1389,10 +1438,6 @@ FUNCTION {format.editors.alt}
{ "\bysame " }
{ bst.author.pre editor remove.ss.period.auth * }
if$
- editor num.names$ #1 >
- { bst.editors * }
- { bst.editor * }
- if$
}
if$
}
@@ -2632,7 +2677,7 @@ FUNCTION {format.lab.names.abb}
% if the number of authors is less than bst.and.others.num, full name.
{ s format.lab.names.full }
% if the number of authors is equal or more than bst.and.others.num, abbreviated name.
- { s #1 "{ll}" format.name$ bst.and.others.output * }
+ { s #1 "{vv~}{ll}" format.name$ bst.and.others.output * }
if$
}
@@ -2690,58 +2735,74 @@ FUNCTION {format.names.full.wo.and}
}
FUNCTION {author.key.full.wo.and}
-{ author empty$
- { key empty$
- { cite$ #1 #3 substring$ }
- { key #3 text.prefix$ }
+{ sortname empty$ not
+ { sortname format.names.full.wo.and }
+ { author empty$ not
+ { author format.names.full.wo.and }
+ { key empty$ not
+ { key #3 text.prefix$ }
+ { cite$ #1 #3 substring$ }
+ if$
+ }
if$
}
- { author format.names.full.wo.and }
if$
}
FUNCTION {author.editor.key.full.wo.and}
-{ author empty$
- { editor empty$
- { key empty$
- { cite$ #1 #3 substring$ }
- { key #3 text.prefix$ }
+{ sortname empty$ not
+ { sortname format.names.full.wo.and }
+ { author empty$ not
+ { author format.names.full.wo.and }
+ { editor empty$ not
+ { editor format.names.full.wo.and }
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ { key #3 text.prefix$ }
+ if$
+ }
if$
}
- { editor format.names.full.wo.and }
if$
}
- { author format.names.full.wo.and }
if$
}
FUNCTION {editor.key.organization.key.full.wo.and}
-{ editor empty$
- { key empty$
- { organization empty$
- { cite$ #1 #3 substring$ }
- { "The " #4 organization chop.word #3 text.prefix$ }
+{ sortname empty$ not
+ { sortname format.names.full.wo.and }
+ { editor empty$ not
+ { editor format.names.full.wo.and }
+ { key empty$ not
+ { key #3 text.prefix$ }
+ { organization empty$ not
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ { cite$ #1 #3 substring$ }
+ if$
+ }
if$
}
- { key #3 text.prefix$ }
if$
}
- { editor format.names.full.wo.and }
if$
}
FUNCTION {author.key.organization.key.full.wo.and}
-{ author empty$
- { key empty$
- { organization empty$
- { cite$ #1 #3 substring$ }
- { "The " #4 organization chop.word #3 text.prefix$ }
+{ sortname empty$ not
+ { sortname format.names.full.wo.and }
+ { author empty$ not
+ { author format.names.full.wo.and }
+ { key empty$ not
+ { key #3 text.prefix$ }
+ { organization empty$ not
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ { cite$ #1 #3 substring$ }
+ if$
+ }
if$
}
- { key #3 text.prefix$ }
if$
}
- { author format.names.full.wo.and }
if$
}
@@ -2935,13 +2996,17 @@ FUNCTION {calc.cyear}
}
FUNCTION {calc.sort.label.abb}
-{ author empty$
- { editor empty$
- { "" }
- { editor 's := }
+{ sortname empty$ not
+ { sortname 's := }
+ { author empty$ not
+ { author 's := }
+ { editor empty$ not
+ { editor 's := }
+ { "" }
+ if$
+ }
if$
}
- { author 's := }
if$
s sort.format.names.abb 't :=
year empty$
@@ -3591,4 +3656,5 @@ EXECUTE {end.bib}
% Local Variables:
% fill-column: 78
% mode: bst
+% coding: utf-8-unix
% End: