diff --git a/CHANGES.md b/CHANGES.md index 07654ad..67a178e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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."). diff --git a/customization/econ-a.bst b/customization/econ-a.bst index 2239d55..937431f 100644 --- a/customization/econ-a.bst +++ b/customization/econ-a.bst @@ -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 @@ -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" } diff --git a/customization/econ-a.pdf b/customization/econ-a.pdf index 058e388..8d69603 100644 Binary files a/customization/econ-a.pdf and b/customization/econ-a.pdf differ diff --git a/customization/econ-abbr.bst b/customization/econ-abbr.bst index a68bbdf..01fe35f 100644 --- a/customization/econ-abbr.bst +++ b/customization/econ-abbr.bst @@ -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 @@ -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" } diff --git a/customization/econ-abbr.pdf b/customization/econ-abbr.pdf index 44b62c5..413c710 100644 Binary files a/customization/econ-abbr.pdf and b/customization/econ-abbr.pdf differ diff --git a/customization/econ-aea.bst b/customization/econ-aea.bst index 788e7e4..641046a 100644 --- a/customization/econ-aea.bst +++ b/customization/econ-aea.bst @@ -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 @@ -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" } @@ -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). + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -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) @@ -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 } @@ -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 := @@ -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 @@ -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 @@ -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$ @@ -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 @@ -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$ @@ -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 @@ -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$ diff --git a/customization/econ-aea.pdf b/customization/econ-aea.pdf index bf34353..07dcf65 100644 Binary files a/customization/econ-aea.pdf and b/customization/econ-aea.pdf differ diff --git a/customization/econ-b.bst b/customization/econ-b.bst index f446a1e..c8b5e03 100644 --- a/customization/econ-b.bst +++ b/customization/econ-b.bst @@ -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 @@ -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" } diff --git a/customization/econ-b.pdf b/customization/econ-b.pdf index ac0b314..4cdb751 100644 Binary files a/customization/econ-b.pdf and b/customization/econ-b.pdf differ diff --git a/customization/econ-default.pdf b/customization/econ-default.pdf index fb58744..e3ca2af 100644 Binary files a/customization/econ-default.pdf and b/customization/econ-default.pdf differ diff --git a/customization/econ-econometrica.bst b/customization/econ-econometrica.bst index 2c4621e..36dbb14 100644 --- a/customization/econ-econometrica.bst +++ b/customization/econ-econometrica.bst @@ -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 @@ -29,7 +29,7 @@ % For changelogs, see CHANGES.txt file. % version number -FUNCTION {econ.version} { "2.9" } +FUNCTION {econ.version} { "3.0" } % File name FUNCTION {econ.file} { "econ-econometrica.bst" } @@ -308,10 +308,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). + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -810,7 +818,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 } @@ -1170,6 +1178,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 := @@ -1178,11 +1191,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 @@ -1198,7 +1220,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 @@ -1215,27 +1237,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$ @@ -1244,15 +1288,20 @@ 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 } -% For Econometrica, we define `format.name.ed` in addition to `format.name`. +% For econ-econometrica.bst, we define `format.name.ed` in addition to `format.name`. FUNCTION {format.names.ed} { 's := % insert 1 to nameptr. @@ -1446,7 +1495,7 @@ FUNCTION {format.editors.x} if$ } if$ - editor format.names.ed * + editor format.names.ed * % For econ-econometrica.bst % editor format.names * bst.editor.btitle.order #0 = { editor num.names$ #1 > @@ -1582,7 +1631,7 @@ FUNCTION {either.or.check} FUNCTION {format.bvolume} { volume empty$ { "" } - { " Volume " volume * bst.volume.post * + { " Volume " volume * bst.volume.post * % For econ-econometrica.bst % { bst.volume.pre volume * bst.volume.post * series empty$ 'skip$ @@ -2253,7 +2302,7 @@ FUNCTION {incollection} format.in.ed.booktitle "booktitle" output.check.nocomma format.bvolume output.nocomma - % For Econometrica, publisher and its address are placed before edition, + % For econ-econometrica.bst, publisher and its address are placed before edition, % chapter and page number. output.address.organization.publisher format.edition output.nocomma diff --git a/customization/econ-econometrica.pdf b/customization/econ-econometrica.pdf index c620d0b..6a7adf5 100644 Binary files a/customization/econ-econometrica.pdf and b/customization/econ-econometrica.pdf differ diff --git a/customization/econ-jet.bst b/customization/econ-jet.bst index 92fd6eb..1d482a5 100644 --- a/customization/econ-jet.bst +++ b/customization/econ-jet.bst @@ -4,7 +4,7 @@ nn%% econ-jet.bst: BibTeX style file for "Journal of Economic Theory". % 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 @@ -29,7 +29,7 @@ nn%% econ-jet.bst: BibTeX style file for "Journal of Economic Theory". % For changelogs, see CHANGES.txt file. % version number -FUNCTION {econ.version} { "2.9" } +FUNCTION {econ.version} { "3.0" } % File name FUNCTION {econ.file} { "econ-jet.bst" } @@ -309,10 +309,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). + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -819,7 +827,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 } @@ -2327,6 +2335,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 := @@ -2335,11 +2348,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 @@ -2355,7 +2377,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 @@ -2372,27 +2394,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$ @@ -2401,12 +2445,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 diff --git a/customization/econ-jet.pdf b/customization/econ-jet.pdf index 0f5912c..62c7d29 100644 Binary files a/customization/econ-jet.pdf and b/customization/econ-jet.pdf differ diff --git a/customization/econ-jie.bst b/customization/econ-jie.bst index e34fba4..142e198 100644 --- a/customization/econ-jie.bst +++ b/customization/econ-jie.bst @@ -4,7 +4,7 @@ n%% econ.bst: BibTeX style file for papers in economics. % 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 @@ -31,7 +31,7 @@ n%% econ.bst: BibTeX style file for papers in economics. % For changelogs, see CHANGES.txt file. % version number -FUNCTION {econ.version} { "2.9" } +FUNCTION {econ.version} { "3.0" } % File name FUNCTION {econ.file} { "econ-jie.bst" } @@ -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 diff --git a/customization/econ-jpe.bst b/customization/econ-jpe.bst index 255d0aa..00a2de4 100644 --- a/customization/econ-jpe.bst +++ b/customization/econ-jpe.bst @@ -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 @@ -37,7 +37,7 @@ % For changelogs, see CHANGES.txt file. % version number -FUNCTION {econ.version} { "2.9" } +FUNCTION {econ.version} { "3.0" } % File name FUNCTION {econ.file} { "econ-jpe.bst" } @@ -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). + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -824,7 +832,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 } @@ -2332,6 +2340,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 := @@ -2340,11 +2353,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 @@ -2360,7 +2382,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 @@ -2377,27 +2399,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$ @@ -2406,15 +2450,20 @@ 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 } -% For JPE, we define `format.name.ed` in addition to `format.name`. +% For econ-jpe.bst, we define `format.name.ed` in addition to `format.name`. FUNCTION {format.names.ed} { 's := % insert 1 to nameptr. @@ -2603,14 +2652,14 @@ FUNCTION {format.editors.x} { bst.editor.btitle.order #0 = { "" } { editor num.names$ #1 > - { " edited by " } - { " edited by " } + { " edited by " } % For econ-jpe.bst + { " edited by " } % For econ-jpe.bst % { bst.editors " by " * } % { bst.editor " by " * } if$ } if$ - editor format.names.ed * + editor format.names.ed * % For econ-jpe.bst bst.editor.btitle.order #0 = { editor num.names$ #1 > { bst.editors * } @@ -3415,7 +3464,7 @@ FUNCTION {incollection} format.in.ed.booktitle "booktitle" output.check.nocomma format.bvolume output.nocomma - % For JPE, publisher and its address are placed before edition, + % For econ-jpe.bst, publisher and its address are placed before edition, % chapter and page number. output.address.organization.publisher format.edition output.nocomma diff --git a/customization/econ-jpe.pdf b/customization/econ-jpe.pdf index 2ec82b1..a8b4b65 100644 Binary files a/customization/econ-jpe.pdf and b/customization/econ-jpe.pdf differ diff --git a/customization/econ-many-authors.pdf b/customization/econ-many-authors.pdf index a3b77fa..ca4339e 100644 Binary files a/customization/econ-many-authors.pdf and b/customization/econ-many-authors.pdf differ diff --git a/customization/econ-no-sort.bst b/customization/econ-no-sort.bst index f5cbf78..bda16f3 100644 --- a/customization/econ-no-sort.bst +++ b/customization/econ-no-sort.bst @@ -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 @@ -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" } diff --git a/customization/econ-no-sort.pdf b/customization/econ-no-sort.pdf index 157a843..92c3388 100644 Binary files a/customization/econ-no-sort.pdf and b/customization/econ-no-sort.pdf differ diff --git a/customization/econ-numbers.pdf b/customization/econ-numbers.pdf index 64d37cf..72d8088 100644 Binary files a/customization/econ-numbers.pdf and b/customization/econ-numbers.pdf differ diff --git a/customization/econ-old.pdf b/customization/econ-old.pdf index 01d6e3b..e0fbd4c 100644 Binary files a/customization/econ-old.pdf and b/customization/econ-old.pdf differ diff --git a/econ-example.pdf b/econ-example.pdf index 29294d8..059fa65 100644 Binary files a/econ-example.pdf and b/econ-example.pdf differ diff --git a/econ-example.tex b/econ-example.tex index 477214b..4577d2c 100644 --- a/econ-example.tex +++ b/econ-example.tex @@ -60,7 +60,7 @@ } \author{Shiro Takeda\thanks{email: {\ttfamily shiro.takeda@gmail.com}.}} -\date{2020/03/29} +\date{2020/12/28} %##################################################################### %######################### Document Starts ########################### diff --git a/econ.bst b/econ.bst index 6224a68..0fa96ff 100644 --- a/econ.bst +++ b/econ.bst @@ -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 @@ -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" }