summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/bibtex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-03-03 00:57:20 +0000
committerKarl Berry <karl@freefriends.org>2009-03-03 00:57:20 +0000
commitaf897fb19e6f4e2fdde23a714556208290752d03 (patch)
tree0b5ad8895485dec6733554c28944d0c6e13c625b /Master/texmf-dist/bibtex
parent940b0c7ca7bd69adb7641e133a2f0004db8af586 (diff)
apacite update (2mar09)
git-svn-id: svn://tug.org/texlive/trunk@12295 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/bibtex')
-rw-r--r--Master/texmf-dist/bibtex/bib/apacite/apa5ex.bib2046
-rw-r--r--Master/texmf-dist/bibtex/bst/apacite/apacann.bst5259
-rw-r--r--Master/texmf-dist/bibtex/bst/apacite/apacannx.bst5259
-rw-r--r--Master/texmf-dist/bibtex/bst/apacite/apacite.bst28
-rw-r--r--Master/texmf-dist/bibtex/bst/apacite/apacitex.bst28
5 files changed, 10554 insertions, 2066 deletions
diff --git a/Master/texmf-dist/bibtex/bib/apacite/apa5ex.bib b/Master/texmf-dist/bibtex/bib/apacite/apa5ex.bib
deleted file mode 100644
index 6d13bbe77c3..00000000000
--- a/Master/texmf-dist/bibtex/bib/apacite/apa5ex.bib
+++ /dev/null
@@ -1,2046 +0,0 @@
-%%
-%% This is file `apa5ex.bib',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% apacite.dtx (with options: `bibdb')
-%%
-%% 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.
-%%
-%% apa5ex.bib
-%% [2007/09/03 v4.00 bibliography database for apacite manual]
-
-
-%%
-%% apa5ex.bib: References from the 5th edition of the Publication Manual
-%% of the APA, plus a few additional references
-%% Written by Erik Meijer
-
-%% Entry labels are section number of the APA manual (5th ed.)
-%% plus a sequence number within the section.
-
-@misc{3.94-1,
- author = {Walker},
- year = {2000},
- type = {Unknown}
-}
-
-@misc{3.95-1,
- author = {Wasserstein and Zappulla and Rosen and Gerstman and Rock},
- year = {1994},
- type = {Unknown}
-}
-
-@misc{3.95-2,
- author = {Bradley and Ramirez and Soo},
- year = {1994},
- type = {Unknown}
-}
-
-@misc{3.95-3,
- author = {Bradley and Soo and Ramirez and Brown},
- year = {1994},
- type = {Unknown}
-}
-
-@misc{3.95-4,
- author = {Kosslyn and Koenig and Barrett and Cave and Tang and Gabrieli},
- year = {1996},
- type = {Unknown}
-}
-
-@misc{3.95-5,
- author = {Kosslyn and Koenig and Gabrieli and Tang and Marsolek and Daly},
- year = {1996},
- type = {Unknown}
-}
-
-@misc{3.95-6,
- author = {Nightlinger and Littlewood},
- year = {1993},
- type = {Unknown}
-}
-
-@book{3.95-7,
- author = {J{\"{o}}reskog, K[arl] G. and S{\"{o}}rbom, D[ag]},
- year = {1989},
- title = {{LISREL} 7: {A} Guide to the Program and Applications},
- edition = {2},
- address = {Chicago},
- publisher = {SPSS}
-}
-
-@misc{3.96-1,
- author = {{\bibcorporate{National Institute of Mental Health}}},
- firstkey = {{National Institute of Mental Health [NIMH]}},
- key = {{NIMH}},
- year = {1999},
- type = {Unknown}
-}
-
-@misc{3.96-2,
- author = {{\bibcorporate{University of Pittsburgh}}},
- year = {1993},
- type = {Unknown}
-}
-
-@book{3.96-3,
- author = {{\bibcorporate{Koninklijke Nederlandse Schaakbond}}},
- firstkey = {{Koninklijke Nederlandse Schaakbond [KNSB]}},
- key = {{KNSB}},
- year = {2002},
- title = {Jaarverslag 2002},
- englishtitle = {Annual Report 2002},
- address = {Amsterdam},
- publisher = {{\bibcorporate{Koninklijke Nederlandse Schaakbond}}},
- note = {Fake entry to study sorting and citing of references with
- same key, but with different firstkey.}
-}
-
-@book{3.96-4,
- author = {{\bibcorporate{Koninklijke Nederlandse Schaakbond}}},
- firstkey = {{Koninklijke Nederlandse Schaakbond [KNSB]}},
- key = {{KNSB}},
- year = {2003},
- title = {Jaarverslag 2003},
- englishtitle = {Annual Report 2003},
- address = {Amsterdam},
- publisher = {{\bibcorporate{Koninklijke Nederlandse Schaakbond}}},
- note = {Fake entry to study sorting and citing of references with
- same key, but with different firstkey.}
-}
-
-@book{3.96-5,
- author = {{\bibcorporate{Koninklijke Nederlandse Schaatsbond}}},
- firstkey = {{Koninklijke Nederlandse Schaatsbond [KNSB]}},
- key = {{KNSB}},
- year = {2002},
- title = {Jaarverslag 2002},
- englishtitle = {Annual Report 2002},
- address = {Amsterdam},
- publisher = {{\bibcorporate{Koninklijke Nederlandse Schaatsbond}}},
- note = {Fake entry to study sorting and citing of references with
- same key, but with different firstkey.}
-}
-
-@book{3.96-6,
- author = {{\bibcorporate{Koninklijke Nederlandse Schaatsbond}}},
- firstkey = {{Koninklijke Nederlandse Schaatsbond [KNSB]}},
- key = {{KNSB}},
- year = {2003},
- title = {Jaarverslag 2003},
- englishtitle = {Annual Report 2003},
- address = {Amsterdam},
- publisher = {{\bibcorporate{Koninklijke Nederlandse Schaatsbond}}},
- note = {Fake entry to study sorting and citing of references with
- same key, but with different firstkey.}
-}
-
-@magazine{3.97-1,
- key = {{\APACciteatitle{Study Finds}}},
- year = {1982},
- month = apr,
- title = {Study Finds Free Care Used More},
- journal = {{APA} Monitor},
- pages = {14}
-}
-
-@book{3.97-2,
- year = {1979},
- title = {College Bound Seniors},
- address = {Princeton, NJ},
- publisher = {College Board Publications}
-}
-
-@misc{3.97-3,
- author = {Anonymous},
- year = {1998},
- type = {Unknown}
-}
-
-@newspaper{3.97-4,
- year = {2002},
- month = mar,
- day = {3},
- title = {Editorial},
- journal = {The Edited Newspaper},
- pages = {2},
- note = {Fake entry to study sorting and citing of references without
- author, but with the same title.}
-}
-
-@newspaper{3.97-5,
- year = {2003},
- month = feb,
- day = {12},
- title = {Editorial},
- journal = {The Edited Newspaper},
- pages = {2},
- note = {Fake entry to study sorting and citing of references without
- author, but with the same title.}
-}
-
-@newspaper{3.97-6,
- year = {2003},
- month = jan,
- day = {24},
- title = {Editorial},
- journal = {The Edited Newspaper},
- pages = {2},
- note = {Fake entry to study sorting and citing of references without
- author, but with the same title.}
-}
-
-@book{3.98-1,
- author = {Luce, R. Duncan},
- year = {1959},
- title = {Individual Choice Behavior},
- address = {New York},
- publisher = {Wiley}
-}
-
-@misc{3.98-2,
- author = {Luce, P. A.},
- year = {1986},
- type = {Unknown}
-}
-
-@misc{3.98-3,
- author = {Goldberg, J. M. and Neff},
- year = {1961},
- type = {Unknown}
-}
-
-@misc{3.98-4,
- author = {Goldberg, M. E. and Wurtz},
- year = {1972},
- type = {Unknown}
-}
-
-@misc{3.99-1,
- author = {Edeline and Weinberger},
- year = {1991},
- type = {Unknown}
-}
-
-@misc{3.99-2,
- author = {Edeline and Weinberger},
- year = {1993},
- type = {Unknown}
-}
-
-@misc{3.99-3,
- author = {Gogel},
- year = {1984},
- type = {Unknown}
-}
-
-@misc{3.99-4,
- author = {Gogel},
- year = {1990},
- type = {Unknown}
-}
-
-@misc{3.99-5,
- author = {Gogel},
- year = {\BIP},
- type = {Unknown}
-}
-
-@misc{3.99-6,
- author = {Johnson},
- year = {1991},
- title = {Aaa}
-}
-
-@misc{3.99-7,
- author = {Johnson},
- year = {1991},
- title = {Bbb}
-}
-
-@misc{3.99-8,
- author = {Johnson},
- year = {1991},
- title = {Ccc}
-}
-
-@misc{3.99-9,
- author = {Singh},
- year = {1983},
- type = {Unknown}
-}
-
-@misc{3.99-10,
- author = {Singh},
- year = {\BIP},
- title = {Aaa}
-}
-
-@misc{3.99-11,
- author = {Singh},
- year = {\BIP},
- title = {Bbb}
-}
-
-@misc{3.99-12,
- author = {Balda},
- year = {1980},
- type = {Unknown}
-}
-
-@misc{3.99-13,
- author = {Kamil},
- year = {1988},
- type = {Unknown}
-}
-
-@misc{3.99-14,
- author = {Pepperberg and Funk},
- year = {1990},
- type = {Unknown}
-}
-
-@misc{3.99-15,
- author = {Minor},
- year = {2001},
- type = {Unknown}
-}
-
-@misc{3.99-16,
- author = {Adams},
- year = {1999},
- type = {Unknown}
-}
-
-@misc{3.99-17,
- author = {Storandt},
- year = {1997},
- type = {Unknown}
-}
-
-@misc{3.100-1,
- author = {Author},
- year = {\bibnodate},
- type = {Unknown},
- note = {no example, but rule given in text}
-}
-
-@misc{3.100-1b,
- author = {Author},
- year = {2003 version},
- type = {Unknown},
- note = {no example, but rule given in text}
-}
-
-@book{3.100-2,
- author = {Aristotle},
- year = {1931},
- title = {Unknown},
- translator = {Someone},
- originalyear = {\bibnodate}
-}
-
-@book{3.100-3,
- author = {James},
- year = {1983},
- title = {Unknown},
- originalyear = {1890}
-}
-
-@misc{3.101-1,
- author = {Cheek and Buss},
- year = {1981},
- type = {Unknown}
-}
-
-@misc{3.101-2,
- author = {Shimamura},
- year = {1989},
- type = {Unknown}
-}
-
-@misc{3.101-3,
- author = {Myers},
- year = {2000},
- type = {Unknown}
-}
-
-@misc{3.101-4,
- author = {Beutler},
- year = {2000},
- type = {Unknown}
-}
-
-@misc{3.103-1,
- author = {Hashtroudi and Chrosniak and Schwartz},
- year = {1991},
- type = {Unknown}
-}
-
-@misc{4.04-t1,
- author = {Brown, J. R.},
- year = {\bibnodate},
- type = {Unknown}
-}
-
-@misc{4.04-t2,
- author = {Browning, A. R.},
- year = {\bibnodate},
- type = {Unknown}
-}
-
-@misc{4.04-t3,
- author = {MacArthur},
- year = {\bibnodate},
- type = {Unknown}
-}
-
-@misc{4.04-t4,
- author = {McAllister},
- year = {\bibnodate},
- type = {Unknown}
-}
-
-@misc{4.04-t5,
- author = {MacNeil},
- year = {\bibnodate},
- type = {Unknown}
-}
-
-@misc{4.04-t6,
- author = {M'Carthy},
- year = {\bibnodate},
- type = {Unknown}
-}
-
-@misc{4.04-t7,
- author = {DeBase},
- year = {\bibnodate},
- type = {Unknown}
-}
-
-@misc{4.04-t8,
- author = {De Vries, J.},
- year = {\bibnodate},
- type = {Unknown}
-}
-
-@misc{4.04-t9,
- author = {von Helmholtz, H. L. F.},
- year = {\bibnodate},
- type = {Unknown}
-}
-
-@article{4.04-t10,
- year = {2003},
- title = {{\APACSortNoop{Two-Thousand and Three}}2003 Hottest Summer Ever},
- journal = {Journal of Meteorology},
- note = {This is a fake entry, used for didactical purposes.}
-}
-
-@misc{4.04-1,
- author = {Hewlett, L. S.},
- year = {1996},
- type = {Unknown}
-}
-
-@misc{4.04-2,
- author = {Hewlett, L. S.},
- year = {1999},
- type = {Unknown}
-}
-
-@misc{4.04-3,
- author = {Alleyne, R. L.},
- year = {2001},
- type = {Unknown}
-}
-
-@misc{4.04-4,
- author = {Alleyne, R. L. and Evans, A. J.},
- year = {1999},
- type = {Unknown}
-}
-
-@misc{4.04-5,
- author = {Gosling, J. R. and Jerald, K. and Belfar, S. F.},
- year = {2000},
- type = {Unknown}
-}
-
-@misc{4.04-6,
- author = {Gosling, J. R. and Tevlin, D. F.},
- year = {1996},
- type = {Unknown}
-}
-
-@misc{4.04-7,
- author = {Hayward, D. and Firsching, A. and Brown, J.},
- year = {1999},
- type = {Unknown}
-}
-
-@misc{4.04-8,
- author = {Hayward, D. and Firsching, A. and Smigel, J.},
- year = {1999},
- type = {Unknown}
-}
-
-@misc{4.04-9,
- author = {Cabading, J. R. and Wright, K.},
- year = {2000},
- type = {Unknown}
-}
-
-@misc{4.04-10,
- author = {Cabading, J. R. and Wright, K.},
- year = {2001},
- type = {Unknown}
-}
-
-@article{4.04-11,
- author = {Baheti, J. R.},
- year = {2001},
- title = {Control {\ldots}}
-}
-
-@article{4.04-12,
- author = {Baheti, J. R.},
- year = {2001},
- title = {Roles of {\ldots}}
-}
-
-@misc{4.04-13,
- author = {Mathur, A. L. and Wallston, J.},
- year = {1999},
- type = {Unknown}
-}
-
-@misc{4.04-14,
- author = {Mathur, S. E. and Ahlers, R. J.},
- year = {1998},
- type = {Unknown}
-}
-
-@book{4.05-1,
- author = {Bandura, A. J.},
- year = {1977},
- title = {Social Learning Theory},
- address = {Englewood Cliffs, NJ},
- publisher = {Prentice Hall}
-}
-
-@article{4.05-2,
- author = {Bretschneider, J. G. and McCoy, N. L.},
- year = {1968},
- title = {Sexual Interest and Behavior in Healthy
- 80- to 102-Year-Olds},
- journal = {Archives of Sexual Behavior},
- volume = {14},
- pages = {343--350}
-}
-
-@article{4.08-1,
- author = {Kernis, M. H. and Cornell, D. P. and Sun, C.-R.
- and Berry, A. and Harlow, T.},
- year = {1993},
- title = {There's More to Self-Esteem than Whether it is High
- or Low: {T}he Importance of Stability of Self-Esteem},
- journal = {Journal of Personality and Social Psychology},
- volume = {65},
- pages = {1190--1204}
-}
-
-@book{4.08-2,
- editor = {Robinson, D. N.},
- year = {1992},
- title = {Social Discourse and Moral Judgment},
- address = {San Diego, CA},
- publisher = {Academic Press}
-}
-
-@misc{4.08-3,
- author = {Bulatao, E. {\protect\bibliteral{(with
- Winford, C.~A.)}\protect\indexskipbracenodot}},
- year = {\bibnodate},
- type = {Unknown}
-}
-
-@article{4.09-1,
- author = {Fowers, B. J. and Olson, D. H.},
- year = {1993},
- title = {{ENRICH} {Marital} {Satisfaction} {Scale}:
- {A} Brief Research and Clinical Tool},
- journal = {Journal of Family Psychology},
- volume = {7},
- pages = {176--185}
-}
-
-@article{4.10-1,
- author = {Deutsch, F. M. and Lussier, J. B. and Servis, L. J.},
- year = {1993},
- title = {Husbands At Home: Predictors of Paternal Participation
- in Childcare and Housework},
- journal = {Journal of Personality and Social Psychology},
- volume = {65},
- pages = {1154--1166}
-}
-
-@incollection{4.10-2,
- author = {O'Neil, J. M. and Egan, J.},
- year = {1992},
- title = {Men's and Women's Gender Role Journeys:
- Metaphor for Healing, Transition, and Transformation},
- editor = {Wainrib, B. R.},
- booktitle = {Gender Issues Across the Life Cycle},
- pages = {107--123},
- address = {New York},
- publisher = {Springer}
-}
-
-@article{4.11-1,
- author = {Buss, D. M. and Schmitt, D. P.},
- year = {1993},
- title = {Sexual Strategies Theory: An Evolutionary Perspective
- on Human Mating},
- journal = {Psychological Review},
- volume = {100},
- pages = {204--232}
-}
-
-@magazine{4.11-2,
- author = {Henry, III, W. A.},
- year = {1990},
- month = apr,
- day = {9},
- title = {Beyond the Melting Pot},
- journal = {Time},
- volume = {135},
- pages = {28--31}
-}
-
-@book{4.12-1,
- author = {Saxe, G. B.},
- year = {1991},
- title = {Cultural and Cognitive Development: Studies in
- Mathematical Understanding},
- address = {Hillsdale, NJ},
- publisher = {Erlbaum}
-}
-
-@incollection{4.13-1,
- author = {Baker, F. M. and Lightfoot, O. B.},
- year = {1993},
- title = {Psychiatric Care of Ethnic Elders},
- editor = {Gaw, A. C.},
- booktitle = {Culture, Ethnicity, and Mental Illness},
- pages = {517--552},
- address = {Washington, DC},
- publisher = {American Psychiatric Press}
-}
-
-@incollection{4.13-2,
- author = {Merikle, Philip M.},
- year = {2000},
- title = {Subliminal Perception},
- editor = {Kazdin, Alan E. and Blanchard, Edward B. and
- Bootzin, Richard R. and Bower, Gordon and
- Close Conoley, Jane and Deaux, Kay and Fox, Ronald E. and
- Harmon, Lenore W. and Howell, William C. and
- Marsella, Anthony J. and Price, Richard H. and
- Roediger, III, Henry L. and Rosenthal, Robert and
- Schmitt, Neal W. and Singer, Jerome L. and Squire, Larry R. and
- Zahn-Waxler, Carolyn},
- booktitle = {Encyclopedia of Psychology},
- volume = {7},
- pages = {497--499},
- address = {New York},
- publisher = {Oxford University Press}
-}
-
-@misc{4.15-1,
- key = {{\APACcitebtitle{Electronic Reference Formats}}},
- title = {Electronic Reference Formats Recommended by the
- {American} {Psychological} {Association}},
- year = {2000},
- month = oct,
- day = {12},
- lastchecked = {October 23, 2000},
- URL = {http://www.apa.org/journals/webref.html}
-}
-
-@article{4.15-2,
- author = {Eid, M. and Langeheine, R.},
- year = {1999},
- title = {The Measurement of Consistency and Occasion Specificity
- with Latent Class Models: A New Model and its
- Application to the Measurement of Affect},
- journal = {Psychological Methods},
- volume = {4},
- pages = {100--116},
- howpublished = {Retrieved November 19, 2000, from the PsycARTICLES database}
-}
-
-
-@article{A-1,
- author = {Herman, L. M. and Kuczaj, III, S. A. and Holder, M. D.},
- year = {1993},
- title = {Responses to Anomalous Gestural Sequences by a
- Language-Trained Dolphin: {E}vidence for Processing
- of Semantic Relations and Syntactic Information},
- journal = {Journal of Experimental Psychology: General},
- volume = {122},
- pages = {184--194}
-}
-
-@article{ex1,
- author = {Mellers, B. A.},
- year = {2000},
- title = {Choice and the Relative Pleasure of Consequences},
- journal = {Psychological Bulletin},
- volume = {126},
- pages = {910--924}
-}
-
-@article{ex2,
- author = {Klimoski, R. and Palmer, S.},
- year = {1993},
- title = {The {ADA} and the Hiring Process in Organizations},
- journal = {Consulting Psychology Journal: Practice and Research},
- volume = {45},
- number = {2},
- pages = {10--36}
-}
-
-@article{ex3,
- author = {Saywitz, K. J. and Mannarino, A. P. and Berliner, L.
- and Cohen, J. A.},
- year = {2000},
- title = {Treatment for Sexually Abused Children and Adolescents},
- journal = {American Psychologist},
- volume = {55},
- pages = {1040--1049}
-}
-
-@article{ex4,
- author = {Wolchik, S. A. and West, S. G. and Sandler, I. N. and
- Tein, J. and Coatsworth, D. and Lengua, L. and others},
- year = {2000},
- title = {An Experimental Evaluation of Theory-Based Mother and
- Mother-Child Programs for Children of Divorce},
- journal = {Journal of Consulting and Clinical Psychology},
- volume = {68},
- pages = {843--856}
-}
-
-@article{ex4-2,
- author = {Swait, Joffre and Adamowicz, Wiktor and Hanemann, Michael
- and Diederich, Adele and Krosnick, Jon and Layton, David
- and Provencher, William and Schkade, David and Tourangeau, Roger},
- year = {2002},
- title = {Context Dependence and Aggregation
- in Disaggregate Choice Analysis},
- journal = {Marketing Letters},
- volume = {13},
- pages = {195--205}
-}
-
-@article{ex5,
- author = {Zuckerman, M. and Kieffer, S. C.},
- year = {\BIP},
- title = {Race Differences in Face-ism: {D}oes Facial Prominence
- Imply Dominance?},
- journal = {Journal of Personality and Social Psychology}
-}
-
-@magazine{ex6,
- author = {Kandel, E. R. and Squire, L. R.},
- year = {2000},
- month = nov,
- day = {10},
- title = {Neuroscience: {B}reaking Down Scientific Barriers to the
- Study of Brain and Mind},
- journal = {Science},
- volume = {290},
- pages = {1113--1120}
-}
-
-@article{ex7,
- author = {Brown, L. S.},
- year = {1993},
- month = spring,
- title = {Antidomination Training as a Central Component of
- Diversity in Clinical Psychology Education},
- journal = {The Clinical Psychologist},
- volume = {46},
- pages = {83--87}
-}
-
-@article{ex8,
- year = {1993},
- month = aug # "/" # sep,
- title = {The New Health-Care Lexicon},
- journal = {Copy Editor},
- volume = {4},
- pages = {1--2}
-}
-
-@newspaper{ex9,
- key = {{\APACciteatitle{New Drug}}},
- year = {1993},
- month = jul,
- day = {15},
- title = {New Drug Appears to Sharply Cut Risk of Death from
- Heart Failure},
- journal = {The Washington Post},
- pages = {A12}
-}
-
-@newspaper{ex10,
- author = {Schwartz, J.},
- year = {1993},
- month = sep,
- day = {30},
- title = {Obesity Affects Economic, Social Status},
- journal = {The Washington Post},
- pages = {A1, A4}
-}
-
-@newspaper{ex11,
- author = {Berkowitz, A. D.},
- year = {2000},
- month = nov,
- day = {24},
- title = {How to Tackle the Problem of Student Drinking},
- type = {Letter to the editor},
- journal = {The Chronicle of Higher Education},
- pages = {B20}
-}
-
-@article{ex12,
- editor = {Barlow, D. H.},
- year = {1991},
- title = {Diagnoses, Dimensions, and \emph{DSM-IV}:
- The Science of Classification},
- type = {Special issue},
- journal = {Journal of Abnormal Psychology},
- volume = {100},
- number = {3}
-}
-
-@article{ex13,
- author = {Harris, P. L. and Kavanaugh, R. D.},
- year = {1993},
- title = {Young Children's Understanding of Pretense},
- journal = {Monographs of the Society for Research in Child Development},
- volume = {58},
- number = {1, Serial No.~231},
-}
-
-@article{ex14,
- author = {Battig, W. F. and Montague, W. E.},
- year = {1969},
- title = {Category Norms for Verbal Items in 56 Categories:
- A Replication and Extension of the {Connecticut}
- Category Norms},
- journal = {Journal of Experimental Psychology Monographs},
- volume = {80},
- number = {3, Pt.~2}
-}
-
-@article{ex15,
- author = {Ganster, D. C. and Schaubroeck, J. and Sime, W. E.
- and Mayes, B. T.},
- year = {1991},
- title = {The Nomological Validity of the {Type}~{A} Personality
- Among Employed Adults},
- type = {Monograph},
- journal = {Journal of Applied Psychology},
- volume = {76},
- pages = {143--168}
-}
-
-@article{ex16,
- author = {Woolf, N. J. and Young, S. L. and Fanselow, M. S. and
- Butcher, L. L.},
- year = {1991},
- title = {{MAP}-2 Expression in Cholinoceptive Pyramidal Cells
- of Rodent Cortex and Hippocampus is Altered by
- {Pavlovian} Conditioning},
- type = {Abstract},
- journal = {Society for Neuroscience Abstracts},
- volume = {17},
- pages = {480}
-}
-
-@article{ex17,
- author = {Nakazato, K. and Shimonaka, Y. and Homma, A.},
- year = {{\protect\bibreftext{1992}{1992/1993}}},
- title = {Cognitive Functions of Centenarians: The {Tokyo}
- {Metropolitan} {Centenarian} {Study}},
- journal = {Japanese Journal of Developmental Psychology},
- volume = {3},
- pages = {9--16},
- howpublished = {Abstract obtained from
- {\APACcitebtitle{PsycSCAN: Neuropsychology}},
- 1993, \emph{2}, Abstract No.~604}
-}
-
-@article{ex18,
- author = {Regier, A. A. and Narrow, W. E. and Rae, D. S.},
- year = {1990},
- title = {The Epidemiology of Anxiety Disorders: The Epidemiologic
- Catchment Area ({ECA}) Experience},
- journal = {Journal of Psychiatric Research},
- volume = {24},
- number = {Suppl.~2},
- pages = {3--14}
-}
-
-@article{ex19,
- author = {Fiske, S. T.},
- year = {1993},
- title = {Social Cognition and Social Perception},
- journal = {Annual Review of Psychology},
- volume = {44},
- pages = {155--194}
-}
-
-@article{ex20,
- author = {Ising, M.},
- year = {2000},
- title = {Intensit{\"{a}}tsabh{\"{a}}ngigkeit evozierter {Potenzial} im
- {EEG}: Sind impulsive {Personen} {Augmenter} oder
- {Reducer}?},
- englishtitle = {Intensity Dependence in Event-Related {EEG} Potentials:
- Are Impulsive Individuals Augmenters or Reducers?},
- journal = {Zeitschrift f{\"{u}}r Differentielle und Diagnostische
- Psychologie},
- volume = {21},
- pages = {208--217}
-}
-
-@article{ex21,
- author = {Stutte, H.},
- year = {1972},
- title = {Transcultural Child Psychiatry},
- journal = {Acta Paedopsychiatrica},
- volume = {38},
- number = {9},
- pages = {229--231}
-}
-
-@article{ex22,
- author = {Coltheart, M. and Curtis, B. and Atkins, P. and Haller, M.},
- year = {1993},
- title = {Models of Reading Aloud: Dual-Route and
- Parallel-Distributed-Processing Approaches},
- journal = {Psychological Review},
- volume = {100},
- pages = {589--608}
-}
-
-@book{B-1,
- author = {Beck, C. A. J. and Sales, B. D.},
- year = {2001},
- title = {Family Mediation: Facts, Myths, and Future Prospects},
- address = {Washington, DC},
- publisher = {American Psychological Association}
-}
-
-@book{ex23,
- author = {Mitchell, T. R. and Larson, Jr.\hbox{}, J. R.},
- year = {1987},
- title = {People in Organizations: An Introduction to
- Organizational Behavior},
- edition = {3},
- address = {New York},
- publisher = {McGraw-Hill}
-}
-
-@book{ex24,
- author = {{\bibcorporate{Australian Bureau of Statistics}}},
- year = {1991},
- title = {Estimated Resident Population by Age and Sex in
- Statistical Local Areas, {New} {South} {Wales},
- {June} 1990},
- number = {3209.1},
- address = {Canberra, Australian Capital Territory},
- publisher = {{\bibcorporate{Australian Bureau of Statistics}}}
-}
-
-@book{ex25,
- editor = {Gibbs, J. T. and Huang, L. N.},
- year = {1991},
- title = {Children of Color: Psychological Interventions with
- Minority Youth},
- address = {San Francisco},
- publisher = {Jossey-Bass}
-}
-
-@book{ex25-t1,
- author = {Vygotsky, L. S.},
- year = {1978},
- title = {Mind in Society: {T}he Development of Higher Mental
- Processes},
- editor = {Rice, Edgar},
- translator = {Rice, Edgar},
- address = {Cambridge, MA},
- publisher = {Harvard University Press},
- originalyear = {1930, 1933, 1935}
-}
-
-@book{ex25-t2,
- author = {J{\"{o}}reskog, Karl G. and S{\"{o}}rbom, Dag},
- year = {1979},
- title = {Advances in Factor Analysis
- and Structural Equation Models},
- editor = {Magidson, Jay},
- address = {Cambridge, MA},
- publisher = {Abt Books}
-}
-
-@book{ex26,
- year = {1993},
- title = {Merriam-{Webster}'s Collegiate Dictionary},
- edition = {10},
- address = {Springfield, MA},
- publisher = {Merriam-Webster}
-}
-
-@book{ex27,
- author = {Rosenthal, R.},
- year = {1987},
- title = {Meta-Analytic Procedures for Social Research},
- edition = {Rev.\hbox{}},
- address = {Newbury Park, CA},
- publisher = {Sage}
-}
-
-@book{ex28,
- editor = {Koch, S.},
- year = {1959--1963},
- title = {Psychology: {A} Study of Science},
- volume = {1--6},
- address = {New York},
- publisher = {McGraw-Hill}
-}
-
-@book{ex29,
- key = {{\bibDSM{American Psychiatric
- Association}{Diagnostic and Statistical Manual
- of Mental Disorders}{4th ed.\hbox{}}{DSM-IV}}},
- author = {{\bibcorporate{American Psychiatric Association}}},
- year = {1994},
- title = {Diagnostic and Statistical Manual of Mental Disorders},
- edition = {4},
- address = {Washington, DC},
- publisher = {{\bibcorporate{American Psychiatric Association}}}
-}
-
-@book{ex30,
- editor = {Sadie, S.},
- year = {1980},
- title = {The New {G}rove Dictionary of Music and Musicians},
- edition = {6},
- volume = {1--20},
- address = {London},
- publisher = {Macmillan}
-}
-
-@book{ex30-2,
- editor = {Kazdin, Alan E. and Blanchard, Edward B. and
- Bootzin, Richard R. and Bower, Gordon and
- Close Conoley, Jane and Deaux, Kay and Fox, Ronald E. and
- Harmon, Lenore W. and Howell, William C. and
- Marsella, Anthony J. and Price, Richard H. and
- Roediger, III, Henry L. and Rosenthal, Robert and
- Schmitt, Neal W. and Singer, Jerome L. and Squire, Larry R. and
- Zahn-Waxler, Carolyn},
- year = {2000},
- title = {Encyclopedia of Psychology},
- address = {New York},
- publisher = {Oxford University Press}
-}
-
-@book{ex31,
- author = {Piaget, J. and Inhelder, B.},
- year = {1951},
- title = {La Gen{\`{e}}se de l'Id{\'{e}}e de Hasard chez l'Enfant},
- englishtitle = {The Origin of the Idea of Chance in the Child},
- address = {Paris},
- publisher = {Presses Universitaires de France}
-}
-
-@book{ex32,
- author = {Laplace, P.-S.},
- year = {1951},
- title = {A Philosophical Essay on Probabilities},
- translator = {Truscott, F. W. and Emory, F. L.},
- address = {New York},
- publisher = {Dover},
- originalyear = {1814}
-}
-
-@book{ex33,
- author = {{\bibcorporate{Research and Training Center on
- Independent Living}}},
- firstkey = {{Research and Training Center on Independent Living [RTCIL]}},
- key = {RTCIL},
- year = {1993},
- title = {Guidelines for Reporting and Writing About People
- with Disabilities},
- edition = {4},
- type = {Brochure},
- address = {Lawrence, KS},
- publisher = {{\bibcorporate{Research and Training Center on
- Independent Living}}}
-}
-
-@incollection{B-2,
- author = {Massaro, D.},
- year = {1992},
- title = {Broadening the Domain of the Fuzzy Logical Model of Perception},
- editor = {Pick, Jr.\hbox{}, H. L. and van den Broek, P. and Knill, D. C.},
- booktitle = {Cognition: Conceptual and Methodological Issues},
- pages = {51--84},
- address = {Washington, DC},
- publisher = {American Psychological Association}
-}
-
-@incollection{ex34,
- author = {Bjork, R. A.},
- year = {1989},
- title = {Retrieval Inhibition as an Adaptive Mechanism in Human Memory},
- editor = {Roediger, III, H. L. and Craik, F. I. M.},
- booktitle = {Varieties of Memory \& Consciousness},
- pages = {309--330},
- address = {Hillsdale, NJ},
- publisher = {Erlbaum}
-}
-
-@incollection{ex35,
- author = {Auerbach, J. S.},
- year = {\BIP},
- title = {The Origins of Narcissism and Narcissistic Personality
- Disorder: A Theoretical and Empirical Reformulation},
- editor = {Masling, J. M. and Bornstein, R. F.},
- booktitle = {Empirical Studies of Psychoanalytic Theories:
- {Vol}.~4. {Psychoanalytic} Perspectives on Psychopathology},
- address = {Washington, DC},
- publisher = {American Psychological Association}
-}
-
-@incollection{ex36,
- author = {Maccoby, E. E. and Martin, J.},
- year = {1983},
- title = {Socialization in the Context of the Family:
- Parent-Child Interaction},
- editor = {Mussen (Series Ed.\hbox{}), P. H. and
- Hetherington{\bibeditortype{Vol.\ Ed.\hbox{}}}, E. M.},
- booktitle = {Handbook of Child Psychology:
- {Vol}.~4. {Socialization}, Personality, and Social Development},
- edition = {4},
- pages = {1--101},
- address = {New York},
- publisher = {Wiley}
-}
-
-@incollection{ex37,
- author = {Davydov, V. V.},
- year = {1972},
- title = {De Introductie van het Begrip Grootheid in de Eerste
- Klas van de Basisschool: Een Experimenteel Onderzoek},
- englishtitle = {The Introduction of the Concept of Quantity in the
- First Grade of the Primary School: An Experimental Study},
- editor = {Van Parreren, C. F. and Carpay, J. A. M.},
- booktitle = {Sovjetpsychologen aan het Woord},
- pages = {227--289},
- address = {Groningen, The Netherlands},
- publisher = {Wolters-Noordhoff}
-}
-
-@incollection{ex38,
- author = {Bergmann, P. G.},
- year = {1993},
- title = {Relativity},
- booktitle = {The New Encyclopaedia {Britannica}},
- volume = {26},
- pages = {501--508},
- address = {Chicago},
- publisher = {Encyclopaedia Britannica}
-}
-
-@incollection{ex39,
- author = {Freud, Sigmund},
- year = {1961},
- title = {The Ego and the Id},
- editor = {Strachey, J.},
- translator = {Strachey, J.},
- booktitle = {The Standard Edition of the Complete Psychological
- Works of {Sigmund} {Freud}},
- volume = {19},
- pages = {3--66},
- address = {London},
- publisher = {Hogarth Press},
- originalyear = {1923}
-}
-
-@incollection{ex40,
- author = {Piaget, J.},
- year = {1988},
- title = {Extracts from {Piaget}'s Theory},
- translator = {Gellerier, G. and Langer, J.},
- editor = {Richardson, K. and Sheldon, S.},
- booktitle = {Cognitive Development to Adolescence: A Reader},
- pages = {3--18},
- address = {Hillsdale, NJ},
- publisher = {Erlbaum},
- originalbooktitle = {Manual of Child Psychology},
- originalpages = {703--732},
- originaleditor = {Mussen, P. H.},
- originalyear = {1970},
- originaladdress = {New York},
- originalpublisher = {Wiley}
-}
-
-@incollection{ex40-t1,
- author = {Browne, M[ichael] W.},
- year = {1977},
- title = {Generalized Least Squares Estimators in the Analysis
- of Covariance Structures},
- editor = {Aigner, D[ennis] J. and Goldberger, A[rthur] S.},
- booktitle = {Latent Variables in Socio-Economic Models},
- pages = {205--226},
- address = {Amsterdam},
- publisher = {North Holland},
- originalyear = {1974},
- originaljournal = {South African Statistical Journal},
- originalvolume = {8},
- originalpages = {1--24},
-}
-
-@techreport{C-1,
- author = {Mazzeo, J. and Druesne, B. and Raffeld, P. C.
- and Checketts, K. T. and Muhlstein, A.},
- year = {1991},
- title = {Comparability of Computer and Paper-and-Pencil Scores
- for Two {CLEP} General Examinations},
- type = {College Board Rep.},
- number = {91-5},
- address = {Princeton, NJ},
- institution = {Educational Testing Service}
-}
-
-@techreport{ex41,
- author = {{\bibcorporate{National Institute of Mental Health}}},
- firstkey = {{National Institute of Mental Health [NIMH]}},
- key = {{NIMH}},
- year = {1990},
- title = {Clinical Training in Serious Mental Illness},
- type = {{DHHS} Publication},
- number = {ADM 90-1679},
- address = {Washington, DC},
- institution = {U.S. Government Printing Office}
-}
-
-@techreport{ex42,
- author = {Osgood, D. W. and Wilson, J. K.},
- year = {1990},
- title = {Covariation of Adolescent Health Problems},
- type = {\bibnotype},
- address = {Lincoln},
- institution = {University of Nebraska},
- note = {NTIS No.\hbox{} PB~91-154~377/AS}
-}
-
-@techreport{ex43,
- author = {Mead, J. V.},
- year = {1992},
- title = {Looking at Old Photographs: Investigating the Teacher
- Tales that Novice Teachers Bring with Them},
- type = {Report},
- number = {NCRTL-RR-92-4},
- address = {East Lansing, MI},
- institution = {National Center for Research on Teacher Learning},
- note = {ERIC Document Reproduction Service No.\hbox{} ED346082}
-}
-
-@techreport{ex44,
- author = {{\bibcorporate{U.S. Department of Health and
- Human Services}}},
- firstkey = {{U.S. Department of Health and Human Services [DHHS]}},
- key = {{DHHS}},
- year = {1992},
- title = {Pressure Ulcers in Adults: Prediction and Prevention},
- type = {AHCPR Publication},
- number = {92-0047},
- address = {Rockville, MD},
- institution = {{\bibcorporate{U.S. Department of Health and
- Human Services}}}
-}
-
-@intechreport{ex45,
- author = {Matthews, K. A.},
- year = {1985},
- title = {Assessment of {Type}~{A} Behavior, Anger, and Hostility
- in Epidemiologic Studies of Cardiovascular Disease},
- editor = {Ostfield, A. M. and Eaker, E. D.},
- booktitle = {Measuring Psychological Variables in Epidemiologic Studies
- of Cardiovascular Disease},
- type = {NIH Publication},
- number = {85-2270},
- pages = {153--183},
- address = {Washington, DC},
- institution = {U.S. Department of Health and Human Services}
-}
-
-@techreport{ex46,
- author = {Broadhurst, R. G. and Maller, R. A.},
- year = {1991},
- title = {Sex Offending and Recidivism},
- number = {3},
- address = {Nedlands},
- institution = {University of Western Australia, Crime Research Centre}
-}
-
-@techreport{ex47,
- editor = {Shuker, R. and Openshaw, R. and Soler, J.},
- year = {1990},
- title = {Youth, Media, and Moral Panic in {New} {Zealand}:
- From Hooligans to Video Nasties},
- type = {Delta Research Monograph},
- number = {11},
- address = {Palmerston North, New Zealand},
- institution = {Massey University, Department of Education}
-}
-
-@techreport{ex48,
- author = {{\bibcorporate{Employee Benefit Research Institute}}},
- firstkey = {{Employee Benefit Research Institute [EBRI]}},
- key = {{EBRI}},
- year = {1992},
- month = feb,
- title = {Sources of Health Insurance and Characteristics of the
- Uninsured},
- type = {Issue Brief},
- number = {123},
- address = {Washington, DC},
- institution = {{\bibcorporate{Employee Benefit Research Institute}}}
-}
-
-@incollection{ex49,
- author = {Deci, E. L. and Ryan, R. M.},
- year = {1991},
- title = {A Motivational Approach to Self:
- Integration in Personality},
- editor = {Dienstbier, R.},
- booktitle = {Nebraska {Symposium} on {Motivation}: Vol.~38.
- {Perspectives} on Motivation},
- pages = {237--288},
- address = {Lincoln},
- publisher = {University of Nebraska Press}
-}
-
-@article{ex50,
- author = {Cynx, J. and Williams, H. and Nottebohm, F.},
- year = {1992},
- title = {Hemispheric Differences in Avian Song Discrimination},
- journal = {Proceedings of the National Academy of Sciences, USA},
- volume = {89},
- pages = {1372--1375}
-}
-
-@lecture{ex51,
- author = {Lichstein, K. L. and Johnson, R. S. and Womack, T. D.
- and Dean, J. E. and Childers, C. K.},
- year = {1990},
- month = jun,
- title = {Relaxation Therapy for Polypharmacy Use in Elderly
- Insomniacs and Noninsomniacs},
- chair = {Rosenthal, T. L.},
- symposium = {Reducing Medication in Geriatric Populations},
- howpublished = {Symposium conducted at the meeting of the First
- International Congress of Behavioral Medicine},
- address = {Uppsala, Sweden}
-}
-
-@lecture{ex52,
- author = {Lanktree, C. and Briere, J.},
- year = {1991},
- month = jan,
- title = {Early Data on the {Trauma} {Symptom} {Checklist}
- for {Children} ({TSC-C})},
- howpublished = {Paper presented at the meeting of the American
- Professional Society on the Abuse of Children},
- address = {San Diego, CA}
-}
-
-@lecture{ex53,
- author = {Ruby, J. and Fulton, C.},
- year = {1993},
- month = jun,
- title = {Beyond Redlining: Editing Software that Works},
- howpublished = {Poster session presented at the annual meeting of the
- Society for Scholarly Publishing},
- address = {Washington, DC}
-}
-
-@phdthesis{ex54,
- author = {Bower, D. L.},
- year = {1993},
- title = {Employee Assistant Programs Supervisory Referrals:
- Characteristics of Referring and Nonreferring
- Supervisors},
- journal = {Dissertation Abstracts International},
- volume = {54},
- number = {01},
- pages = {534B},
- note = {UMI No.~9315947}
-}
-
-@phdthesis{ex55,
- author = {Ross, D. F.},
- year = {1990},
- title = {Unconscious Transference and Mistaken Identity: When
- a Witness Misidentifies a Familiar but Innocent Person
- from a Lineup},
- school = {Cornell University},
- originalyear = {1990},
- journal = {Dissertation Abstracts International},
- volume = {51},
- pages = {417}
-}
-
-@phdthesis{ex56,
- author = {Wilfley, D. E.},
- year = {1989},
- title = {Interpersonal Analyses of Bulimia: Normalweight
- and Obese},
- school = {University of Missouri},
- address = {Columbia}
-}
-
-@mastersthesis{ex57,
- author = {Almeida, D. M.},
- year = {1990},
- title = {Fathers' Participation in Family Work: Consequences
- for Fathers' Stress and Father--Child Relations},
- school = {University of Victoria},
- address = {Victoria, British Columbia, Canada}
-}
-
-@unpublished{ex58,
- author = {Stinson, C. and Milbrath, C. and Reidbord, S. and Bucci, W.},
- year = {1992},
- title = {Thematic Segmentation of Psychotherapy Transcripts for
- Convergent Analyses},
- howpublished = {Unpublished manuscript}
-}
-
-@unpublished{ex59,
- author = {D{\'{e}}pret, E. F. and Fiske, S. T.},
- year = {1993},
- title = {Perceiving the Powerful: Intriguing Individuals Versus
- Threatening Groups},
- howpublished = {Unpublished manuscript},
- organization = {University of Massachusetts at Amherst}
-}
-
-@unpublished{ex60,
- author = {McIntosh, D. N.},
- year = {1993},
- title = {Religion as Schema, with Implications for the Relation
- Between Religion and Coping},
- howpublished = {Manuscript submitted for publication}
-}
-
-@unpublished{ex61,
- author = {Bordi, F. and LeDoux, J. E.},
- year = {1993},
- type = {Auditory response latencies in rat auditory cortex},
- howpublished = {Unpublished raw data}
-}
-
-@misc{ex62,
- editor = {Klombers, N.},
- year = {1993},
- month = spring,
- title = {{ADAA} {Reporter}},
- note = {Available from the Anxiety Disorders Association of
- America, 6000 Executive Boulevard, Suite 513,
- Rockville, MD 20852}
-}
-
-@article{G-1,
- author = {Mroczek, D. K.},
- year = {2000},
- title = {The Emerging Study of Midlife},
- type = {Review of the book {\APACcitebtitle{Life in the middle:
- Psychological and social development in middle age}}},
- journal = {Contemporary Psychology: APA Review of Books},
- volume = {45},
- pages = {482--485}
-}
-
-@article{ex63,
- author = {Schatz, B. R.},
- year = {2000},
- title = {Learning by Text or Context?},
- type = {Review of the book
- {\APACcitebtitle{The social life of information}}},
- journal = {Science},
- volume = {290},
- pages = {1304}
-}
-
-@article{ex64,
- author = {Kraus, S. J.},
- year = {1992},
- title = {Visions of Psychology: A Videotext of Classic Studies},
- type = {Review of the motion picture
- {\APACcitebtitle{Discovering Psychology}}},
- journal = {Contemporary Psychology},
- volume = {37},
- pages = {1146--1147}
-}
-
-@misc{ex65-1,
- author = {Scorsese, M. {\protect\bibliteral{(Producer)}\protect\bibskipbracenodot}
- and Lonergan, K.
- {\protect\bibliteral{(Writer/Director)}\protect\indexskipbracenodot}},
- year = {2000},
- title = {You Can Count On Me},
- type = {Motion picture},
- address = {United States},
- publisher = {Paramount Pictures}
-}
-
-@misc{ex65-2,
- author = {Harrison, J. {\protect\bibliteral{(Producer)}\protect\bibskipbracenodot}
- and Schmiechen, R.
- {\protect\bibliteral{(Director)}\protect\indexskipbracenodot}},
- year = {1992},
- title = {Changing Our Minds: The Story of {Evelyn} {Hooker}},
- type = {Motion picture},
- note = {Available from Changing Our Minds, Inc., 170 West End
- Avenue, Suite 25R, New York, NY 10023}
-}
-
-@misc{ex65-3,
- author = {{\bibcorporate{American Psychological Association (Producer)}}},
- firstkey = {{American Psychological Association [APA]}},
- key = {{APA}},
- year = {2000},
- title = {Responding Therapeutically to Patient Expressions of
- Sexual Attraction: A Stimulus Training Tape},
- type = {Motion picture},
- note = {Available from the American Psychological Association,
- 750 First Street, NE, Washington, DC 20002-4242}
-}
-
-@misc{ex66,
- author = {Crystal, L. {\protect\bibliteral{(Executive
- Producer)}\protect\indexskipbracenodot}},
- year = {1993},
- month = oct,
- day = {11},
- title = {The {MacNeil}/{Lehrer} News Hour},
- type = {Television broadcast},
- address = {New York and Washington, DC},
- publisher = {Public Broadcasting Service}
-}
-
-@misc{ex67,
- editor = {Miller, {\bibinitial{R\bibeditortype{Producer}}}},
- year = {1989},
- title = {The Mind},
- type = {Television series},
- address = {New York},
- publisher = {WNET}
-}
-
-@incollection{ex68,
- author = {Hall, B. {\protect\bibliteral{(Writer)}\protect\bibskipbracenodot}
- and Bender, J.
- {\protect\bibliteral{(Director)}\protect\indexskipbracenodot}},
- year = {1991},
- title = {The Rules of the Game},
- type = {Television series episode},
- editor = {Sander{\bibeditortype{Producer}}, J.},
- booktitle = {I'll Fly Away},
- address = {New York},
- publisher = {New York Broadcasting Company}
-}
-
-@incollection{ex69-1,
- key = {{\protect\bibsong{Shocked}{1992}{Over the
- Waterfall}{track~5}}},
- author = {Shocked, Michelle},
- year = {1992},
- title = {Over the Waterfall{\bibInstring{\BOn}}},
- booktitle = {Arkansas Traveler {\upshape[\uppercase{CD}]}},
- address = {New York},
- publisher = {PolyGram Music}
-}
-
-@incollection{ex69-2,
- key = {{\protect\bibsong{Goodenough}{1982}{Tails
- and Trotters}{track~5}}},
- author = {Goodenough, J. B.},
- year = {1982},
- title = {Tails and Trotters{\bibInstring{\BOn}}},
- type = {Recorded by G. Bok, A. Mayo, \& E. Trickett},
- booktitle = {And So Will We Yet {\upshape[\uppercase{CD}]}},
- address = {Sharon, CT},
- publisher = {Folk-Legacy Records},
- note = {1990}
-}
-
-@misc{ex70,
- author = {Costa, Jr.\hbox{} {\protect\bibliteral{(Speaker)}}, P. T.},
- year = {1988},
- title = {Personality, Continuity, and Changes of Adult Life},
- type = {Cassette Recording},
- number = {207-433-88A-B},
- address = {Washington, DC},
- publisher = {American Psychological Association}
-}
-
-@article{ex71-1,
- author = {VandenBos, G. and Knapp, S. and Doe, J.},
- year = {2001},
- title = {Role of Reference Elements in the Selection of Resources
- by Psychology Undergraduates},
- type = {Electronic version},
- journal = {Journal of Bibliographic Research},
- volume = {5},
- pages = {117--123}
-}
-
-@article{ex71-2,
- author = {VandenBos, G. and Knapp, S. and Doe, J.},
- year = {2001},
- title = {Role of Reference Elements in the Selection of Resources
- by Psychology Undergraduates},
- journal = {Journal of Bibliographic Research},
- volume = {5},
- pages = {117--123},
- lastchecked = {October 13, 2001},
- url = {http://jbr.org/articles.html}
-}
-
-@article{ex72,
- author = {Fredrickson, B. L.},
- year = {2000},
- month = mar,
- day = {7},
- title = {Cultivating Positive Emotions to Optimize Health
- and Well-Being},
- journal = {Prevention \& Treatment},
- volume = {3},
- pages = {Article 0001a},
- lastchecked = {November 20, 2000},
- url = {http://journals.apa.org/prevention/volume3/pre0030001a.html}
-}
-
-@article{ex73,
- author = {Crow, T. J.},
- year = {2000},
- title = {Did \emph{Homo} {\emph{Sapiens}} Speciate on the
- {\emph{Y}} Chromosome?},
- journal = {Psycoloquy},
- volume = {11},
- lastchecked = {March 25, 2001},
- url = {ftp://ftp.princeton.edu/harnad/Psycoloquy/
- 2000.volume.11/psyc.00.11.001.
- language-sex-chromosomes.1.crow}
-}
-
-@article{ex74,
- author = {Glueckauf, R. L. and Whitton, J. and Baxter, J. and Kain, J.
- and Vogelgesang, S. and Hudson, M. and others},
- year = {1998},
- month = jul,
- title = {Videocounseling for Families of Rural Teens with
- Epilepsy---{P}roject Update},
- journal = {Telehealth News},
- volume = {2},
- number = {2},
- lastchecked = {June 6, 2000},
- url = {http://www.telehealth.net/subscribe/newslettr_4a.html#1}
-}
-
-@misc{ex75,
- author = {{\bibcorporate{Greater New Milford (Ct) Area Healthy
- Community 2000,
- Task Force on Teen and Adolescent Issues}}},
- firstkey = {{Greater New Milford (Ct) Area Healthy Community 2000,
- Task Force on Teen and Adolescent Issues [TFTAI]}},
- key = {{TFTAI}},
- year = {\bibnodate},
- title = {Who Has Time for a Family Meal? {You} Do!},
- lastchecked = {October 5, 2000},
- url = {http://www.familymealtime.org}
-}
-
-@incollection{ex76,
- author = {{\bibcorporate{Benton Foundation}}},
- year = {1998},
- month = jul,
- day = {7},
- title = {Barriers to Closing the Gap},
- booktitle = {Losing Ground Bit by Bit: Low-Income Communities in the
- Information Age},
- chapter = {2},
- lastchecked = {August 18, 2001},
- url = {http://www.benton.org/Library/Low-Income/two.html},
-}
-
-@misc{ex77,
- year = {\bibnodate},
- title = {{GVU}'s 8th {WWW} User Survey},
- lastchecked = {August 8, 2000},
- url = {http://www.cc.gatech.edu/gvu/user_surveys/survey-1997-10/}
-}
-
-@misc{ex78,
- author = {Chou, L. and McClintock, R. and Moretti, F. and Nix, D. H.},
- year = {1993},
- title = {Technology and Education: New Wine in New Bottles:
- Choosing Pasts and Imagining Educational Futures},
- howpublished = {Retrieved August 24, 2000, from Columbia University,
- Institute for Learning Technologies Web site:
- \url{http://www.ilt.columbia.edu/
- publications/papers/newwine1.html}\bibnodot{.}}
-}
-
-@misc{ex79,
- author = {{\bibcorporate{University of California, San Francisco,
- Institute for Health and Aging}}},
- firstkey = {{University of California, San Francisco, Institute for
- Health and Aging [UCSF-IHA]}},
- key = {{UCSF-IHA}},
- year = {1996},
- month = nov,
- title = {Chronic Care in {A}merica: {A} 21st Century Challenge},
- howpublished = {Retrieved September 9, 2000, from the Robert Wood Johnson
- Foundation Web site:
- \url{http://www.rwjf.org/library/chrcare/}\bibnodot{.}}
-}
-
-@misc{ex80,
- author = {{\bibcorporate{United States Sentencing Commission}}},
- firstkey = {{United States Sentencing Commission [USSC]}},
- key = {{USSC}},
- year = {\bibnodate},
- title = {{\APACSortNoop{Nineteen Ninety-Seven}}1997 Sourcebook of
- Federal Sentencing Statistics},
- lastchecked = {December 8, 1999},
- url = {http://www.ussc.gov/annrpt/1997/sbtoc97.htm}
-}
-
-@misc{ex81,
- author = {{\bibcorporate{Canarie, Inc.}}},
- year = {1997},
- month = sep,
- day = {27},
- title = {Towards a {Canadian} Health {IWAY}: Vision, Opportunities
- and Future Steps},
- lastchecked = {November 8, 2000},
- url = {http://www.canarie.ca/press/publications/pdf/
- health/healthvision.doc}
-}
-
-@techreport{ex82,
- author = {Kruschke, J. K. and Bradley, A. L.},
- year = {1995},
- title = {Extensions to the Delta Rule of Associative Learning},
- type = {Indiana University Cognitive Science Research Report},
- number = {14\BmakeAbstractRetrieved},
- lastchecked = {October 21, 2000},
- url = {http://www.indiana.edu/~kruschke/deltarule_abstract.html},
-}
-
-@lecture{ex83,
- author = {Cutler, L. D. and Fr{\"{o}}lich, B. and Hanrahan, P.},
- year = {1997},
- month = jan,
- day = {16},
- title = {Two-Handed Direct Manipulation on the Responsive
- Workbench},
- howpublished = {Paper presented at the 1997 Symposium on Interactive 3D
- Graphics\BmakeAbstractRetrieved},
- lastchecked = {June 12, 2000},
- url = {http://www.graphics.stanford.edu/papers/twohanded/},
-}
-
-@lecture{ex84,
- author = {Tan, G. and Lewandowsky, S.},
- year = {1996},
- title = {A Comparison of Operator Trust in Humans Versus Machines},
- howpublished = {Paper presented at the CybErg 96 virtual conference},
- lastchecked = {May 16, 2000},
- url = {http://www.curtin.edu.au/conference/cyberg/
- centre/outline.cgi/frame?dir=tan},
-}
-
-@misc{ex85,
- author = {Chalmers, D.},
- year = {2000},
- month = nov,
- day = {17},
- title = {Seeing with Sound},
- type = {\bibmessage},
- number = {1},
- url = {news://sci.psychology.consciousness}
-}
-
-@misc{ex86,
- author = {Simons, D. J.},
- year = {2000},
- month = jul,
- day = {14},
- title = {News Resources for Visual Cognition},
- type = {\bibmessage},
- number = {31},
- url = {http://groups.yahoo.com/group/visualcognition/message/31}
-}
-
-@misc{ex87,
- author = {Hammond, T.},
- year = {2000},
- month = nov,
- day = {20},
- title = {{YAHC}: {Handle} {Parameters}, {DOI} {Genres}, etc.},
- type = {\bibmessage},
- howpublished = {Message posted to Ref-Links electronic mailing list,
- archived at \url{http://www.doi.org/mail-archive/
- ref-link/msg00088.html}\bibnodot{.}}
-}
-
-@article{ex88,
- author = {Borman, W. C. and Hanson, M. A. and Oppler, S. H. and
- Pulakos, E. D. and White, L. A.},
- year = {1993},
- title = {Role of Early Supervisory Experience in Supervisor Performance},
- journal = {Journal of Applied Psychology},
- volume = {78},
- pages = {443--449},
- howpublished = {Retrieved October 23, 2000, from the PsycARTICLES database}
-}
-
-@newspaper{ex89,
- author = {Hilts, P. J.},
- year = {1999},
- month = feb,
- day = {16},
- title = {In Forecasting Their Emotions, Most People Flunk Out},
- journal = {New York Times},
- lastchecked = {November 21, 2000},
- url = {http://www.nytimes.com}
-}
-
-@article{ex90,
- author = {Fournier, M. and {\lowercase{D}}e Ridder, D. and Bensing, J.},
- year = {1999},
- title = {Optimism and Adaptation to Multiple Sclerosis: What Does
- Optimism Mean?},
- journal = {Journal of Behavioral Medicine},
- volume = {22},
- pages = {303--326},
- howpublished = {Abstract retrieved October 23, 2000, from PsycINFO database}
-}
-
-@techreport{ex91,
- author = {{\bibcorporate{U.S. General Accounting Office}}},
- year = {1997},
- month = feb,
- title = {Telemedicine: Federal Strategy is Needed to Guide Investments},
- type = {Publication},
- number = {GAO/NSAID/HEHS-97-67},
- howpublished = {Retrieved September 15, 2000, from General Accounting Office
- Reports Online via GPO Access:
- \url{http://www.access.gpo.gov/su_docs/aces/
- aces160.shtml?/gao/index.html}\bibnodot{.}}
-}
-
-@misc{ex92,
- author = {Miller, M. E.},
- year = {1993},
- title = {The {Interactive} {Tester}},
- edition = {Version~4.0\noedition\ignorespaces},
- type = {\bibcomputersoftware},
- address = {Westminster, CA},
- publisher = {Psytek Services}
-}
-
-@misc{ex93,
- author = {Schwarzer, R.},
- year = {1989},
- title = {Statistics Software for Meta-Analysis},
- type = {\bibcomputersoftwareandmanual},
- lastchecked = {March 23, 2001},
- url = {http://www.yorku.ca/faculty/academic/schwarze/meta_e.htm}
-}
-
-@manual{ex93-t1,
- author = {{\bibcorporate{R Development Core Team}}},
- year = {2004},
- title = {R: A Language and Environment for Statistical Computing},
- address = {Vienna, Austria},
- publisher = {R Foundation for Statistical Computing},
- url = {http://www.r-project.org}
-}
-
-@misc{ex94,
- key = {{\APACcitebtitle{National Health Interview Survey}}},
- title = {National {Health} {Interview} {Survey}---{Current} Health
- Topics: 1991---{Longitudinal} Study of Aging},
- edition = {Version~4\noedition\ignorespaces},
- type = {Data file},
- year = {\bibnodate},
- address = {Hyattsville, MD},
- publisher = {National Center for Health Statistics}
-}
-
-@misc{ex95,
- author = {{\bibcorporate{Department of Health and Human Services,
- National Center for Health Statistics}}},
- firstkey = {{Department of Health and Human Services,
- National Center for Health Statistics [DHHS-NCHS]}},
- key = {{DHHS-NCHS}},
- year = {1991},
- title = {National {Health} {Provider} {Inventory}: Home Health
- Agencies and Hospices, 1991},
- type = {Data file},
- howpublished = {Available from National Technical Information Service
- Web site, \url{http://www.ntis.gov}\bibnodot{.}}
-}
-
-
-@book{APAManual3,
- author = {{\bibcorporate{American Psychological Association}}},
- firstkey = {{American Psychological Association [APA]}},
- key = {{APA}},
- year = {1984},
- title = {Publication Manual of the {American} {Psychological}
- {Association}},
- edition = {3},
- address = {Washington, DC},
- publisher = {{\bibcorporate{American Psychological Association}}},
- note = {with revisions},
-}
-
-@book{APAManual,
- author = {{\bibcorporate{American Psychological Association}}},
- firstkey = {{American Psychological Association [APA]}},
- key = {{APA}},
- year = {2001},
- title = {Publication Manual of the {American} {Psychological}
- {Association}},
- edition = {5},
- address = {Washington, DC},
- publisher = {{\bibcorporate{American Psychological Association}}},
-}
-
-@book{chicago,
- title = {The {Chicago} Manual of Style},
- edition = {15},
- year = {2003},
- address = {Chicago},
- publisher = {The University of Chicago Press},
-}
-
-@book{LaTeXbook,
- author = {Lamport, Leslie},
- year = {1994},
- title = {{\APACSortNoop{LaTeX}}{\LaTeX}: A Document Preparation System.
- {User}'s Guide and Reference Manual},
- edition = {2},
- address = {Reading, MA},
- publisher = {Addison-Wesley},
-}
-
-@book{KoDa04,
- author = {Kopka, Helmut and Daly, Patrick W.},
- year = {2004},
- title = {Guide To {\APACSortNoop{LaTeX}}{\LaTeX}},
- edition = {4},
- address = {Boston, MA},
- publisher = {Addison-Wesley},
-}
-
-@book{TLC2,
- author = {Mittelbach, Frank and Goossens, Michel},
- year = {2004},
- title = {The {\APACSortNoop{LaTeX}}{\LaTeX} Companion},
- edition = {2},
- address = {Boston, MA},
- publisher = {Addison-Wesley},
-}
-
-@book{meijer1998,
- author = {Meijer, Erik},
- year = {1998},
- title = {Structural Equation Models for Nonnormal Data},
- address = {Leiden, The Netherlands},
- publisher = {DSWO Press},
-}
-
-@book{WaMe00,
- author = {Wansbeek, Tom and Meijer, Erik},
- year = {2000},
- title = {Measurement Error and Latent Variables in Econometrics},
- address = {Amsterdam},
- publisher = {North-Holland},
-}
-
-@unpublished{APA-3rd-ed-ex53,
- author = {Gottfredson, G. D.},
- year = {1978},
- title = {Why Don't Vocational Interests Predict Job
- Satisfaction Better Than They Do?},
- howpublished = {Unpublished manuscript},
- organization = {Johns Hopkins University, Center for Social
- Organization of Schools},
- address = {Baltimore},
-}
-
-%%
-%%
-%% End of file `apa5ex.bib'.
diff --git a/Master/texmf-dist/bibtex/bst/apacite/apacann.bst b/Master/texmf-dist/bibtex/bst/apacite/apacann.bst
new file mode 100644
index 00000000000..dfdd1bbb0b8
--- /dev/null
+++ b/Master/texmf-dist/bibtex/bst/apacite/apacann.bst
@@ -0,0 +1,5259 @@
+%%
+%% This is file `apacann.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% apacite.dtx (with options: `bibstyle,annotated')
+%%
+%% This is a generated file.
+%%
+%% Copyright (C) 1994-2009 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, apacann.bst, apacannx.bst,
+%% english.apc, dutch.apc, finnish.apc, french.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.
+%%
+%% apacann.bst
+%% [2009/03/01 v4.05 APA annotated bibliography style]
+%% apacann.bst : reference list according to APA manual
+%% with annotations
+%% Written by Erik Meijer
+
+FUNCTION {identify.apacite.version}
+{ % Put identifying string in the .blg file
+ "apacann.bst"
+ " [2009/03/01 v4.05 APA annotated bibliography style]"
+ * top$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+ENTRY
+ { address
+ annote % only used for annotated version
+ annotate % only used for annotated version
+ author
+ booktitle % for articles in books
+ chair % for lectures
+ chapter % for incollection, esp. internet documents
+ day
+ edition
+ editor
+ englishtitle % english translation of title in other language
+ firstkey % key for first citation
+ howpublished
+ institution % for technical reports
+ 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
+ organization % for unpublished
+ %
+ % for reprints, translations, etc.
+ %
+ originaladdress
+ originalbooktitle
+ originaledition
+ originaleditor
+ originaljournal
+ originalnumber
+ originalpages
+ originalpublisher
+ originalvolume
+ originalyear
+ %
+ % back to normal
+ %
+ pages
+ publisher
+ school % for theses
+ series % not used
+ symposium % for lectures
+ text % for literals
+ title
+ translator % translator of book (or article)
+ type % type of phdthesis (e.g., Doctoral dissertation)
+ % or type of article (e.g., Letter to the editor)
+ % etc.
+ url
+ volume
+ year
+ }
+ { title.number % for sorting titles
+ cite.initials % dummy (0-1) indicating whether or not
+ % initials of the 1st author must
+ % be used for citing
+ cite.num.names.full % number of names to be cited for full and
+ cite.num.names.short % short cite
+ add.to.year % For a, b, c, etc. after year
+ % in multiple citations with same author-year
+ }
+ { year.label % For sorting entries by year
+ author.year.sort.label % For sorting entries and checking whether
+ % initials should be added, how many authors
+ % 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.
+ }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+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 brace.level
+ }
+
+STRINGS { s t u old.label field
+ aut1f aut1s aut1f.old aut1s.old
+ aut2 aut2.old
+ aut3 aut3.old
+ aut4 aut4.old
+ aut5 aut5.old
+ aut6 aut6.old
+ year.label.old
+ }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {test} { #0 }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.index} { #0 }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+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 {jul} {"{\APACmonth{07}}"}
+
+MACRO {aug} {"{\APACmonth{08}}"}
+
+MACRO {sep} {"{\APACmonth{09}}"}
+
+MACRO {oct} {"{\APACmonth{10}}"}
+
+MACRO {nov} {"{\APACmonth{11}}"}
+
+MACRO {dec} {"{\APACmonth{12}}"}
+
+MACRO {winter} {"{\APACmonth{13}}"}
+
+MACRO {spring} {"{\APACmonth{14}}"}
+
+MACRO {summer} {"{\APACmonth{15}}"}
+
+MACRO {fall} {"{\APACmonth{16}}"}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ % issues warning if field is empty
+ % call with
+ % "field" field warning.if.empty
+ % Note that the first field must be between quotes
+ % because it is the fieldname for use in the warning message.
+ %
+FUNCTION {warning.if.empty}
+{ empty$
+ { "No " swap$ * " in " * cite$ * warning$ }
+ { pop$ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % issues warning if title, type, and howpublished are empty
+ %
+FUNCTION {check.relevant.fields}
+{ 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
+ % not empty and not equal to each other)
+ % 0 if (editor or translator empty) or
+ % (editor = translator)
+ %
+FUNCTION {editor.ne.trans}
+{ translator empty$
+ { #0 }
+ { editor empty$
+ { #0 }
+ { translator editor =
+ { #0 }
+ { #1 }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {conv.int.to.str}
+{ duplicate$ #10 <
+ { "0000" swap$ int.to.str$ * }
+ { duplicate$ #100 <
+ { "000" swap$ int.to.str$ * }
+ { duplicate$ #1000 <
+ { "00" swap$ int.to.str$ * }
+ { duplicate$ #10000 <
+ { "0" swap$ int.to.str$ * }
+ { int.to.str$ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {ref.type}
+{ type$ "article" =
+ type$ "magazine" =
+ type$ "newspaper" =
+ type$ "book" =
+ type$ "techreport" =
+ type$ "unpublished" =
+ type$ "misc" =
+ type$ "booklet" =
+ type$ "manual" =
+ type$ "proceedings" =
+ or
+ or
+ or
+ or
+ or
+ or
+ or
+ or
+ or
+ { #1 }
+ { type$ "incollection" =
+ type$ "phdthesis" =
+ type$ "mastersthesis" =
+ type$ "lecture" =
+ type$ "inbook" =
+ type$ "inproceedings" =
+ type$ "conference" =
+ type$ "intechreport" =
+ or
+ or
+ or
+ or
+ or
+ or
+ or
+ { #2 }
+ { type$ "literal" =
+ { #3 }
+ { #0 }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {is.atype}
+{ type$ "article" =
+ type$ "magazine" =
+ type$ "newspaper" =
+ type$ "incollection" =
+ type$ "inbook" =
+ type$ "inproceedings" =
+ type$ "conference" =
+ type$ "intechreport" =
+ type$ "manual" =
+ or
+ or
+ or
+ or
+ or
+ or
+ or
+ or
+ { #1 }
+ { journal empty$ not
+ %
+ type$ "phdthesis" =
+ type$ "mastersthesis" =
+ or
+ %
+ and
+ { #1 }
+ { type$ "misc" =
+ type empty$ not and
+ { type "\bibmessage" =
+ type "\bibcomputerprogram" =
+ type "\bibcomputerprogrammanual" =
+ type "\bibcomputerprogramandmanual" =
+ type "\bibcomputersoftware" =
+ type "\bibcomputersoftwaremanual" =
+ type "\bibcomputersoftwareandmanual" =
+ type "\bibprogramminglanguage" =
+ or
+ or
+ or
+ or
+ or
+ or
+ or
+ { #1 }
+ { #0 }
+ if$
+ }
+ { #0 }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % connects two strings with connect string
+ % if one of them empty, then connect string
+ % is left out
+ %
+ % call with S1 S2 connectstring connect.check
+ %
+FUNCTION {connect.check}
+{ 'u :=
+ %
+ % if S2 = ""
+ %
+ duplicate$ empty$
+ %
+ % then remove S2
+ %
+ { pop$
+ %
+ % S1 is on top of stack.
+ % if it is empty, it is replaced by the empty string ""
+ %
+ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+ }
+ %
+ % else swap S1 and S2 so that S1 can be checked
+ %
+ { swap$
+ %
+ % if S1 is empty, remove S1 so that S2 is left on the
+ % stack and is the result is given
+ %
+ duplicate$ empty$
+ { pop$ }
+ %
+ % now the real work starts:
+ % push the connect string "C"
+ % so that top of stack is "C" "S1" "S2"
+ % concatenate, so that top of stack is
+ % "S1+C" "S2"
+ %
+ { u *
+ %
+ % swap and concatenate
+ %
+ swap$ *
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % connects two strings with space ("\ ")
+ % if length of second is 4 or larger,
+ % connects them with non-breaking space ("tie", "~")
+ % 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$ #4 <
+ { "~" }
+ { "\ " }
+ if$
+ swap$ * *
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % connects two strings with comma (", ")
+ % if one of them is empty, the comma is left out
+ %
+ % call with S1 S2 connect.with.comma.check
+ % result: "S1, S2"
+ %
+FUNCTION {connect.with.comma.check}
+{ ", " connect.check }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % connects two strings with semicolon ("; ")
+ % if one of them is empty, semicolon is left out
+ %
+ % call with S1 S2 connect.with.semicolon.check
+ % result: "S1; S2"
+ %
+FUNCTION {connect.with.semicolon.check}
+{ "; " connect.check }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % connects two strings with colon (": ")
+ % if one of them is empty, colon is left out
+ %
+ % call with S1 S2 connect.with.colon.check
+ % result: "S1: S2"
+ %
+FUNCTION {connect.with.colon.check}
+{ ": " connect.check }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % connects two strings with space ("\ ")
+ %
+ % call with S1 S2 connect.with.space.check
+ % result: "S1\ S2"
+ %
+FUNCTION {connect.with.space.check}
+{ "\ " connect.check }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % encloses string in pre- and postfix string
+ % call with
+ % prefix postfix S enclose.check
+ % delivers empty string if S empty
+ %
+FUNCTION {enclose.check}
+{ duplicate$ empty$
+ { pop$ pop$ pop$
+ ""
+ }
+ { swap$ * * }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % emphasizes top of stack
+ % call with
+ % "string" emphasize.check
+ %
+FUNCTION {emphasize.check}
+{ "\Bem{" swap$
+ "}" swap$
+ enclose.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % brackets top of stack
+ % call with
+ % "string" bracket
+ %
+FUNCTION {bracket.check}
+{ "[" swap$
+ "]" swap$
+ enclose.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % parenthesizes top of stack
+ % call with
+ % "string" parenthesize
+ %
+FUNCTION {parenthesize.check}
+{ "(" swap$
+ ")" swap$
+ enclose.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % checks whether argument is "multiresult":
+ % whether it contains '-', '+', or ',' characters
+ % used with pages to check whether pp. or p. must be used
+ %
+FUNCTION {multi.result.check}
+{ 't :=
+ #0 'multiresult :=
+ %
+ % while (not multiresult) and (length(t) > 1) do
+ %
+ { multiresult not
+ t text.length$ #1 >
+ and
+ }
+ %
+ % if t(1-2) = "--" or t(1) = "+" or ","
+ % then multiresult = 1
+ % else t = t(2-last)
+ %
+ { t #1 #2 substring$ 's :=
+ "--" s =
+ { #1 'multiresult := }
+ { t #1 #1 substring$ 's :=
+ "+" s =
+ "," s =
+ or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ if$
+ }
+ while$
+ 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" = }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {remove.spaces}
+{ % Remove spaces from string.
+ % Works best if string only contains alphanumeric characters and spaces.
+ 's := % The original string
+ s text.length$ 'len := % Its length (no. of characters)
+ "" 't := % Initialize the transformed string
+ #0 'pos :=
+ %
+ % while (pos < len) do
+ %
+ { pos len < }
+ { pos #1 + 'pos :=
+ s pos #1 substring$ 'u :=
+ %
+ % u is the pos-th character in s
+ % If it is a space, move to next character,
+ % else copy character to output.
+ %
+ u " " =
+ 'skip$
+ { t u * 't := }
+ if$
+ }
+ while$
+ %
+ % Now push the result back on the stack
+ t
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % starting new block by writing what's left on the stack,
+ % starting a new line and adding some extra space or
+ % whatever is more defined in \newblock
+ %
+FUNCTION {output.end.block}
+{ write$
+ newline$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % starting new block by writing what's left on the stack,
+ % starting a new line and adding some extra space or
+ % whatever is more defined in \newblock
+ %
+FUNCTION {output.new.block}
+{ output.end.block
+ "\newblock" write$
+ newline$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % starting new block by writing what's left on the stack,
+ % starting a new line and adding some extra space or
+ % whatever is more defined in \newblock
+ %
+FUNCTION {output.dot.new.block}
+{ add.period$
+ output.new.block
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {start.new.block}
+{ newline$
+ "\unskip\ " write$ newline$
+ "\newblock " write$ newline$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % finish current entry
+ % by writing what's left on the stack and starting a new line
+ %
+FUNCTION {fin.entry}
+{ output.end.block
+ "\PrintBackRefs{\CurrentBib}" write$ newline$
+ test
+ { "\vspace{\baselineskip}" write$ newline$ }
+ 'skip$
+ if$
+ %
+ % According to TLC2, pp. 810-811, both annote and annotate fields are
+ % known, so support them both, but do not print them both, in case
+ % someone wants to make a file that is compatible with both the annotate
+ % and annotation styles and thus duplicates the information. Instead, we
+ % give annote priority.
+ %
+ annote empty$
+ {% Try annotate
+ annotate empty$
+ 'skip$
+ { % add annotation
+ "\begin{APACrefannotation}" write$ newline$
+ annotate write$ newline$
+ "\end{APACrefannotation}" write$ newline$
+ }
+ if$
+ }
+ { % add annotation
+ "\begin{APACrefannotation}" write$ newline$
+ annote write$ newline$
+ "\end{APACrefannotation}" write$ newline$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {sort.name.format} { "{ll{}}{ f{}}{ vv{}}{ jj{}}" }
+
+FUNCTION {cite.name.format} { "{ll}" }
+
+FUNCTION {cite.initials.name.format} { "{f{\BPBI }.~~}{vv }{ll}{ jj}" }
+
+FUNCTION {author.name.format} { "{ll}{, f{\BPBI }.}{ vv}{, jj}" }
+
+FUNCTION {editor.name.format} { "{f{\BPBI }.~~}{vv }{ll}{ jj}" }
+
+FUNCTION {index.name.format} { "{ll}{, f{\BPBI }.}{ vv}{, jj}" }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {init.initials}
+{ "yyyyy" 'aut1f.old :=
+ "yyyyy" 'aut1s.old :=
+ #0 'cite.initials.old :=
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {update.no.initials}
+{ 'field :=
+ field 'aut1f.old :=
+ field 'aut1s.old :=
+ #0 'cite.initials.old :=
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {check.add.initials.aut}
+{ %
+ % If last name is equal to previous last name
+ % but initials are different, then initials should
+ % be cited. If initials are also the same, initials
+ % should be cited if that is the case for the previous
+ % author .
+ %
+ aut1s aut1s.old =
+ { aut1f aut1f.old =
+ { cite.initials.old 'cite.initials := }
+ { #1 'cite.initials :=
+ aut1f 'aut1f.old :=
+ aut1s 'aut1s.old :=
+ cite.initials 'cite.initials.old :=
+ }
+ if$
+ }
+ { %
+ % Different last name.
+ aut1f 'aut1f.old :=
+ aut1s 'aut1s.old :=
+ cite.initials 'cite.initials.old :=
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {check.add.initials.field}
+{ 'field :=
+ field #1 cite.initials.name.format format.name$ 'aut1f :=
+ field #1 cite.name.format format.name$ 'aut1s :=
+ %
+ % Now do the actual work
+ %
+ check.add.initials.aut
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {check.add.initials}
+{ %
+ % Check whether author or editor or other field acts as author.
+ % Initials are only relevant with author or editor.
+ %
+ firstkey empty$ not
+ { key empty$ not
+ { %
+ % Both key and firstkey are nonempty.
+ % Then, key is treated as last name of first author,
+ % and firstkey is treated as last name + initials of
+ % first author .
+ %
+ firstkey sortify remove.spaces 'aut1f :=
+ key sortify remove.spaces 'aut1s :=
+ check.add.initials.aut
+ }
+ { firstkey sortify remove.spaces update.no.initials }
+ if$
+ }
+ { key empty$ not
+ { key sortify remove.spaces update.no.initials }
+ { %
+ % No key or firstkey, so find out which field
+ % to use as author.
+ %
+ % Check reference type:
+ % if result is 1 then possibly editor acts as author
+ % 2 then editor does not act as author
+ % 3 then key should have been used
+ % 0 then unknown reference type
+ ref.type #2 =
+ { %
+ % Format first author with and without initials
+ author empty$
+ { title.sort.label update.no.initials }
+ { author check.add.initials.field }
+ if$
+ }
+ { %
+ % Format first author with and without initials
+ author empty$
+ { editor empty$
+ { title.sort.label update.no.initials }
+ { editor check.add.initials.field }
+ if$
+ }
+ { author check.add.initials.field }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {tentative.cite.num.names.field}
+{ 'field :=
+ field num.names$ 'numnames :=
+ numnames #3 <
+ { %
+ % 1 or 2 names: always cite all of them.
+ numnames 'cite.num.names.full :=
+ numnames 'cite.num.names.short :=
+ }
+ { numnames #6 <
+ { %
+ % 3-5 names: cite all of them the first time,
+ % only the first name later times
+ numnames 'cite.num.names.full :=
+ #1 'cite.num.names.short :=
+ }
+ { %
+ % 6 or more names: cite only the first name
+ #1 'cite.num.names.full :=
+ #1 'cite.num.names.short :=
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {tentative.cite.num.names}
+{ %
+ % Check whether author or editor or other field acts as author.
+ % Number of names is only relevant with author or editor.
+ %
+ firstkey empty$ not
+ {
+ #1 'cite.num.names.full :=
+ #1 'cite.num.names.short :=
+ }
+ { key empty$ not
+ {
+ #1 'cite.num.names.full :=
+ #1 'cite.num.names.short :=
+ }
+ { %
+ % No key or firstkey, so find out which field
+ % to use as author.
+ %
+ % Check reference type:
+ % if result is 1 then possibly editor acts as author
+ % 2 then editor does not act as author
+ % 3 then key should have been used
+ % 0 then unknown reference type
+ ref.type #2 =
+ { %
+ % Format first author with and without initials
+ author empty$
+ {
+ #1 'cite.num.names.full :=
+ #1 'cite.num.names.short :=
+ }
+ { author tentative.cite.num.names.field }
+ if$
+ }
+ { %
+ % Format first author with and without initials
+ author empty$
+ { editor empty$
+ {
+ #1 'cite.num.names.full :=
+ #1 'cite.num.names.short :=
+ }
+ { editor tentative.cite.num.names.field }
+ if$
+ }
+ { author tentative.cite.num.names.field }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {init.cite.num.names}
+{ #0 'cite.num.names.old :=
+ #0 'numnames.old :=
+ "yyyy" 'year.label.old :=
+ #0 'add.to.year.old :=
+ "" 'aut1f.old :=
+ "" 'aut2.old :=
+ "" 'aut3.old :=
+ "" 'aut4.old :=
+ "" 'aut5.old :=
+ "" 'aut6.old :=
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {update.cite.num.names}
+{ cite.num.names.short 'cite.num.names.old :=
+ numnames 'numnames.old :=
+ year.label 'year.label.old :=
+ add.to.year 'add.to.year.old :=
+ aut1f 'aut1f.old :=
+ aut2 'aut2.old :=
+ aut3 'aut3.old :=
+ aut4 'aut4.old :=
+ aut5 'aut5.old :=
+ aut6 'aut6.old :=
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {format.6.authors}
+{ %
+ % First author: with initials.
+ %
+ field #1 cite.initials.name.format format.name$ 'aut1f :=
+ %
+ % Second and later authors: without initials.
+ %
+ numnames #1 >
+ name.max #1 >
+ and
+ { %
+ % 2nd author
+ field #2 cite.name.format format.name$ 'aut2 :=
+ %
+ numnames #2 >
+ name.max #2 >
+ and
+ { %
+ % 3nd author
+ field #3 cite.name.format format.name$ 'aut3 :=
+ %
+ numnames #3 >
+ name.max #3 >
+ and
+ { %
+ % 4th author
+ field #4 cite.name.format format.name$ 'aut4 :=
+ %
+ numnames #4 >
+ name.max #4 >
+ and
+ { %
+ % 5th author
+ field #5 cite.name.format format.name$ 'aut5 :=
+ %
+ numnames #5 >
+ name.max #5 >
+ and
+ { %
+ % 6th author
+ field #6 cite.name.format format.name$ 'aut6 :=
+ }
+ { %
+ % 5 authors: 6 is empty
+ %
+ "" 'aut6 :=
+ }
+ if$
+ }
+ { %
+ % 4 authors: 5-6 are empty
+ %
+ "" 'aut5 :=
+ "" 'aut6 :=
+ }
+ if$
+ }
+ { %
+ % 3 authors: 4-6 are empty
+ %
+ "" 'aut4 :=
+ "" 'aut5 :=
+ "" 'aut6 :=
+ }
+ if$
+ }
+ { %
+ % 2 authors: 3-6 are empty
+ %
+ "" 'aut3 :=
+ "" 'aut4 :=
+ "" 'aut5 :=
+ "" 'aut6 :=
+ }
+ if$
+ }
+ { %
+ % Only 1 author: 2-6 are empty
+ %
+ "" 'aut2 :=
+ "" 'aut3 :=
+ "" 'aut4 :=
+ "" 'aut5 :=
+ "" 'aut6 :=
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {change.add.to.year}
+{
+ forward #1 =
+ { %
+ % Moving forward: this add.to.year number must be 1 higher than
+ % previous.
+ %
+ add.to.year.old #0 >
+ { add.to.year.old #1 + 'add.to.year := }
+ { #2 'add.to.year := }
+ if$
+ }
+ { %
+ % Moving backward: this add.to.year number must be 1 lower than
+ % previous.
+ %
+ add.to.year.old #1 - 'add.to.year :=
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {definitive.cite.num.names.1.or.2}
+{ %
+ numnames numnames.old =
+ { %
+ % Same number of names: ambiguity could arise. Check whether current
+ % and previous have the same author(s).
+ %
+ aut1f aut1f.old =
+ { %
+ % Same first author: if the second author is also the same or if
+ % there is only one author, a's and b's should be added.
+ %
+ aut2 aut2.old =
+ numnames #2 =
+ and
+ %
+ numnames #1 =
+ or
+ { %
+ % Same author(s): add to year.
+ %
+ change.add.to.year
+ }
+ { %
+ % Different second author: no ambiguity possible.
+ %
+ skip$
+ }
+ if$
+ }
+ { %
+ % Different first author: no ambiguity possible.
+ %
+ skip$
+ }
+ if$
+ }
+ { %
+ % Different number of names: no ambiguity possible.
+ %
+ skip$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {definitive.cite.num.names.3.or.more}
+{ %
+ % Check whether current and previous have the same first author.
+ %
+ aut1f aut1f.old =
+ { %
+ % Same first author: check second author
+ %
+ aut2 aut2.old =
+ { %
+ % Same 1st & 2nd author: check 3rd.
+ %
+ aut3 aut3.old =
+ { %
+ % Same 1st-3rd authors: check 4th.
+ %
+ numnames.old #3 =
+ { numnames #3 =
+ { %
+ % Both current and previous have 3 authors, which are
+ % the same, so both have identical author-year
+ % combinations, so ambiguity should be resolved by
+ % a's and b's. Check whether more authors were
+ % necessary for previous one.
+ %
+ change.add.to.year
+ cite.num.names.short cite.num.names.old <
+ { cite.num.names.old
+ 'cite.num.names.short :=
+ }
+ 'skip$
+ if$
+ }
+ { %
+ % Previous has 3 authors, current has more, with same
+ % first 3, so at least 4 must be used for current to
+ % make a difference.
+ %
+ cite.num.names.short #4 <
+ { #4 'cite.num.names.short := }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ { numnames #3 =
+ { %
+ % Current has 3 authors, previous has more, with same
+ % first 3, so all 3 of current must be used.
+ %
+ numnames 'cite.num.names.short :=
+ }
+ { %
+ % Same 1st-3rd author and both current and previous
+ % have at least 4 authors: check 4th.
+ %
+ aut4 aut4.old =
+ { %
+ % Same 1st-4th authors: check 5th.
+ %
+ numnames.old #4 =
+ { numnames #4 =
+ { %
+ % Both current and previous have 4 authors,
+ % which are the same, so both have
+ % identical author-year combinations, so
+ % ambiguity should be resolved by a's and
+ % b's. Check whether more authors were
+ % necessary for previous one.
+ %
+ change.add.to.year
+ cite.num.names.short cite.num.names.old <
+ { cite.num.names.old
+ 'cite.num.names.short :=
+ }
+ 'skip$
+ if$
+ }
+ { %
+ % Previous has 4 authors, current has more,
+ % with same first 4, so at least 5 must be
+ % used for current to make a difference.
+ %
+ cite.num.names.short #5 <
+ { #5 'cite.num.names.short := }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ { numnames #4 =
+ { %
+ % Current has 4 authors, previous has more,
+ % with same first 4, so all 4 of current
+ % must be used.
+ %
+ numnames 'cite.num.names.short :=
+ }
+ { %
+ % Same 1st-4th author and both current and
+ % previous have at least 5 authors: check
+ % 5th.
+ %
+ aut5 aut5.old =
+ { %
+ % Same 1st-5th authors: check 6th.
+ %
+ numnames.old #5 =
+ { numnames #5 =
+ { %
+ % Both current and previous
+ % have 5 authors, which are the
+ % same, so both have identical
+ % author-year combinations, so
+ % ambiguity should be resolved
+ % by a's and b's. Check whether
+ % more authors were necessary
+ % for previous one.
+ %
+ change.add.to.year
+ cite.num.names.short
+ cite.num.names.old <
+ { cite.num.names.old
+ 'cite.num.names.short :=
+ }
+ 'skip$
+ if$
+ }
+ { %
+ % Previous has 5 authors,
+ % current has more, with same
+ % first 5, so at least 6 must
+ % be used for current to make
+ % a difference.
+ %
+ cite.num.names.short #6 <
+ { #6 'cite.num.names.short := }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ { numnames #5 =
+ { %
+ % Current has 5 authors,
+ % previous has more, with same
+ % first 5, so all 5 of current
+ % must be used.
+ %
+ numnames 'cite.num.names.short :=
+ }
+ { %
+ % Same 1st-5th author and both
+ % current and previous have at
+ % least 6 authors. If one has
+ % 6 authors and the other has
+ % more or the 6th is different,
+ % 6 should be used (which is
+ % the maximum).
+ %
+ numnames #6 >
+ numnames.old #6 =
+ and
+ %
+ numnames #6 =
+ numnames.old #6 >
+ and
+ %
+ or
+ %
+ aut6 aut6.old =
+ not
+ %
+ or
+ { #6 cite.num.names.short <
+ { #6
+ 'cite.num.names.short
+ :=
+ }
+ 'skip$
+ if$
+ }
+ { %
+ % The first 6 authors are
+ % the same and either both
+ % have 6 or both have more.
+ % So for all practical
+ % purposes they have
+ % identical author-year
+ % combination, so ambiguity
+ % should be resolved by a's
+ % and b's. Check whether
+ % more authors were
+ % necessary for previous
+ % one.
+ %
+ change.add.to.year
+ cite.num.names.short
+ cite.num.names.old
+ <
+ { cite.num.names.old
+ 'cite.num.names.short
+ :=
+ }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ { %
+ % Different 5th author: citing 5 authors is
+ % sufficient for this comparison.
+ %
+ cite.num.names.short #5 <
+ { #5 'cite.num.names.short := }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ { %
+ % Different 4th author: citing 4 authors is
+ % sufficient for this comparison.
+ %
+ cite.num.names.short #4 <
+ { #4 'cite.num.names.short := }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ { %
+ % Different 3rd author: citing 3 authors is sufficient for this
+ % comparison.
+ %
+ cite.num.names.short #3 <
+ { #3 'cite.num.names.short := }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ { %
+ % Different 2nd author: citing 2 authors is sufficient for this
+ % comparison.
+ %
+ cite.num.names.short #2 <
+ { #2 'cite.num.names.short := }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ { %
+ % Different first author: no ambiguity, move to next entry.
+ %
+ skip$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {definitive.cite.num.names.field}
+{ 'field :=
+ field num.names$ 'numnames :=
+ %
+ % Format authors
+ %
+ format.6.authors
+ %
+ % Now compare authors with authors of previous entry.
+ %
+ cite.num.names.short numnames.old >
+ { %
+ % The previous entry has less authors than already defined
+ % necessary to be cited. No ambiguity is possible and we're ready.
+ %
+ skip$
+ }
+ { %
+ % Both previous and current entry have at least one author .
+ %
+ year.label year.label.old =
+ { %
+ % Same year label: possibly ambiguous citation.
+ %
+ % First check: current and/or previous have 1 or
+ % 2 authors.
+ %
+ numnames #3 <
+ numnames.old #3 <
+ or
+ %
+ { definitive.cite.num.names.1.or.2 }
+ { definitive.cite.num.names.3.or.more }
+ if$
+ }
+ { %
+ % Different year label: everything's fine,
+ % move to next entry.
+ %
+ skip$
+ }
+ if$
+ }
+ if$
+ %
+ % If during the previous process the name maximum is exceeded
+ % (which was not checked), correct this. NOTE: If the name
+ % maximum is smaller than 6, this could lead to ambiguous
+ % citations if, e.g., the year and the first 5 authors are
+ % the same, but the 6th author is different.
+ %
+ cite.num.names.short name.max >
+ { name.max 'cite.num.names.short := }
+ 'skip$
+ if$
+ %
+ % For a "full" cite, the number of names should always be at least
+ % as large as for a "short" cite.
+ %
+ cite.num.names.full cite.num.names.short <
+ { cite.num.names.short 'cite.num.names.full := }
+ 'skip$
+ if$
+ %
+ % Update "old" variables for next entry.
+ %
+ update.cite.num.names
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {definitive.cite.no.names}
+{ %
+ % The formatted field that acts as author is on top
+ % of the stack.
+ 'aut1f :=
+ "" 'aut2 :=
+ "" 'aut3 :=
+ "" 'aut4 :=
+ "" 'aut5 :=
+ "" 'aut6 :=
+ #1 'numnames :=
+ %
+ year.label year.label.old =
+ { %
+ % Same year label: possibly ambiguous citation.
+ %
+ definitive.cite.num.names.1.or.2
+ }
+ { %
+ % Different year label: everything's fine,
+ % move to next entry.
+ %
+ skip$
+ }
+ if$
+ %
+ % Update "old" variables for next entry.
+ %
+ update.cite.num.names
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {definitive.cite.num.names}
+{ %
+ % Check whether author or editor or other field acts as author.
+ % Number of names is only relevant with author or editor.
+ %
+ firstkey empty$ not
+ { firstkey sortify remove.spaces definitive.cite.no.names }
+ { key empty$ not
+ { key sortify remove.spaces definitive.cite.no.names }
+ { %
+ % No key or firstkey, so find out which field
+ % to use as author.
+ %
+ % Check reference type:
+ % if result is 1 then possibly editor acts as author
+ % 2 then editor does not act as author
+ % 3 then key should have been used
+ % 0 then unknown reference type
+ ref.type #2 =
+ { %
+ % Format first author with and without initials
+ author empty$
+ { title.sort.label definitive.cite.no.names }
+ { author definitive.cite.num.names.field }
+ if$
+ }
+ { %
+ % Format first author with and without initials
+ author empty$
+ { editor empty$
+ { title.sort.label definitive.cite.no.names }
+ { editor definitive.cite.num.names.field }
+ if$
+ }
+ { author definitive.cite.num.names.field }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.tentative.year.sort.label}
+{ %
+ % Implicit or explicit ``no date'' is put at the front
+ % (the year zero; years B.C. will imply complications)
+ % because these are possibly old works.
+ % ``In press'' is put at the end.
+ %
+ year empty$
+ { "0000" 'year.label := }
+ { year "\bibnodate" =
+ year "n.d." =
+ or
+ { "0000" 'year.label := }
+ { year "\BIP" =
+ { "9999" 'year.label := }
+ { % It is not checked whether the year field
+ % makes sense.
+ year sortify remove.spaces 'year.label :=
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ %
+ % Push year sort label on the stack
+ year.label
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {month.number.day}
+{ month empty$
+ { "" }
+ { month sortify remove.spaces
+ %
+ % Add the day when available.
+ day empty$
+ 'skip$
+ { "/" *
+ day sortify remove.spaces *
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.name.sort.label}
+{ %
+ % Author or editor-acting-as-author available.
+ % => Make tentative "short cite with initials" author
+ % label (L1) of one of the forms
+ % "Last1 F1"
+ % "Last1 F1 Last2"
+ % "Last1 F1 zzzz" ("zzzz" representing et al.)
+ % => If more than 2 'authors': make label (L2) for 2nd-6th authors
+ % of one of the forms
+ % "Last2 Last3"
+ % "Last2 Last3 Last4"
+ % "Last2 Last3 Last4 Last5"
+ % "Last2 Last3 Last4 Last5 Last6"
+ % "Last2 Last3 Last4 Last5 Last6 zzzz"
+ %
+ % Then format year label (L3) of one of the forms:
+ % "0000" (missing year or explicit 'no date')
+ % "9999" ('in press')
+ % year (otherwise; don't use originalyear here yet)
+ %
+ % From earlier sorting of titles, we have title number. Convert
+ % to string, which gives title label (L4) .
+ %
+ % Then tentative sorting label (author.year.sort.label) is a
+ % concatenation of
+ % L1
+ % " "
+ % L3
+ % " "
+ % L2
+ % " "
+ % L4
+ %
+ % The name field is on top of the stack.
+ 'field :=
+ %
+ % numnames is the total number of names contained in field
+ field num.names$ 'numnames :=
+ %
+ % Format first author
+ field #1 sort.name.format format.name$
+ %
+ % Format the second author if there are two, or else "zzzz" = et al.
+ numnames #1 =
+ 'skip$
+ { numnames #2 =
+ { %
+ % Two authors: format second author
+ field #2 "{ll{}}" format.name$ 's :=
+ s "others" =
+ { " zzzz" * } % Add "et al."-substitute
+ { " " * s * } % Add second author
+ if$
+ }
+ { " zzzz" * } % 3 or more authors: add "et al."-substitute
+ if$
+ }
+ if$
+ " " * % Add spaces
+ make.tentative.year.sort.label * % Add year (L3).
+ " " * % Add spaces
+ %
+ % Now build up L2 if applicable
+ numnames #3 <
+ 'skip$
+ { %
+ % Treat last author slightly differently
+ numnames name.max >
+ { name.max 'lastname :=
+ " zzzz" % Push "et al."-substitute on stack
+ }
+ { numnames 'lastname :=
+ "" % Push empty string on stack
+ }
+ if$
+ %
+ % Names 2 to "last" - 1
+ "" % Push empty string on stack
+ #2 'nameptr :=
+ { nameptr lastname < }
+ { % Add name no. nameptr
+ field nameptr "{ll{}}" format.name$ *
+ " " *
+ nameptr #1 + 'nameptr :=
+ }
+ while$
+ %
+ % "Last" author
+ field lastname "{ll{}}" format.name$ 's :=
+ s "others" =
+ { "zzzz" * } % Add "et al."-substitute
+ { s * } % Add last author
+ if$
+ %
+ swap$ * % Add the previously formatted empty string or
+ % "et al."-substitute if there are many authors.
+ * % Add L2 to the earlier labels.
+ }
+ if$
+ %
+ " " * % Add spaces
+ title.number conv.int.to.str * % Add sorted title number (L4).
+ sortify % Clean up and convert to lowercase
+ " " * % Add spaces
+ month.number.day * % Add month and day when available
+ 'author.year.sort.label := % Assign result to sort label.
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.field.year.sort.label}
+{ %
+ % 'field' acts as first author (L1), subsequent authors
+ % are empty (L2).
+ %
+ % Then format year label (L3) of one of the forms:
+ % "0000" (missing year or explicit 'no date')
+ % "9999" ('in press')
+ % year (otherwise; don't use originalyear here yet)
+ %
+ % From earlier sorting of titles, we have title number. Convert
+ % to string, which gives title label (L4) .
+ %
+ % Then tentative sorting label (author.year.sort.label) is a
+ % concatenation of
+ % L1
+ % " "
+ % L3
+ % " "
+ % L2
+ % " "
+ % L4
+ %
+ % 'field' is on top of the stack. It is already supposed to be cleaned
+ % (i.e., sortified and space-removed), so this is already L1.
+ " " * % Add spaces to L1
+ make.tentative.year.sort.label * % Add year (L3).
+ " " * % Add spaces
+ " " * % L2 is empty, add spaces
+ title.number conv.int.to.str * % Add sorted title number (L4).
+ sortify % Clean up and convert to lowercase
+ " " * % Add spaces
+ month.number.day * % Add month and day when available
+ 'author.year.sort.label := % Assign result to sort label.
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.author.editor.sort.label}
+{ author empty$
+ { editor empty$
+ { %
+ % Use what has previously been stored in title.sort.label
+ % as author substitute .
+ title.sort.label make.field.year.sort.label
+ }
+ { editor make.name.sort.label }
+ if$
+ }
+ { author make.name.sort.label }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.author.sort.label}
+{ author empty$
+ { %
+ % Use what has previously been stored in title.sort.label
+ % as author substitute .
+ title.sort.label make.field.year.sort.label
+ }
+ { author make.name.sort.label }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.tentative.sort.label}
+{ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ % General strategy:
+ %
+ % Ordinary situation: author or editor-acting-as-author
+ % available.
+ % => Make tentative "short cite with initials" author
+ % label (L1) of one of the forms
+ % "Last1 F1"
+ % "Last1 F1 Last2"
+ % "Last1 F1 zzzz" ("zzzz" representing et al.)
+ % => If more than 2 'authors': make label (L2) for 2nd-6th authors
+ % of one of the forms
+ % "Last2 Last3"
+ % "Last2 Last3 Last4"
+ % "Last2 Last3 Last4 Last5"
+ % "Last2 Last3 Last4 Last5 Last6"
+ % "Last2 Last3 Last4 Last5 Last6 zzzz"
+ % When key is available (overrules author and editor fields):
+ % => L1 = key, L2 = ""
+ % No author, editor, and key: define title or substitute as key
+ % and format as key.
+ %
+ % Then format year label (L3) of one of the forms:
+ % "0000" (missing year or explicit 'no date')
+ % "9999" ('in press')
+ % year (otherwise; don't use originalyear here yet)
+ %
+ % From earlier sorting of titles, we have title number. Convert
+ % to string, which gives title label (L4) .
+ %
+ % Then tentative sorting label (author.year.sort.label) is a
+ % concatenation of
+ % L1
+ % " "
+ % L3
+ % " "
+ % L2
+ % " "
+ % L4
+ %
+ % This can then be sorted, from which it can be derived
+ % whether initials are necessary, how many names must
+ % be used for short and full citations, and whether "a"'s and
+ % "b"'s etc. are necessary behind the year labels.
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % key and firstkey overrule author information
+ %
+ firstkey empty$ not
+ { key empty$ not
+ { %
+ % Both key and firstkey available:
+ % for sorting and checking initials, treat key as last
+ % name and firstkey as initials.
+ %
+ key sortify remove.spaces
+ " " *
+ firstkey sortify remove.spaces *
+ make.field.year.sort.label
+ }
+ { firstkey sortify remove.spaces make.field.year.sort.label }
+ if$
+ }
+ { key empty$ not
+ { key sortify remove.spaces make.field.year.sort.label }
+ { %
+ % No key or firstkey, so find out which field
+ % to use as author.
+ %
+ % Check reference type:
+ % if result is 1 then possibly editor acts as author
+ % 2 then editor does not act as author
+ % 3 then key should have been used
+ % 0 then unknown reference type
+ ref.type
+ duplicate$ #1 =
+ { pop$
+ make.author.editor.sort.label
+ }
+ { duplicate$ #2 =
+ { pop$
+ make.author.sort.label
+ }
+ { #3 =
+ { "no key in " cite$ * warning$
+ make.author.editor.sort.label
+ }
+ { make.author.editor.sort.label }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ %
+ author.year.sort.label 'sort.key$ :=
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.definitive.name.sort.label}
+{ %
+ % Author or editor-acting-as-author available.
+ % => Make author-with-initials label (L1) of one of the forms
+ % "Last1 F1 Last2 F2 ... LastN FN"
+ % "Last1 F1 Last2 F2 ... Last6 F6 zzzz"
+ % (where N <= 6 is the total number of authors, and
+ % "zzzz" represents et al. if there are more than 6 authors)
+ % No author, editor, and key: define title or substitute as sort key.
+ %
+ % The name field is on top of the stack.
+ 'field :=
+ %
+ % numnames is the total number of names contained in field
+ field num.names$ 'numnames :=
+ %
+ % If there are more than 6 authors, only 6 are mentioned.
+ numnames name.max >
+ { name.max 'format.num.names := }
+ { numnames 'format.num.names := }
+ if$
+ % Initialize stack with empty string
+ ""
+ %
+ % Cycle over authors.
+ #1 'nameptr :=
+ { nameptr format.num.names < }
+ { % Format author and add spaces
+ field nameptr sort.name.format format.name$ *
+ " " *
+ nameptr #1 + 'nameptr :=
+ }
+ while$
+ % Format last author that must be formatted
+ field nameptr sort.name.format format.name$ *
+ % Add et al. if necessary
+ nameptr numnames <
+ { " zzzz" * }
+ 'skip$
+ if$
+ sortify % Clean up and change case
+ " " * % Add spaces
+ year.label * % Add year
+ " " * % Add spaces
+ title.number conv.int.to.str * % Add sorted title number
+ " " * % Add spaces
+ month.number.day * % Add month and day when available
+ 'author.year.sort.label := % Assign result to sort label.
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.definitive.field.year.sort.label}
+{ %
+ % 'field' acts as author (L1).
+ %
+ % Then format year label (L2) of one of the forms:
+ % "0000" (missing year or explicit `no date')
+ % "9999" (`in press')
+ % year (otherwise; don't use originalyear here yet)
+ %
+ % From earlier sorting of titles, we have title number. Convert
+ % to string, which gives title label (L3) .
+ %
+ % Then tentative sorting label (author.year.sort.label) is a
+ % concatenation of
+ % L1
+ % " "
+ % L2
+ % " "
+ % L3
+ %
+ % 'field' is on top of the stack. It is already supposed to be cleaned
+ % (i.e., sortified and space-removed), so this is already L1.
+ " " * % Add spaces
+ year.label * % Add year
+ " " * % Add spaces
+ title.number conv.int.to.str * % Add sorted title number
+ " " * % Add spaces
+ month.number.day * % Add month and day when available
+ 'author.year.sort.label := % Assign result to sort label.
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.definitive.author.editor.sort.label}
+{ author empty$
+ { editor empty$
+ { %
+ % Use what has previously been stored in title.sort.label
+ % as author substitute .
+ title.sort.label make.definitive.field.year.sort.label
+ }
+ { editor make.definitive.name.sort.label }
+ if$
+ }
+ { author make.definitive.name.sort.label }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.definitive.author.sort.label}
+{ author empty$
+ { %
+ % Use what has previously been stored in title.sort.label
+ % as author substitute .
+ title.sort.label make.definitive.field.year.sort.label
+ }
+ { author make.definitive.name.sort.label }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.final.sort.key}
+{ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ % General strategy:
+ %
+ % Ordinary situation: author or editor-acting-as-author
+ % available.
+ % => Make author-with-initials label (L1) of one of the forms
+ % "Last1 F1 Last2 F2 ... LastN FN"
+ % "Last1 F1 Last2 F2 ... Last6 F6 zzzz"
+ % (where N <= 6 is the total number of authors, and
+ % "zzzz" represents et al. if there are more than 6 authors)
+ % No author, editor, and key: define title or substitute as sort key.
+ %
+ % Then format year label (L2) of one of the forms:
+ % "0000" (missing year or explicit `no date')
+ % "9999" (`in press')
+ % year (otherwise; don't use originalyear here yet)
+ % Add "/"month"/"day to the latter when available.
+ %
+ % From earlier sorting of titles, we have title number. Convert
+ % to string, which gives title label (L3) .
+ %
+ % Then final sorting label (author.year.sort.label) is a
+ % concatenation of
+ % L1
+ % " "
+ % L2
+ % " "
+ % L3
+ %
+ % This can then be sorted.
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ %
+ % Find out which field
+ % to use as author.
+ %
+ % Check reference type:
+ % if result is 1 then possibly editor acts as author
+ % 2 then editor does not act as author
+ % 3 then key should have been used
+ % 0 then unknown reference type
+ ref.type #2 =
+ { make.definitive.author.sort.label }
+ { make.definitive.author.editor.sort.label }
+ if$
+ %
+ author.year.sort.label 'sort.key$ :=
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ { s }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {chop.articles}
+{ 's :=
+ "a " #2
+ "an " #3
+ "the " #4
+ s
+ chop.word
+ chop.word
+ chop.word
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {format.sort.title}
+{ %
+ % Remove non-alphanumeric characters and change to lower case .
+ sortify
+ %
+ % Remove "a ", "an ", and "the " from the front .
+ chop.articles #1 entry.max$ substring$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.sort.title}
+{ title empty$
+ { text empty$
+ { type empty$
+ { howpublished empty$
+ { note empty$
+ { url empty$
+ { " " }
+ { url format.sort.title }
+ if$
+ }
+ { note format.sort.title }
+ if$
+ }
+ { howpublished format.sort.title }
+ if$
+ }
+ { type format.sort.title }
+ if$
+ }
+ { text format.sort.title }
+ if$
+ }
+ { title format.sort.title }
+ if$
+ remove.spaces
+ 'title.sort.label :=
+ title.sort.label 'sort.key$ :=
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.title.number}
+{ title.sort.label old.label =
+ { %
+ % A tie: old and new label are the same .
+ old.number 'title.number :=
+ }
+ { %
+ % The usual situation: titles are different.
+ old.number #1 + 'title.number :=
+ title.number 'old.number :=
+ title.sort.label 'old.label :=
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+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
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {comma.between.two} { "\BCBT{}" }
+
+FUNCTION {comma.between.names} { ", " }
+
+FUNCTION {comma.before.last} { "\BCBL{}" }
+
+FUNCTION {and.before.last} { "\ \BBA{} " }
+
+FUNCTION {et.al.string.cite} { "\ \protect\BOthers{.}" }
+
+FUNCTION {et.al.string} { "\ \BOthers{.}" }
+
+FUNCTION {et.al.string.period} { "\ \BOthersPeriod{.}" }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {add.name.index}
+{ %
+ %
+ make.index
+ { "%" * write$ newline$
+ % Check for corporate author
+ field is.bibcorporate
+ { "\corporateAX{" }
+ { "\AX{" }
+ if$
+ write$
+ field nameptr sort.name.format format.name$ sortify write$ newline$
+ "@" write$
+ field nameptr format.index.name
+ "}%" * write$ newline$
+ }
+ { "%" * write$ newline$ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.name.cite.label}
+{ 'field :=
+ 'format.num.names :=
+ %
+ field num.names$ 'numnames := % numnames is the total number of names
+ % contained in field
+ %
+ % It is implicit in the APA manual that if "et al." would refer
+ % to exactly one author, then this author should be named
+ % instead of "et al."
+ %
+ format.num.names numnames #1 - =
+ { numnames 'format.num.names := }
+ 'skip$
+ if$
+ %
+ % Format first author: with or without initials
+ %
+ #1 'nameptr :=
+ cite.initials #1 =
+ { field nameptr format.cite.initials.name }
+ { field nameptr cite.name.format format.name$ }
+ if$
+ add.name.index % Add index entry when desired.
+ %
+ numnames #1 =
+ 'skip$
+ { format.num.names #1 =
+ { %
+ % First author et al.
+ %
+ et.al.string.cite write$
+ }
+ { numnames #2 =
+ { %
+ % Given that format.num.names > 1, it is 2.
+ % Format second author.
+ %
+ #2 'nameptr :=
+ field nameptr cite.name.format format.name$ 's :=
+ %
+ % Check if 2nd author is explicit "others".
+ % If so, insert "et al." string.
+ %
+ s "others" =
+ { et.al.string.cite write$ } % First et al.
+ { %
+ % First \& Second
+ %
+ and.before.last write$
+ s
+ add.name.index % Add index entry when desired.
+ }
+ if$
+ }
+ { %
+ % 3 or more names, 2 or more must be cited
+ %
+ % for nameptr := 2 to format.num.names - 1 do
+ %
+ #2 'nameptr :=
+ { nameptr format.num.names < }
+ { %
+ % Put comma between consecutive authors
+ %
+ comma.between.names write$
+ %
+ % Format and add next author
+ %
+ field nameptr cite.name.format format.name$
+ add.name.index % Add index entry when desired.
+ %
+ % Move to next author
+ %
+ nameptr #1 + 'nameptr :=
+ }
+ while$
+ %
+ % nameptr = format.num.names
+ % Format this author.
+ %
+ field nameptr cite.name.format format.name$ 's :=
+ %
+ format.num.names numnames =
+ { %
+ % This is also the last author. Add (optional) comma.
+ %
+ comma.before.last write$
+ %
+ % Check if this author is explicit "others".
+ % If so, insert "et al." string.
+ %
+ s "others" =
+ { et.al.string.cite write$ }
+ { and.before.last write$
+ s
+ add.name.index % Add index entry when desired.
+ }
+ if$
+ }
+ { %
+ % This is not the last author.
+ % Add comma, author name, and "et al."
+ %
+ comma.between.names write$
+ s
+ add.name.index % Add index entry when desired.
+ %
+ comma.before.last et.al.string.cite * write$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.title.cite.label}
+{ %
+ % Formatting: check if formatted as article title or
+ % as book title, and insert this formatting.
+ %
+ is.atype
+ { "\APACciteatitle{" }
+ { "\APACcitebtitle{" }
+ if$
+ %
+ title empty$
+ { text empty$
+ { type empty$
+ { howpublished empty$
+ { note empty$
+ { url empty$
+ { cite$ }
+ { url }
+ if$
+ }
+ { note }
+ if$
+ }
+ { howpublished }
+ if$
+ }
+ { type }
+ if$
+ }
+ { text }
+ if$
+ }
+ { title }
+ if$
+ %
+ % Connect with formatting.
+ %
+ * "}" *
+ %
+ % Write to output
+ %
+ write$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.author.editor.cite.label}
+{ author empty$
+ { editor empty$
+ { %
+ % No author or editor:
+ % Use title or other description as citation label.
+ %
+ make.title.cite.label
+ "}{%" write$ newline$
+ make.title.cite.label
+ }
+ { cite.num.names.full editor make.name.cite.label
+ "}{%" write$ newline$
+ cite.num.names.short editor make.name.cite.label
+ }
+ if$
+ }
+ { cite.num.names.full author make.name.cite.label
+ "}{%" write$ newline$
+ cite.num.names.short author make.name.cite.label
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.author.cite.label}
+{ author empty$
+ { %
+ % No author:
+ % Use title or other description as citation label.
+ %
+ make.title.cite.label
+ "}{%" write$ newline$
+ make.title.cite.label
+ }
+ { cite.num.names.full author make.name.cite.label
+ "}{%" write$ newline$
+ cite.num.names.short author make.name.cite.label
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.definitive.year.supplement}
+{ %
+ % Add "a", "b", etc. when necessary.
+ %
+ add.to.year #0 =
+ { "" }
+ { "{\protect"
+ year empty$
+ { "\BCntND" * }
+ { year "\bibnodate" =
+ { "\BCntND" * }
+ { year "\BIP" =
+ { "\BCntIP" * }
+ { "\BCnt" * }
+ if$
+ }
+ if$
+ }
+ if$
+ "{" * add.to.year int.to.str$ * "}}" *
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {protect.year}
+{ year empty$
+ { "{\protect\bibnodate{}}" }
+ { year "\bibnodate" =
+ { "{\protect\bibnodate{}}" }
+ { year "\BIP" =
+ { "{\protect\BIP{}}" }
+ { year }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.definitive.year.label}
+{ "{\protect\APACyear{"
+ originalyear empty$
+ { protect.year }
+ { originalyear "\bibnodate" = % date of original publication unknown
+ { translator empty$
+ { protect.year }
+ { year empty$
+ { "{\protect\BTRANSL{}~\protect\bibnodate{}}" } % trans. n.d.
+ { "{\protect\BTRANSL{}}~" protect.year * } % trans. 1931
+ if$
+ }
+ if$
+ }
+ { year empty$
+ { originalyear "/{\protect\bibnodate{}}" * } % 1923/n.d.
+ { originalyear year =
+ { protect.year }
+ { originalyear "/" * protect.year * } % 1923/1961
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ * "}}%" * write$ newline$
+ %
+ % Add "a", "b", etc. when necessary.
+ %
+ "{\protect\APACexlab{" "}}"
+ make.definitive.year.supplement enclose.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.cite.labels}
+{ newline$
+ %
+ % Write a few lines for testing purposes.
+ %
+ test
+ { "\bibitem[]{} \fullciteA{" cite$ * "}" * write$ newline$
+ "\bibitem[]{} \citeA{" cite$ * "}" * write$ newline$
+ }
+ 'skip$
+ if$
+ %
+ "\bibitem[\protect\citeauthoryear{%" write$ newline$
+ %
+ % When key or firstkey is available, this takes precedence.
+ %
+ firstkey empty$ not
+ { %
+ % Full cite: firstkey.
+ %
+ firstkey write$
+ "}{%" write$ newline$
+ %
+ % Short cite: if key is not empty and cite.initials is 0,
+ % then key, else firstkey.
+ %
+ cite.initials #0 =
+ key empty$ not
+ and
+ { key }
+ { firstkey }
+ if$
+ write$
+ }
+ { key empty$ not
+ { %
+ % No firstkey, but key available:
+ % Both full and short labels are key.
+ %
+ key write$
+ "}{%" write$ newline$
+ key write$
+ }
+ { % No key or firstkey, so find out which field
+ % to use as author.
+ %
+ % Check reference type:
+ % if result is 1 then possibly editor acts as author
+ % 2 then editor does not act as author
+ % 3 then key should have been used
+ % 0 then unknown reference type
+ ref.type #2 =
+ { make.author.cite.label }
+ { make.author.editor.cite.label }
+ if$
+ }
+ if$
+ }
+ if$
+ "}{%" write$ newline$
+ %
+ % Make year label that's used for citations
+ %
+ make.definitive.year.label write$
+ "}]{%" write$ newline$
+ cite$ write$
+ "}%" write$ newline$
+ % author.year.sort.label write$ newline$ % for testing purposes
+ % year.label write$ newline$ % for testing purposes
+ %
+ % If the item is used in a meta-analysis, indicate this with
+ % a star.
+ %
+ "\APACinsertmetastar{%" write$ newline$
+ cite$ write$
+ "}%" write$ newline$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {editor.postfix}
+{ editor num.names$ #1 >
+ { "(\BEDS)" }
+ { "(\BED)" }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {editor.trans.postfix}
+{ editor num.names$ #1 >
+ { "(\BEDS{} \BAnd{} \BTRANSS)" }
+ { "(\BED{} \BAnd{} \BTRANS)" }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % "(Trans.)" postfix
+ % translator must not be empty
+ %
+FUNCTION {trans.postfix}
+{ translator num.names$ #1 >
+ { "(\BTRANSS)" }
+ { "(\BTRANS)" }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {format.author.names}
+{ 'field :=
+ 'dot :=
+ %
+ field num.names$ 'numnames := % numnames is the total number of names
+ % contained in field
+ numnames 'format.num.names := % Format all authors
+ format.num.names name.max > % Unless this exceeds the maximum of 6.
+ { dot
+ { name.max 'format.num.names := } % Format 6 authors
+ { cite.num.names.full 'format.num.names := } % Format 1 editor
+ if$
+ }
+ 'skip$
+ if$
+ %
+ % It is kind of explicit in the APA manual that if "et al." would
+ % refer to exactly one author (the 7th), then this author should
+ % still be replaced by "et al.", unlike with citations.
+ % So format.num.names is not adapted.
+ %
+ % Format first author
+ %
+ #1 'nameptr :=
+ field nameptr format.author.name
+ %
+ % Add period if required and if this is the only author.
+ %
+ numnames #1 =
+ dot
+ and
+ { add.period$ }
+ 'skip$
+ if$
+ add.name.index % Add index entry when desired.
+ %
+ numnames #1 =
+ 'skip$
+ { format.num.names #1 =
+ { %
+ % First author et al.
+ %
+ comma.between.two
+ %
+ % Add period if required.
+ %
+ dot
+ { et.al.string.period * }
+ { et.al.string * }
+ if$
+ write$
+ }
+ { numnames #2 =
+ { %
+ % Given that format.num.names > 1, it is 2.
+ %
+ comma.between.two write$
+ %
+ % Format second author.
+ %
+ #2 'nameptr :=
+ field nameptr format.author.name 's :=
+ %
+ % Check if 2nd author is explicit "others".
+ % If so, insert "et al." string.
+ %
+ s "others" =
+ { %
+ % First et al.
+ % Add period if required.
+ %
+ dot
+ { et.al.string.period }
+ { et.al.string }
+ if$
+ write$
+ }
+ { %
+ % First \& Second
+ %
+ and.before.last write$
+ %
+ % Add period if required.
+ %
+ dot
+ { s add.period$ }
+ { s }
+ if$
+ add.name.index % Add index entry when desired.
+ }
+ if$
+ }
+ { %
+ % 3 or more names, 2 or more must be cited
+ %
+ % for nameptr := 2 to format.num.names - 1 do
+ %
+ #2 'nameptr :=
+ { nameptr format.num.names < }
+ { %
+ % Put comma between consecutive authors
+ %
+ comma.between.names write$
+ %
+ % Format and add next author
+ %
+ field nameptr format.author.name
+ add.name.index % Add index entry when desired.
+ %
+ % Move to next author
+ %
+ nameptr #1 + 'nameptr :=
+ }
+ while$
+ %
+ % nameptr = format.num.names
+ % Format this author.
+ %
+ field nameptr format.author.name 's :=
+ %
+ format.num.names numnames =
+ { %
+ % This is also the last author. Add (optional) comma.
+ %
+ comma.before.last write$
+ %
+ % Check if this author is explicit "others".
+ % If so, insert "et al." string.
+ %
+ s "others" =
+ { %
+ % Add period if required.
+ %
+ dot
+ { et.al.string.period }
+ { et.al.string }
+ if$
+ write$
+ }
+ { and.before.last write$
+ %
+ % Add period if required.
+ %
+ dot
+ { s add.period$ }
+ { s }
+ if$
+ add.name.index % Add index entry when desired.
+ }
+ if$
+ }
+ { %
+ % This is not the last author.
+ % Add comma, author name, and "et al."
+ %
+ comma.between.names write$
+ s
+ add.name.index % Add index entry when desired.
+ %
+ comma.before.last
+ %
+ % Add period if required.
+ %
+ dot
+ { et.al.string.period * }
+ { et.al.string * }
+ if$
+ write$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {format.authors}
+{ #1 author format.author.names
+ "%" write$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {format.editors.as.authors}
+{ #0 editor format.author.names
+ "\ " editor.postfix * add.period$ write$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {format.ed.trans.as.authors}
+{ #0 editor format.author.names
+ "\ " editor.trans.postfix * add.period$ write$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {format.editor.names}
+{ 'field :=
+ %
+ field num.names$ 'numnames := % numnames is the total number of names
+ % contained in field
+ numnames 'format.num.names := % Format all authors
+ format.num.names name.max > % Unless this exceeds the maximum of 6.
+ { #1 'format.num.names := } % Then it becomes 1 (First et al.)
+ 'skip$
+ if$
+ %
+ % Format first editor
+ %
+ field #1 format.editor.name
+ %
+ numnames #1 =
+ 'skip$
+ { format.num.names #1 =
+ { et.al.string * } % First editor et al., no comma.
+ { numnames #2 =
+ { %
+ % Given that format.num.names > 1, it is 2.
+ % No comma. Format second editor.
+ %
+ field #2 format.editor.name 's :=
+ %
+ % Check if 2nd editor is explicit "others".
+ % If so, insert "et al." string.
+ %
+ s "others" =
+ { et.al.string * } % First et al.
+ { and.before.last * s * } % First \& Second
+ if$
+ }
+ { %
+ % 3 or more names, 2 or more must be cited
+ %
+ % for nameptr := 2 to format.num.names - 1 do
+ %
+ #2 'nameptr :=
+ { nameptr format.num.names < }
+ { %
+ % Put comma between consecutive editors
+ %
+ comma.between.names *
+ %
+ % Format and add next editor
+ %
+ field nameptr format.editor.name *
+ %
+ % Move to next editor
+ %
+ nameptr #1 + 'nameptr :=
+ }
+ while$
+ %
+ % nameptr = format.num.names
+ % Format this editor.
+ %
+ field nameptr format.editor.name 's :=
+ %
+ format.num.names numnames =
+ { %
+ % This is also the last editor. Add (optional) comma.
+ %
+ comma.before.last *
+ %
+ % Check if this editor is explicit "others".
+ % If so, insert "et al." string.
+ %
+ s "others" =
+ { et.al.string * }
+ { and.before.last * s * }
+ if$
+ }
+ { %
+ % This is not the last editor.
+ % Add comma, editor name, and "et al."
+ %
+ comma.between.names * s *
+ comma.before.last * et.al.string *
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format editors in case editors do not act as authors
+ % (such as reference to chapter in edited book)
+ %
+ % L. W. Poon (Ed.) (1 editor)
+ % or
+ % A. S. Gurman \& D. P. Kniskern (Eds.) (2 editors)
+ % or
+ % L. Poon, A. Jones, \& D. P. Smith (Eds.) (>2 editors)
+ %
+ % editor must not be empty
+ %
+FUNCTION {format.editors.in.line}
+{ editor format.editor.names
+ editor.postfix connect.with.space.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format editors in case editors are also translators
+ % and do not act as authors
+ % (such as reference to chapter in edited book
+ % of translated articles)
+ %
+ % L. W. Poon (Ed. and Trans.) (1 editor)
+ % or
+ % A. S. Gurman \& D. P. Kniskern (Eds. and Trans.) (2 editors)
+ % or
+ % L. Poon, A. Jones, \& D. P. Smith (Eds. and Trans.) (>2 editors)
+ %
+ % editor must not be empty
+ %
+FUNCTION {format.editors.trans.in.line}
+{ editor format.editor.names
+ editor.trans.postfix connect.with.space.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format translators in case translators act as editors
+ % (such as reference to chapter in translated book)
+ %
+ % L. W. Poon (Trans.) (1 translator)
+ % or
+ % A. S. Gurman \& D. P. Kniskern (Trans.) (2 translators)
+ % or
+ % L. Poon, A. Jones, \& D. P. Smith (Trans.) (>2 translators)
+ %
+ % translator must not be empty
+ %
+FUNCTION {format.translators.in.line}
+{ translator format.editor.names
+ trans.postfix connect.with.space.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format translators in case translator does not act as editor
+ % (such as reference to translated book)
+ %
+ % L. Solotaroff, Trans.
+ %
+FUNCTION {format.translators.in.paren.check}
+{ translator empty$
+ { "" }
+ { translator format.editor.names
+ translator num.names$ #1 >
+ { ", \BTRANSS{}" * }
+ { ", \BTRANS{}" * }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format editors and translators in case neither act as editor
+ % (such as reference to edited or translated book with a
+ % a single author)
+ %
+ % L. Solotaroff, Ed.
+ % L. Solotaroff, Ed. \& Trans.
+ % L. Solotaroff, Trans.
+ % L. Solotaroff, Ed. \& S. Prokofieff, Trans.
+ %
+FUNCTION {format.editors.translators.in.paren.check}
+{ editor empty$
+ { translator empty$
+ { "" }
+ { translator format.editor.names
+ translator num.names$ #1 >
+ { ", \BTRANSS{}" * }
+ { ", \BTRANS{}" * }
+ if$
+ }
+ if$
+ }
+ { editor format.editor.names
+ editor num.names$ #1 >
+ { ", \BEDS{}" * }
+ { ", \BED{}" * }
+ if$
+ translator empty$
+ 'skip$
+ { editor translator =
+ { editor num.names$ #1 >
+ { " \BAnd{} \BTRANSS" * }
+ { " \BAnd{} \BTRANS" * }
+ if$
+ }
+ { " \BAnd{} " *
+ translator format.editor.names *
+ translator num.names$ #1 >
+ { ", \BTRANSS{}" * }
+ { ", \BTRANS{}" * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % translator of article
+ %
+FUNCTION {format.atrans.check}
+{ format.translators.in.paren.check parenthesize.check }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format "In editor (Ed.), "
+ %
+FUNCTION {format.in.editors}
+{ "\BIn{} "
+ editor empty$
+ 'skip$
+ { format.editors.in.line * ", " * }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format "In translator (Trans.),"
+ %
+FUNCTION {format.in.trans}
+{ "\BIn{} "
+ translator empty$
+ 'skip$
+ { format.translators.in.line * ", " * }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format "In editor (Ed. and Trans.)"
+ % or "In editor (Ed.)" if editor not equal to translator
+ %
+FUNCTION {format.in.editors.trans}
+{ "\BIn{} "
+ editor empty$
+ { translator empty$
+ 'skip$
+ { format.translators.in.line * ", " * }
+ if$
+ }
+ { translator empty$
+ { format.editors.in.line * }
+ { editor translator =
+ { format.editors.trans.in.line * }
+ { format.editors.in.line * }
+ if$
+ }
+ if$
+ ", " *
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {format.year.check}
+{ "\APACrefYear{"
+ year empty$
+ { "\bibnodate{}" * }
+ { year * }
+ if$
+ %
+ % Add "a", "b", etc. when necessary.
+ %
+ make.definitive.year.supplement *
+ "}" *
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {format.year.month.day.check}
+{ "\APACrefYearMonthDay{"
+ year empty$
+ { "\bibnodate{}" * }
+ { year * }
+ if$
+ %
+ % Add "a", "b", etc. when necessary.
+ %
+ make.definitive.year.supplement *
+ "}{" *
+ %
+ % Add month and day when present.
+ %
+ month empty$
+ 'skip$
+ { month * }
+ if$
+ "}{" *
+ day empty$
+ 'skip$
+ { day * }
+ if$
+ "}" *
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % title of article in journal or book
+ % no finishing period
+ % field must be on top of stack
+ % (so englishtitle can be handled also)
+ %
+FUNCTION {format.atitle.no.dot}
+{ "\BBOQ{}" swap$
+ "\BBCQ{}" swap$
+ duplicate$ empty$
+ 'skip$
+ { 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
+ % with finishing period
+ % field must be on top of stack
+ % (so englishtitle can be handled also)
+ %
+FUNCTION {format.atitle.dot}
+{ "\BBOQ{}" swap$
+ "\BBCQ{}" swap$
+ duplicate$ empty$
+ 'skip$
+ { 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
+ % field must be on top of stack
+ % second element on stack must be connected:
+ % if that is empty, then atitle.dot
+ % else atitle.no.dot, connect, and add period
+ %
+FUNCTION {format.atitle.connect}
+{ swap$
+ duplicate$ empty$
+ { pop$
+ format.atitle.dot
+ }
+ { swap$
+ format.atitle.no.dot
+ swap$ connect.with.space.check
+ add.period$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % title of book or so, without period
+ % call with
+ % field format.btitle.no.dot
+ %
+FUNCTION {format.btitle.no.dot}
+{ duplicate$ empty$
+ 'skip$
+ { 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
+ % call with
+ % field format.btitle.dot
+ %
+FUNCTION {format.btitle.dot}
+{ duplicate$ empty$
+ 'skip$
+ { add.period$ format.btitle.no.dot }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % title of book and similar
+ % field must be on top of stack
+ % second element on stack must be connected:
+ % if that is empty, then btitle.dot
+ % else btitle.no.dot, connect, and add period
+ %
+FUNCTION {format.btitle.connect}
+{ swap$
+ duplicate$ empty$
+ { pop$
+ format.btitle.dot
+ }
+ { swap$
+ format.btitle.no.dot
+ swap$ connect.with.space.check
+ add.period$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % title of book and similar
+ % field must be on top of stack
+ % second element on stack must be connected
+ %
+FUNCTION {format.btitle.connect.no.dot}
+{ swap$
+ duplicate$ empty$
+ { pop$
+ format.btitle.no.dot
+ }
+ { swap$
+ format.btitle.no.dot
+ swap$ connect.with.space.check
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format englishtitle (of nonenglish article, etc.)
+ %
+FUNCTION {format.aetitle.check}
+{ englishtitle empty$
+ { "" }
+ { % 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$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format type (of article, etc.)
+ %
+FUNCTION {format.atype.check}
+{ type bracket.check }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format title and englishtitle (of article, etc.)
+ %
+FUNCTION {format.atitle.check}
+{ format.aetitle.check
+ title format.atitle.connect
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format title, englishtitle, and type
+ % (of article, etc.)
+ %
+FUNCTION {format.atitle.type.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.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.aetitle.check
+ format.atype.check connect.with.space.check
+ format.atrans.check connect.with.space.check
+ title format.atitle.connect
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format journal, volume, number and pages
+ % call with
+ % formatted.pages format.journal.vol.num.pages.check
+ %
+FUNCTION { format.journal.vol.num.pages.check }
+{ "journal" journal warning.if.empty
+ 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"
+ %
+ % call with
+ % field format.bvolume.check
+ %
+FUNCTION {format.bvolume.check}
+{ duplicate$ empty$
+ 'skip$
+ { duplicate$ multi.result.check
+ { "\BVOLS" swap$ tie.or.space.connect }
+ { "\BVOL" swap$ tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % edition of book, must not be empty
+ % call with
+ % field format.edition.check
+ %
+FUNCTION {format.edition.check}
+{ duplicate$ empty$
+ 'skip$
+ { "\PrintOrdinal{" swap$ * "}" *
+ "\BEd" connect.with.space.check
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % volume and edition of book
+ %
+FUNCTION {format.bvol.edition.check}
+{ edition format.edition.check
+ volume format.bvolume.check
+ connect.with.comma.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % volume and edition of book
+ %
+FUNCTION {format.bvol.edition}
+{ format.bvol.edition.check
+ parenthesize.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % volume and edition and translator of translated book
+ %
+FUNCTION {format.bvol.edition.trans}
+{ format.bvol.edition.check
+ format.translators.in.paren.check connect.with.semicolon.check
+ parenthesize.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % volume, edition, editor, and translator of (translated) book
+ %
+FUNCTION {format.bvol.edition.editor.trans}
+{ format.bvol.edition.check
+ format.editors.translators.in.paren.check connect.with.semicolon.check
+ parenthesize.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % formats pages by first checking if 1 or more pages
+ % and prefixing pages with "p." or "pp." (these strings
+ % are given in the commands \BPG and \BPGS, respectively),
+ % whichever is applicable, and do a tie or space connect
+ %
+ % call with
+ % field format.bpages.check
+ %
+FUNCTION {format.bpages.check}
+{ duplicate$ empty$
+ 'skip$
+ { duplicate$ multi.result.check
+ { "\BPGS" swap$ tie.or.space.connect }
+ { "\BPG~" swap$ * }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % formats chapters by first checking if 1 or more chapters
+ % and prefixing pages with "chap." (this string
+ % is given in the commands \BCHAP and \BCHAPS, respectively),
+ % whichever is applicable, and do a tie or space connect
+ %
+ % call with
+ % field format.bchapter.check
+ %
+FUNCTION {format.bchapter.check}
+{ duplicate$ empty$
+ 'skip$
+ { duplicate$ multi.result.check
+ { "\BCHAPS" swap$ tie.or.space.connect }
+ { "\BCHAP" swap$ tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % volume, edition, and pages or chapter of article in book etc.
+ %
+FUNCTION {format.bvol.edition.pages}
+{ format.bvol.edition.check
+ pages empty$
+ { chapter format.bchapter.check connect.with.comma.check }
+ { pages format.bpages.check connect.with.comma.check }
+ if$
+ parenthesize.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % title, volume, edition of book
+ %
+FUNCTION {format.btitle.vol.edition}
+{ 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.betitle.check
+ format.bvol.edition.trans connect.with.space.check
+ title format.btitle.connect.no.dot
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % title, volume, edition, editor, and translator of book
+ %
+FUNCTION {format.btitle.vol.edition.editor.trans}
+{ 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.
+ %
+ % New York: Wiley
+ % or
+ % Wiley (if address empty)
+ % or
+ % New York (if publisher empty)
+ %
+FUNCTION {format.address.publisher}
+{ %
+ % 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 "}" *
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format address and publisher of book etc.
+ %
+ % New York: Wiley
+ % or
+ % Wiley (if address empty)
+ % or
+ % New York (if publisher empty)
+ %
+ % warning if no publisher or no address
+ %
+FUNCTION {format.address.publisher.check}
+{ "publisher" publisher warning.if.empty
+ "address" address warning.if.empty
+ publisher empty$
+ address empty$
+ and
+ 'skip$
+ { % Clear the stack
+ duplicate$ empty$
+ 'skip$
+ { output.new.block }
+ if$
+ format.address.publisher
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format number as in reports: No. 2017
+ % call with
+ % field format.rnumber.check
+ %
+FUNCTION {format.rnumber.check}
+{ duplicate$ empty$
+ 'skip$
+ { duplicate$ multi.result.check
+ { "\BNUMS" swap$ tie.or.space.connect }
+ { "\BNUM" swap$ tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format type and number of a standalone item
+ % call with
+ % format.type.number
+ %
+FUNCTION { format.type.number }
+{ 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
+ % call with
+ % format.howpublished
+ %
+FUNCTION {format.howpublished}
+{ howpublished empty$
+ 'skip$
+ { % clear the stack
+ duplicate$ empty$
+ 'pop$
+ { output.dot.new.block }
+ if$
+ "\APAChowpublished{" howpublished * "}" *
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format howpublished if not empty,
+ % for misc
+ % call with
+ % output.howpublished
+ %
+FUNCTION {output.howpublished}
+{ howpublished empty$
+ 'skip$
+ { "\APAChowpublished{" howpublished * "}" *
+ output.dot.new.block
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % begin and end of url environment
+ %
+FUNCTION {begin.end.url.env}
+{ " \begin{APACrefURL} "
+ % For "Retrieved <date>, from"
+ lastchecked empty$
+ 'skip$
+ { "[{" * lastchecked * "}]" * }
+ if$
+ " \end{APACrefURL} "
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % begin and end of message environment
+ %
+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 }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format original year of publication and note
+ % (reprint or translation)
+ %
+FUNCTION {format.orig.year.note}
+{ originalyear empty$
+ { 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}
+{ "\APACorigjournalnote{"
+ originalyear "" connect.check "}{" *
+ originaljournal "" connect.check "}{" *
+ originalvolume "" connect.check "}{" *
+ originalnumber "" connect.check "}{" *
+ originalpages "" connect.check "}{" *
+ note "" connect.check "}" *
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format original book of publication and note
+ % (reprint or translation)
+ %
+FUNCTION {format.orig.book.note}
+{ "\APACorigbooknote{" originalyear "" connect.check "}{" *
+ %
+ originaleditor empty$
+ 'skip$
+ { originaleditor num.names$ #1 >
+ { "\APACorigEDS{" * originaleditor format.editor.names * "}" * }
+ { "\APACorigED{" * originaleditor format.editor.names * "}" * }
+ if$
+ }
+ if$
+ %
+ "}{" *
+ 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
+ % and format optional note
+ %
+FUNCTION {format.orig.note}
+{ originaljournal empty$
+ { originalbooktitle empty$
+ { note empty$
+ { originalyear empty$
+ 'skip$
+ { originalyear "\bibnodate" =
+ 'skip$
+ { output.new.block
+ format.orig.year.note
+ }
+ if$
+ }
+ if$
+ }
+ { output.new.block
+ format.orig.year.note
+ }
+ if$
+ }
+ { output.new.block
+ format.orig.book.note
+ }
+ if$
+ }
+ { output.new.block
+ format.orig.journal.note
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % article in periodical: journal, magazine, newspaper, ...
+ %
+ % call with
+ % formatted.pages formatted.date periodical
+ %
+FUNCTION {periodical}
+{ %
+ % author or editor, year, title, englishtitle, type
+ %
+ author empty$
+ %
+ % no author: possibly special issue with editors as authors
+ % (APA manual, ex. 11, p. 121)
+ %
+ { editor empty$
+ %
+ % no author or editor: title serves as author.
+ % title formatted as article title (APA manual not consistent in this,
+ % compare statement on p. 119: ``treat as book title'' and
+ % example 8, p. 121: no underlining => article title)
+ %
+ { format.atitle.type.trans.check output.new.block
+ %
+ % now formatted date on top of stack
+ %
+ output.dot.new.block
+ }
+ %
+ % format editor and year, and check if year is present
+ % format article title and check if title or type present
+ %
+ { format.editors.as.authors start.new.block
+ %
+ % now formatted date on top of stack
+ %
+ output.dot.new.block
+ format.atitle.type.trans.check output.new.block
+ }
+ if$
+ }
+ %
+ % format author and year, and check if year is present
+ % format article title and check if title or type present
+ %
+ { format.authors start.new.block
+ %
+ % now formatted date on top of stack
+ %
+ output.dot.new.block
+ format.atitle.type.trans.check output.new.block
+ }
+ if$
+ %
+ % format journal name, volume and issue number, and pages
+ % and check if journal not empty
+ %
+ format.journal.vol.num.pages.check
+ %
+ % 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$
+ %
+ % possible reprint and optional note
+ %
+ format.orig.note
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % journal article
+ %
+FUNCTION {article}
+{ pages format.year.month.day.check periodical }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % magazine article
+ %
+FUNCTION {magazine}
+{ pages format.year.month.day.check periodical }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % newspaper article
+ %
+FUNCTION {newspaper}
+{ pages format.bpages.check format.year.month.day.check periodical }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % (translation of) entire book
+ %
+FUNCTION {book}
+{ %
+ % author or editor,
+ % year, title, englishtitle, translator
+ %
+ author empty$
+ %
+ % no author: possibly edited book with editors as authors
+ %
+ { editor empty$
+ %
+ % no author or editor: title serves as author.
+ % title formatted as book title
+ %
+ { format.btitle.vol.edition.trans
+ format.type.number connect.with.space.check
+ output.dot.new.block
+ format.year.check add.period$
+ }
+ %
+ % format editor and year, and check if year is present
+ % format booktitle, volume, and edition and check if title present
+ %
+ { translator empty$
+ { format.editors.as.authors start.new.block
+ format.year.check output.dot.new.block
+ format.btitle.vol.edition
+ }
+ %
+ % format translator correctly
+ %
+ { translator editor =
+ not
+ { format.editors.as.authors start.new.block
+ format.year.check output.dot.new.block
+ format.btitle.vol.edition.trans
+ }
+ { format.ed.trans.as.authors start.new.block
+ format.year.check output.dot.new.block
+ format.btitle.vol.edition
+ }
+ if$
+ }
+ if$
+ format.type.number connect.with.space.check
+ add.period$
+ }
+ if$
+ }
+ %
+ % format author and year, and check if year is present
+ % format booktitle, volume, and edition and check if title present
+ %
+ { format.authors start.new.block
+ format.year.check output.dot.new.block
+ format.btitle.vol.edition.editor.trans
+ format.type.number connect.with.space.check
+ add.period$
+ }
+ if$
+ %
+ % format address and publisher, check if address and publisher present
+ %
+ 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
+ %
+ format.orig.note
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % (translated) article or chapter in edited book
+ %
+FUNCTION {incollection}
+{ author empty$
+ %
+ % no author: title serves as author.
+ % title formatted as article title (APA manual not consistent in this,
+ % compare statement on p. 119: ``treat as book title'' and
+ % example 8, p. 121: no underlining => article title)
+ %
+ { editor.ne.trans
+ { format.atitle.type.trans.check }
+ { format.atitle.type.check }
+ if$
+ output.new.block
+ %
+ % format month and day as well when available
+ % esp. for ``collections'' that are not books,
+ % such as parts of internet documents
+ %
+ format.year.month.day.check add.period$
+ }
+ %
+ % format author and year, and check if year is present
+ % format article title and check if title or type present
+ %
+ { format.authors start.new.block
+ format.year.month.day.check output.dot.new.block
+ editor.ne.trans
+ { format.atitle.type.trans.check }
+ { format.atitle.type.check }
+ if$
+ }
+ 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 * 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 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
+ %
+ format.orig.note
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % technical report number
+ %
+FUNCTION {format.tr.number}
+{ type empty$
+ { "\BTR{}" }
+ { type "\bibnotype" =
+ { "" }
+ { type }
+ if$
+ }
+ if$
+ number format.rnumber.check connect.with.space.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % title, volume, edition, report number
+ %
+FUNCTION {format.tr.title.number}
+{ 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.
+ %
+ % Washington, DC: National Institute of Education
+ % or
+ % National Institute of Education (if address empty)
+ %
+ % warning if no institution
+ %
+FUNCTION {format.address.institution.check}
+{ "institution" institution warning.if.empty
+ "address" address warning.if.empty
+ 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
+ %
+FUNCTION {techreport}
+{ author empty$
+ %
+ % no author: possibly edited report with editors as authors
+ %
+ { editor empty$
+ %
+ % no author or editor: title serves as author.
+ % title formatted as book title
+ %
+ { format.tr.title.number output.dot.new.block
+ format.year.month.day.check add.period$
+ }
+ %
+ % format editor and year, and check if year is present
+ % format report title and check if title present
+ % format volume, edition, type, and number
+ %
+ { format.editors.as.authors start.new.block
+ format.year.month.day.check output.dot.new.block
+ format.tr.title.number add.period$
+ }
+ if$
+ }
+ %
+ % format author and year, and check if year is present
+ % format report title and check if title present
+ % format volume, edition, type, and number
+ %
+ { format.authors start.new.block
+ format.year.month.day.check output.dot.new.block
+ format.tr.title.number add.period$
+ }
+ if$
+ %
+ % format address and institution, check if institution present
+ %
+ format.address.institution.check
+ %
+ % if not empty, insert howpublished.
+ % (used if report 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 optional note
+ %
+ note empty$
+ 'skip$
+ { % Clear the stack
+ duplicate$ empty$
+ 'skip$
+ { output.new.block }
+ if$
+ format.note
+ }
+ if$
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % (translated) article or chapter in report
+ %
+FUNCTION {intechreport}
+{ author empty$
+ %
+ % no author: title serves as author.
+ % title formatted as article title (APA manual not consistent in this,
+ % compare statement on p. 119: ``treat as book title'' and
+ % example 8, p. 121: no underlining => article title)
+ %
+ { editor.ne.trans
+ { format.atitle.trans.check }
+ { format.atitle.check }
+ if$
+ output.new.block
+ format.year.month.day.check output.dot.new.block
+ }
+ %
+ % format author and year, and check if year is present
+ % format article title and check if title or type present
+ %
+ { format.authors start.new.block
+ format.year.month.day.check output.dot.new.block
+ editor.ne.trans
+ { format.atitle.trans.check }
+ { format.atitle.check }
+ if$
+ output.new.block
+ }
+ if$
+ %
+ % format "In " editor " (Ed. \& Trans.), "
+ % booktitle, volume, edition, pages
+ %
+ format.in.editors.trans
+ %
+ % volume, edition, report type and number, pages
+ %
+ "\APACbVolEdTRpgs{" format.bvol.edition.check * "}{" *
+ format.tr.number *
+ "}{" * pages format.bpages.check *
+ "}" *
+ %
+ booktitle format.btitle.connect *
+ add.period$
+ %
+ % format address and publisher, check if publisher present
+ %
+ format.address.institution.check
+ %
+ % if not empty, insert howpublished.
+ % (used if report 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
+ %
+ format.orig.note
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % papers presented at conferences etc.
+ %
+FUNCTION {lecture}
+{ author empty$
+ { "author" author warning.if.empty }
+ { format.authors start.new.block }
+ if$
+ %
+ % format year, month, and day, and check if year present
+ % format title and check if title present
+ % format howpublished and check if howpublished present
+ %
+ format.year.month.day.check output.dot.new.block
+ symposium empty$
+ { format.betitle.check
+ title format.btitle.connect output.new.block
+ howpublished empty$
+ { "symposium and howpublished missing in " cite$ * warning$
+ ""
+ }
+ { "\APAChowpublished{" howpublished * "}" * }
+ if$
+ address connect.with.comma.check
+ }
+ { format.atitle.type.check output.new.block
+ "\BIn{} "
+ chair empty$
+ 'skip$
+ { chair format.editor.names
+ chair num.names$ #1 >
+ { "(\BCHAIRS)" }
+ { "(\BCHAIR)" }
+ if$
+ connect.with.space.check * ", " *
+ }
+ 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$
+ 'skip$
+ { % Clear the stack
+ duplicate$ empty$
+ 'skip$
+ { output.new.block }
+ if$
+ format.note
+ }
+ if$
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % default thesis type is on top of stack
+ % now, if type field is empty, this default is used
+ % else default is removed and replaced by value of
+ % type field
+ %
+FUNCTION {format.type.school}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+ school connect.with.comma.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % phd theses, etc.
+ % call with
+ % "default.published.thesis" "default.unpublished.thesis" thesis
+ %
+FUNCTION {thesis}
+{ author empty$
+ { "author" author warning.if.empty }
+ { format.authors start.new.block }
+ if$
+ %
+ % format year and check if year present
+ %
+ format.year.check output.dot.new.block
+ %
+ % format title and check if title present
+ % journal empty => unpublished PhD thesis
+ % journal not empty => published (e.g., Dissertation Abstracts Int.)
+ %
+ journal empty$
+ { format.btitle.vol.edition output.dot.new.block
+ %
+ % pop default unpublished thesis, top is default published thesis
+ %
+ swap$ pop$
+ format.type.school
+ address connect.with.comma.check
+ }
+ %
+ % pop default published thesis, top is default unpublished thesis
+ %
+ { pop$
+ type empty$
+ school empty$
+ originalyear empty$
+ and
+ and
+ { pop$
+ ""
+ }
+ { format.type.school
+ originalyear connect.with.comma.check
+ parenthesize.check
+ }
+ if$
+ format.aetitle.check
+ swap$ connect.with.space.check
+ "title" title warning.if.empty
+ title format.atitle.connect output.new.block
+ pages format.journal.vol.num.pages.check
+ }
+ if$
+ %
+ % if not empty, insert howpublished.
+ % (used if thesis 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 optional note
+ %
+ note empty$
+ 'skip$
+ { % Clear the stack
+ duplicate$ empty$
+ 'skip$
+ { output.new.block }
+ if$
+ format.note
+ }
+ if$
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % phd theses, etc.
+ %
+FUNCTION {phdthesis}
+{ "\BPhD" "\BUPhD" thesis }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % master's theses, etc.
+ %
+FUNCTION {mastersthesis}
+{ "\BMTh" "\BUMTh" thesis }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % title of something (used in unpublished and misc)
+ % english translation of title
+ % type and number of something
+ %
+FUNCTION {format.btitle.type.num}
+{ format.betitle.check
+ format.bvol.edition connect.with.space.check
+ format.type.number
+ connect.with.space.check
+ title empty$
+ { add.period$ }
+ { title format.btitle.connect }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % title of message or software-related thing (used in misc)
+ % english translation of title
+ % type and number of something
+ %
+FUNCTION {format.mtitle.type.num}
+{ format.aetitle.check
+ format.bvol.edition connect.with.space.check
+ type.2 "\bibmessage" =
+ { number empty$
+ 'skip$
+ { type.2 number tie.or.space.connect
+ bracket.check
+ connect.with.space.check
+ }
+ if$
+ }
+ { format.type.number
+ connect.with.space.check
+ }
+ if$
+ title empty$
+ { add.period$ }
+ { title format.atitle.connect }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % title, english translation of title,
+ % type and number of something (used in misc)
+ %
+FUNCTION {output.misctitle.type.num}
+{ type.2 empty$
+ { format.btitle.type.num }
+ { 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$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % unpublished manuscripts, etc.
+ %
+FUNCTION {unpublished}
+{ check.relevant.fields
+ author empty$
+ %
+ % no author: possibly edited book with editors as authors
+ %
+ { editor empty$
+ %
+ % no author or editor: title serves as author.
+ % title formatted as book title
+ %
+ { format.btitle.type.num output.new.block
+ format.year.month.day.check add.period$
+ }
+ %
+ % format editor and year, and check if year is present
+ % format book title, volume, and edition and check if title present
+ %
+ { format.editors.as.authors start.new.block
+ format.year.month.day.check output.dot.new.block
+ format.btitle.type.num
+ }
+ if$
+ }
+ %
+ % format author and year, and check if year is present
+ % format book title, volume, and edition
+ % and check if title or type present
+ %
+ { format.authors start.new.block
+ format.year.month.day.check output.dot.new.block
+ format.btitle.type.num
+ }
+ if$
+ howpublished empty$
+ organization empty$ and
+ address empty$ and
+ 'skip$
+ { 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$
+ '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}
+{ %
+ % 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
+ %
+ { editor empty$
+ %
+ % no author or editor: title/type serves as author.
+ % title formatted as book title
+ %
+ % if no title and no type, howpublished is title
+ %
+ { title empty$
+ type.2 empty$ and
+ { howpublished empty$
+ { "No author, editor, title, type, and howpublished in "
+ cite$ * warning$
+ ""
+ }
+ { "\APAChowpublished{" howpublished * "}" * add.period$ }
+ if$
+ format.year.month.day.check add.period$
+ }
+ { output.misctitle.type.num output.new.block
+ format.year.month.day.check add.period$
+ format.howpublished add.period$
+ }
+ if$
+ }
+ %
+ % format editor and year, and check if year is present
+ % format book title, volume, and edition and check if title present
+ %
+ { format.editors.as.authors start.new.block
+ format.year.month.day.check output.dot.new.block
+ output.misctitle.type.num
+ format.howpublished add.period$
+ }
+ if$
+ }
+ %
+ % format author and year, and check if year is present
+ % format book title, volume, and edition
+ % and check if title or type present
+ %
+ { format.authors start.new.block
+ format.year.month.day.check output.dot.new.block
+ output.misctitle.type.num
+ format.howpublished add.period$
+ }
+ if$
+ %
+ 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$
+ { % Clear the stack
+ duplicate$ empty$
+ 'skip$
+ { output.new.block }
+ if$
+ format.url
+ }
+ if$
+ %
+ % format optional note
+ %
+ note empty$
+ 'skip$
+ { % Clear the stack
+ duplicate$ empty$
+ 'skip$
+ { output.new.block }
+ if$
+ format.note
+ }
+ if$
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % for legal cases and other cases that need to be
+ % done by hand
+ %
+FUNCTION {literal}
+{ "key" key warning.if.empty
+ "text" text warning.if.empty
+ text empty$
+ { "" }
+ { text }
+ if$
+ 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
+ %
+FUNCTION {booklet}
+{ misc }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % part of a book
+ %
+FUNCTION {inbook}
+{ incollection }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % article in proceedings
+ %
+FUNCTION {inproceedings}
+{ incollection }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % article in proceedings (Kopka & Daly, 2004, p. 230)
+ %
+FUNCTION {conference}
+{ inproceedings }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % proceedings
+ %
+FUNCTION {proceedings}
+{ misc }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % unknown types
+ %
+FUNCTION {default.type}
+{ misc }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {initialize}
+{ %
+ % Maximum number of names to be formatted .
+ #6 'name.max :=
+}
+
+FUNCTION {init.old.number}
+{ %
+ % For numbering the entries according to current sorting order.
+ #0 'old.number :=
+}
+
+FUNCTION {init.old.label}
+{ %
+ % For comparing labels across entries .
+ "zzzzzz" 'old.label :=
+}
+
+FUNCTION {init.cite.initials.add.to.year}
+{ %
+ % Initialize "cite initials" indicator for all entries.
+ #0 'cite.initials :=
+ %
+ % Initialize "add to year", i.e., whether a, b, etc. must
+ % be added to the year in citation, to "no".
+ #0 'add.to.year :=
+ %
+}
+
+FUNCTION {move.forward}
+{ %
+ % Indicates that we're moving forward (ITERATE) through the entry list .
+ #1 'forward :=
+}
+
+FUNCTION {move.backward}
+{ %
+ % Indicates that we're moving backward (REVERSE) through the entry list .
+ #0 'forward :=
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {write.bbl.entry}
+{ %
+ % Output \bibitem and \citeauthoryear command.
+ %
+ make.cite.labels
+ %
+ % Format and output reference list entry.
+ %
+ call.type$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+READ
+
+
+EXECUTE { identify.apacite.version }
+
+
+EXECUTE { initialize }
+
+
+ITERATE { make.sort.title }
+
+SORT
+
+EXECUTE { init.old.number }
+
+EXECUTE { init.old.label }
+
+ITERATE { make.title.number }
+
+
+ITERATE { make.tentative.sort.label }
+
+SORT
+
+
+ITERATE { init.cite.initials.add.to.year }
+
+EXECUTE { init.initials }
+
+ITERATE { check.add.initials }
+
+EXECUTE { init.initials }
+
+REVERSE { check.add.initials }
+
+ITERATE { tentative.cite.num.names }
+
+EXECUTE { init.cite.num.names }
+
+EXECUTE { move.forward }
+
+ITERATE { definitive.cite.num.names }
+
+EXECUTE { init.cite.num.names }
+
+EXECUTE { move.backward }
+
+REVERSE { definitive.cite.num.names }
+
+
+ITERATE { make.final.sort.key }
+
+SORT
+
+
+EXECUTE { begin.bib }
+
+
+ITERATE { write.bbl.entry }
+
+
+EXECUTE { end.bib }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%%
+%% End of file `apacann.bst'.
diff --git a/Master/texmf-dist/bibtex/bst/apacite/apacannx.bst b/Master/texmf-dist/bibtex/bst/apacite/apacannx.bst
new file mode 100644
index 00000000000..5b8406c10c1
--- /dev/null
+++ b/Master/texmf-dist/bibtex/bst/apacite/apacannx.bst
@@ -0,0 +1,5259 @@
+%%
+%% This is file `apacannx.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% apacite.dtx (with options: `xbibstyle,annotated')
+%%
+%% This is a generated file.
+%%
+%% Copyright (C) 1994-2009 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, apacann.bst, apacannx.bst,
+%% english.apc, dutch.apc, finnish.apc, french.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.
+%%
+%% apacannx.bst
+%% [2009/03/01 v4.05 APA annotated bibl. style with author index info]
+%% apacannx.bst : reference list according to APA manual
+%% with annotations and author indexing information
+%% Written by Erik Meijer
+
+FUNCTION {identify.apacite.version}
+{ % Put identifying string in the .blg file
+ "apacannx.bst"
+" [2009/03/01 v4.05 APA annotated bibl. style with author index info]"
+ * top$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+ENTRY
+ { address
+ annote % only used for annotated version
+ annotate % only used for annotated version
+ author
+ booktitle % for articles in books
+ chair % for lectures
+ chapter % for incollection, esp. internet documents
+ day
+ edition
+ editor
+ englishtitle % english translation of title in other language
+ firstkey % key for first citation
+ howpublished
+ institution % for technical reports
+ 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
+ organization % for unpublished
+ %
+ % for reprints, translations, etc.
+ %
+ originaladdress
+ originalbooktitle
+ originaledition
+ originaleditor
+ originaljournal
+ originalnumber
+ originalpages
+ originalpublisher
+ originalvolume
+ originalyear
+ %
+ % back to normal
+ %
+ pages
+ publisher
+ school % for theses
+ series % not used
+ symposium % for lectures
+ text % for literals
+ title
+ translator % translator of book (or article)
+ type % type of phdthesis (e.g., Doctoral dissertation)
+ % or type of article (e.g., Letter to the editor)
+ % etc.
+ url
+ volume
+ year
+ }
+ { title.number % for sorting titles
+ cite.initials % dummy (0-1) indicating whether or not
+ % initials of the 1st author must
+ % be used for citing
+ cite.num.names.full % number of names to be cited for full and
+ cite.num.names.short % short cite
+ add.to.year % For a, b, c, etc. after year
+ % in multiple citations with same author-year
+ }
+ { year.label % For sorting entries by year
+ author.year.sort.label % For sorting entries and checking whether
+ % initials should be added, how many authors
+ % 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.
+ }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+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 brace.level
+ }
+
+STRINGS { s t u old.label field
+ aut1f aut1s aut1f.old aut1s.old
+ aut2 aut2.old
+ aut3 aut3.old
+ aut4 aut4.old
+ aut5 aut5.old
+ aut6 aut6.old
+ year.label.old
+ }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {test} { #0 }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.index} { #1 }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+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 {jul} {"{\APACmonth{07}}"}
+
+MACRO {aug} {"{\APACmonth{08}}"}
+
+MACRO {sep} {"{\APACmonth{09}}"}
+
+MACRO {oct} {"{\APACmonth{10}}"}
+
+MACRO {nov} {"{\APACmonth{11}}"}
+
+MACRO {dec} {"{\APACmonth{12}}"}
+
+MACRO {winter} {"{\APACmonth{13}}"}
+
+MACRO {spring} {"{\APACmonth{14}}"}
+
+MACRO {summer} {"{\APACmonth{15}}"}
+
+MACRO {fall} {"{\APACmonth{16}}"}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ % issues warning if field is empty
+ % call with
+ % "field" field warning.if.empty
+ % Note that the first field must be between quotes
+ % because it is the fieldname for use in the warning message.
+ %
+FUNCTION {warning.if.empty}
+{ empty$
+ { "No " swap$ * " in " * cite$ * warning$ }
+ { pop$ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % issues warning if title, type, and howpublished are empty
+ %
+FUNCTION {check.relevant.fields}
+{ 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
+ % not empty and not equal to each other)
+ % 0 if (editor or translator empty) or
+ % (editor = translator)
+ %
+FUNCTION {editor.ne.trans}
+{ translator empty$
+ { #0 }
+ { editor empty$
+ { #0 }
+ { translator editor =
+ { #0 }
+ { #1 }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {conv.int.to.str}
+{ duplicate$ #10 <
+ { "0000" swap$ int.to.str$ * }
+ { duplicate$ #100 <
+ { "000" swap$ int.to.str$ * }
+ { duplicate$ #1000 <
+ { "00" swap$ int.to.str$ * }
+ { duplicate$ #10000 <
+ { "0" swap$ int.to.str$ * }
+ { int.to.str$ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {ref.type}
+{ type$ "article" =
+ type$ "magazine" =
+ type$ "newspaper" =
+ type$ "book" =
+ type$ "techreport" =
+ type$ "unpublished" =
+ type$ "misc" =
+ type$ "booklet" =
+ type$ "manual" =
+ type$ "proceedings" =
+ or
+ or
+ or
+ or
+ or
+ or
+ or
+ or
+ or
+ { #1 }
+ { type$ "incollection" =
+ type$ "phdthesis" =
+ type$ "mastersthesis" =
+ type$ "lecture" =
+ type$ "inbook" =
+ type$ "inproceedings" =
+ type$ "conference" =
+ type$ "intechreport" =
+ or
+ or
+ or
+ or
+ or
+ or
+ or
+ { #2 }
+ { type$ "literal" =
+ { #3 }
+ { #0 }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {is.atype}
+{ type$ "article" =
+ type$ "magazine" =
+ type$ "newspaper" =
+ type$ "incollection" =
+ type$ "inbook" =
+ type$ "inproceedings" =
+ type$ "conference" =
+ type$ "intechreport" =
+ type$ "manual" =
+ or
+ or
+ or
+ or
+ or
+ or
+ or
+ or
+ { #1 }
+ { journal empty$ not
+ %
+ type$ "phdthesis" =
+ type$ "mastersthesis" =
+ or
+ %
+ and
+ { #1 }
+ { type$ "misc" =
+ type empty$ not and
+ { type "\bibmessage" =
+ type "\bibcomputerprogram" =
+ type "\bibcomputerprogrammanual" =
+ type "\bibcomputerprogramandmanual" =
+ type "\bibcomputersoftware" =
+ type "\bibcomputersoftwaremanual" =
+ type "\bibcomputersoftwareandmanual" =
+ type "\bibprogramminglanguage" =
+ or
+ or
+ or
+ or
+ or
+ or
+ or
+ { #1 }
+ { #0 }
+ if$
+ }
+ { #0 }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % connects two strings with connect string
+ % if one of them empty, then connect string
+ % is left out
+ %
+ % call with S1 S2 connectstring connect.check
+ %
+FUNCTION {connect.check}
+{ 'u :=
+ %
+ % if S2 = ""
+ %
+ duplicate$ empty$
+ %
+ % then remove S2
+ %
+ { pop$
+ %
+ % S1 is on top of stack.
+ % if it is empty, it is replaced by the empty string ""
+ %
+ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+ }
+ %
+ % else swap S1 and S2 so that S1 can be checked
+ %
+ { swap$
+ %
+ % if S1 is empty, remove S1 so that S2 is left on the
+ % stack and is the result is given
+ %
+ duplicate$ empty$
+ { pop$ }
+ %
+ % now the real work starts:
+ % push the connect string "C"
+ % so that top of stack is "C" "S1" "S2"
+ % concatenate, so that top of stack is
+ % "S1+C" "S2"
+ %
+ { u *
+ %
+ % swap and concatenate
+ %
+ swap$ *
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % connects two strings with space ("\ ")
+ % if length of second is 4 or larger,
+ % connects them with non-breaking space ("tie", "~")
+ % 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$ #4 <
+ { "~" }
+ { "\ " }
+ if$
+ swap$ * *
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % connects two strings with comma (", ")
+ % if one of them is empty, the comma is left out
+ %
+ % call with S1 S2 connect.with.comma.check
+ % result: "S1, S2"
+ %
+FUNCTION {connect.with.comma.check}
+{ ", " connect.check }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % connects two strings with semicolon ("; ")
+ % if one of them is empty, semicolon is left out
+ %
+ % call with S1 S2 connect.with.semicolon.check
+ % result: "S1; S2"
+ %
+FUNCTION {connect.with.semicolon.check}
+{ "; " connect.check }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % connects two strings with colon (": ")
+ % if one of them is empty, colon is left out
+ %
+ % call with S1 S2 connect.with.colon.check
+ % result: "S1: S2"
+ %
+FUNCTION {connect.with.colon.check}
+{ ": " connect.check }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % connects two strings with space ("\ ")
+ %
+ % call with S1 S2 connect.with.space.check
+ % result: "S1\ S2"
+ %
+FUNCTION {connect.with.space.check}
+{ "\ " connect.check }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % encloses string in pre- and postfix string
+ % call with
+ % prefix postfix S enclose.check
+ % delivers empty string if S empty
+ %
+FUNCTION {enclose.check}
+{ duplicate$ empty$
+ { pop$ pop$ pop$
+ ""
+ }
+ { swap$ * * }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % emphasizes top of stack
+ % call with
+ % "string" emphasize.check
+ %
+FUNCTION {emphasize.check}
+{ "\Bem{" swap$
+ "}" swap$
+ enclose.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % brackets top of stack
+ % call with
+ % "string" bracket
+ %
+FUNCTION {bracket.check}
+{ "[" swap$
+ "]" swap$
+ enclose.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % parenthesizes top of stack
+ % call with
+ % "string" parenthesize
+ %
+FUNCTION {parenthesize.check}
+{ "(" swap$
+ ")" swap$
+ enclose.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % checks whether argument is "multiresult":
+ % whether it contains '-', '+', or ',' characters
+ % used with pages to check whether pp. or p. must be used
+ %
+FUNCTION {multi.result.check}
+{ 't :=
+ #0 'multiresult :=
+ %
+ % while (not multiresult) and (length(t) > 1) do
+ %
+ { multiresult not
+ t text.length$ #1 >
+ and
+ }
+ %
+ % if t(1-2) = "--" or t(1) = "+" or ","
+ % then multiresult = 1
+ % else t = t(2-last)
+ %
+ { t #1 #2 substring$ 's :=
+ "--" s =
+ { #1 'multiresult := }
+ { t #1 #1 substring$ 's :=
+ "+" s =
+ "," s =
+ or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ if$
+ }
+ while$
+ 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" = }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {remove.spaces}
+{ % Remove spaces from string.
+ % Works best if string only contains alphanumeric characters and spaces.
+ 's := % The original string
+ s text.length$ 'len := % Its length (no. of characters)
+ "" 't := % Initialize the transformed string
+ #0 'pos :=
+ %
+ % while (pos < len) do
+ %
+ { pos len < }
+ { pos #1 + 'pos :=
+ s pos #1 substring$ 'u :=
+ %
+ % u is the pos-th character in s
+ % If it is a space, move to next character,
+ % else copy character to output.
+ %
+ u " " =
+ 'skip$
+ { t u * 't := }
+ if$
+ }
+ while$
+ %
+ % Now push the result back on the stack
+ t
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % starting new block by writing what's left on the stack,
+ % starting a new line and adding some extra space or
+ % whatever is more defined in \newblock
+ %
+FUNCTION {output.end.block}
+{ write$
+ newline$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % starting new block by writing what's left on the stack,
+ % starting a new line and adding some extra space or
+ % whatever is more defined in \newblock
+ %
+FUNCTION {output.new.block}
+{ output.end.block
+ "\newblock" write$
+ newline$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % starting new block by writing what's left on the stack,
+ % starting a new line and adding some extra space or
+ % whatever is more defined in \newblock
+ %
+FUNCTION {output.dot.new.block}
+{ add.period$
+ output.new.block
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {start.new.block}
+{ newline$
+ "\unskip\ " write$ newline$
+ "\newblock " write$ newline$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % finish current entry
+ % by writing what's left on the stack and starting a new line
+ %
+FUNCTION {fin.entry}
+{ output.end.block
+ "\PrintBackRefs{\CurrentBib}" write$ newline$
+ test
+ { "\vspace{\baselineskip}" write$ newline$ }
+ 'skip$
+ if$
+ %
+ % According to TLC2, pp. 810-811, both annote and annotate fields are
+ % known, so support them both, but do not print them both, in case
+ % someone wants to make a file that is compatible with both the annotate
+ % and annotation styles and thus duplicates the information. Instead, we
+ % give annote priority.
+ %
+ annote empty$
+ {% Try annotate
+ annotate empty$
+ 'skip$
+ { % add annotation
+ "\begin{APACrefannotation}" write$ newline$
+ annotate write$ newline$
+ "\end{APACrefannotation}" write$ newline$
+ }
+ if$
+ }
+ { % add annotation
+ "\begin{APACrefannotation}" write$ newline$
+ annote write$ newline$
+ "\end{APACrefannotation}" write$ newline$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {sort.name.format} { "{ll{}}{ f{}}{ vv{}}{ jj{}}" }
+
+FUNCTION {cite.name.format} { "{ll}" }
+
+FUNCTION {cite.initials.name.format} { "{f{\BPBI }.~~}{vv }{ll}{ jj}" }
+
+FUNCTION {author.name.format} { "{ll}{, f{\BPBI }.}{ vv}{, jj}" }
+
+FUNCTION {editor.name.format} { "{f{\BPBI }.~~}{vv }{ll}{ jj}" }
+
+FUNCTION {index.name.format} { "{ll}{, f{\BPBI }.}{ vv}{, jj}" }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {init.initials}
+{ "yyyyy" 'aut1f.old :=
+ "yyyyy" 'aut1s.old :=
+ #0 'cite.initials.old :=
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {update.no.initials}
+{ 'field :=
+ field 'aut1f.old :=
+ field 'aut1s.old :=
+ #0 'cite.initials.old :=
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {check.add.initials.aut}
+{ %
+ % If last name is equal to previous last name
+ % but initials are different, then initials should
+ % be cited. If initials are also the same, initials
+ % should be cited if that is the case for the previous
+ % author .
+ %
+ aut1s aut1s.old =
+ { aut1f aut1f.old =
+ { cite.initials.old 'cite.initials := }
+ { #1 'cite.initials :=
+ aut1f 'aut1f.old :=
+ aut1s 'aut1s.old :=
+ cite.initials 'cite.initials.old :=
+ }
+ if$
+ }
+ { %
+ % Different last name.
+ aut1f 'aut1f.old :=
+ aut1s 'aut1s.old :=
+ cite.initials 'cite.initials.old :=
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {check.add.initials.field}
+{ 'field :=
+ field #1 cite.initials.name.format format.name$ 'aut1f :=
+ field #1 cite.name.format format.name$ 'aut1s :=
+ %
+ % Now do the actual work
+ %
+ check.add.initials.aut
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {check.add.initials}
+{ %
+ % Check whether author or editor or other field acts as author.
+ % Initials are only relevant with author or editor.
+ %
+ firstkey empty$ not
+ { key empty$ not
+ { %
+ % Both key and firstkey are nonempty.
+ % Then, key is treated as last name of first author,
+ % and firstkey is treated as last name + initials of
+ % first author .
+ %
+ firstkey sortify remove.spaces 'aut1f :=
+ key sortify remove.spaces 'aut1s :=
+ check.add.initials.aut
+ }
+ { firstkey sortify remove.spaces update.no.initials }
+ if$
+ }
+ { key empty$ not
+ { key sortify remove.spaces update.no.initials }
+ { %
+ % No key or firstkey, so find out which field
+ % to use as author.
+ %
+ % Check reference type:
+ % if result is 1 then possibly editor acts as author
+ % 2 then editor does not act as author
+ % 3 then key should have been used
+ % 0 then unknown reference type
+ ref.type #2 =
+ { %
+ % Format first author with and without initials
+ author empty$
+ { title.sort.label update.no.initials }
+ { author check.add.initials.field }
+ if$
+ }
+ { %
+ % Format first author with and without initials
+ author empty$
+ { editor empty$
+ { title.sort.label update.no.initials }
+ { editor check.add.initials.field }
+ if$
+ }
+ { author check.add.initials.field }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {tentative.cite.num.names.field}
+{ 'field :=
+ field num.names$ 'numnames :=
+ numnames #3 <
+ { %
+ % 1 or 2 names: always cite all of them.
+ numnames 'cite.num.names.full :=
+ numnames 'cite.num.names.short :=
+ }
+ { numnames #6 <
+ { %
+ % 3-5 names: cite all of them the first time,
+ % only the first name later times
+ numnames 'cite.num.names.full :=
+ #1 'cite.num.names.short :=
+ }
+ { %
+ % 6 or more names: cite only the first name
+ #1 'cite.num.names.full :=
+ #1 'cite.num.names.short :=
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {tentative.cite.num.names}
+{ %
+ % Check whether author or editor or other field acts as author.
+ % Number of names is only relevant with author or editor.
+ %
+ firstkey empty$ not
+ {
+ #1 'cite.num.names.full :=
+ #1 'cite.num.names.short :=
+ }
+ { key empty$ not
+ {
+ #1 'cite.num.names.full :=
+ #1 'cite.num.names.short :=
+ }
+ { %
+ % No key or firstkey, so find out which field
+ % to use as author.
+ %
+ % Check reference type:
+ % if result is 1 then possibly editor acts as author
+ % 2 then editor does not act as author
+ % 3 then key should have been used
+ % 0 then unknown reference type
+ ref.type #2 =
+ { %
+ % Format first author with and without initials
+ author empty$
+ {
+ #1 'cite.num.names.full :=
+ #1 'cite.num.names.short :=
+ }
+ { author tentative.cite.num.names.field }
+ if$
+ }
+ { %
+ % Format first author with and without initials
+ author empty$
+ { editor empty$
+ {
+ #1 'cite.num.names.full :=
+ #1 'cite.num.names.short :=
+ }
+ { editor tentative.cite.num.names.field }
+ if$
+ }
+ { author tentative.cite.num.names.field }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {init.cite.num.names}
+{ #0 'cite.num.names.old :=
+ #0 'numnames.old :=
+ "yyyy" 'year.label.old :=
+ #0 'add.to.year.old :=
+ "" 'aut1f.old :=
+ "" 'aut2.old :=
+ "" 'aut3.old :=
+ "" 'aut4.old :=
+ "" 'aut5.old :=
+ "" 'aut6.old :=
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {update.cite.num.names}
+{ cite.num.names.short 'cite.num.names.old :=
+ numnames 'numnames.old :=
+ year.label 'year.label.old :=
+ add.to.year 'add.to.year.old :=
+ aut1f 'aut1f.old :=
+ aut2 'aut2.old :=
+ aut3 'aut3.old :=
+ aut4 'aut4.old :=
+ aut5 'aut5.old :=
+ aut6 'aut6.old :=
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {format.6.authors}
+{ %
+ % First author: with initials.
+ %
+ field #1 cite.initials.name.format format.name$ 'aut1f :=
+ %
+ % Second and later authors: without initials.
+ %
+ numnames #1 >
+ name.max #1 >
+ and
+ { %
+ % 2nd author
+ field #2 cite.name.format format.name$ 'aut2 :=
+ %
+ numnames #2 >
+ name.max #2 >
+ and
+ { %
+ % 3nd author
+ field #3 cite.name.format format.name$ 'aut3 :=
+ %
+ numnames #3 >
+ name.max #3 >
+ and
+ { %
+ % 4th author
+ field #4 cite.name.format format.name$ 'aut4 :=
+ %
+ numnames #4 >
+ name.max #4 >
+ and
+ { %
+ % 5th author
+ field #5 cite.name.format format.name$ 'aut5 :=
+ %
+ numnames #5 >
+ name.max #5 >
+ and
+ { %
+ % 6th author
+ field #6 cite.name.format format.name$ 'aut6 :=
+ }
+ { %
+ % 5 authors: 6 is empty
+ %
+ "" 'aut6 :=
+ }
+ if$
+ }
+ { %
+ % 4 authors: 5-6 are empty
+ %
+ "" 'aut5 :=
+ "" 'aut6 :=
+ }
+ if$
+ }
+ { %
+ % 3 authors: 4-6 are empty
+ %
+ "" 'aut4 :=
+ "" 'aut5 :=
+ "" 'aut6 :=
+ }
+ if$
+ }
+ { %
+ % 2 authors: 3-6 are empty
+ %
+ "" 'aut3 :=
+ "" 'aut4 :=
+ "" 'aut5 :=
+ "" 'aut6 :=
+ }
+ if$
+ }
+ { %
+ % Only 1 author: 2-6 are empty
+ %
+ "" 'aut2 :=
+ "" 'aut3 :=
+ "" 'aut4 :=
+ "" 'aut5 :=
+ "" 'aut6 :=
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {change.add.to.year}
+{
+ forward #1 =
+ { %
+ % Moving forward: this add.to.year number must be 1 higher than
+ % previous.
+ %
+ add.to.year.old #0 >
+ { add.to.year.old #1 + 'add.to.year := }
+ { #2 'add.to.year := }
+ if$
+ }
+ { %
+ % Moving backward: this add.to.year number must be 1 lower than
+ % previous.
+ %
+ add.to.year.old #1 - 'add.to.year :=
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {definitive.cite.num.names.1.or.2}
+{ %
+ numnames numnames.old =
+ { %
+ % Same number of names: ambiguity could arise. Check whether current
+ % and previous have the same author(s).
+ %
+ aut1f aut1f.old =
+ { %
+ % Same first author: if the second author is also the same or if
+ % there is only one author, a's and b's should be added.
+ %
+ aut2 aut2.old =
+ numnames #2 =
+ and
+ %
+ numnames #1 =
+ or
+ { %
+ % Same author(s): add to year.
+ %
+ change.add.to.year
+ }
+ { %
+ % Different second author: no ambiguity possible.
+ %
+ skip$
+ }
+ if$
+ }
+ { %
+ % Different first author: no ambiguity possible.
+ %
+ skip$
+ }
+ if$
+ }
+ { %
+ % Different number of names: no ambiguity possible.
+ %
+ skip$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {definitive.cite.num.names.3.or.more}
+{ %
+ % Check whether current and previous have the same first author.
+ %
+ aut1f aut1f.old =
+ { %
+ % Same first author: check second author
+ %
+ aut2 aut2.old =
+ { %
+ % Same 1st & 2nd author: check 3rd.
+ %
+ aut3 aut3.old =
+ { %
+ % Same 1st-3rd authors: check 4th.
+ %
+ numnames.old #3 =
+ { numnames #3 =
+ { %
+ % Both current and previous have 3 authors, which are
+ % the same, so both have identical author-year
+ % combinations, so ambiguity should be resolved by
+ % a's and b's. Check whether more authors were
+ % necessary for previous one.
+ %
+ change.add.to.year
+ cite.num.names.short cite.num.names.old <
+ { cite.num.names.old
+ 'cite.num.names.short :=
+ }
+ 'skip$
+ if$
+ }
+ { %
+ % Previous has 3 authors, current has more, with same
+ % first 3, so at least 4 must be used for current to
+ % make a difference.
+ %
+ cite.num.names.short #4 <
+ { #4 'cite.num.names.short := }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ { numnames #3 =
+ { %
+ % Current has 3 authors, previous has more, with same
+ % first 3, so all 3 of current must be used.
+ %
+ numnames 'cite.num.names.short :=
+ }
+ { %
+ % Same 1st-3rd author and both current and previous
+ % have at least 4 authors: check 4th.
+ %
+ aut4 aut4.old =
+ { %
+ % Same 1st-4th authors: check 5th.
+ %
+ numnames.old #4 =
+ { numnames #4 =
+ { %
+ % Both current and previous have 4 authors,
+ % which are the same, so both have
+ % identical author-year combinations, so
+ % ambiguity should be resolved by a's and
+ % b's. Check whether more authors were
+ % necessary for previous one.
+ %
+ change.add.to.year
+ cite.num.names.short cite.num.names.old <
+ { cite.num.names.old
+ 'cite.num.names.short :=
+ }
+ 'skip$
+ if$
+ }
+ { %
+ % Previous has 4 authors, current has more,
+ % with same first 4, so at least 5 must be
+ % used for current to make a difference.
+ %
+ cite.num.names.short #5 <
+ { #5 'cite.num.names.short := }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ { numnames #4 =
+ { %
+ % Current has 4 authors, previous has more,
+ % with same first 4, so all 4 of current
+ % must be used.
+ %
+ numnames 'cite.num.names.short :=
+ }
+ { %
+ % Same 1st-4th author and both current and
+ % previous have at least 5 authors: check
+ % 5th.
+ %
+ aut5 aut5.old =
+ { %
+ % Same 1st-5th authors: check 6th.
+ %
+ numnames.old #5 =
+ { numnames #5 =
+ { %
+ % Both current and previous
+ % have 5 authors, which are the
+ % same, so both have identical
+ % author-year combinations, so
+ % ambiguity should be resolved
+ % by a's and b's. Check whether
+ % more authors were necessary
+ % for previous one.
+ %
+ change.add.to.year
+ cite.num.names.short
+ cite.num.names.old <
+ { cite.num.names.old
+ 'cite.num.names.short :=
+ }
+ 'skip$
+ if$
+ }
+ { %
+ % Previous has 5 authors,
+ % current has more, with same
+ % first 5, so at least 6 must
+ % be used for current to make
+ % a difference.
+ %
+ cite.num.names.short #6 <
+ { #6 'cite.num.names.short := }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ { numnames #5 =
+ { %
+ % Current has 5 authors,
+ % previous has more, with same
+ % first 5, so all 5 of current
+ % must be used.
+ %
+ numnames 'cite.num.names.short :=
+ }
+ { %
+ % Same 1st-5th author and both
+ % current and previous have at
+ % least 6 authors. If one has
+ % 6 authors and the other has
+ % more or the 6th is different,
+ % 6 should be used (which is
+ % the maximum).
+ %
+ numnames #6 >
+ numnames.old #6 =
+ and
+ %
+ numnames #6 =
+ numnames.old #6 >
+ and
+ %
+ or
+ %
+ aut6 aut6.old =
+ not
+ %
+ or
+ { #6 cite.num.names.short <
+ { #6
+ 'cite.num.names.short
+ :=
+ }
+ 'skip$
+ if$
+ }
+ { %
+ % The first 6 authors are
+ % the same and either both
+ % have 6 or both have more.
+ % So for all practical
+ % purposes they have
+ % identical author-year
+ % combination, so ambiguity
+ % should be resolved by a's
+ % and b's. Check whether
+ % more authors were
+ % necessary for previous
+ % one.
+ %
+ change.add.to.year
+ cite.num.names.short
+ cite.num.names.old
+ <
+ { cite.num.names.old
+ 'cite.num.names.short
+ :=
+ }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ { %
+ % Different 5th author: citing 5 authors is
+ % sufficient for this comparison.
+ %
+ cite.num.names.short #5 <
+ { #5 'cite.num.names.short := }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ { %
+ % Different 4th author: citing 4 authors is
+ % sufficient for this comparison.
+ %
+ cite.num.names.short #4 <
+ { #4 'cite.num.names.short := }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ { %
+ % Different 3rd author: citing 3 authors is sufficient for this
+ % comparison.
+ %
+ cite.num.names.short #3 <
+ { #3 'cite.num.names.short := }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ { %
+ % Different 2nd author: citing 2 authors is sufficient for this
+ % comparison.
+ %
+ cite.num.names.short #2 <
+ { #2 'cite.num.names.short := }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ { %
+ % Different first author: no ambiguity, move to next entry.
+ %
+ skip$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {definitive.cite.num.names.field}
+{ 'field :=
+ field num.names$ 'numnames :=
+ %
+ % Format authors
+ %
+ format.6.authors
+ %
+ % Now compare authors with authors of previous entry.
+ %
+ cite.num.names.short numnames.old >
+ { %
+ % The previous entry has less authors than already defined
+ % necessary to be cited. No ambiguity is possible and we're ready.
+ %
+ skip$
+ }
+ { %
+ % Both previous and current entry have at least one author .
+ %
+ year.label year.label.old =
+ { %
+ % Same year label: possibly ambiguous citation.
+ %
+ % First check: current and/or previous have 1 or
+ % 2 authors.
+ %
+ numnames #3 <
+ numnames.old #3 <
+ or
+ %
+ { definitive.cite.num.names.1.or.2 }
+ { definitive.cite.num.names.3.or.more }
+ if$
+ }
+ { %
+ % Different year label: everything's fine,
+ % move to next entry.
+ %
+ skip$
+ }
+ if$
+ }
+ if$
+ %
+ % If during the previous process the name maximum is exceeded
+ % (which was not checked), correct this. NOTE: If the name
+ % maximum is smaller than 6, this could lead to ambiguous
+ % citations if, e.g., the year and the first 5 authors are
+ % the same, but the 6th author is different.
+ %
+ cite.num.names.short name.max >
+ { name.max 'cite.num.names.short := }
+ 'skip$
+ if$
+ %
+ % For a "full" cite, the number of names should always be at least
+ % as large as for a "short" cite.
+ %
+ cite.num.names.full cite.num.names.short <
+ { cite.num.names.short 'cite.num.names.full := }
+ 'skip$
+ if$
+ %
+ % Update "old" variables for next entry.
+ %
+ update.cite.num.names
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {definitive.cite.no.names}
+{ %
+ % The formatted field that acts as author is on top
+ % of the stack.
+ 'aut1f :=
+ "" 'aut2 :=
+ "" 'aut3 :=
+ "" 'aut4 :=
+ "" 'aut5 :=
+ "" 'aut6 :=
+ #1 'numnames :=
+ %
+ year.label year.label.old =
+ { %
+ % Same year label: possibly ambiguous citation.
+ %
+ definitive.cite.num.names.1.or.2
+ }
+ { %
+ % Different year label: everything's fine,
+ % move to next entry.
+ %
+ skip$
+ }
+ if$
+ %
+ % Update "old" variables for next entry.
+ %
+ update.cite.num.names
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {definitive.cite.num.names}
+{ %
+ % Check whether author or editor or other field acts as author.
+ % Number of names is only relevant with author or editor.
+ %
+ firstkey empty$ not
+ { firstkey sortify remove.spaces definitive.cite.no.names }
+ { key empty$ not
+ { key sortify remove.spaces definitive.cite.no.names }
+ { %
+ % No key or firstkey, so find out which field
+ % to use as author.
+ %
+ % Check reference type:
+ % if result is 1 then possibly editor acts as author
+ % 2 then editor does not act as author
+ % 3 then key should have been used
+ % 0 then unknown reference type
+ ref.type #2 =
+ { %
+ % Format first author with and without initials
+ author empty$
+ { title.sort.label definitive.cite.no.names }
+ { author definitive.cite.num.names.field }
+ if$
+ }
+ { %
+ % Format first author with and without initials
+ author empty$
+ { editor empty$
+ { title.sort.label definitive.cite.no.names }
+ { editor definitive.cite.num.names.field }
+ if$
+ }
+ { author definitive.cite.num.names.field }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.tentative.year.sort.label}
+{ %
+ % Implicit or explicit ``no date'' is put at the front
+ % (the year zero; years B.C. will imply complications)
+ % because these are possibly old works.
+ % ``In press'' is put at the end.
+ %
+ year empty$
+ { "0000" 'year.label := }
+ { year "\bibnodate" =
+ year "n.d." =
+ or
+ { "0000" 'year.label := }
+ { year "\BIP" =
+ { "9999" 'year.label := }
+ { % It is not checked whether the year field
+ % makes sense.
+ year sortify remove.spaces 'year.label :=
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ %
+ % Push year sort label on the stack
+ year.label
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {month.number.day}
+{ month empty$
+ { "" }
+ { month sortify remove.spaces
+ %
+ % Add the day when available.
+ day empty$
+ 'skip$
+ { "/" *
+ day sortify remove.spaces *
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.name.sort.label}
+{ %
+ % Author or editor-acting-as-author available.
+ % => Make tentative "short cite with initials" author
+ % label (L1) of one of the forms
+ % "Last1 F1"
+ % "Last1 F1 Last2"
+ % "Last1 F1 zzzz" ("zzzz" representing et al.)
+ % => If more than 2 'authors': make label (L2) for 2nd-6th authors
+ % of one of the forms
+ % "Last2 Last3"
+ % "Last2 Last3 Last4"
+ % "Last2 Last3 Last4 Last5"
+ % "Last2 Last3 Last4 Last5 Last6"
+ % "Last2 Last3 Last4 Last5 Last6 zzzz"
+ %
+ % Then format year label (L3) of one of the forms:
+ % "0000" (missing year or explicit 'no date')
+ % "9999" ('in press')
+ % year (otherwise; don't use originalyear here yet)
+ %
+ % From earlier sorting of titles, we have title number. Convert
+ % to string, which gives title label (L4) .
+ %
+ % Then tentative sorting label (author.year.sort.label) is a
+ % concatenation of
+ % L1
+ % " "
+ % L3
+ % " "
+ % L2
+ % " "
+ % L4
+ %
+ % The name field is on top of the stack.
+ 'field :=
+ %
+ % numnames is the total number of names contained in field
+ field num.names$ 'numnames :=
+ %
+ % Format first author
+ field #1 sort.name.format format.name$
+ %
+ % Format the second author if there are two, or else "zzzz" = et al.
+ numnames #1 =
+ 'skip$
+ { numnames #2 =
+ { %
+ % Two authors: format second author
+ field #2 "{ll{}}" format.name$ 's :=
+ s "others" =
+ { " zzzz" * } % Add "et al."-substitute
+ { " " * s * } % Add second author
+ if$
+ }
+ { " zzzz" * } % 3 or more authors: add "et al."-substitute
+ if$
+ }
+ if$
+ " " * % Add spaces
+ make.tentative.year.sort.label * % Add year (L3).
+ " " * % Add spaces
+ %
+ % Now build up L2 if applicable
+ numnames #3 <
+ 'skip$
+ { %
+ % Treat last author slightly differently
+ numnames name.max >
+ { name.max 'lastname :=
+ " zzzz" % Push "et al."-substitute on stack
+ }
+ { numnames 'lastname :=
+ "" % Push empty string on stack
+ }
+ if$
+ %
+ % Names 2 to "last" - 1
+ "" % Push empty string on stack
+ #2 'nameptr :=
+ { nameptr lastname < }
+ { % Add name no. nameptr
+ field nameptr "{ll{}}" format.name$ *
+ " " *
+ nameptr #1 + 'nameptr :=
+ }
+ while$
+ %
+ % "Last" author
+ field lastname "{ll{}}" format.name$ 's :=
+ s "others" =
+ { "zzzz" * } % Add "et al."-substitute
+ { s * } % Add last author
+ if$
+ %
+ swap$ * % Add the previously formatted empty string or
+ % "et al."-substitute if there are many authors.
+ * % Add L2 to the earlier labels.
+ }
+ if$
+ %
+ " " * % Add spaces
+ title.number conv.int.to.str * % Add sorted title number (L4).
+ sortify % Clean up and convert to lowercase
+ " " * % Add spaces
+ month.number.day * % Add month and day when available
+ 'author.year.sort.label := % Assign result to sort label.
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.field.year.sort.label}
+{ %
+ % 'field' acts as first author (L1), subsequent authors
+ % are empty (L2).
+ %
+ % Then format year label (L3) of one of the forms:
+ % "0000" (missing year or explicit 'no date')
+ % "9999" ('in press')
+ % year (otherwise; don't use originalyear here yet)
+ %
+ % From earlier sorting of titles, we have title number. Convert
+ % to string, which gives title label (L4) .
+ %
+ % Then tentative sorting label (author.year.sort.label) is a
+ % concatenation of
+ % L1
+ % " "
+ % L3
+ % " "
+ % L2
+ % " "
+ % L4
+ %
+ % 'field' is on top of the stack. It is already supposed to be cleaned
+ % (i.e., sortified and space-removed), so this is already L1.
+ " " * % Add spaces to L1
+ make.tentative.year.sort.label * % Add year (L3).
+ " " * % Add spaces
+ " " * % L2 is empty, add spaces
+ title.number conv.int.to.str * % Add sorted title number (L4).
+ sortify % Clean up and convert to lowercase
+ " " * % Add spaces
+ month.number.day * % Add month and day when available
+ 'author.year.sort.label := % Assign result to sort label.
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.author.editor.sort.label}
+{ author empty$
+ { editor empty$
+ { %
+ % Use what has previously been stored in title.sort.label
+ % as author substitute .
+ title.sort.label make.field.year.sort.label
+ }
+ { editor make.name.sort.label }
+ if$
+ }
+ { author make.name.sort.label }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.author.sort.label}
+{ author empty$
+ { %
+ % Use what has previously been stored in title.sort.label
+ % as author substitute .
+ title.sort.label make.field.year.sort.label
+ }
+ { author make.name.sort.label }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.tentative.sort.label}
+{ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ % General strategy:
+ %
+ % Ordinary situation: author or editor-acting-as-author
+ % available.
+ % => Make tentative "short cite with initials" author
+ % label (L1) of one of the forms
+ % "Last1 F1"
+ % "Last1 F1 Last2"
+ % "Last1 F1 zzzz" ("zzzz" representing et al.)
+ % => If more than 2 'authors': make label (L2) for 2nd-6th authors
+ % of one of the forms
+ % "Last2 Last3"
+ % "Last2 Last3 Last4"
+ % "Last2 Last3 Last4 Last5"
+ % "Last2 Last3 Last4 Last5 Last6"
+ % "Last2 Last3 Last4 Last5 Last6 zzzz"
+ % When key is available (overrules author and editor fields):
+ % => L1 = key, L2 = ""
+ % No author, editor, and key: define title or substitute as key
+ % and format as key.
+ %
+ % Then format year label (L3) of one of the forms:
+ % "0000" (missing year or explicit 'no date')
+ % "9999" ('in press')
+ % year (otherwise; don't use originalyear here yet)
+ %
+ % From earlier sorting of titles, we have title number. Convert
+ % to string, which gives title label (L4) .
+ %
+ % Then tentative sorting label (author.year.sort.label) is a
+ % concatenation of
+ % L1
+ % " "
+ % L3
+ % " "
+ % L2
+ % " "
+ % L4
+ %
+ % This can then be sorted, from which it can be derived
+ % whether initials are necessary, how many names must
+ % be used for short and full citations, and whether "a"'s and
+ % "b"'s etc. are necessary behind the year labels.
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % key and firstkey overrule author information
+ %
+ firstkey empty$ not
+ { key empty$ not
+ { %
+ % Both key and firstkey available:
+ % for sorting and checking initials, treat key as last
+ % name and firstkey as initials.
+ %
+ key sortify remove.spaces
+ " " *
+ firstkey sortify remove.spaces *
+ make.field.year.sort.label
+ }
+ { firstkey sortify remove.spaces make.field.year.sort.label }
+ if$
+ }
+ { key empty$ not
+ { key sortify remove.spaces make.field.year.sort.label }
+ { %
+ % No key or firstkey, so find out which field
+ % to use as author.
+ %
+ % Check reference type:
+ % if result is 1 then possibly editor acts as author
+ % 2 then editor does not act as author
+ % 3 then key should have been used
+ % 0 then unknown reference type
+ ref.type
+ duplicate$ #1 =
+ { pop$
+ make.author.editor.sort.label
+ }
+ { duplicate$ #2 =
+ { pop$
+ make.author.sort.label
+ }
+ { #3 =
+ { "no key in " cite$ * warning$
+ make.author.editor.sort.label
+ }
+ { make.author.editor.sort.label }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ %
+ author.year.sort.label 'sort.key$ :=
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.definitive.name.sort.label}
+{ %
+ % Author or editor-acting-as-author available.
+ % => Make author-with-initials label (L1) of one of the forms
+ % "Last1 F1 Last2 F2 ... LastN FN"
+ % "Last1 F1 Last2 F2 ... Last6 F6 zzzz"
+ % (where N <= 6 is the total number of authors, and
+ % "zzzz" represents et al. if there are more than 6 authors)
+ % No author, editor, and key: define title or substitute as sort key.
+ %
+ % The name field is on top of the stack.
+ 'field :=
+ %
+ % numnames is the total number of names contained in field
+ field num.names$ 'numnames :=
+ %
+ % If there are more than 6 authors, only 6 are mentioned.
+ numnames name.max >
+ { name.max 'format.num.names := }
+ { numnames 'format.num.names := }
+ if$
+ % Initialize stack with empty string
+ ""
+ %
+ % Cycle over authors.
+ #1 'nameptr :=
+ { nameptr format.num.names < }
+ { % Format author and add spaces
+ field nameptr sort.name.format format.name$ *
+ " " *
+ nameptr #1 + 'nameptr :=
+ }
+ while$
+ % Format last author that must be formatted
+ field nameptr sort.name.format format.name$ *
+ % Add et al. if necessary
+ nameptr numnames <
+ { " zzzz" * }
+ 'skip$
+ if$
+ sortify % Clean up and change case
+ " " * % Add spaces
+ year.label * % Add year
+ " " * % Add spaces
+ title.number conv.int.to.str * % Add sorted title number
+ " " * % Add spaces
+ month.number.day * % Add month and day when available
+ 'author.year.sort.label := % Assign result to sort label.
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.definitive.field.year.sort.label}
+{ %
+ % 'field' acts as author (L1).
+ %
+ % Then format year label (L2) of one of the forms:
+ % "0000" (missing year or explicit `no date')
+ % "9999" (`in press')
+ % year (otherwise; don't use originalyear here yet)
+ %
+ % From earlier sorting of titles, we have title number. Convert
+ % to string, which gives title label (L3) .
+ %
+ % Then tentative sorting label (author.year.sort.label) is a
+ % concatenation of
+ % L1
+ % " "
+ % L2
+ % " "
+ % L3
+ %
+ % 'field' is on top of the stack. It is already supposed to be cleaned
+ % (i.e., sortified and space-removed), so this is already L1.
+ " " * % Add spaces
+ year.label * % Add year
+ " " * % Add spaces
+ title.number conv.int.to.str * % Add sorted title number
+ " " * % Add spaces
+ month.number.day * % Add month and day when available
+ 'author.year.sort.label := % Assign result to sort label.
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.definitive.author.editor.sort.label}
+{ author empty$
+ { editor empty$
+ { %
+ % Use what has previously been stored in title.sort.label
+ % as author substitute .
+ title.sort.label make.definitive.field.year.sort.label
+ }
+ { editor make.definitive.name.sort.label }
+ if$
+ }
+ { author make.definitive.name.sort.label }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.definitive.author.sort.label}
+{ author empty$
+ { %
+ % Use what has previously been stored in title.sort.label
+ % as author substitute .
+ title.sort.label make.definitive.field.year.sort.label
+ }
+ { author make.definitive.name.sort.label }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.final.sort.key}
+{ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ % General strategy:
+ %
+ % Ordinary situation: author or editor-acting-as-author
+ % available.
+ % => Make author-with-initials label (L1) of one of the forms
+ % "Last1 F1 Last2 F2 ... LastN FN"
+ % "Last1 F1 Last2 F2 ... Last6 F6 zzzz"
+ % (where N <= 6 is the total number of authors, and
+ % "zzzz" represents et al. if there are more than 6 authors)
+ % No author, editor, and key: define title or substitute as sort key.
+ %
+ % Then format year label (L2) of one of the forms:
+ % "0000" (missing year or explicit `no date')
+ % "9999" (`in press')
+ % year (otherwise; don't use originalyear here yet)
+ % Add "/"month"/"day to the latter when available.
+ %
+ % From earlier sorting of titles, we have title number. Convert
+ % to string, which gives title label (L3) .
+ %
+ % Then final sorting label (author.year.sort.label) is a
+ % concatenation of
+ % L1
+ % " "
+ % L2
+ % " "
+ % L3
+ %
+ % This can then be sorted.
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ %
+ % Find out which field
+ % to use as author.
+ %
+ % Check reference type:
+ % if result is 1 then possibly editor acts as author
+ % 2 then editor does not act as author
+ % 3 then key should have been used
+ % 0 then unknown reference type
+ ref.type #2 =
+ { make.definitive.author.sort.label }
+ { make.definitive.author.editor.sort.label }
+ if$
+ %
+ author.year.sort.label 'sort.key$ :=
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ { s }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {chop.articles}
+{ 's :=
+ "a " #2
+ "an " #3
+ "the " #4
+ s
+ chop.word
+ chop.word
+ chop.word
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {format.sort.title}
+{ %
+ % Remove non-alphanumeric characters and change to lower case .
+ sortify
+ %
+ % Remove "a ", "an ", and "the " from the front .
+ chop.articles #1 entry.max$ substring$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.sort.title}
+{ title empty$
+ { text empty$
+ { type empty$
+ { howpublished empty$
+ { note empty$
+ { url empty$
+ { " " }
+ { url format.sort.title }
+ if$
+ }
+ { note format.sort.title }
+ if$
+ }
+ { howpublished format.sort.title }
+ if$
+ }
+ { type format.sort.title }
+ if$
+ }
+ { text format.sort.title }
+ if$
+ }
+ { title format.sort.title }
+ if$
+ remove.spaces
+ 'title.sort.label :=
+ title.sort.label 'sort.key$ :=
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.title.number}
+{ title.sort.label old.label =
+ { %
+ % A tie: old and new label are the same .
+ old.number 'title.number :=
+ }
+ { %
+ % The usual situation: titles are different.
+ old.number #1 + 'title.number :=
+ title.number 'old.number :=
+ title.sort.label 'old.label :=
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+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
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {comma.between.two} { "\BCBT{}" }
+
+FUNCTION {comma.between.names} { ", " }
+
+FUNCTION {comma.before.last} { "\BCBL{}" }
+
+FUNCTION {and.before.last} { "\ \BBA{} " }
+
+FUNCTION {et.al.string.cite} { "\ \protect\BOthers{.}" }
+
+FUNCTION {et.al.string} { "\ \BOthers{.}" }
+
+FUNCTION {et.al.string.period} { "\ \BOthersPeriod{.}" }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {add.name.index}
+{ %
+ %
+ make.index
+ { "%" * write$ newline$
+ % Check for corporate author
+ field is.bibcorporate
+ { "\corporateAX{" }
+ { "\AX{" }
+ if$
+ write$
+ field nameptr sort.name.format format.name$ sortify write$ newline$
+ "@" write$
+ field nameptr format.index.name
+ "}%" * write$ newline$
+ }
+ { "%" * write$ newline$ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.name.cite.label}
+{ 'field :=
+ 'format.num.names :=
+ %
+ field num.names$ 'numnames := % numnames is the total number of names
+ % contained in field
+ %
+ % It is implicit in the APA manual that if "et al." would refer
+ % to exactly one author, then this author should be named
+ % instead of "et al."
+ %
+ format.num.names numnames #1 - =
+ { numnames 'format.num.names := }
+ 'skip$
+ if$
+ %
+ % Format first author: with or without initials
+ %
+ #1 'nameptr :=
+ cite.initials #1 =
+ { field nameptr format.cite.initials.name }
+ { field nameptr cite.name.format format.name$ }
+ if$
+ add.name.index % Add index entry when desired.
+ %
+ numnames #1 =
+ 'skip$
+ { format.num.names #1 =
+ { %
+ % First author et al.
+ %
+ et.al.string.cite write$
+ }
+ { numnames #2 =
+ { %
+ % Given that format.num.names > 1, it is 2.
+ % Format second author.
+ %
+ #2 'nameptr :=
+ field nameptr cite.name.format format.name$ 's :=
+ %
+ % Check if 2nd author is explicit "others".
+ % If so, insert "et al." string.
+ %
+ s "others" =
+ { et.al.string.cite write$ } % First et al.
+ { %
+ % First \& Second
+ %
+ and.before.last write$
+ s
+ add.name.index % Add index entry when desired.
+ }
+ if$
+ }
+ { %
+ % 3 or more names, 2 or more must be cited
+ %
+ % for nameptr := 2 to format.num.names - 1 do
+ %
+ #2 'nameptr :=
+ { nameptr format.num.names < }
+ { %
+ % Put comma between consecutive authors
+ %
+ comma.between.names write$
+ %
+ % Format and add next author
+ %
+ field nameptr cite.name.format format.name$
+ add.name.index % Add index entry when desired.
+ %
+ % Move to next author
+ %
+ nameptr #1 + 'nameptr :=
+ }
+ while$
+ %
+ % nameptr = format.num.names
+ % Format this author.
+ %
+ field nameptr cite.name.format format.name$ 's :=
+ %
+ format.num.names numnames =
+ { %
+ % This is also the last author. Add (optional) comma.
+ %
+ comma.before.last write$
+ %
+ % Check if this author is explicit "others".
+ % If so, insert "et al." string.
+ %
+ s "others" =
+ { et.al.string.cite write$ }
+ { and.before.last write$
+ s
+ add.name.index % Add index entry when desired.
+ }
+ if$
+ }
+ { %
+ % This is not the last author.
+ % Add comma, author name, and "et al."
+ %
+ comma.between.names write$
+ s
+ add.name.index % Add index entry when desired.
+ %
+ comma.before.last et.al.string.cite * write$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.title.cite.label}
+{ %
+ % Formatting: check if formatted as article title or
+ % as book title, and insert this formatting.
+ %
+ is.atype
+ { "\APACciteatitle{" }
+ { "\APACcitebtitle{" }
+ if$
+ %
+ title empty$
+ { text empty$
+ { type empty$
+ { howpublished empty$
+ { note empty$
+ { url empty$
+ { cite$ }
+ { url }
+ if$
+ }
+ { note }
+ if$
+ }
+ { howpublished }
+ if$
+ }
+ { type }
+ if$
+ }
+ { text }
+ if$
+ }
+ { title }
+ if$
+ %
+ % Connect with formatting.
+ %
+ * "}" *
+ %
+ % Write to output
+ %
+ write$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.author.editor.cite.label}
+{ author empty$
+ { editor empty$
+ { %
+ % No author or editor:
+ % Use title or other description as citation label.
+ %
+ make.title.cite.label
+ "}{%" write$ newline$
+ make.title.cite.label
+ }
+ { cite.num.names.full editor make.name.cite.label
+ "}{%" write$ newline$
+ cite.num.names.short editor make.name.cite.label
+ }
+ if$
+ }
+ { cite.num.names.full author make.name.cite.label
+ "}{%" write$ newline$
+ cite.num.names.short author make.name.cite.label
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.author.cite.label}
+{ author empty$
+ { %
+ % No author:
+ % Use title or other description as citation label.
+ %
+ make.title.cite.label
+ "}{%" write$ newline$
+ make.title.cite.label
+ }
+ { cite.num.names.full author make.name.cite.label
+ "}{%" write$ newline$
+ cite.num.names.short author make.name.cite.label
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.definitive.year.supplement}
+{ %
+ % Add "a", "b", etc. when necessary.
+ %
+ add.to.year #0 =
+ { "" }
+ { "{\protect"
+ year empty$
+ { "\BCntND" * }
+ { year "\bibnodate" =
+ { "\BCntND" * }
+ { year "\BIP" =
+ { "\BCntIP" * }
+ { "\BCnt" * }
+ if$
+ }
+ if$
+ }
+ if$
+ "{" * add.to.year int.to.str$ * "}}" *
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {protect.year}
+{ year empty$
+ { "{\protect\bibnodate{}}" }
+ { year "\bibnodate" =
+ { "{\protect\bibnodate{}}" }
+ { year "\BIP" =
+ { "{\protect\BIP{}}" }
+ { year }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.definitive.year.label}
+{ "{\protect\APACyear{"
+ originalyear empty$
+ { protect.year }
+ { originalyear "\bibnodate" = % date of original publication unknown
+ { translator empty$
+ { protect.year }
+ { year empty$
+ { "{\protect\BTRANSL{}~\protect\bibnodate{}}" } % trans. n.d.
+ { "{\protect\BTRANSL{}}~" protect.year * } % trans. 1931
+ if$
+ }
+ if$
+ }
+ { year empty$
+ { originalyear "/{\protect\bibnodate{}}" * } % 1923/n.d.
+ { originalyear year =
+ { protect.year }
+ { originalyear "/" * protect.year * } % 1923/1961
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ * "}}%" * write$ newline$
+ %
+ % Add "a", "b", etc. when necessary.
+ %
+ "{\protect\APACexlab{" "}}"
+ make.definitive.year.supplement enclose.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {make.cite.labels}
+{ newline$
+ %
+ % Write a few lines for testing purposes.
+ %
+ test
+ { "\bibitem[]{} \fullciteA{" cite$ * "}" * write$ newline$
+ "\bibitem[]{} \citeA{" cite$ * "}" * write$ newline$
+ }
+ 'skip$
+ if$
+ %
+ "\bibitem[\protect\citeauthoryear{%" write$ newline$
+ %
+ % When key or firstkey is available, this takes precedence.
+ %
+ firstkey empty$ not
+ { %
+ % Full cite: firstkey.
+ %
+ firstkey write$
+ "}{%" write$ newline$
+ %
+ % Short cite: if key is not empty and cite.initials is 0,
+ % then key, else firstkey.
+ %
+ cite.initials #0 =
+ key empty$ not
+ and
+ { key }
+ { firstkey }
+ if$
+ write$
+ }
+ { key empty$ not
+ { %
+ % No firstkey, but key available:
+ % Both full and short labels are key.
+ %
+ key write$
+ "}{%" write$ newline$
+ key write$
+ }
+ { % No key or firstkey, so find out which field
+ % to use as author.
+ %
+ % Check reference type:
+ % if result is 1 then possibly editor acts as author
+ % 2 then editor does not act as author
+ % 3 then key should have been used
+ % 0 then unknown reference type
+ ref.type #2 =
+ { make.author.cite.label }
+ { make.author.editor.cite.label }
+ if$
+ }
+ if$
+ }
+ if$
+ "}{%" write$ newline$
+ %
+ % Make year label that's used for citations
+ %
+ make.definitive.year.label write$
+ "}]{%" write$ newline$
+ cite$ write$
+ "}%" write$ newline$
+ % author.year.sort.label write$ newline$ % for testing purposes
+ % year.label write$ newline$ % for testing purposes
+ %
+ % If the item is used in a meta-analysis, indicate this with
+ % a star.
+ %
+ "\APACinsertmetastar{%" write$ newline$
+ cite$ write$
+ "}%" write$ newline$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {editor.postfix}
+{ editor num.names$ #1 >
+ { "(\BEDS)" }
+ { "(\BED)" }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {editor.trans.postfix}
+{ editor num.names$ #1 >
+ { "(\BEDS{} \BAnd{} \BTRANSS)" }
+ { "(\BED{} \BAnd{} \BTRANS)" }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % "(Trans.)" postfix
+ % translator must not be empty
+ %
+FUNCTION {trans.postfix}
+{ translator num.names$ #1 >
+ { "(\BTRANSS)" }
+ { "(\BTRANS)" }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {format.author.names}
+{ 'field :=
+ 'dot :=
+ %
+ field num.names$ 'numnames := % numnames is the total number of names
+ % contained in field
+ numnames 'format.num.names := % Format all authors
+ format.num.names name.max > % Unless this exceeds the maximum of 6.
+ { dot
+ { name.max 'format.num.names := } % Format 6 authors
+ { cite.num.names.full 'format.num.names := } % Format 1 editor
+ if$
+ }
+ 'skip$
+ if$
+ %
+ % It is kind of explicit in the APA manual that if "et al." would
+ % refer to exactly one author (the 7th), then this author should
+ % still be replaced by "et al.", unlike with citations.
+ % So format.num.names is not adapted.
+ %
+ % Format first author
+ %
+ #1 'nameptr :=
+ field nameptr format.author.name
+ %
+ % Add period if required and if this is the only author.
+ %
+ numnames #1 =
+ dot
+ and
+ { add.period$ }
+ 'skip$
+ if$
+ add.name.index % Add index entry when desired.
+ %
+ numnames #1 =
+ 'skip$
+ { format.num.names #1 =
+ { %
+ % First author et al.
+ %
+ comma.between.two
+ %
+ % Add period if required.
+ %
+ dot
+ { et.al.string.period * }
+ { et.al.string * }
+ if$
+ write$
+ }
+ { numnames #2 =
+ { %
+ % Given that format.num.names > 1, it is 2.
+ %
+ comma.between.two write$
+ %
+ % Format second author.
+ %
+ #2 'nameptr :=
+ field nameptr format.author.name 's :=
+ %
+ % Check if 2nd author is explicit "others".
+ % If so, insert "et al." string.
+ %
+ s "others" =
+ { %
+ % First et al.
+ % Add period if required.
+ %
+ dot
+ { et.al.string.period }
+ { et.al.string }
+ if$
+ write$
+ }
+ { %
+ % First \& Second
+ %
+ and.before.last write$
+ %
+ % Add period if required.
+ %
+ dot
+ { s add.period$ }
+ { s }
+ if$
+ add.name.index % Add index entry when desired.
+ }
+ if$
+ }
+ { %
+ % 3 or more names, 2 or more must be cited
+ %
+ % for nameptr := 2 to format.num.names - 1 do
+ %
+ #2 'nameptr :=
+ { nameptr format.num.names < }
+ { %
+ % Put comma between consecutive authors
+ %
+ comma.between.names write$
+ %
+ % Format and add next author
+ %
+ field nameptr format.author.name
+ add.name.index % Add index entry when desired.
+ %
+ % Move to next author
+ %
+ nameptr #1 + 'nameptr :=
+ }
+ while$
+ %
+ % nameptr = format.num.names
+ % Format this author.
+ %
+ field nameptr format.author.name 's :=
+ %
+ format.num.names numnames =
+ { %
+ % This is also the last author. Add (optional) comma.
+ %
+ comma.before.last write$
+ %
+ % Check if this author is explicit "others".
+ % If so, insert "et al." string.
+ %
+ s "others" =
+ { %
+ % Add period if required.
+ %
+ dot
+ { et.al.string.period }
+ { et.al.string }
+ if$
+ write$
+ }
+ { and.before.last write$
+ %
+ % Add period if required.
+ %
+ dot
+ { s add.period$ }
+ { s }
+ if$
+ add.name.index % Add index entry when desired.
+ }
+ if$
+ }
+ { %
+ % This is not the last author.
+ % Add comma, author name, and "et al."
+ %
+ comma.between.names write$
+ s
+ add.name.index % Add index entry when desired.
+ %
+ comma.before.last
+ %
+ % Add period if required.
+ %
+ dot
+ { et.al.string.period * }
+ { et.al.string * }
+ if$
+ write$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {format.authors}
+{ #1 author format.author.names
+ "%" write$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {format.editors.as.authors}
+{ #0 editor format.author.names
+ "\ " editor.postfix * add.period$ write$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {format.ed.trans.as.authors}
+{ #0 editor format.author.names
+ "\ " editor.trans.postfix * add.period$ write$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {format.editor.names}
+{ 'field :=
+ %
+ field num.names$ 'numnames := % numnames is the total number of names
+ % contained in field
+ numnames 'format.num.names := % Format all authors
+ format.num.names name.max > % Unless this exceeds the maximum of 6.
+ { #1 'format.num.names := } % Then it becomes 1 (First et al.)
+ 'skip$
+ if$
+ %
+ % Format first editor
+ %
+ field #1 format.editor.name
+ %
+ numnames #1 =
+ 'skip$
+ { format.num.names #1 =
+ { et.al.string * } % First editor et al., no comma.
+ { numnames #2 =
+ { %
+ % Given that format.num.names > 1, it is 2.
+ % No comma. Format second editor.
+ %
+ field #2 format.editor.name 's :=
+ %
+ % Check if 2nd editor is explicit "others".
+ % If so, insert "et al." string.
+ %
+ s "others" =
+ { et.al.string * } % First et al.
+ { and.before.last * s * } % First \& Second
+ if$
+ }
+ { %
+ % 3 or more names, 2 or more must be cited
+ %
+ % for nameptr := 2 to format.num.names - 1 do
+ %
+ #2 'nameptr :=
+ { nameptr format.num.names < }
+ { %
+ % Put comma between consecutive editors
+ %
+ comma.between.names *
+ %
+ % Format and add next editor
+ %
+ field nameptr format.editor.name *
+ %
+ % Move to next editor
+ %
+ nameptr #1 + 'nameptr :=
+ }
+ while$
+ %
+ % nameptr = format.num.names
+ % Format this editor.
+ %
+ field nameptr format.editor.name 's :=
+ %
+ format.num.names numnames =
+ { %
+ % This is also the last editor. Add (optional) comma.
+ %
+ comma.before.last *
+ %
+ % Check if this editor is explicit "others".
+ % If so, insert "et al." string.
+ %
+ s "others" =
+ { et.al.string * }
+ { and.before.last * s * }
+ if$
+ }
+ { %
+ % This is not the last editor.
+ % Add comma, editor name, and "et al."
+ %
+ comma.between.names * s *
+ comma.before.last * et.al.string *
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format editors in case editors do not act as authors
+ % (such as reference to chapter in edited book)
+ %
+ % L. W. Poon (Ed.) (1 editor)
+ % or
+ % A. S. Gurman \& D. P. Kniskern (Eds.) (2 editors)
+ % or
+ % L. Poon, A. Jones, \& D. P. Smith (Eds.) (>2 editors)
+ %
+ % editor must not be empty
+ %
+FUNCTION {format.editors.in.line}
+{ editor format.editor.names
+ editor.postfix connect.with.space.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format editors in case editors are also translators
+ % and do not act as authors
+ % (such as reference to chapter in edited book
+ % of translated articles)
+ %
+ % L. W. Poon (Ed. and Trans.) (1 editor)
+ % or
+ % A. S. Gurman \& D. P. Kniskern (Eds. and Trans.) (2 editors)
+ % or
+ % L. Poon, A. Jones, \& D. P. Smith (Eds. and Trans.) (>2 editors)
+ %
+ % editor must not be empty
+ %
+FUNCTION {format.editors.trans.in.line}
+{ editor format.editor.names
+ editor.trans.postfix connect.with.space.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format translators in case translators act as editors
+ % (such as reference to chapter in translated book)
+ %
+ % L. W. Poon (Trans.) (1 translator)
+ % or
+ % A. S. Gurman \& D. P. Kniskern (Trans.) (2 translators)
+ % or
+ % L. Poon, A. Jones, \& D. P. Smith (Trans.) (>2 translators)
+ %
+ % translator must not be empty
+ %
+FUNCTION {format.translators.in.line}
+{ translator format.editor.names
+ trans.postfix connect.with.space.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format translators in case translator does not act as editor
+ % (such as reference to translated book)
+ %
+ % L. Solotaroff, Trans.
+ %
+FUNCTION {format.translators.in.paren.check}
+{ translator empty$
+ { "" }
+ { translator format.editor.names
+ translator num.names$ #1 >
+ { ", \BTRANSS{}" * }
+ { ", \BTRANS{}" * }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format editors and translators in case neither act as editor
+ % (such as reference to edited or translated book with a
+ % a single author)
+ %
+ % L. Solotaroff, Ed.
+ % L. Solotaroff, Ed. \& Trans.
+ % L. Solotaroff, Trans.
+ % L. Solotaroff, Ed. \& S. Prokofieff, Trans.
+ %
+FUNCTION {format.editors.translators.in.paren.check}
+{ editor empty$
+ { translator empty$
+ { "" }
+ { translator format.editor.names
+ translator num.names$ #1 >
+ { ", \BTRANSS{}" * }
+ { ", \BTRANS{}" * }
+ if$
+ }
+ if$
+ }
+ { editor format.editor.names
+ editor num.names$ #1 >
+ { ", \BEDS{}" * }
+ { ", \BED{}" * }
+ if$
+ translator empty$
+ 'skip$
+ { editor translator =
+ { editor num.names$ #1 >
+ { " \BAnd{} \BTRANSS" * }
+ { " \BAnd{} \BTRANS" * }
+ if$
+ }
+ { " \BAnd{} " *
+ translator format.editor.names *
+ translator num.names$ #1 >
+ { ", \BTRANSS{}" * }
+ { ", \BTRANS{}" * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % translator of article
+ %
+FUNCTION {format.atrans.check}
+{ format.translators.in.paren.check parenthesize.check }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format "In editor (Ed.), "
+ %
+FUNCTION {format.in.editors}
+{ "\BIn{} "
+ editor empty$
+ 'skip$
+ { format.editors.in.line * ", " * }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format "In translator (Trans.),"
+ %
+FUNCTION {format.in.trans}
+{ "\BIn{} "
+ translator empty$
+ 'skip$
+ { format.translators.in.line * ", " * }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format "In editor (Ed. and Trans.)"
+ % or "In editor (Ed.)" if editor not equal to translator
+ %
+FUNCTION {format.in.editors.trans}
+{ "\BIn{} "
+ editor empty$
+ { translator empty$
+ 'skip$
+ { format.translators.in.line * ", " * }
+ if$
+ }
+ { translator empty$
+ { format.editors.in.line * }
+ { editor translator =
+ { format.editors.trans.in.line * }
+ { format.editors.in.line * }
+ if$
+ }
+ if$
+ ", " *
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {format.year.check}
+{ "\APACrefYear{"
+ year empty$
+ { "\bibnodate{}" * }
+ { year * }
+ if$
+ %
+ % Add "a", "b", etc. when necessary.
+ %
+ make.definitive.year.supplement *
+ "}" *
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {format.year.month.day.check}
+{ "\APACrefYearMonthDay{"
+ year empty$
+ { "\bibnodate{}" * }
+ { year * }
+ if$
+ %
+ % Add "a", "b", etc. when necessary.
+ %
+ make.definitive.year.supplement *
+ "}{" *
+ %
+ % Add month and day when present.
+ %
+ month empty$
+ 'skip$
+ { month * }
+ if$
+ "}{" *
+ day empty$
+ 'skip$
+ { day * }
+ if$
+ "}" *
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % title of article in journal or book
+ % no finishing period
+ % field must be on top of stack
+ % (so englishtitle can be handled also)
+ %
+FUNCTION {format.atitle.no.dot}
+{ "\BBOQ{}" swap$
+ "\BBCQ{}" swap$
+ duplicate$ empty$
+ 'skip$
+ { 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
+ % with finishing period
+ % field must be on top of stack
+ % (so englishtitle can be handled also)
+ %
+FUNCTION {format.atitle.dot}
+{ "\BBOQ{}" swap$
+ "\BBCQ{}" swap$
+ duplicate$ empty$
+ 'skip$
+ { 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
+ % field must be on top of stack
+ % second element on stack must be connected:
+ % if that is empty, then atitle.dot
+ % else atitle.no.dot, connect, and add period
+ %
+FUNCTION {format.atitle.connect}
+{ swap$
+ duplicate$ empty$
+ { pop$
+ format.atitle.dot
+ }
+ { swap$
+ format.atitle.no.dot
+ swap$ connect.with.space.check
+ add.period$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % title of book or so, without period
+ % call with
+ % field format.btitle.no.dot
+ %
+FUNCTION {format.btitle.no.dot}
+{ duplicate$ empty$
+ 'skip$
+ { 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
+ % call with
+ % field format.btitle.dot
+ %
+FUNCTION {format.btitle.dot}
+{ duplicate$ empty$
+ 'skip$
+ { add.period$ format.btitle.no.dot }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % title of book and similar
+ % field must be on top of stack
+ % second element on stack must be connected:
+ % if that is empty, then btitle.dot
+ % else btitle.no.dot, connect, and add period
+ %
+FUNCTION {format.btitle.connect}
+{ swap$
+ duplicate$ empty$
+ { pop$
+ format.btitle.dot
+ }
+ { swap$
+ format.btitle.no.dot
+ swap$ connect.with.space.check
+ add.period$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % title of book and similar
+ % field must be on top of stack
+ % second element on stack must be connected
+ %
+FUNCTION {format.btitle.connect.no.dot}
+{ swap$
+ duplicate$ empty$
+ { pop$
+ format.btitle.no.dot
+ }
+ { swap$
+ format.btitle.no.dot
+ swap$ connect.with.space.check
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format englishtitle (of nonenglish article, etc.)
+ %
+FUNCTION {format.aetitle.check}
+{ englishtitle empty$
+ { "" }
+ { % 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$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format type (of article, etc.)
+ %
+FUNCTION {format.atype.check}
+{ type bracket.check }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format title and englishtitle (of article, etc.)
+ %
+FUNCTION {format.atitle.check}
+{ format.aetitle.check
+ title format.atitle.connect
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format title, englishtitle, and type
+ % (of article, etc.)
+ %
+FUNCTION {format.atitle.type.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.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.aetitle.check
+ format.atype.check connect.with.space.check
+ format.atrans.check connect.with.space.check
+ title format.atitle.connect
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format journal, volume, number and pages
+ % call with
+ % formatted.pages format.journal.vol.num.pages.check
+ %
+FUNCTION { format.journal.vol.num.pages.check }
+{ "journal" journal warning.if.empty
+ 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"
+ %
+ % call with
+ % field format.bvolume.check
+ %
+FUNCTION {format.bvolume.check}
+{ duplicate$ empty$
+ 'skip$
+ { duplicate$ multi.result.check
+ { "\BVOLS" swap$ tie.or.space.connect }
+ { "\BVOL" swap$ tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % edition of book, must not be empty
+ % call with
+ % field format.edition.check
+ %
+FUNCTION {format.edition.check}
+{ duplicate$ empty$
+ 'skip$
+ { "\PrintOrdinal{" swap$ * "}" *
+ "\BEd" connect.with.space.check
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % volume and edition of book
+ %
+FUNCTION {format.bvol.edition.check}
+{ edition format.edition.check
+ volume format.bvolume.check
+ connect.with.comma.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % volume and edition of book
+ %
+FUNCTION {format.bvol.edition}
+{ format.bvol.edition.check
+ parenthesize.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % volume and edition and translator of translated book
+ %
+FUNCTION {format.bvol.edition.trans}
+{ format.bvol.edition.check
+ format.translators.in.paren.check connect.with.semicolon.check
+ parenthesize.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % volume, edition, editor, and translator of (translated) book
+ %
+FUNCTION {format.bvol.edition.editor.trans}
+{ format.bvol.edition.check
+ format.editors.translators.in.paren.check connect.with.semicolon.check
+ parenthesize.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % formats pages by first checking if 1 or more pages
+ % and prefixing pages with "p." or "pp." (these strings
+ % are given in the commands \BPG and \BPGS, respectively),
+ % whichever is applicable, and do a tie or space connect
+ %
+ % call with
+ % field format.bpages.check
+ %
+FUNCTION {format.bpages.check}
+{ duplicate$ empty$
+ 'skip$
+ { duplicate$ multi.result.check
+ { "\BPGS" swap$ tie.or.space.connect }
+ { "\BPG~" swap$ * }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % formats chapters by first checking if 1 or more chapters
+ % and prefixing pages with "chap." (this string
+ % is given in the commands \BCHAP and \BCHAPS, respectively),
+ % whichever is applicable, and do a tie or space connect
+ %
+ % call with
+ % field format.bchapter.check
+ %
+FUNCTION {format.bchapter.check}
+{ duplicate$ empty$
+ 'skip$
+ { duplicate$ multi.result.check
+ { "\BCHAPS" swap$ tie.or.space.connect }
+ { "\BCHAP" swap$ tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % volume, edition, and pages or chapter of article in book etc.
+ %
+FUNCTION {format.bvol.edition.pages}
+{ format.bvol.edition.check
+ pages empty$
+ { chapter format.bchapter.check connect.with.comma.check }
+ { pages format.bpages.check connect.with.comma.check }
+ if$
+ parenthesize.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % title, volume, edition of book
+ %
+FUNCTION {format.btitle.vol.edition}
+{ 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.betitle.check
+ format.bvol.edition.trans connect.with.space.check
+ title format.btitle.connect.no.dot
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % title, volume, edition, editor, and translator of book
+ %
+FUNCTION {format.btitle.vol.edition.editor.trans}
+{ 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.
+ %
+ % New York: Wiley
+ % or
+ % Wiley (if address empty)
+ % or
+ % New York (if publisher empty)
+ %
+FUNCTION {format.address.publisher}
+{ %
+ % 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 "}" *
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format address and publisher of book etc.
+ %
+ % New York: Wiley
+ % or
+ % Wiley (if address empty)
+ % or
+ % New York (if publisher empty)
+ %
+ % warning if no publisher or no address
+ %
+FUNCTION {format.address.publisher.check}
+{ "publisher" publisher warning.if.empty
+ "address" address warning.if.empty
+ publisher empty$
+ address empty$
+ and
+ 'skip$
+ { % Clear the stack
+ duplicate$ empty$
+ 'skip$
+ { output.new.block }
+ if$
+ format.address.publisher
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format number as in reports: No. 2017
+ % call with
+ % field format.rnumber.check
+ %
+FUNCTION {format.rnumber.check}
+{ duplicate$ empty$
+ 'skip$
+ { duplicate$ multi.result.check
+ { "\BNUMS" swap$ tie.or.space.connect }
+ { "\BNUM" swap$ tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format type and number of a standalone item
+ % call with
+ % format.type.number
+ %
+FUNCTION { format.type.number }
+{ 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
+ % call with
+ % format.howpublished
+ %
+FUNCTION {format.howpublished}
+{ howpublished empty$
+ 'skip$
+ { % clear the stack
+ duplicate$ empty$
+ 'pop$
+ { output.dot.new.block }
+ if$
+ "\APAChowpublished{" howpublished * "}" *
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format howpublished if not empty,
+ % for misc
+ % call with
+ % output.howpublished
+ %
+FUNCTION {output.howpublished}
+{ howpublished empty$
+ 'skip$
+ { "\APAChowpublished{" howpublished * "}" *
+ output.dot.new.block
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % begin and end of url environment
+ %
+FUNCTION {begin.end.url.env}
+{ " \begin{APACrefURL} "
+ % For "Retrieved <date>, from"
+ lastchecked empty$
+ 'skip$
+ { "[{" * lastchecked * "}]" * }
+ if$
+ " \end{APACrefURL} "
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % begin and end of message environment
+ %
+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 }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format original year of publication and note
+ % (reprint or translation)
+ %
+FUNCTION {format.orig.year.note}
+{ originalyear empty$
+ { 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}
+{ "\APACorigjournalnote{"
+ originalyear "" connect.check "}{" *
+ originaljournal "" connect.check "}{" *
+ originalvolume "" connect.check "}{" *
+ originalnumber "" connect.check "}{" *
+ originalpages "" connect.check "}{" *
+ note "" connect.check "}" *
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % format original book of publication and note
+ % (reprint or translation)
+ %
+FUNCTION {format.orig.book.note}
+{ "\APACorigbooknote{" originalyear "" connect.check "}{" *
+ %
+ originaleditor empty$
+ 'skip$
+ { originaleditor num.names$ #1 >
+ { "\APACorigEDS{" * originaleditor format.editor.names * "}" * }
+ { "\APACorigED{" * originaleditor format.editor.names * "}" * }
+ if$
+ }
+ if$
+ %
+ "}{" *
+ 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
+ % and format optional note
+ %
+FUNCTION {format.orig.note}
+{ originaljournal empty$
+ { originalbooktitle empty$
+ { note empty$
+ { originalyear empty$
+ 'skip$
+ { originalyear "\bibnodate" =
+ 'skip$
+ { output.new.block
+ format.orig.year.note
+ }
+ if$
+ }
+ if$
+ }
+ { output.new.block
+ format.orig.year.note
+ }
+ if$
+ }
+ { output.new.block
+ format.orig.book.note
+ }
+ if$
+ }
+ { output.new.block
+ format.orig.journal.note
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % article in periodical: journal, magazine, newspaper, ...
+ %
+ % call with
+ % formatted.pages formatted.date periodical
+ %
+FUNCTION {periodical}
+{ %
+ % author or editor, year, title, englishtitle, type
+ %
+ author empty$
+ %
+ % no author: possibly special issue with editors as authors
+ % (APA manual, ex. 11, p. 121)
+ %
+ { editor empty$
+ %
+ % no author or editor: title serves as author.
+ % title formatted as article title (APA manual not consistent in this,
+ % compare statement on p. 119: ``treat as book title'' and
+ % example 8, p. 121: no underlining => article title)
+ %
+ { format.atitle.type.trans.check output.new.block
+ %
+ % now formatted date on top of stack
+ %
+ output.dot.new.block
+ }
+ %
+ % format editor and year, and check if year is present
+ % format article title and check if title or type present
+ %
+ { format.editors.as.authors start.new.block
+ %
+ % now formatted date on top of stack
+ %
+ output.dot.new.block
+ format.atitle.type.trans.check output.new.block
+ }
+ if$
+ }
+ %
+ % format author and year, and check if year is present
+ % format article title and check if title or type present
+ %
+ { format.authors start.new.block
+ %
+ % now formatted date on top of stack
+ %
+ output.dot.new.block
+ format.atitle.type.trans.check output.new.block
+ }
+ if$
+ %
+ % format journal name, volume and issue number, and pages
+ % and check if journal not empty
+ %
+ format.journal.vol.num.pages.check
+ %
+ % 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$
+ %
+ % possible reprint and optional note
+ %
+ format.orig.note
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % journal article
+ %
+FUNCTION {article}
+{ pages format.year.month.day.check periodical }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % magazine article
+ %
+FUNCTION {magazine}
+{ pages format.year.month.day.check periodical }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % newspaper article
+ %
+FUNCTION {newspaper}
+{ pages format.bpages.check format.year.month.day.check periodical }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % (translation of) entire book
+ %
+FUNCTION {book}
+{ %
+ % author or editor,
+ % year, title, englishtitle, translator
+ %
+ author empty$
+ %
+ % no author: possibly edited book with editors as authors
+ %
+ { editor empty$
+ %
+ % no author or editor: title serves as author.
+ % title formatted as book title
+ %
+ { format.btitle.vol.edition.trans
+ format.type.number connect.with.space.check
+ output.dot.new.block
+ format.year.check add.period$
+ }
+ %
+ % format editor and year, and check if year is present
+ % format booktitle, volume, and edition and check if title present
+ %
+ { translator empty$
+ { format.editors.as.authors start.new.block
+ format.year.check output.dot.new.block
+ format.btitle.vol.edition
+ }
+ %
+ % format translator correctly
+ %
+ { translator editor =
+ not
+ { format.editors.as.authors start.new.block
+ format.year.check output.dot.new.block
+ format.btitle.vol.edition.trans
+ }
+ { format.ed.trans.as.authors start.new.block
+ format.year.check output.dot.new.block
+ format.btitle.vol.edition
+ }
+ if$
+ }
+ if$
+ format.type.number connect.with.space.check
+ add.period$
+ }
+ if$
+ }
+ %
+ % format author and year, and check if year is present
+ % format booktitle, volume, and edition and check if title present
+ %
+ { format.authors start.new.block
+ format.year.check output.dot.new.block
+ format.btitle.vol.edition.editor.trans
+ format.type.number connect.with.space.check
+ add.period$
+ }
+ if$
+ %
+ % format address and publisher, check if address and publisher present
+ %
+ 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
+ %
+ format.orig.note
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % (translated) article or chapter in edited book
+ %
+FUNCTION {incollection}
+{ author empty$
+ %
+ % no author: title serves as author.
+ % title formatted as article title (APA manual not consistent in this,
+ % compare statement on p. 119: ``treat as book title'' and
+ % example 8, p. 121: no underlining => article title)
+ %
+ { editor.ne.trans
+ { format.atitle.type.trans.check }
+ { format.atitle.type.check }
+ if$
+ output.new.block
+ %
+ % format month and day as well when available
+ % esp. for ``collections'' that are not books,
+ % such as parts of internet documents
+ %
+ format.year.month.day.check add.period$
+ }
+ %
+ % format author and year, and check if year is present
+ % format article title and check if title or type present
+ %
+ { format.authors start.new.block
+ format.year.month.day.check output.dot.new.block
+ editor.ne.trans
+ { format.atitle.type.trans.check }
+ { format.atitle.type.check }
+ if$
+ }
+ 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 * 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 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
+ %
+ format.orig.note
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % technical report number
+ %
+FUNCTION {format.tr.number}
+{ type empty$
+ { "\BTR{}" }
+ { type "\bibnotype" =
+ { "" }
+ { type }
+ if$
+ }
+ if$
+ number format.rnumber.check connect.with.space.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % title, volume, edition, report number
+ %
+FUNCTION {format.tr.title.number}
+{ 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.
+ %
+ % Washington, DC: National Institute of Education
+ % or
+ % National Institute of Education (if address empty)
+ %
+ % warning if no institution
+ %
+FUNCTION {format.address.institution.check}
+{ "institution" institution warning.if.empty
+ "address" address warning.if.empty
+ 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
+ %
+FUNCTION {techreport}
+{ author empty$
+ %
+ % no author: possibly edited report with editors as authors
+ %
+ { editor empty$
+ %
+ % no author or editor: title serves as author.
+ % title formatted as book title
+ %
+ { format.tr.title.number output.dot.new.block
+ format.year.month.day.check add.period$
+ }
+ %
+ % format editor and year, and check if year is present
+ % format report title and check if title present
+ % format volume, edition, type, and number
+ %
+ { format.editors.as.authors start.new.block
+ format.year.month.day.check output.dot.new.block
+ format.tr.title.number add.period$
+ }
+ if$
+ }
+ %
+ % format author and year, and check if year is present
+ % format report title and check if title present
+ % format volume, edition, type, and number
+ %
+ { format.authors start.new.block
+ format.year.month.day.check output.dot.new.block
+ format.tr.title.number add.period$
+ }
+ if$
+ %
+ % format address and institution, check if institution present
+ %
+ format.address.institution.check
+ %
+ % if not empty, insert howpublished.
+ % (used if report 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 optional note
+ %
+ note empty$
+ 'skip$
+ { % Clear the stack
+ duplicate$ empty$
+ 'skip$
+ { output.new.block }
+ if$
+ format.note
+ }
+ if$
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % (translated) article or chapter in report
+ %
+FUNCTION {intechreport}
+{ author empty$
+ %
+ % no author: title serves as author.
+ % title formatted as article title (APA manual not consistent in this,
+ % compare statement on p. 119: ``treat as book title'' and
+ % example 8, p. 121: no underlining => article title)
+ %
+ { editor.ne.trans
+ { format.atitle.trans.check }
+ { format.atitle.check }
+ if$
+ output.new.block
+ format.year.month.day.check output.dot.new.block
+ }
+ %
+ % format author and year, and check if year is present
+ % format article title and check if title or type present
+ %
+ { format.authors start.new.block
+ format.year.month.day.check output.dot.new.block
+ editor.ne.trans
+ { format.atitle.trans.check }
+ { format.atitle.check }
+ if$
+ output.new.block
+ }
+ if$
+ %
+ % format "In " editor " (Ed. \& Trans.), "
+ % booktitle, volume, edition, pages
+ %
+ format.in.editors.trans
+ %
+ % volume, edition, report type and number, pages
+ %
+ "\APACbVolEdTRpgs{" format.bvol.edition.check * "}{" *
+ format.tr.number *
+ "}{" * pages format.bpages.check *
+ "}" *
+ %
+ booktitle format.btitle.connect *
+ add.period$
+ %
+ % format address and publisher, check if publisher present
+ %
+ format.address.institution.check
+ %
+ % if not empty, insert howpublished.
+ % (used if report 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
+ %
+ format.orig.note
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % papers presented at conferences etc.
+ %
+FUNCTION {lecture}
+{ author empty$
+ { "author" author warning.if.empty }
+ { format.authors start.new.block }
+ if$
+ %
+ % format year, month, and day, and check if year present
+ % format title and check if title present
+ % format howpublished and check if howpublished present
+ %
+ format.year.month.day.check output.dot.new.block
+ symposium empty$
+ { format.betitle.check
+ title format.btitle.connect output.new.block
+ howpublished empty$
+ { "symposium and howpublished missing in " cite$ * warning$
+ ""
+ }
+ { "\APAChowpublished{" howpublished * "}" * }
+ if$
+ address connect.with.comma.check
+ }
+ { format.atitle.type.check output.new.block
+ "\BIn{} "
+ chair empty$
+ 'skip$
+ { chair format.editor.names
+ chair num.names$ #1 >
+ { "(\BCHAIRS)" }
+ { "(\BCHAIR)" }
+ if$
+ connect.with.space.check * ", " *
+ }
+ 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$
+ 'skip$
+ { % Clear the stack
+ duplicate$ empty$
+ 'skip$
+ { output.new.block }
+ if$
+ format.note
+ }
+ if$
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % default thesis type is on top of stack
+ % now, if type field is empty, this default is used
+ % else default is removed and replaced by value of
+ % type field
+ %
+FUNCTION {format.type.school}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+ school connect.with.comma.check
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % phd theses, etc.
+ % call with
+ % "default.published.thesis" "default.unpublished.thesis" thesis
+ %
+FUNCTION {thesis}
+{ author empty$
+ { "author" author warning.if.empty }
+ { format.authors start.new.block }
+ if$
+ %
+ % format year and check if year present
+ %
+ format.year.check output.dot.new.block
+ %
+ % format title and check if title present
+ % journal empty => unpublished PhD thesis
+ % journal not empty => published (e.g., Dissertation Abstracts Int.)
+ %
+ journal empty$
+ { format.btitle.vol.edition output.dot.new.block
+ %
+ % pop default unpublished thesis, top is default published thesis
+ %
+ swap$ pop$
+ format.type.school
+ address connect.with.comma.check
+ }
+ %
+ % pop default published thesis, top is default unpublished thesis
+ %
+ { pop$
+ type empty$
+ school empty$
+ originalyear empty$
+ and
+ and
+ { pop$
+ ""
+ }
+ { format.type.school
+ originalyear connect.with.comma.check
+ parenthesize.check
+ }
+ if$
+ format.aetitle.check
+ swap$ connect.with.space.check
+ "title" title warning.if.empty
+ title format.atitle.connect output.new.block
+ pages format.journal.vol.num.pages.check
+ }
+ if$
+ %
+ % if not empty, insert howpublished.
+ % (used if thesis 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 optional note
+ %
+ note empty$
+ 'skip$
+ { % Clear the stack
+ duplicate$ empty$
+ 'skip$
+ { output.new.block }
+ if$
+ format.note
+ }
+ if$
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % phd theses, etc.
+ %
+FUNCTION {phdthesis}
+{ "\BPhD" "\BUPhD" thesis }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % master's theses, etc.
+ %
+FUNCTION {mastersthesis}
+{ "\BMTh" "\BUMTh" thesis }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % title of something (used in unpublished and misc)
+ % english translation of title
+ % type and number of something
+ %
+FUNCTION {format.btitle.type.num}
+{ format.betitle.check
+ format.bvol.edition connect.with.space.check
+ format.type.number
+ connect.with.space.check
+ title empty$
+ { add.period$ }
+ { title format.btitle.connect }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % title of message or software-related thing (used in misc)
+ % english translation of title
+ % type and number of something
+ %
+FUNCTION {format.mtitle.type.num}
+{ format.aetitle.check
+ format.bvol.edition connect.with.space.check
+ type.2 "\bibmessage" =
+ { number empty$
+ 'skip$
+ { type.2 number tie.or.space.connect
+ bracket.check
+ connect.with.space.check
+ }
+ if$
+ }
+ { format.type.number
+ connect.with.space.check
+ }
+ if$
+ title empty$
+ { add.period$ }
+ { title format.atitle.connect }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % title, english translation of title,
+ % type and number of something (used in misc)
+ %
+FUNCTION {output.misctitle.type.num}
+{ type.2 empty$
+ { format.btitle.type.num }
+ { 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$
+ }
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % unpublished manuscripts, etc.
+ %
+FUNCTION {unpublished}
+{ check.relevant.fields
+ author empty$
+ %
+ % no author: possibly edited book with editors as authors
+ %
+ { editor empty$
+ %
+ % no author or editor: title serves as author.
+ % title formatted as book title
+ %
+ { format.btitle.type.num output.new.block
+ format.year.month.day.check add.period$
+ }
+ %
+ % format editor and year, and check if year is present
+ % format book title, volume, and edition and check if title present
+ %
+ { format.editors.as.authors start.new.block
+ format.year.month.day.check output.dot.new.block
+ format.btitle.type.num
+ }
+ if$
+ }
+ %
+ % format author and year, and check if year is present
+ % format book title, volume, and edition
+ % and check if title or type present
+ %
+ { format.authors start.new.block
+ format.year.month.day.check output.dot.new.block
+ format.btitle.type.num
+ }
+ if$
+ howpublished empty$
+ organization empty$ and
+ address empty$ and
+ 'skip$
+ { 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$
+ '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}
+{ %
+ % 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
+ %
+ { editor empty$
+ %
+ % no author or editor: title/type serves as author.
+ % title formatted as book title
+ %
+ % if no title and no type, howpublished is title
+ %
+ { title empty$
+ type.2 empty$ and
+ { howpublished empty$
+ { "No author, editor, title, type, and howpublished in "
+ cite$ * warning$
+ ""
+ }
+ { "\APAChowpublished{" howpublished * "}" * add.period$ }
+ if$
+ format.year.month.day.check add.period$
+ }
+ { output.misctitle.type.num output.new.block
+ format.year.month.day.check add.period$
+ format.howpublished add.period$
+ }
+ if$
+ }
+ %
+ % format editor and year, and check if year is present
+ % format book title, volume, and edition and check if title present
+ %
+ { format.editors.as.authors start.new.block
+ format.year.month.day.check output.dot.new.block
+ output.misctitle.type.num
+ format.howpublished add.period$
+ }
+ if$
+ }
+ %
+ % format author and year, and check if year is present
+ % format book title, volume, and edition
+ % and check if title or type present
+ %
+ { format.authors start.new.block
+ format.year.month.day.check output.dot.new.block
+ output.misctitle.type.num
+ format.howpublished add.period$
+ }
+ if$
+ %
+ 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$
+ { % Clear the stack
+ duplicate$ empty$
+ 'skip$
+ { output.new.block }
+ if$
+ format.url
+ }
+ if$
+ %
+ % format optional note
+ %
+ note empty$
+ 'skip$
+ { % Clear the stack
+ duplicate$ empty$
+ 'skip$
+ { output.new.block }
+ if$
+ format.note
+ }
+ if$
+ fin.entry
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % for legal cases and other cases that need to be
+ % done by hand
+ %
+FUNCTION {literal}
+{ "key" key warning.if.empty
+ "text" text warning.if.empty
+ text empty$
+ { "" }
+ { text }
+ if$
+ 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
+ %
+FUNCTION {booklet}
+{ misc }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % part of a book
+ %
+FUNCTION {inbook}
+{ incollection }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % article in proceedings
+ %
+FUNCTION {inproceedings}
+{ incollection }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % article in proceedings (Kopka & Daly, 2004, p. 230)
+ %
+FUNCTION {conference}
+{ inproceedings }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % proceedings
+ %
+FUNCTION {proceedings}
+{ misc }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % unknown types
+ %
+FUNCTION {default.type}
+{ misc }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {initialize}
+{ %
+ % Maximum number of names to be formatted .
+ #6 'name.max :=
+}
+
+FUNCTION {init.old.number}
+{ %
+ % For numbering the entries according to current sorting order.
+ #0 'old.number :=
+}
+
+FUNCTION {init.old.label}
+{ %
+ % For comparing labels across entries .
+ "zzzzzz" 'old.label :=
+}
+
+FUNCTION {init.cite.initials.add.to.year}
+{ %
+ % Initialize "cite initials" indicator for all entries.
+ #0 'cite.initials :=
+ %
+ % Initialize "add to year", i.e., whether a, b, etc. must
+ % be added to the year in citation, to "no".
+ #0 'add.to.year :=
+ %
+}
+
+FUNCTION {move.forward}
+{ %
+ % Indicates that we're moving forward (ITERATE) through the entry list .
+ #1 'forward :=
+}
+
+FUNCTION {move.backward}
+{ %
+ % Indicates that we're moving backward (REVERSE) through the entry list .
+ #0 'forward :=
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{}" write$ newline$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FUNCTION {write.bbl.entry}
+{ %
+ % Output \bibitem and \citeauthoryear command.
+ %
+ make.cite.labels
+ %
+ % Format and output reference list entry.
+ %
+ call.type$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+READ
+
+
+EXECUTE { identify.apacite.version }
+
+
+EXECUTE { initialize }
+
+
+ITERATE { make.sort.title }
+
+SORT
+
+EXECUTE { init.old.number }
+
+EXECUTE { init.old.label }
+
+ITERATE { make.title.number }
+
+
+ITERATE { make.tentative.sort.label }
+
+SORT
+
+
+ITERATE { init.cite.initials.add.to.year }
+
+EXECUTE { init.initials }
+
+ITERATE { check.add.initials }
+
+EXECUTE { init.initials }
+
+REVERSE { check.add.initials }
+
+ITERATE { tentative.cite.num.names }
+
+EXECUTE { init.cite.num.names }
+
+EXECUTE { move.forward }
+
+ITERATE { definitive.cite.num.names }
+
+EXECUTE { init.cite.num.names }
+
+EXECUTE { move.backward }
+
+REVERSE { definitive.cite.num.names }
+
+
+ITERATE { make.final.sort.key }
+
+SORT
+
+
+EXECUTE { begin.bib }
+
+
+ITERATE { write.bbl.entry }
+
+
+EXECUTE { end.bib }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%%
+%% End of file `apacannx.bst'.
diff --git a/Master/texmf-dist/bibtex/bst/apacite/apacite.bst b/Master/texmf-dist/bibtex/bst/apacite/apacite.bst
index 8b416318614..0341a68c24e 100644
--- a/Master/texmf-dist/bibtex/bst/apacite/apacite.bst
+++ b/Master/texmf-dist/bibtex/bst/apacite/apacite.bst
@@ -8,7 +8,7 @@
%%
%% This is a generated file.
%%
-%% Copyright (C) 1994-2007 Erik Meijer and any individual authors listed
+%% Copyright (C) 1994-2009 Erik Meijer and any individual authors listed
%% elsewhere in this file.
%%
%% This file is part of the `apacite' package.
@@ -27,9 +27,9 @@
%% 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.
+%% apacite.drv, apacdoc.sty, apacann.bst, apacannx.bst,
+%% english.apc, dutch.apc, finnish.apc, french.apc, german.apc,
+%% ngerman.apc, greek.apc, norsk.apc, spanish.apc, swedish.apc.
%%
%% This work has the LPPL maintenance status `maintained'
%%
@@ -41,16 +41,14 @@
%% the generated files.
%%
%% apacite.bst
-%% [2007/09/03 v4.00 APA bibliography style]
-
-
+%% [2009/03/01 v4.05 APA bibliography style]
%% apacite.bst : reference list according to APA manual
%% 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]"
+ " [2009/03/01 v4.05 APA bibliography style]"
* top$
}
@@ -59,7 +57,8 @@ FUNCTION {identify.apacite.version}
ENTRY
{ address
- annote % not used
+ annote % only used for annotated version
+ annotate % only used for annotated version
author
booktitle % for articles in books
chair % for lectures
@@ -1339,6 +1338,15 @@ FUNCTION {definitive.cite.num.names.3.or.more}
}
if$
}
+ { %
+ % Different 5th author: citing 5 authors is
+ % sufficient for this comparison.
+ %
+ cite.num.names.short #5 <
+ { #5 'cite.num.names.short := }
+ 'skip$
+ if$
+ }
if$
}
if$
@@ -3596,7 +3604,7 @@ FUNCTION {format.bvolume.check}
FUNCTION {format.edition.check}
{ duplicate$ empty$
'skip$
- { "\PrintCardinal{" swap$ * "}" *
+ { "\PrintOrdinal{" swap$ * "}" *
"\BEd" connect.with.space.check
}
if$
diff --git a/Master/texmf-dist/bibtex/bst/apacite/apacitex.bst b/Master/texmf-dist/bibtex/bst/apacite/apacitex.bst
index 0bfa3a538ee..47fcc7e4ce3 100644
--- a/Master/texmf-dist/bibtex/bst/apacite/apacitex.bst
+++ b/Master/texmf-dist/bibtex/bst/apacite/apacitex.bst
@@ -8,7 +8,7 @@
%%
%% This is a generated file.
%%
-%% Copyright (C) 1994-2007 Erik Meijer and any individual authors listed
+%% Copyright (C) 1994-2009 Erik Meijer and any individual authors listed
%% elsewhere in this file.
%%
%% This file is part of the `apacite' package.
@@ -27,9 +27,9 @@
%% 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.
+%% apacite.drv, apacdoc.sty, apacann.bst, apacannx.bst,
+%% english.apc, dutch.apc, finnish.apc, french.apc, german.apc,
+%% ngerman.apc, greek.apc, norsk.apc, spanish.apc, swedish.apc.
%%
%% This work has the LPPL maintenance status `maintained'
%%
@@ -41,9 +41,7 @@
%% the generated files.
%%
%% apacitex.bst
-%% [2007/09/03 v4.00 APA bibl. style with author index info]
-
-
+%% [2009/03/01 v4.05 APA bibl. style with author index info]
%% apacitex.bst : reference list according to APA manual
%% with author indexing information
%% Written by Erik Meijer
@@ -51,7 +49,7 @@
FUNCTION {identify.apacite.version}
{ % Put identifying string in the .blg file
"apacitex.bst"
- " [2007/09/03 v4.00 APA bibl. style with author index info]"
+ " [2009/03/01 v4.05 APA bibl. style with author index info]"
* top$
}
@@ -60,7 +58,8 @@ FUNCTION {identify.apacite.version}
ENTRY
{ address
- annote % not used
+ annote % only used for annotated version
+ annotate % only used for annotated version
author
booktitle % for articles in books
chair % for lectures
@@ -1340,6 +1339,15 @@ FUNCTION {definitive.cite.num.names.3.or.more}
}
if$
}
+ { %
+ % Different 5th author: citing 5 authors is
+ % sufficient for this comparison.
+ %
+ cite.num.names.short #5 <
+ { #5 'cite.num.names.short := }
+ 'skip$
+ if$
+ }
if$
}
if$
@@ -3597,7 +3605,7 @@ FUNCTION {format.bvolume.check}
FUNCTION {format.edition.check}
{ duplicate$ empty$
'skip$
- { "\PrintCardinal{" swap$ * "}" *
+ { "\PrintOrdinal{" swap$ * "}" *
"\BEd" connect.with.space.check
}
if$