diff options
Diffstat (limited to 'Master/texmf-dist/bibtex/bst/apacite/apacite.bst')
-rw-r--r-- | Master/texmf-dist/bibtex/bst/apacite/apacite.bst | 1687 |
1 files changed, 911 insertions, 776 deletions
diff --git a/Master/texmf-dist/bibtex/bst/apacite/apacite.bst b/Master/texmf-dist/bibtex/bst/apacite/apacite.bst index 0097506a45e..8b416318614 100644 --- a/Master/texmf-dist/bibtex/bst/apacite/apacite.bst +++ b/Master/texmf-dist/bibtex/bst/apacite/apacite.bst @@ -1,33 +1,60 @@ -% \iffalse meta-comment -% -% This is file `apacite.bst'. -% -% Copyright 1994-2005 Erik Meijer and any individual authors listed -% elsewhere in this file. All rights reserved. -% -% This file is part of the `apacite' package. -% ------------------------------------------- -% -% It may be distributed and/or modified under the -% conditions of the LaTeX Project Public License, either version 1.3 -% of this license or (at your option) any later version. -% The latest version of this license is in -% http://www.latex-project.org/lppl.txt -% and version 1.3 or later is part of all distributions of LaTeX -% version 2003/12/01 or later. -% -% The list of all files belonging to the `apacite' package, with a -% short description, is given in the file `manifest.txt'. -% -% \fi +%% +%% This is file `apacite.bst', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% apacite.dtx (with options: `bibstyle') +%% +%% This is a generated file. +%% +%% Copyright (C) 1994-2007 Erik Meijer and any individual authors listed +%% elsewhere in this file. +%% +%% This file is part of the `apacite' package. +%% ------------------------------------------- +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either +%% version 1.3 of this license or (at your option) any later +%% version. The latest version of this license is in: +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3 or later is part of all distributions of +%% LaTeX version 2005/12/01 or later. +%% +%% The `apacite' package consists of the files apacite.dtx and +%% apacite.ins, and the following generated files: +%% apacite.sty, apacite.bst, apacitex.bst, apa5ex.bib, +%% apacite.drv, apacdoc.sty, +%% english.apc, dutch.apc, finnish.apc, german.apc, ngerman.apc, +%% greek.apc, norsk.apc, spanish.apc, swedish.apc. +%% +%% This work has the LPPL maintenance status `maintained' +%% +%% The Current Maintainer of this work is Erik Meijer +%% +%% This file may only be distributed together with a copy of the +%% source files of the apacite package, i.e., apacite.dtx and +%% apacite.ins. You may however distribute the apacite package without +%% the generated files. +%% +%% apacite.bst +%% [2007/09/03 v4.00 APA bibliography style] + %% apacite.bst : reference list according to APA manual -%% Written by Erik Meijer <e.meijer@eco.rug.nl> -%% This version: [2005/06/08] +%% Written by Erik Meijer + +FUNCTION {identify.apacite.version} +{ % Put identifying string in the .blg file + "apacite.bst" + " [2007/09/03 v4.00 APA bibliography style]" + * top$ +} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% DECLARATION OF FIELDS, INTEGERS, AND STRINGS FOR EACH % -% ENTRY % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ENTRY @@ -47,6 +74,7 @@ ENTRY journal key % key for second and later citations, or all % citations if firstkey is missing + lastchecked % for URL's month note number % number of journal or report @@ -78,6 +106,7 @@ ENTRY type % type of phdthesis (e.g., Doctoral dissertation) % or type of article (e.g., Letter to the editor) % etc. + url volume year } @@ -96,16 +125,17 @@ ENTRY % should be cited and whether a, b, etc. % after year is necessary title.sort.label % for sorting titles + type.2 % Replacement for type with misc entries and + % entries that revert to misc. } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% DECLARATION OF GLOBAL INTEGERS AND STRINGS % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% INTEGERS { len pos name.max old.number numnames numnames.old nameptr lastname format.num.names cite.initials.old cite.num.names.old add.to.year.old forward - multiresult dot + multiresult dot brace.level } STRINGS { s t u old.label field @@ -119,66 +149,53 @@ STRINGS { s t u old.label field } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% A small function for testing purposes. FUNCTION {test} { #0 } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% A small function (ideally replaced by a user-definable -% MACRO) that indicates whether index entries must be -% generated. FUNCTION {make.index} { #0 } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% MONTH MACROS % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -MACRO {jan} {"{\APACSortNoop{01}}January"} -MACRO {feb} {"{\APACSortNoop{02}}February"} +MACRO {jan} {"{\APACmonth{01}}"} + +MACRO {feb} {"{\APACmonth{02}}"} + +MACRO {mar} {"{\APACmonth{03}}"} + +MACRO {apr} {"{\APACmonth{04}}"} + +MACRO {may} {"{\APACmonth{05}}"} + +MACRO {jun} {"{\APACmonth{06}}"} -MACRO {mar} {"{\APACSortNoop{03}}March"} +MACRO {jul} {"{\APACmonth{07}}"} -MACRO {apr} {"{\APACSortNoop{04}}April"} +MACRO {aug} {"{\APACmonth{08}}"} -MACRO {may} {"{\APACSortNoop{05}}May"} +MACRO {sep} {"{\APACmonth{09}}"} -MACRO {jun} {"{\APACSortNoop{06}}June"} +MACRO {oct} {"{\APACmonth{10}}"} -MACRO {jul} {"{\APACSortNoop{07}}July"} +MACRO {nov} {"{\APACmonth{11}}"} -MACRO {aug} {"{\APACSortNoop{08}}August"} +MACRO {dec} {"{\APACmonth{12}}"} -MACRO {sep} {"{\APACSortNoop{09}}September"} +MACRO {winter} {"{\APACmonth{13}}"} -MACRO {oct} {"{\APACSortNoop{10}}October"} +MACRO {spring} {"{\APACmonth{14}}"} -MACRO {nov} {"{\APACSortNoop{11}}November"} +MACRO {summer} {"{\APACmonth{15}}"} -MACRO {dec} {"{\APACSortNoop{12}}December"} +MACRO {fall} {"{\APACmonth{16}}"} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% LOGICAL `NOT', `AND', AND `OR' % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Logical 'not': -% If the first element on the stack is A then this function -% does the following: -% push { #0 } -% push { #1 } -% So now the first 3 elements of the stack are -% { #1 } { #0 } A -% The first 3 are popped and subjected to 'if': -% If A > 0 then { #0 } is executed, else { #1 } is executed: -% if A > 0 -% then 0 -% else 1 -% So consider integers as logicals, where 1 = true and 0 = false, -% then this does -% (if A then false else true) -% which is a logical 'not'. FUNCTION {not} { { #0 } @@ -187,23 +204,6 @@ FUNCTION {not} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Logical 'and': -% If the first 2 elements on the stack are A B -% then this function does the following: -% push 'skip$ -% push { pop$ #0 } -% So now first 4 elements are -% { pop$ #0 } 'skip$ A B -% The first 3 are popped and subjected to 'if' (B is on top of -% the stack): -% If A > 0 then 'skip$ is executed, else { pop$ #0 } is executed: -% if A > 0 -% then (B stays on top of stack) -% else (B is popped and #0 is pushed) -% So consider integers as logicals, where 1 = true and 0 = false, -% then this does -% (if A then B else false) -% which is a logical 'and'. FUNCTION {and} { 'skip$ @@ -212,23 +212,6 @@ FUNCTION {and} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Logical 'or': -% If the first 2 elements on the stack are A B -% then this function does the following: -% push { pop$ #1 } -% push 'skip$ -% So now first 4 elements are -% 'skip$ { pop$ #1 } A B -% The first 3 are popped and subjected to 'if' (B is on top of -% the stack): -% If A > 0 then { pop$ #1 } is executed, else 'skip$ is executed: -% if A > 0 -% then (B is popped and #1 is pushed) -% else (B stays on top of stack) -% So consider integers as logicals, where 1 = true and 0 = false, -% then this does -% (if A then true else B) -% which is a logical 'or'. FUNCTION {or} { { pop$ #1 } @@ -236,9 +219,7 @@ FUNCTION {or} if$ } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% GENERAL PURPOSE FUNCTIONS FOR FORMATTING % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -255,27 +236,19 @@ FUNCTION {warning.if.empty} if$ } - - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % issues warning if title, type, and howpublished are empty % FUNCTION {check.relevant.fields} -{ title empty$ - type empty$ - howpublished empty$ - and - and +{ title empty$ + type empty$ and + howpublished empty$ and { "No title, type, and howpublished in " cite$ * warning$ } 'skip$ if$ } - - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % delivers 1 if (both editor and translator @@ -299,7 +272,6 @@ FUNCTION {editor.ne.trans} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Convert integer to string, assume that integer < 100,000 FUNCTION {conv.int.to.str} { duplicate$ #10 < @@ -320,12 +292,7 @@ FUNCTION {conv.int.to.str} if$ } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Delivers 1 if possibly editor in author position -% 2 if editor not in author position -% 3 if not applicable: use key -% 0 if unknown type FUNCTION {ref.type} { type$ "article" = @@ -354,7 +321,9 @@ FUNCTION {ref.type} type$ "lecture" = type$ "inbook" = type$ "inproceedings" = - type$ "intechreport" = + type$ "conference" = + type$ "intechreport" = + or or or or @@ -373,17 +342,19 @@ FUNCTION {ref.type} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Delivers 1 if title is formatted as an "article"-type, -% 0 otherwise FUNCTION {is.atype} -{ type$ "article" = - type$ "magazine" = - type$ "newspaper" = +{ type$ "article" = + type$ "magazine" = + type$ "newspaper" = type$ "incollection" = type$ "inbook" = type$ "inproceedings" = - type$ "intechreport" = + type$ "conference" = + type$ "intechreport" = + type$ "manual" = + or + or or or or @@ -400,8 +371,7 @@ FUNCTION {is.atype} and { #1 } { type$ "misc" = - type empty$ not - and + type empty$ not and { type "\bibmessage" = type "\bibcomputerprogram" = type "\bibcomputerprogrammanual" = @@ -484,21 +454,18 @@ FUNCTION {connect.check} if$ } - - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % connects two strings with space ("\ ") - % if length of second is 3 or larger, + % if length of second is 4 or larger, % connects them with non-breaking space ("tie", "~") - % if length of second smaller than 3 + % if length of second smaller than 4 % % call with S1 S2 tie.or.space.connect % result: "S1\ S2" or "S1~S2" % FUNCTION {tie.or.space.connect} -{ duplicate$ text.length$ #3 < +{ duplicate$ text.length$ #4 < { "~" } { "\ " } if$ @@ -538,7 +505,6 @@ FUNCTION {connect.with.semicolon.check} FUNCTION {connect.with.colon.check} { ": " connect.check } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % connects two strings with space ("\ ") @@ -549,8 +515,6 @@ FUNCTION {connect.with.colon.check} FUNCTION {connect.with.space.check} { "\ " connect.check } - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % encloses string in pre- and postfix string @@ -579,7 +543,6 @@ FUNCTION {emphasize.check} enclose.check } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % brackets top of stack @@ -642,14 +605,20 @@ FUNCTION {multi.result.check} multiresult } +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % + % Checks whether an author is a corporate author, i.e., + % whether the field starts with "{\bibcorporate". + % Call with + % field is.bibcorporate + % +FUNCTION {is.bibcorporate} +{ #1 #14 substring$ "{\bibcorporate" = } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% GENERAL PURPOSE FUNCTIONS FOR SORTING % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Remove non-alphanumeric characters -% and change to lower case . FUNCTION {sortify} { purify$ @@ -657,14 +626,6 @@ FUNCTION {sortify} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Remove spaces from a string. Used for sorting. -% -% Call with -% string remove.spaces -% -% E.g., -% "fine old day" remove.spaces -% gives "fineoldday" . FUNCTION {remove.spaces} { % Remove spaces from string. @@ -696,10 +657,8 @@ FUNCTION {remove.spaces} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% BASIC OUTPUT FUNCTIONS % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % starting new block by writing what's left on the stack, @@ -711,7 +670,6 @@ FUNCTION {output.end.block} newline$ } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % starting new block by writing what's left on the stack, @@ -720,10 +678,10 @@ FUNCTION {output.end.block} % FUNCTION {output.new.block} { output.end.block - "\newblock{}" write$ + "\newblock" write$ + newline$ } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % starting new block by writing what's left on the stack, @@ -736,13 +694,11 @@ FUNCTION {output.dot.new.block} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Starting new block assuming that stack is empty. -% Starting a new line and adding some extra space or -% whatever is more defined in \newblock FUNCTION {start.new.block} { newline$ - "\newblock{}" write$ + "\unskip\ " write$ newline$ + "\newblock " write$ newline$ } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -752,6 +708,7 @@ FUNCTION {start.new.block} % FUNCTION {fin.entry} { output.end.block + "\PrintBackRefs{\CurrentBib}" write$ newline$ test { "\vspace{\baselineskip}" write$ newline$ } 'skip$ @@ -759,27 +716,21 @@ FUNCTION {fin.entry} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% FUNCTIONS FOR SORTING BY AUTHOR (OR SUBSTITUTE), YEAR, % -% TITLE % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%MACRO {sort.name.format} { "{ll{}}{ f{}}{ vv{}}{ jj{}}" } - FUNCTION {sort.name.format} { "{ll{}}{ f{}}{ vv{}}{ jj{}}" } FUNCTION {cite.name.format} { "{ll}" } -FUNCTION {cite.initials.name.format} { "{f. }{vv }{ll}{ jj}" } +FUNCTION {cite.initials.name.format} { "{f{\BPBI }.~~}{vv }{ll}{ jj}" } -FUNCTION {author.name.format} { "{ll}{, f.}{ vv}{, jj}" } +FUNCTION {author.name.format} { "{ll}{, f{\BPBI }.}{ vv}{, jj}" } -FUNCTION {editor.name.format} { "{f.~}{vv }{ll}{ jj}" } +FUNCTION {editor.name.format} { "{f{\BPBI }.~~}{vv }{ll}{ jj}" } -FUNCTION {index.name.format} { "{ll}{, f.}{ vv}{, jj}" } +FUNCTION {index.name.format} { "{ll}{, f{\BPBI }.}{ vv}{, jj}" } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Check whether initials must be added (1). -% Initialization. FUNCTION {init.initials} { "yyyyy" 'aut1f.old := @@ -788,11 +739,6 @@ FUNCTION {init.initials} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Check whether initials must be added (2). -% Update when author, editor, and key fields are not used. -% -% Call with -% field update.no.initials FUNCTION {update.no.initials} { 'field := @@ -802,7 +748,6 @@ FUNCTION {update.no.initials} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Check whether initials must be added (3). FUNCTION {check.add.initials.aut} { % @@ -832,9 +777,6 @@ FUNCTION {check.add.initials.aut} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Check whether initials must be added (4). -% Call with -% field check.add.initials.field FUNCTION {check.add.initials.field} { 'field := @@ -847,7 +789,6 @@ FUNCTION {check.add.initials.field} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Check whether initials must be added (4). FUNCTION {check.add.initials} { % @@ -907,9 +848,6 @@ FUNCTION {check.add.initials} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Compute tentative number of names that must be cited (1). -% Call with -% field tentative.cite.num.names.field FUNCTION {tentative.cite.num.names.field} { 'field := @@ -938,7 +876,6 @@ FUNCTION {tentative.cite.num.names.field} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Compute tentative number of names that must be cited (2). FUNCTION {tentative.cite.num.names} { % @@ -997,8 +934,6 @@ FUNCTION {tentative.cite.num.names} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Initialize "number of names to be cited" before -% looping over entries. FUNCTION {init.cite.num.names} { #0 'cite.num.names.old := @@ -1014,7 +949,6 @@ FUNCTION {init.cite.num.names} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Update "number of names to be cited" . FUNCTION {update.cite.num.names} { cite.num.names.short 'cite.num.names.old := @@ -1030,10 +964,6 @@ FUNCTION {update.cite.num.names} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Format (maximally) 6 authors for comparison issues -% to determine number of authors that must be cited. -% It is assumed that the 'field' and 'numnames' variables -% have already been defined. FUNCTION {format.6.authors} { % @@ -1125,9 +1055,6 @@ FUNCTION {format.6.authors} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Compute definitive number of names that must be cited -% and whether a's or b's must be added to year (1). -% a's or b's are necessary: update add.to.year variable FUNCTION {change.add.to.year} { @@ -1151,12 +1078,6 @@ FUNCTION {change.add.to.year} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Compute definitive number of names that must be cited -% and whether a's or b's must be added to year (1). -% Current and/or previous entry has 1 or 2 authors -% or editors acting as authors and they are published in the -% same year. The number of authors does not need to be changed -% in this case, but a's or b's may be necessary. FUNCTION {definitive.cite.num.names.1.or.2} { % @@ -1203,13 +1124,7 @@ FUNCTION {definitive.cite.num.names.1.or.2} if$ } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Compute definitive number of names that must be cited -% and whether a's or b's must be added to year (2). -% Both current and previous entries have 3 or more authors -% or editors acting as authors and they are published in the -% same year. FUNCTION {definitive.cite.num.names.3.or.more} { % @@ -1475,18 +1390,7 @@ FUNCTION {definitive.cite.num.names.3.or.more} if$ } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Compute definitive number of names that must be cited -% and whether a's or b's must be added to year (3). -% Current entry has an author or editor acting as author. -% -% Call with -% field definitive.cite.num.names.field -% -% What should we do with explicit "others"? Is now ignored. -% If this causes ambiguity that could be resolved, the user -% should have added additional author names. FUNCTION {definitive.cite.num.names.field} { 'field := @@ -1557,16 +1461,7 @@ FUNCTION {definitive.cite.num.names.field} update.cite.num.names } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Compute definitive number of names that must be cited (4) -% and especially whether a's and b's should be added. -% This function is for the situation when author or editor -% are not used and firstkey, key, or something else is -% used to cite the referenced work. -% -% Call with -% formatted.field definitive.cite.no.names FUNCTION {definitive.cite.no.names} { % @@ -1600,7 +1495,6 @@ FUNCTION {definitive.cite.no.names} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Compute definitive number of names that must be cited (5). FUNCTION {definitive.cite.num.names} { % @@ -1647,7 +1541,6 @@ FUNCTION {definitive.cite.num.names} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Make a tentative year sorting label (without `a' and `b'). FUNCTION {make.tentative.year.sort.label} { % @@ -1679,71 +1572,11 @@ FUNCTION {make.tentative.year.sort.label} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Give month (converted to number) and day when available. FUNCTION {month.number.day} { month empty$ { "" } - { % -% month jan = -% { "01" } -% { month feb = -% { "02" } -% { month mar = -% { "03" } -% { month apr = -% { "04" } -% { month may = -% { "05" } -% { month jun = -% { "06" } -% { month jul = -% { "07" } -% { month aug = -% { "08" } -% { month sep = -% { "09" } -% { month oct = -% { "10" } -% { month nov = -% { "11" } -% { month dec = -% { "12" } -% { % - % Month is something - % else, e.g., "Spring" - % or jul # "/" # aug. - % Currently too - % difficult to figure - % out: user should - % trick the system. - % - month sortify - remove.spaces -% } -% if$ -% } -% if$ -% } -% if$ -% } -% if$ -% } -% if$ -% } -% if$ -% } -% if$ -% } -% if$ -% } -% if$ -% } -% if$ -% } -% if$ -% } -% if$ + { month sortify remove.spaces % % Add the day when available. day empty$ @@ -1757,12 +1590,6 @@ FUNCTION {month.number.day} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Make tentative sort label with names in field on top of -% the stack. -% -% Call with -% field make.name.sort.label -% where 'field' is the field that takes the author-role. FUNCTION {make.name.sort.label} { % @@ -1873,17 +1700,7 @@ FUNCTION {make.name.sort.label} 'author.year.sort.label := % Assign result to sort label. } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Called by make.tentative.sort.label to make tentative -% sort label if key or firstkey is available or author and -% editor are empty or unusable. -% -% Call with -% field make.field.year.sort.label -% where 'field' is the field that takes the author-role, -% perhaps already subjected to removing articles from the -% beginning. FUNCTION {make.field.year.sort.label} { % @@ -1921,11 +1738,7 @@ FUNCTION {make.field.year.sort.label} 'author.year.sort.label := % Assign result to sort label. } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Called by make.tentative.sort.label to make tentative -% sort label if key or firstkey are not available and -% author or editor may be used FUNCTION {make.author.editor.sort.label} { author empty$ @@ -1943,9 +1756,6 @@ FUNCTION {make.author.editor.sort.label} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Called by make.tentative.sort.label to make tentative -% sort label if key or firstkey are not available and -% author (but not editor) may be used FUNCTION {make.author.sort.label} { author empty$ @@ -1958,10 +1768,7 @@ FUNCTION {make.author.sort.label} if$ } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Make tentative label for citing and sorting and do some -% preprocessing. FUNCTION {make.tentative.sort.label} { % @@ -2066,15 +1873,7 @@ FUNCTION {make.tentative.sort.label} author.year.sort.label 'sort.key$ := } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Make final sort label with names in field on top of -% the stack. -% -% Call with -% field make.definitive.name.sort.label -% -% where 'field' is the field that takes the author-role. FUNCTION {make.definitive.name.sort.label} { % @@ -2097,7 +1896,7 @@ FUNCTION {make.definitive.name.sort.label} { name.max 'format.num.names := } { numnames 'format.num.names := } if$ - % Initialize stack with empty stringh + % Initialize stack with empty string "" % % Cycle over authors. @@ -2126,16 +1925,7 @@ FUNCTION {make.definitive.name.sort.label} 'author.year.sort.label := % Assign result to sort label. } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Called to make definitive sort label if author and -% editor are empty or unusable. -% -% Call with -% field make.definitive.field.year.sort.label -% where 'field' is the field that takes the author-role, -% perhaps already subjected to removing articles from the -% beginning. FUNCTION {make.definitive.field.year.sort.label} { % @@ -2168,10 +1958,7 @@ FUNCTION {make.definitive.field.year.sort.label} 'author.year.sort.label := % Assign result to sort label. } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Called by make.final.sort.key if author or editor -% may be used. FUNCTION {make.definitive.author.editor.sort.label} { author empty$ @@ -2189,8 +1976,6 @@ FUNCTION {make.definitive.author.editor.sort.label} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Called by make.final.sort.key if author but not editor -% may be used. FUNCTION {make.definitive.author.sort.label} { author empty$ @@ -2203,11 +1988,7 @@ FUNCTION {make.definitive.author.sort.label} if$ } - - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Make final sort key . FUNCTION {make.final.sort.key} { % @@ -2260,24 +2041,10 @@ FUNCTION {make.final.sort.key} author.year.sort.label 'sort.key$ := } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% FUNCTIONS THAT ALLOW SORTING BY TITLE % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Remove first N characters of string if they are equal to -% teststring . -% -% Call with -% teststring N string chop.word -% -% E.g., -% "A " #2 "A fine old day" chop.word -% gives "fine old day" -% and -% "A " #2 "The fine old day" chop.word -% gives "The fine old day". FUNCTION {chop.word} { 's := @@ -2289,10 +2056,6 @@ FUNCTION {chop.word} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Remove "a ", "an ", and "the " from beginning of string. -% -% Call with -% string chop.articles FUNCTION {chop.articles} { 's := @@ -2306,12 +2069,6 @@ FUNCTION {chop.articles} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Format title and other non-name/date entries for sort key. -% -% Call with -% field format.sort.title -% -% Make sure that field is not empty, this is not checked here! FUNCTION {format.sort.title} { % @@ -2323,7 +2080,6 @@ FUNCTION {format.sort.title} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Make title sorting label or substitute. FUNCTION {make.sort.title} { title empty$ @@ -2331,9 +2087,10 @@ FUNCTION {make.sort.title} { type empty$ { howpublished empty$ { note empty$ - { "no title, type, howpublished, or note in " cite$ * - warning$ - " " + { url empty$ + { " " } + { url format.sort.title } + if$ } { note format.sort.title } if$ @@ -2355,7 +2112,6 @@ FUNCTION {make.sort.title} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Make title number: rank number of sorted title . FUNCTION {make.title.number} { title.sort.label old.label = @@ -2373,11 +2129,235 @@ FUNCTION {make.title.number} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% CITATION LABELS % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +FUNCTION {last.part.name.format} { "{ll}" } + +FUNCTION {initials.with.space.name.format} { "{f.}" } + +FUNCTION {von.last.junior.name.format} { "{vv }{ll}{ jj}" } + +FUNCTION {von.junior.name.format} { "{ vv}{, jj}" } + +FUNCTION {one.complete.name.format} { "{vv }{ll}{, jj}{, ff}" } + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +FUNCTION {string.length} +{ #0 'pos := + % If the next character exists, i.e., is not empty, + % add 1 to the string length. + % We cannot use empty$ because " " empty$ is true. + { duplicate$ pos #1 + #1 substring$ "" = not } + { pos #1 + 'pos := } + while$ + pop$ pos +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +FUNCTION {transform.spaces.and.hyphens} +{ 's := % The original string + s string.length 'len := % Its length (no. of characters) + "" 't := % Initialize the transformed string + #1 'pos := + #0 'brace.level := + % + % while (pos < len) do + % + { pos len < } + { % First, check whether we are at brace level 0 + brace.level #0 = + { + % At least two characters left: check for ". ", ".~", and ".-". + % If so, replace and shift two positions. + s pos #2 substring$ ". " = + s pos #2 substring$ ".~" = or + { t "\BPBI " * 't := + pos #2 + 'pos := + } + { s pos #2 substring$ ".-" = + { t "\BHBI " * 't := + pos #2 + 'pos := + } + { % neither is true, copy one character and shift one position + t s pos #1 substring$ * 't := + % Check whether we need to increase brace level. + % Note that this is not sophisticated: it does not capture + % \{, \verb+}+, etc. + % Note also that unbalanced braces cause problems. + s pos #1 substring$ "{" = + { brace.level #1 + 'brace.level := } + 'skip$ + if$ + pos #1 + 'pos := + } + if$ + } + if$ + } + { % Not at brace level 0: copy result literally + t s pos #1 substring$ * 't := + % Check whether we need to increase or decrease brace level. + % Note that this is not sophisticated: it does not capture + % \{, \verb+}+, etc. + s pos #1 substring$ "{" = + { brace.level #1 + 'brace.level := } + { s pos #1 substring$ "}" = + { brace.level #1 - 'brace.level := } + 'skip$ + if$ + } + if$ + pos #1 + 'pos := + } + if$ + } + while$ + % + pos len = + { % Last character, copy + t s pos #1 substring$ * 't := + } + { % pos = len + 1, so s ends with ". " or ".-" + % This should not have happened, but make the best out of it. + % Push last two characters of s on the stack, i.e., ". " or ".-". + s len #1 - #2 substring$ + % Remove "\BPBI " or "\BHBI " from t + t text.length$ 'len := % Length of t (no. of characters) + t #1 len #6 - substring$ + % Concatenate and assign to t + swap$ * 't := + } + if$ + % + % Now push the result back on the stack + t +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +FUNCTION {format.initials.with.hyphen} +{ % Format initials. + % Call with + % field authornumber format.initials.with.hyphen + % e.g. + % author #1 format.initials.with.hyphen + % Instead of field, a string may also be used. + % + % First, format initials in the default way, retaining spaces + % and hyphens. + initials.with.space.name.format format.name$ + transform.spaces.and.hyphens +} + +FUNCTION {format.last.part.name} +{ % Format a name with last.part.name.format, + % as part of more complicated things. + % Call with + % field authornumber format.last.part.name + % e.g. + % author #1 format.last.part.name + % Instead of field, a string may also be used. + last.part.name.format format.name$ +} + +FUNCTION {format.von.last.junior.name} +{ % Format a name with von.last.junior.name.format, + % for citing or as part of more complicated things. + % Call with + % field authornumber format.von.last.junior.name + % e.g. + % author #1 format.von.last.junior.name + % Instead of field, a string may also be used. + von.last.junior.name.format format.name$ +} + +FUNCTION {format.von.junior.name} +{ % Format a name with von.last.junior.name.format, + % for citing or as part of more complicated things. + % Call with + % field authornumber format.von.junior.name + % e.g. + % author #1 format.von.junior.name + % Instead of field, a string may also be used. + von.junior.name.format format.name$ +} + +FUNCTION {format.cite.initials.name} +{ % Format a name for citing with initials. + % Call with + % field authornumber format.cite.initials.name + % e.g. + % author #1 format.cite.initials.name + % Instead of field, a string may also be used. + % + % First, extract the complete name, format it in the canonical form, + % and push on the stack. + one.complete.name.format format.name$ + % + % Format the initials and push on the stack. + duplicate$ #1 format.initials.with.hyphen + % + % Format the von-last-junior part and push on the stack. + swap$ #1 format.von.last.junior.name + % + % Connect with "~" hyphen (if they're both non-empty). + "~" connect.check +} + +FUNCTION {format.author.name} +{ % Format an author name for the reference list. + % Call with + % field authornumber format.author.name + % e.g. + % author #1 format.author.name + % Instead of field, a string may also be used. + % + % First, extract the complete name, format it in the canonical form, + % and push on the stack. + one.complete.name.format format.name$ + % + % Make two copies of the name, format the last name and push on the stack. + duplicate$ duplicate$ #1 format.last.part.name + % + % Format the initials and push on the stack. + swap$ #1 format.initials.with.hyphen + % + % Connect with last name. + connect.with.comma.check + % + % Format the von-junior part and connect with initials. + swap$ #1 format.von.junior.name "" connect.check +} + +FUNCTION {format.editor.name} +{ % Format a name for the reference list as an editor. + % Call with + % field authornumber format.editor.name + % e.g. + % author #1 format.editor.name + % Instead of field, a string may also be used. + % + format.cite.initials.name +} + +FUNCTION {format.index.name} +{ % Format an author name for the index. + % Call with + % field authornumber format.index.name + % e.g. + % author #1 format.index.name + % Instead of field, a string may also be used. + % + format.author.name +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Some macro strings about commas, etc. between authors FUNCTION {comma.between.two} { "\BCBT{}" } @@ -2394,35 +2374,28 @@ FUNCTION {et.al.string} { "\ \BOthers{.}" } FUNCTION {et.al.string.period} { "\ \BOthersPeriod{.}" } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Add author index entry when desired. -% "field" must have been defined before and must contain the -% contents of the relevant author field. -% "nameptr" must also have been defined before. It is the -% number of the author that must be formatted. (So if it is -% #2, then the 2nd author must be formatted.) -% What's on top of the stack (the formatted author) is written -% to the .bbl file. FUNCTION {add.name.index} { % % make.index { "%" * write$ newline$ - "\protect\AX{" write$ + % Check for corporate author + field is.bibcorporate + { "\corporateAX{" } + { "\AX{" } + if$ + write$ field nameptr sort.name.format format.name$ sortify write$ newline$ "@" write$ - field nameptr index.name.format format.name$ "}%" * write$ newline$ + field nameptr format.index.name + "}%" * write$ newline$ } { "%" * write$ newline$ } if$ } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Citation labels when author or editor may be used. -% Field is on top of the stack. -% -% Call with -% format.num.names field make.name.cite.label FUNCTION {make.name.cite.label} { 'field := @@ -2444,8 +2417,8 @@ FUNCTION {make.name.cite.label} % #1 'nameptr := cite.initials #1 = - { field nameptr cite.initials.name.format format.name$ } - { field nameptr cite.name.format format.name$ } + { field nameptr format.cite.initials.name } + { field nameptr cite.name.format format.name$ } if$ add.name.index % Add index entry when desired. % @@ -2544,8 +2517,6 @@ FUNCTION {make.name.cite.label} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Citation labels when no author, editor, firstkey or key -% is available. FUNCTION {make.title.cite.label} { % @@ -2562,7 +2533,11 @@ FUNCTION {make.title.cite.label} { type empty$ { howpublished empty$ { note empty$ - { cite$ } + { url empty$ + { cite$ } + { url } + if$ + } { note } if$ } @@ -2588,7 +2563,6 @@ FUNCTION {make.title.cite.label} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Citation labels when author or editor may be used. FUNCTION {make.author.editor.cite.label} { author empty$ @@ -2615,7 +2589,6 @@ FUNCTION {make.author.editor.cite.label} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Citation labels when author (but not editor) may be used. FUNCTION {make.author.cite.label} { author empty$ @@ -2634,9 +2607,7 @@ FUNCTION {make.author.cite.label} if$ } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Make "a" or "b" supplement to year label when necessary. FUNCTION {make.definitive.year.supplement} { % @@ -2663,7 +2634,6 @@ FUNCTION {make.definitive.year.supplement} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Add \protect if year is \BIP or \bibnodate. FUNCTION {protect.year} { year empty$ @@ -2681,7 +2651,6 @@ FUNCTION {protect.year} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Make year label that is used for citations in text. FUNCTION {make.definitive.year.label} { "{\protect\APACyear{" @@ -2717,16 +2686,7 @@ FUNCTION {make.definitive.year.label} make.definitive.year.supplement enclose.check } - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Make citation labels: -% - Full formatted author list (or substitute if no author -% available) for first citation; -% - Short formatted author list (ditto) for subsequent -% citations; -% - Year, with originalyear when applicable, and "a" or "b" -% etc. addendum when necessary. FUNCTION {make.cite.labels} { newline$ @@ -2806,14 +2766,10 @@ FUNCTION {make.cite.labels} "}%" write$ newline$ } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% FORMATTING OF REFERENCE LIST % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% "(Ed.)" or "(Eds.)" postfix. -% editor must not be empty FUNCTION {editor.postfix} { editor num.names$ #1 > @@ -2823,8 +2779,6 @@ FUNCTION {editor.postfix} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% "(Ed. \& Trans.)" postfix -% editor must not be empty FUNCTION {editor.trans.postfix} { editor num.names$ #1 > @@ -2846,15 +2800,6 @@ FUNCTION {trans.postfix} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Format authors (or editors acting as authors) for -% reference list. -% -% Call with -% dot field format.author.names -% where field is the field (string) that contains the authors -% (or editors acting as authors) that must be formatted and -% dot is 1 or 0 indicating whether or not a period must end -% the formatting. FUNCTION {format.author.names} { 'field := @@ -2880,7 +2825,7 @@ FUNCTION {format.author.names} % Format first author % #1 'nameptr := - field nameptr author.name.format format.name$ + field nameptr format.author.name % % Add period if required and if this is the only author. % @@ -2917,7 +2862,7 @@ FUNCTION {format.author.names} % Format second author. % #2 'nameptr := - field nameptr author.name.format format.name$ 's := + field nameptr format.author.name 's := % % Check if 2nd author is explicit "others". % If so, insert "et al." string. @@ -2962,7 +2907,7 @@ FUNCTION {format.author.names} % % Format and add next author % - field nameptr author.name.format format.name$ + field nameptr format.author.name add.name.index % Add index entry when desired. % % Move to next author @@ -2974,7 +2919,7 @@ FUNCTION {format.author.names} % nameptr = format.num.names % Format this author. % - field nameptr author.name.format format.name$ 's := + field nameptr format.author.name 's := % format.num.names numnames = { % @@ -3035,8 +2980,6 @@ FUNCTION {format.author.names} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Format authors in reference list, where it is given that -% the author field is not empty. FUNCTION {format.authors} { #1 author format.author.names @@ -3044,14 +2987,6 @@ FUNCTION {format.authors} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Format editors in reference list in case editors act as -% authors (such as reference to entire edited book) -% -% Letheridge, S., \& Cannon, C. R. (Eds.). -% or -% Letheridge, S. (Ed.). (if only 1 editor) -% -% editor must not be empty FUNCTION {format.editors.as.authors} { #0 editor format.author.names @@ -3059,16 +2994,6 @@ FUNCTION {format.editors.as.authors} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% -% Format editors in reference list in case editors are also -% translators and act as authors (such as reference to entire -% edited book of translated articles) -% -% Letheridge, S., \& Cannon, C. R. (Eds. and Trans.). -% or -% Letheridge, S. (Ed. and Trans.). (if only 1 editor) -% -% editor must not be empty FUNCTION {format.ed.trans.as.authors} { #0 editor format.author.names @@ -3076,14 +3001,6 @@ FUNCTION {format.ed.trans.as.authors} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Format a list of names with the initials before the -% last names (i.e., names in the editor position), -% commas between names (not between 2), -% and ampersand (\&) before last name. -% These names are not put in the author index. -% -% Call with -% field format.editor.names FUNCTION {format.editor.names} { 'field := @@ -3098,7 +3015,7 @@ FUNCTION {format.editor.names} % % Format first editor % - field #1 editor.name.format format.name$ + field #1 format.editor.name % numnames #1 = 'skip$ @@ -3109,7 +3026,7 @@ FUNCTION {format.editor.names} % Given that format.num.names > 1, it is 2. % No comma. Format second editor. % - field #2 editor.name.format format.name$ 's := + field #2 format.editor.name 's := % % Check if 2nd editor is explicit "others". % If so, insert "et al." string. @@ -3133,7 +3050,7 @@ FUNCTION {format.editor.names} % % Format and add next editor % - field nameptr editor.name.format format.name$ * + field nameptr format.editor.name * % % Move to next editor % @@ -3144,7 +3061,7 @@ FUNCTION {format.editor.names} % nameptr = format.num.names % Format this editor. % - field nameptr editor.name.format format.name$ 's := + field nameptr format.editor.name 's := % format.num.names numnames = { % @@ -3176,7 +3093,6 @@ FUNCTION {format.editor.names} if$ } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % format editors in case editors do not act as authors @@ -3195,7 +3111,6 @@ FUNCTION {format.editors.in.line} editor.postfix connect.with.space.check } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % format editors in case editors are also translators @@ -3216,7 +3131,6 @@ FUNCTION {format.editors.trans.in.line} editor.trans.postfix connect.with.space.check } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % format translators in case translators act as editors @@ -3235,7 +3149,6 @@ FUNCTION {format.translators.in.line} trans.postfix connect.with.space.check } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % format translators in case translator does not act as editor @@ -3312,9 +3225,6 @@ FUNCTION {format.editors.translators.in.paren.check} FUNCTION {format.atrans.check} { format.translators.in.paren.check parenthesize.check } - - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % format "In editor (Ed.), " @@ -3327,7 +3237,6 @@ FUNCTION {format.in.editors} if$ } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % format "In translator (Trans.)," @@ -3340,8 +3249,6 @@ FUNCTION {format.in.trans} if$ } - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % format "In editor (Ed. and Trans.)" @@ -3369,69 +3276,54 @@ FUNCTION {format.in.editors.trans} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% DATE % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Formats year (+ extra label) between parentheses (which -% may be redefined by \BBOP and \BBCP). -% Extra label can be used for -% Bentler, P. M. (1983a) <article 1> -% Bentler, P. M. (1983b) <article 2> FUNCTION {format.year.check} -{ "\BBOP{}" "\BBCP{}" % Opening and closing parentheses +{ "\APACrefYear{" year empty$ - { "\bibnodate{}" } - { year } + { "\bibnodate{}" * } + { year * } if$ % % Add "a", "b", etc. when necessary. % make.definitive.year.supplement * - % - % Combine everything - % - enclose.check + "}" * } - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Formats year (+ extra label) + month + day between -% parentheses (which may be redefined by \BBOP and \BBCP). -% Extra label can be used for -% Bentler, P. M. (1983a, June 7) <article 1> -% Bentler, P. M. (1983b, April 4) <article 2> FUNCTION {format.year.month.day.check} -{ "\BBOP{}" "\BBCP{}" % Opening and closing parentheses +{ "\APACrefYearMonthDay{" year empty$ - { "\bibnodate{}" } - { year } + { "\bibnodate{}" * } + { year * } if$ % % Add "a", "b", etc. when necessary. % make.definitive.year.supplement * + "}{" * % % Add month and day when present. % - month connect.with.comma.check - day connect.with.space.check - % - % Combine everything - % - enclose.check + month empty$ + 'skip$ + { month * } + if$ + "}{" * + day empty$ + 'skip$ + { day * } + if$ + "}" * } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% TITLE FORMATTING % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % title of article in journal or book @@ -3444,13 +3336,16 @@ FUNCTION {format.atitle.no.dot} "\BBCQ{}" swap$ duplicate$ empty$ 'skip$ - { "t" change.case$ } + { duplicate$ + % Two arguments: Title twice: (1) don't change case; (2) change case + "\APACrefatitle{" swap$ * "}{" * swap$ + "t" change.case$ + * "}" * + } if$ enclose.check } - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % title of article in journal or book @@ -3460,15 +3355,19 @@ FUNCTION {format.atitle.no.dot} % FUNCTION {format.atitle.dot} { "\BBOQ{}" swap$ - "\BBCQ{} " swap$ + "\BBCQ{}" swap$ duplicate$ empty$ 'skip$ - { "t" change.case$ add.period$ } + { duplicate$ + % Two arguments: Title twice: (1) don't change case; (2) change case + "\APACrefatitle{" swap$ * "}{" * swap$ + "t" change.case$ + * "}" * add.period$ + } if$ enclose.check } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % title of article in journal or book @@ -3491,39 +3390,37 @@ FUNCTION {format.atitle.connect} if$ } - - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % - % title of book or so, no period - % + % title of book or so, without period % call with % field format.btitle.no.dot % FUNCTION {format.btitle.no.dot} { duplicate$ empty$ 'skip$ - { "t" change.case$ emphasize.check } + { duplicate$ + % Two arguments: Title twice: (1) don't change case; (2) change case + "\APACrefbtitle{" swap$ * "}{" * swap$ + "t" change.case$ + * "}" * + } if$ } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % title of book or so, with period - % (maybe emphasize and add.period$ should be reversed) % call with % field format.btitle.dot % FUNCTION {format.btitle.dot} { duplicate$ empty$ 'skip$ - { "t" change.case$ add.period$ emphasize.check } + { add.period$ format.btitle.no.dot } if$ } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % title of book and similar @@ -3569,10 +3466,27 @@ FUNCTION {format.btitle.connect.no.dot} % % format englishtitle (of nonenglish article, etc.) % -FUNCTION {format.etitle.check} +FUNCTION {format.aetitle.check} { englishtitle empty$ { "" } - { englishtitle "t" change.case$ bracket.check } + { % Two arguments: Title twice: (1) don't change case; (2) change case + "\APACrefaetitle{" englishtitle * "}{" * + englishtitle "t" change.case$ * "}" * + } + if$ +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % + % format englishtitle (of nonenglish book, etc.) + % +FUNCTION {format.betitle.check} +{ englishtitle empty$ + { "" } + { % Two arguments: Title twice: (1) don't change case; (2) change case + "\APACrefbetitle{" englishtitle * "}{" * + englishtitle "t" change.case$ * "}" * + } if$ } @@ -3583,53 +3497,51 @@ FUNCTION {format.etitle.check} FUNCTION {format.atype.check} { type bracket.check } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % format title and englishtitle (of article, etc.) % FUNCTION {format.atitle.check} -{ format.etitle.check +{ format.aetitle.check title format.atitle.connect } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % format title, englishtitle, and type % (of article, etc.) % FUNCTION {format.atitle.type.check} -{ format.etitle.check +{ format.aetitle.check format.atype.check connect.with.space.check title format.atitle.connect } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % format title, englishtitle, % and translator (of article, etc.) % FUNCTION {format.atitle.trans.check} -{ format.etitle.check +{ format.aetitle.check format.atrans.check connect.with.space.check title format.atitle.connect } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % format title, englishtitle, type, % and translator (of article, etc.) % FUNCTION {format.atitle.type.trans.check} -{ format.etitle.check +{ format.aetitle.check format.atype.check connect.with.space.check format.atrans.check connect.with.space.check title format.atitle.connect } +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % @@ -3639,13 +3551,24 @@ FUNCTION {format.atitle.type.trans.check} % FUNCTION { format.journal.vol.num.pages.check } { "journal" journal warning.if.empty - journal emphasize.check - volume emphasize.check connect.with.comma.check - number parenthesize.check "" connect.check - swap$ connect.with.comma.check + duplicate$ empty$ + journal empty$ and + volume empty$ and + number empty$ and + { pop$ "" } + { "\APACjournalVolNumPages{" journal "" connect.check + "}{" * volume "" connect.check + "}{" * number "" connect.check + "}{" * swap$ "" connect.check + "}" * + } + if$ } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % volume of book, checks whether % "Volume" or "Volumes" @@ -3658,14 +3581,12 @@ FUNCTION {format.bvolume.check} 'skip$ { duplicate$ multi.result.check { "\BVOLS" swap$ tie.or.space.connect } - { "\BVOL" swap$ tie.or.space.connect } + { "\BVOL" swap$ tie.or.space.connect } if$ } if$ } - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % edition of book, must not be empty @@ -3675,11 +3596,12 @@ FUNCTION {format.bvolume.check} FUNCTION {format.edition.check} { duplicate$ empty$ 'skip$ - { "\BEd" connect.with.space.check } + { "\PrintCardinal{" swap$ * "}" * + "\BEd" connect.with.space.check + } if$ } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % volume and edition of book @@ -3690,9 +3612,6 @@ FUNCTION {format.bvol.edition.check} connect.with.comma.check } - - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % volume and edition of book @@ -3737,7 +3656,7 @@ FUNCTION {format.bpages.check} 'skip$ { duplicate$ multi.result.check { "\BPGS" swap$ tie.or.space.connect } - { "\BPG" swap$ tie.or.space.connect } + { "\BPG~" swap$ * } if$ } if$ @@ -3764,7 +3683,6 @@ FUNCTION {format.bchapter.check} if$ } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % volume, edition, and pages or chapter of article in book etc. @@ -3778,25 +3696,22 @@ FUNCTION {format.bvol.edition.pages} parenthesize.check } - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % title, volume, edition of book % FUNCTION {format.btitle.vol.edition} -{ format.etitle.check +{ format.betitle.check format.bvol.edition connect.with.space.check title format.btitle.connect.no.dot } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % title, volume, edition, and translator of book % FUNCTION {format.btitle.vol.edition.trans} -{ format.etitle.check +{ format.betitle.check format.bvol.edition.trans connect.with.space.check title format.btitle.connect.no.dot } @@ -3806,12 +3721,15 @@ FUNCTION {format.btitle.vol.edition.trans} % title, volume, edition, editor, and translator of book % FUNCTION {format.btitle.vol.edition.editor.trans} -{ format.etitle.check +{ format.betitle.check format.bvol.edition.editor.trans connect.with.space.check title format.btitle.connect.no.dot } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % format address and publisher of book etc. % @@ -3822,10 +3740,28 @@ FUNCTION {format.btitle.vol.edition.editor.trans} % New York (if publisher empty) % FUNCTION {format.address.publisher} -{ address publisher connect.with.colon.check } - - - +{ % + % If publisher = author or publisher = "author" or publisher = "Author" + % then hand over the final choice how to format this to \LaTeX. + % (I could imagine similar code for editors, but the APA manual does + % not mention it and then we'd have to check whether the editor is in + % the author position, so let's keep it simple until someone complains.) + % + author empty$ + publisher empty$ or + { publisher "\APACaddressPublisher{" } + { author publisher = + "author" publisher = or + "Author" publisher = or + { author "\APACaddressPublisherEqAuth{" } + { publisher "\APACaddressPublisher{" } + if$ + } + if$ + address "" connect.check "}{" * + % Recover publisher that was pushed onto the stack previously. + swap$ "" connect.check "}" * +} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % @@ -3842,10 +3778,22 @@ FUNCTION {format.address.publisher} FUNCTION {format.address.publisher.check} { "publisher" publisher warning.if.empty "address" address warning.if.empty - format.address.publisher + publisher empty$ + address empty$ + and + 'skip$ + { % Clear the stack + duplicate$ empty$ + 'skip$ + { output.new.block } + if$ + format.address.publisher + } + if$ } - +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % @@ -3858,7 +3806,7 @@ FUNCTION {format.rnumber.check} 'skip$ { duplicate$ multi.result.check { "\BNUMS" swap$ tie.or.space.connect } - { "\BNUM" swap$ tie.or.space.connect } + { "\BNUM" swap$ tie.or.space.connect } if$ } if$ @@ -3871,16 +3819,22 @@ FUNCTION {format.rnumber.check} % format.type.number % FUNCTION { format.type.number } -{ number empty$ - { type bracket.check } - { type - number format.rnumber.check connect.with.space.check +{ type empty$ + { type.2 } + { type } + if$ + number empty$ + { bracket.check } + { number format.rnumber.check connect.with.space.check parenthesize.check } if$ } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % format howpublished if not empty, % for various entry types @@ -3890,8 +3844,12 @@ FUNCTION { format.type.number } FUNCTION {format.howpublished} { howpublished empty$ 'skip$ - { output.dot.new.block - howpublished + { % clear the stack + duplicate$ empty$ + 'pop$ + { output.dot.new.block } + if$ + "\APAChowpublished{" howpublished * "}" * } if$ } @@ -3906,26 +3864,71 @@ FUNCTION {format.howpublished} FUNCTION {output.howpublished} { howpublished empty$ 'skip$ - { howpublished + { "\APAChowpublished{" howpublished * "}" * output.dot.new.block } if$ } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% NOTE FORMATTING FUNCTIONS % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % + % begin and end of url environment + % +FUNCTION {begin.end.url.env} +{ " \begin{APACrefURL} " + % For "Retrieved <date>, from" + lastchecked empty$ + 'skip$ + { "[{" * lastchecked * "}]" * } + if$ + " \end{APACrefURL} " +} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % - % format optional note + % begin and end of message environment % -FUNCTION {format.note} -{ note parenthesize.check } +FUNCTION {begin.end.msg.env} +{ " \begin{APACrefURLmsg} " + " \end{APACrefURLmsg} " +} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % + % format url given that it is not empty, + % for various entry types + % call with + % format.url + % +FUNCTION {format.url} +{ % First format begin and end of the enclosing environment. + % With posted messages, a different environment is used. + type.2 empty$ + { begin.end.url.env } + { type.2 "\bibmessage" = + { begin.end.msg.env } + { begin.end.url.env } + if$ + } + if$ + % The url string. + "\url{" url * "}" * + % Enclose in begin and end environment + enclose.check +} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % + % format optional note + % +FUNCTION {format.note} +{ "\APACrefnote{" "}" note enclose.check } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % @@ -3934,33 +3937,27 @@ FUNCTION {format.note} % FUNCTION {format.orig.year.note} { originalyear empty$ - { note parenthesize.check } - { originalyear "\bibnodate" = - { note parenthesize.check } - { "\BOWP{} " originalyear * % original work published - note connect.with.semicolon.check - parenthesize.check - } - if$ + { format.note } + { "\APACorigyearnote{" + originalyear "" connect.check "}{" * + note "" connect.check "}" * } if$ } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % format original journal of publication and note % (reprint or translation) % FUNCTION {format.orig.journal.note} -{ "\BREPR{} " % reprinted from - originaljournal emphasize.check * - originalyear connect.with.comma.check - originalvolume emphasize.check connect.with.comma.check - originalnumber bracket.check "" connect.check - originalpages connect.with.comma.check - note connect.with.semicolon.check - parenthesize.check +{ "\APACorigjournalnote{" + originalyear "" connect.check "}{" * + originaljournal "" connect.check "}{" * + originalvolume "" connect.check "}{" * + originalnumber "" connect.check "}{" * + originalpages "" connect.check "}{" * + note "" connect.check "}" * } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -3969,42 +3966,27 @@ FUNCTION {format.orig.journal.note} % (reprint or translation) % FUNCTION {format.orig.book.note} -{ "\BREPR{}" % Reprinted from - % - % title of the book the work was originally published in - % - originalbooktitle format.btitle.no.dot connect.with.space.check - % - % volume, edition, pages - % - originaledition format.edition.check connect.with.comma.check - originalvolume format.bvolume.check connect.with.comma.check - originalpages format.bpages.check connect.with.comma.check - % - % editor of the original book +{ "\APACorigbooknote{" originalyear "" connect.check "}{" * % originaleditor empty$ 'skip$ - { "by " originaleditor format.editor.names * - originaleditor num.names$ #1 > - { ", \BEDS{}" * } - { ", \BED{}" * } + { originaleditor num.names$ #1 > + { "\APACorigEDS{" * originaleditor format.editor.names * "}" * } + { "\APACorigED{" * originaleditor format.editor.names * "}" * } if$ - connect.with.comma.check } if$ % - % year of the original publication - % - originalyear connect.with.comma.check - % - originaladdress originalpublisher connect.with.colon.check - connect.with.comma.check - note connect.with.semicolon.check - parenthesize.check + "}{" * + originalbooktitle format.btitle.no.dot "" connect.check "}{" * + originaledition format.edition.check "" connect.check "}{" * + originalvolume format.bvolume.check "" connect.check "}{" * + originalpages format.bpages.check "" connect.check "}{" * + originaladdress "" connect.check "}{" * + originalpublisher "" connect.check "}{" * + note "" connect.check "}" * } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % format information about original publication of reprint @@ -4015,38 +3997,35 @@ FUNCTION {format.orig.note} { originalbooktitle empty$ { note empty$ { originalyear empty$ - { add.period$ } + 'skip$ { originalyear "\bibnodate" = - { add.period$ } - { output.dot.new.block + 'skip$ + { output.new.block format.orig.year.note } if$ } if$ } - { output.dot.new.block + { output.new.block format.orig.year.note } if$ } - { output.dot.new.block + { output.new.block format.orig.book.note } if$ } - { output.dot.new.block + { output.new.block format.orig.journal.note } if$ } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% PERIODICALS % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % article in periodical: journal, magazine, newspaper, ... @@ -4110,7 +4089,20 @@ FUNCTION {periodical} % if not empty, insert howpublished. % (used if article is retrieved from the internet) % - format.howpublished + format.howpublished add.period$ + % + % format url + % + url empty$ + 'skip$ + { % Clear the stack + duplicate$ empty$ + 'skip$ + { output.new.block } + if$ + format.url + } + if$ % % possible reprint and optional note % @@ -4118,8 +4110,6 @@ FUNCTION {periodical} fin.entry } - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % journal article @@ -4127,8 +4117,6 @@ FUNCTION {periodical} FUNCTION {article} { pages format.year.month.day.check periodical } - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % magazine article @@ -4136,8 +4124,6 @@ FUNCTION {article} FUNCTION {magazine} { pages format.year.month.day.check periodical } - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % newspaper article @@ -4145,8 +4131,6 @@ FUNCTION {magazine} FUNCTION {newspaper} { pages format.bpages.check format.year.month.day.check periodical } - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % (translation of) entire book @@ -4168,7 +4152,7 @@ FUNCTION {book} { format.btitle.vol.edition.trans format.type.number connect.with.space.check output.dot.new.block - format.year.check output.dot.new.block + format.year.check add.period$ } % % format editor and year, and check if year is present @@ -4196,7 +4180,7 @@ FUNCTION {book} } if$ format.type.number connect.with.space.check - output.dot.new.block + add.period$ } if$ } @@ -4208,7 +4192,7 @@ FUNCTION {book} format.year.check output.dot.new.block format.btitle.vol.edition.editor.trans format.type.number connect.with.space.check - output.dot.new.block + add.period$ } if$ % @@ -4216,6 +4200,24 @@ FUNCTION {book} % format.address.publisher.check % + % if not empty, insert howpublished. + % (used if book is retrieved from the internet) + % + format.howpublished add.period$ + % + % format url + % + url empty$ + 'skip$ + { % Clear the stack + duplicate$ empty$ + 'skip$ + { output.new.block } + if$ + format.url + } + if$ + % % format original publication (of reprint/translation) % and optional note % @@ -4223,7 +4225,6 @@ FUNCTION {book} fin.entry } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % (translated) article or chapter in edited book @@ -4246,7 +4247,7 @@ FUNCTION {incollection} % esp. for ``collections'' that are not books, % such as parts of internet documents % - format.year.month.day.check output.dot.new.block + format.year.month.day.check add.period$ } % % format author and year, and check if year is present @@ -4258,25 +4259,38 @@ FUNCTION {incollection} { format.atitle.type.trans.check } { format.atitle.type.check } if$ - output.new.block } if$ % % format "In " editor " (Ed. \& Trans.), " % booktitle, volume, edition, pages % + output.new.block format.in.editors.trans format.bvol.edition.pages - booktitle format.btitle.connect * output.dot.new.block + booktitle format.btitle.connect * add.period$ % % format address and publisher, check if publisher present % format.address.publisher.check - % - % if not empty, insert howpublished. - % (used if article is retrieved from the internet) - % - format.howpublished + % + % if not empty, insert howpublished. + % (used if article is retrieved from the internet) + % + format.howpublished add.period$ + % + % format url + % + url empty$ + 'skip$ + { % Clear the stack + duplicate$ empty$ + 'skip$ + { output.new.block } + if$ + format.url + } + if$ % % format original publication (of reprint/translation) % and optional note @@ -4286,10 +4300,8 @@ FUNCTION {incollection} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% REPORTS % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % technical report number @@ -4311,14 +4323,36 @@ FUNCTION {format.tr.number} % title, volume, edition, report number % FUNCTION {format.tr.title.number} -{ format.etitle.check - format.bvol.edition.check - format.tr.number connect.with.semicolon.check - parenthesize.check connect.with.space.check +{ format.betitle.check + % Single out the situation in which there is no number + % and type = {\bibnotype}, i.e., no type as well. + % (Why not use book then?) + type empty$ + { % Now, we're in the regular situation with at least a + % number, a type, a volume, or an edition. + "\APACbVolEdTR{" format.bvol.edition.check * "}{" * + format.tr.number * "}" * + } + { type "\bibnotype" = + number empty$ + volume empty$ + edition empty$ + and + and + and + { "" } + { % Now, we're in the regular situation with at least a + % number, a type, a volume, or an edition. + "\APACbVolEdTR{" format.bvol.edition.check * "}{" * + format.tr.number * "}" * + } + if$ + } + if$ + connect.with.space.check title format.btitle.connect } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % format address and institution of reports etc. @@ -4332,10 +4366,38 @@ FUNCTION {format.tr.title.number} FUNCTION {format.address.institution.check} { "institution" institution warning.if.empty "address" address warning.if.empty - address institution connect.with.colon.check + institution empty$ + address empty$ + and + 'skip$ + { % Clear the stack + duplicate$ empty$ + 'skip$ + { output.new.block } + if$ + % + % If institution = author or institution = "author" + % or institution = "Author" then hand over the final choice how to + % format this to \LaTeX. See also format.address.publisher + % + author empty$ + institution empty$ or + { institution "\APACaddressInstitution{" } + { author institution = + "author" institution = or + "Author" institution = or + { author "\APACaddressInstitutionEqAuth{" } + { institution "\APACaddressInstitution{" } + if$ + } + if$ + address "" connect.check "}{" * + % Recover institution that was pushed onto the stack previously. + swap$ "" connect.check "}" * + } + if$ } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % reports @@ -4351,7 +4413,7 @@ FUNCTION {techreport} % title formatted as book title % { format.tr.title.number output.dot.new.block - format.year.month.day.check output.dot.new.block + format.year.month.day.check add.period$ } % % format editor and year, and check if year is present @@ -4360,7 +4422,7 @@ FUNCTION {techreport} % { format.editors.as.authors start.new.block format.year.month.day.check output.dot.new.block - format.tr.title.number output.dot.new.block + format.tr.title.number add.period$ } if$ } @@ -4371,7 +4433,7 @@ FUNCTION {techreport} % { format.authors start.new.block format.year.month.day.check output.dot.new.block - format.tr.title.number output.dot.new.block + format.tr.title.number add.period$ } if$ % @@ -4382,21 +4444,36 @@ FUNCTION {techreport} % if not empty, insert howpublished. % (used if report is retrieved from the internet) % - format.howpublished + format.howpublished add.period$ + % + % format url + % + url empty$ + 'skip$ + { % Clear the stack + duplicate$ empty$ + 'skip$ + { output.new.block } + if$ + format.url + } + if$ % % format optional note % note empty$ - { add.period$ } - { output.dot.new.block + 'skip$ + { % Clear the stack + duplicate$ empty$ + 'skip$ + { output.new.block } + if$ format.note } if$ fin.entry } - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % (translated) article or chapter in report @@ -4437,13 +4514,13 @@ FUNCTION {intechreport} % % volume, edition, report type and number, pages % - format.bvol.edition.check - format.tr.number connect.with.semicolon.check - pages format.bpages.check connect.with.comma.check - parenthesize.check + "\APACbVolEdTRpgs{" format.bvol.edition.check * "}{" * + format.tr.number * + "}{" * pages format.bpages.check * + "}" * % booktitle format.btitle.connect * - output.dot.new.block + add.period$ % % format address and publisher, check if publisher present % @@ -4452,7 +4529,20 @@ FUNCTION {intechreport} % if not empty, insert howpublished. % (used if report is retrieved from the internet) % - format.howpublished + format.howpublished add.period$ + % + % format url + % + url empty$ + 'skip$ + { % Clear the stack + duplicate$ empty$ + 'skip$ + { output.new.block } + if$ + format.url + } + if$ % % format original publication (of reprint/translation) % and optional note @@ -4477,12 +4567,15 @@ FUNCTION {lecture} % format.year.month.day.check output.dot.new.block symposium empty$ - { format.etitle.check + { format.betitle.check title format.btitle.connect output.new.block howpublished empty$ - { "symposium and howpublished missing in " * cite$ warning$ } - { howpublished } + { "symposium and howpublished missing in " cite$ * warning$ + "" + } + { "\APAChowpublished{" howpublished * "}" * } if$ + address connect.with.comma.check } { format.atitle.type.check output.new.block "\BIn{} " @@ -4498,26 +4591,42 @@ FUNCTION {lecture} if$ symposium format.btitle.no.dot * format.howpublished + address connect.with.comma.check + } + if$ + add.period$ + % + % format url + % + url empty$ + 'skip$ + { % Clear the stack + duplicate$ empty$ + 'skip$ + { output.new.block } + if$ + format.url } if$ % % format optional note % note empty$ - { add.period$ } - { output.dot.new.block + 'skip$ + { % Clear the stack + duplicate$ empty$ + 'skip$ + { output.new.block } + if$ format.note } if$ fin.entry } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% THESES % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % default thesis type is on top of stack @@ -4535,8 +4644,6 @@ FUNCTION {format.type.school} school connect.with.comma.check } - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % phd theses, etc. @@ -4583,7 +4690,7 @@ FUNCTION {thesis} parenthesize.check } if$ - format.etitle.check + format.aetitle.check swap$ connect.with.space.check "title" title warning.if.empty title format.atitle.connect output.new.block @@ -4594,20 +4701,36 @@ FUNCTION {thesis} % if not empty, insert howpublished. % (used if thesis is retrieved from the internet) % - format.howpublished + format.howpublished add.period$ + % + % format url + % + url empty$ + 'skip$ + { % Clear the stack + duplicate$ empty$ + 'skip$ + { output.new.block } + if$ + format.url + } + if$ % % format optional note % note empty$ - { add.period$ } - { output.dot.new.block + 'skip$ + { % Clear the stack + duplicate$ empty$ + 'skip$ + { output.new.block } + if$ format.note } if$ fin.entry } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % phd theses, etc. @@ -4615,7 +4738,6 @@ FUNCTION {thesis} FUNCTION {phdthesis} { "\BPhD" "\BUPhD" thesis } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % master's theses, etc. @@ -4623,13 +4745,9 @@ FUNCTION {phdthesis} FUNCTION {mastersthesis} { "\BMTh" "\BUMTh" thesis } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% OTHER % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % title of something (used in unpublished and misc) @@ -4637,7 +4755,8 @@ FUNCTION {mastersthesis} % type and number of something % FUNCTION {format.btitle.type.num} -{ format.etitle.check +{ format.betitle.check + format.bvol.edition connect.with.space.check format.type.number connect.with.space.check title empty$ @@ -4653,11 +4772,12 @@ FUNCTION {format.btitle.type.num} % type and number of something % FUNCTION {format.mtitle.type.num} -{ format.etitle.check - type "\bibmessage" = +{ format.aetitle.check + format.bvol.edition connect.with.space.check + type.2 "\bibmessage" = { number empty$ 'skip$ - { type number connect.with.space.check + { type.2 number tie.or.space.connect bracket.check connect.with.space.check } @@ -4679,23 +4799,16 @@ FUNCTION {format.mtitle.type.num} % type and number of something (used in misc) % FUNCTION {output.misctitle.type.num} -{ type empty$ +{ type.2 empty$ { format.btitle.type.num } - { type "\bibmessage" = - type "\bibcomputerprogram" = - type "\bibcomputerprogrammanual" = - type "\bibcomputerprogramandmanual" = - type "\bibcomputersoftware" = - type "\bibcomputersoftwaremanual" = - type "\bibcomputersoftwareandmanual" = - type "\bibprogramminglanguage" = - or - or - or - or - or - or - or + { type.2 "\bibmessage" = + type.2 "\bibcomputerprogram" = or + type.2 "\bibcomputerprogrammanual" = or + type.2 "\bibcomputerprogramandmanual" = or + type.2 "\bibcomputersoftware" = or + type.2 "\bibcomputersoftwaremanual" = or + type.2 "\bibcomputersoftwareandmanual" = or + type.2 "\bibprogramminglanguage" = or { format.mtitle.type.num } { format.btitle.type.num } if$ @@ -4718,8 +4831,8 @@ FUNCTION {unpublished} % no author or editor: title serves as author. % title formatted as book title % - { format.btitle.type.num output.dot.new.block - format.year.month.day.check + { format.btitle.type.num output.new.block + format.year.month.day.check add.period$ } % % format editor and year, and check if year is present @@ -4742,36 +4855,59 @@ FUNCTION {unpublished} } if$ howpublished empty$ - organization empty$ - address empty$ - and - and + organization empty$ and + address empty$ and 'skip$ - { output.dot.new.block - howpublished + { output.new.block + "\APAChowpublished{" "}" howpublished enclose.check organization connect.with.comma.check address connect.with.comma.check + add.period$ + } + if$ + % + % format url + % + url empty$ + 'skip$ + { % Clear the stack + duplicate$ empty$ + 'skip$ + { output.new.block } + if$ + format.url } if$ % % format optional note % note empty$ - { add.period$ } - { output.dot.new.block + 'skip$ + { % Clear the stack + duplicate$ empty$ + 'skip$ + { output.new.block } + if$ format.note } if$ fin.entry } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % nonprint media and other things that don't fit % FUNCTION {misc} -{ author empty$ +{ % + % To handle @manual: use type.2 instead of type. + type.2 empty$ + type empty$ not and + { type 'type.2 := } + 'skip$ + if$ + % + author empty$ % % no author: possibly edited item with editors as authors % @@ -4782,19 +4918,20 @@ FUNCTION {misc} % % if no title and no type, howpublished is title % - { title empty$ - type empty$ - and + { title empty$ + type.2 empty$ and { howpublished empty$ { "No author, editor, title, type, and howpublished in " - cite$ * warning$ } - { howpublished output.dot.new.block } + cite$ * warning$ + "" + } + { "\APAChowpublished{" howpublished * "}" * add.period$ } if$ - format.year.month.day.check output.dot.new.block + format.year.month.day.check add.period$ } { output.misctitle.type.num output.new.block - format.year.month.day.check output.dot.new.block - output.howpublished + format.year.month.day.check add.period$ + format.howpublished add.period$ } if$ } @@ -4804,8 +4941,8 @@ FUNCTION {misc} % { format.editors.as.authors start.new.block format.year.month.day.check output.dot.new.block - output.misctitle.type.num output.new.block - output.howpublished + output.misctitle.type.num + format.howpublished add.period$ } if$ } @@ -4816,24 +4953,47 @@ FUNCTION {misc} % { format.authors start.new.block format.year.month.day.check output.dot.new.block - output.misctitle.type.num output.new.block - output.howpublished + output.misctitle.type.num + format.howpublished add.period$ } if$ - address empty$ - publisher empty$ - and + % + address empty$ + publisher empty$ and + 'skip$ + { % Clear the stack + duplicate$ empty$ + 'skip$ + { output.new.block } + if$ + format.address.publisher add.period$ + } + if$ + % + % format url + % + url empty$ 'skip$ - { format.address.publisher - output.dot.new.block + { % Clear the stack + duplicate$ empty$ + 'skip$ + { output.new.block } + if$ + format.url } if$ % % format optional note % note empty$ - { "" } - { format.note } + 'skip$ + { % Clear the stack + duplicate$ empty$ + 'skip$ + { output.new.block } + if$ + format.note + } if$ fin.entry } @@ -4853,16 +5013,26 @@ FUNCTION {literal} fin.entry } +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % + % technical documentation + % +FUNCTION {manual} +{ % + % If type is empty, assume that it is a computer software manual. + % + type empty$ + { "\bibcomputersoftwaremanual" 'type.2 := } + 'skip$ + if$ + misc +} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % following functions not used for APA Manual examples % - - - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % booklet @@ -4870,7 +5040,6 @@ FUNCTION {literal} FUNCTION {booklet} { misc } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % part of a book @@ -4878,7 +5047,6 @@ FUNCTION {booklet} FUNCTION {inbook} { incollection } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % article in proceedings @@ -4886,16 +5054,12 @@ FUNCTION {inbook} FUNCTION {inproceedings} { incollection } - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % - % technical documentation + % article in proceedings (Kopka & Daly, 2004, p. 230) % -FUNCTION {manual} -{ misc } - - +FUNCTION {conference} +{ inproceedings } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % @@ -4904,7 +5068,6 @@ FUNCTION {manual} FUNCTION {proceedings} { misc } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % unknown types @@ -4912,17 +5075,13 @@ FUNCTION {proceedings} FUNCTION {default.type} { misc } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% INITIALIZATION FUNCTIONS % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FUNCTION {initialize} { % % Maximum number of names to be formatted . #6 'name.max := -% #250 'entry.max$ := -% #5000 'global.max$ := } FUNCTION {init.old.number} @@ -4961,12 +5120,9 @@ FUNCTION {move.backward} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% BASIC BIBLIOGRAPHY OUTPUT FUNCTIONS % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Beginning of the thebibliography environment: -% Write preamble if there is one, write \begin command FUNCTION {begin.bib} { preamble$ empty$ @@ -4977,7 +5133,6 @@ FUNCTION {begin.bib} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Write \end{thebibliography} command FUNCTION {end.bib} { newline$ @@ -4985,8 +5140,6 @@ FUNCTION {end.bib} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Write the citation labels and reference list entry to -% the .bbl file. FUNCTION {write.bbl.entry} { % @@ -5000,20 +5153,17 @@ FUNCTION {write.bbl.entry} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% READ AND PROCESS ENTRIES, MAKE THEBIBLIOGRAPHY % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Read entries . - READ -% Some initializations . + +EXECUTE { identify.apacite.version } + EXECUTE { initialize } -% Sort items by title in order to replace each title by -% its number in later sorting . ITERATE { make.sort.title } @@ -5025,17 +5175,11 @@ EXECUTE { init.old.label } ITERATE { make.title.number } -% Now generate some tentative author-year labels and do some -% preprocessing for the later definitive author and year -% labels. ITERATE { make.tentative.sort.label } SORT -% Now check whether initials must be added to first author, -% how many authors must be formatted, whether an "a", "b", -% etc., must be added to the year label. ITERATE { init.cite.initials.add.to.year } @@ -5062,30 +5206,21 @@ EXECUTE { move.backward } REVERSE { definitive.cite.num.names } -% Make final sorting label and do definitive sorting . - ITERATE { make.final.sort.key } SORT -% Write preamble and \begin{thebibliography}{} statement EXECUTE { begin.bib } -% Make final cite labels, format reference list entry, -% and write to .bbl file. ITERATE { write.bbl.entry } -% Write \end{thebibliography} statement - EXECUTE { end.bib } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% DONE % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% -% EOF apacite.bst -% +%% +%% +%% End of file `apacite.bst'. |