Skip to content

Commit

Permalink
bst files in the customization folder are updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
ShiroTakeda committed Dec 29, 2020
1 parent 8b6531e commit 6adc34b
Show file tree
Hide file tree
Showing 25 changed files with 424 additions and 177 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Changelogs for econ.bst

## Ver. 3.0

* 2020-12-29: bst files in the customization folder are updated.

* 2020-06-23: In the new econ.bst, if the number of authors is greater than N1,
only the first N2 authors' names are displayed in the reference part (and
other authors' names are omitted by "et el.").
Expand Down
4 changes: 2 additions & 2 deletions customization/econ-a.bst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
% Maintainer: Shiro Takeda
% Copyright (C) 2001-2018 Shiro Takeda
% First-written: <2007/07/28>
% Version: 2.10
% Version: 3.0
% Keywords: TeX, BibTeX, bst
% URL: https://github.com/ShiroTakeda/econ-bst

Expand Down Expand Up @@ -37,7 +37,7 @@
% For changelogs, see CHANGES.txt file.

% version number
FUNCTION {econ.version} { "2.10" }
FUNCTION {econ.version} { "3.0" }

% File name
FUNCTION {econ.file} { "econ.bst" }
Expand Down
Binary file modified customization/econ-a.pdf
Binary file not shown.
4 changes: 2 additions & 2 deletions customization/econ-abbr.bst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
% Maintainer: Shiro Takeda
% Copyright (C) 2001-2018 Shiro Takeda
% First-written: <2007/07/28>
% Version: 2.10
% Version: 3.0
% Keywords: TeX, BibTeX, bst
% URL: https://github.com/ShiroTakeda/econ-bst

Expand Down Expand Up @@ -37,7 +37,7 @@
% For changelogs, see CHANGES.txt file.

% version number
FUNCTION {econ.version} { "2.10" }
FUNCTION {econ.version} { "3.0" }

% File name
FUNCTION {econ.file} { "econ.bst" }
Expand Down
Binary file modified customization/econ-abbr.pdf
Binary file not shown.
121 changes: 85 additions & 36 deletions customization/econ-aea.bst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
% Maintainer: Shiro Takeda
% Copyright (C) 2001-2018 Shiro Takeda
% First-written: <2007/07/28>
% Version: 2.9
% Version: 3.0
% Keywords: TeX, BibTeX, bst
% URL: https://github.com/ShiroTakeda/econ-bst

Expand Down Expand Up @@ -36,7 +36,7 @@
% https://github.com/ShiroTakeda/econ-bst

% version number
FUNCTION {econ.version} { "2.9" }
FUNCTION {econ.version} { "3.0" }

% File name
FUNCTION {econ.file} { "aer.bst" }
Expand Down Expand Up @@ -316,10 +316,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).


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Expand Down Expand Up @@ -584,8 +592,8 @@ FUNCTION {bst.address.post}

% You can choose the order of address and publisher by this function.
%
% If #0, address -> publisher order (the default value).
% If non-zero, publisher -> address order.
% If #0, address -> publisher order (the default value).
% If non-zero, publisher -> address order.

FUNCTION {bst.address.position}
{ #0 } % Address is placed before publisher (default)
Expand Down Expand Up @@ -828,7 +836,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 }
Expand Down Expand Up @@ -1188,6 +1196,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 :=
Expand All @@ -1196,11 +1209,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
Expand All @@ -1216,7 +1238,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
Expand All @@ -1233,27 +1255,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$
Expand All @@ -1262,12 +1306,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
Expand Down Expand Up @@ -1403,8 +1452,8 @@ FUNCTION {format.editors.x}
{ bst.editor.btitle.order #0 =
{ "" }
{ editor num.names$ #1 >
{ " edited by " }
{ " edited by " }
{ " edited by " } % For econ-aea.bst
{ " edited by " } % For econ-aea.bst
% { bst.editors " by " * }
% { bst.editor " by " * }
if$
Expand Down Expand Up @@ -1546,7 +1595,7 @@ FUNCTION {format.bvolume}
{ volume empty$
{ "" }
% { bst.volume.pre volume * bst.volume.post *
{ " Volume " volume * "." *
{ " Volume " volume * "." * % For econ-aea.bst
series empty$
'skip$
%% If there is series field
Expand Down Expand Up @@ -1876,7 +1925,7 @@ FUNCTION {format.address}
FUNCTION {format.publisher}
{ publisher empty$
{ "" }
{ address empty$
{ address empty$ % For econ-aea.bst
{ ", " publisher * bst.publisher.post * }
{ bst.publisher.pre publisher * bst.publisher.post * }
if$
Expand Down
Binary file modified customization/econ-aea.pdf
Binary file not shown.
4 changes: 2 additions & 2 deletions customization/econ-b.bst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
% Maintainer: Shiro Takeda
% Copyright (C) 2001-2018 Shiro Takeda
% First-written: <2007/07/28>
% Version: 2.10
% Version: 3.0
% Keywords: TeX, BibTeX, bst
% URL: https://github.com/ShiroTakeda/econ-bst

Expand Down Expand Up @@ -37,7 +37,7 @@
% For changelogs, see CHANGES.txt file.

% version number
FUNCTION {econ.version} { "2.10" }
FUNCTION {econ.version} { "3.0" }

% File name
FUNCTION {econ.file} { "econ.bst" }
Expand Down
Binary file modified customization/econ-b.pdf
Binary file not shown.
Binary file modified customization/econ-default.pdf
Binary file not shown.
Loading

0 comments on commit 6adc34b

Please sign in to comment.