Debian Codegraph @

texmf-dist/source/bibtex/apacite/apacite.dtx

raw
1 % \iffalse meta-comment
2 %
3 % Copyright (C) 1994-2013 Erik Meijer and any individual authors listed
4 % elsewhere in this file.
5 %
6 % This file is part of the `apacite' package.
7 % -------------------------------------------
8 %
9 % It may be distributed and/or modified under the
10 % conditions of the LaTeX Project Public License, either
11 % version 1.3 of this license or (at your option) any later
12 % version. The latest version of this license is in:
13 %
14 % http://www.latex-project.org/lppl.txt
15 %
16 % and version 1.3 or later is part of all distributions of
17 % LaTeX version 2005/12/01 or later.
18 %
19 % The `apacite' package consists of the files apacite.dtx and
20 % apacite.ins, and the following generated files:
21 % apacite.sty, apacdoc.sty, apacite.drv,
22 % apacite.bst, apacitex.bst, apacann.bst, apacannx.bst,
23 % apa5ex.bib, apacxmpl.tex,
24 % english.apc, dutch.apc, finnish.apc, french.apc,
25 % german.apc, ngerman.apc, greek.apc, norsk.apc,
26 % spanish.apc, swedish.apc.
27 %
28 % This work has the LPPL maintenance status `maintained'
29 %
30 % The Current Maintainer of this work is Erik Meijer
31 %
32 % This file may only be distributed together with a copy of the
33 % source files of the apacite package, i.e., apacite.dtx and
34 % apacite.ins. You may however distribute the apacite package without
35 % the generated files.
36 %
37 % \fi
38 %
39 % \CheckSum{0}
40 % \CharacterTable
41 % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
42 % Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
43 % Digits \0\1\2\3\4\5\6\7\8\9
44 % Exclamation \! Double quote \" Hash (number) \#
45 % Dollar \$ Percent \% Ampersand \&
46 % Acute accent \' Left paren \( Right paren \)
47 % Asterisk \* Plus \+ Comma \,
48 % Minus \- Point \. Solidus \/
49 % Colon \: Semicolon \; Less than \<
50 % Equals \= Greater than \> Question mark \?
51 % Commercial at \@ Left bracket \[ Backslash \\
52 % Right bracket \] Circumflex \^ Underscore \_
53 % Grave accent \` Left brace \{ Vertical bar \|
54 % Right brace \} Tilde \~}
55 %
56 % \iffalse
57 %<*dtx>
58 \ProvidesFile{apacite.dtx}
59 [2013/07/21 v6.03 apacite dtx file]
60 %</dtx>
61 %<driver>\ProvidesFile{apacite.drv}
62 %<package|docpkg>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
63 %<package>\ProvidesPackage{apacite}
64 %<docpkg>\ProvidesPackage{apacdoc}
65 %<english>\ProvidesFile{english.apc}
66 %<dutch>\ProvidesFile{dutch.apc}
67 %<finnish>\ProvidesFile{finnish.apc}
68 %<german>\ProvidesFile{german.apc}
69 %<ngerman>\ProvidesFile{ngerman.apc}
70 %<greek>\ProvidesFile{greek.apc}
71 %<norsk>\ProvidesFile{norsk.apc}
72 %<spanish>\ProvidesFile{spanish.apc}
73 %<swedish>\ProvidesFile{swedish.apc}
74 %<xmpl>%% apacxmpl.tex
75 %<bibdb>%% apa5ex.bib
76 %<bibstyle&!annotated>%% apacite.bst
77 %<bibstyle&annotated>%% apacann.bst
78 %<xbibstyle&!annotated>%% apacitex.bst
79 %<xbibstyle&annotated>%% apacannx.bst
80 %^^A
81 %^^A I have to find out how I can replace the hard-coded date+version with a
82 %^^A command such that the value of the command is written to the file instead
83 %^^A of the name.
84 %^^A
85 %<driver> [2013/07/21 v6.03 apacite documentation driver file]
86 %<package> [2013/07/21 v6.03 APA citation]
87 %<docpkg> [2013/07/21 v6.03 apacite documentation style]
88 %<english> [2013/07/21 v6.03 apacite language file]
89 %<dutch> [2013/07/21 v6.03 apacite language file]
90 %<finnish> [2013/07/21 v6.03 apacite language file]
91 %<german> [2013/07/21 v6.03 apacite language file]
92 %<ngerman> [2013/07/21 v6.03 apacite language file]
93 %<greek> [2013/07/21 v6.03 apacite language file]
94 %<norsk> [2013/07/21 v6.03 apacite language file]
95 %<spanish> [2013/07/21 v6.03 apacite language file]
96 %<swedish> [2013/07/21 v6.03 apacite language file]
97 %<xmpl>%% [2013/07/21 v6.03 LaTeX file for examples]
98 %<bibdb>%% [2013/07/21 v6.03 bibliography database for examples]
99 %<bibstyle&!annotated>%% [2013/07/21 v6.03 APA bibliography style]
100 %<*xbibstyle&!annotated>
101 %% [2013/07/21 v6.03 APA bibl. style with author index info]
102 %</xbibstyle&!annotated>
103 %<bibstyle&annotated>%% [2013/07/21 v6.03 APA annotated bibliography style]
104 %<*xbibstyle&annotated>
105 %% [2013/07/21 v6.03 APA annotated bibl. style with author index info]
106 %</xbibstyle&annotated>
107 %
108 %<*install>
109 %^^A =============================================
110 %^^A Here is the docstrip installation file
111 %^^A It is written on first LaTeX run if it
112 %^^A does not already exist
113 %^^A =============================================
114 \begin{filecontents*}{apacite.ins}
115 %%
116 %% This file will generate fast loadable files and documentation
117 %% driver files from apacite.dtx when run through LaTeX.
118 %%
119 %% Copyright (C) 1994-2013 Erik Meijer and any individual authors listed
120 %% elsewhere in this file.
121 %%
122 %% This file is part of the `apacite' package.
123 %% -------------------------------------------
124 %%
125 %% It may be distributed and/or modified under the
126 %% conditions of the LaTeX Project Public License, either
127 %% version 1.3 of this license or (at your option) any later
128 %% version. The latest version of this license is in:
129 %%
130 %% http://www.latex-project.org/lppl.txt
131 %%
132 %% and version 1.3 or later is part of all distributions of
133 %% LaTeX version 2005/12/01 or later.
134 %%
135 %% The `apacite' package consists of the files apacite.dtx and
136 %% apacite.ins, and the following generated files:
137 %% apacite.sty, apacdoc.sty, apacite.drv,
138 %% apacite.bst, apacitex.bst, apacann.bst, apacannx.bst,
139 %% apa5ex.bib, apacxmpl.tex,
140 %% english.apc, dutch.apc, finnish.apc, french.apc,
141 %% german.apc, ngerman.apc, greek.apc, norsk.apc,
142 %% spanish.apc, swedish.apc.
143 %%
144 %% This work has the LPPL maintenance status `maintained'
145 %%
146 %% The Current Maintainer of this work is Erik Meijer
147 %%
148 %% This file may only be distributed together with a copy of the
149 %% source files of the apacite package, i.e., apacite.dtx and
150 %% apacite.ins. You may however distribute the apacite package without
151 %% the generated files.
152
153 \input docstrip.tex
154 \keepsilent
155
156 \declarepreamble\mainpreamble
157
158 This is a generated file.
159
160 Copyright (C) 1994-2013 Erik Meijer and any individual authors listed
161 elsewhere in this file.
162
163 This file is part of the `apacite' package.
164 -------------------------------------------
165
166 It may be distributed and/or modified under the
167 conditions of the LaTeX Project Public License, either
168 version 1.3 of this license or (at your option) any later
169 version. The latest version of this license is in:
170
171 http://www.latex-project.org/lppl.txt
172
173 and version 1.3 or later is part of all distributions of
174 LaTeX version 2005/12/01 or later.
175
176 The `apacite' package consists of the files apacite.dtx and
177 apacite.ins, and the following generated files:
178 apacite.sty, apacdoc.sty, apacite.drv,
179 apacite.bst, apacitex.bst, apacann.bst, apacannx.bst,
180 apa5ex.bib, apacxmpl.tex,
181 english.apc, dutch.apc, finnish.apc, french.apc,
182 german.apc, ngerman.apc, greek.apc, norsk.apc,
183 spanish.apc, swedish.apc.
184
185 This work has the LPPL maintenance status `maintained'
186
187 The Current Maintainer of this work is Erik Meijer
188
189 This file may only be distributed together with a copy of the
190 source files of the apacite package, i.e., apacite.dtx and
191 apacite.ins. You may however distribute the apacite package without
192 the generated files.
193
194 \endpreamble
195
196 \declarepreamble\drvpreamble
197
198 This is a generated file.
199
200 Copyright (C) 1994-2013 Erik Meijer and any individual authors listed
201 elsewhere in this file.
202
203 This file is part of the `apacite' package.
204 -------------------------------------------
205
206 It may be distributed and/or modified under the
207 conditions of the LaTeX Project Public License, either
208 version 1.3 of this license or (at your option) any later
209 version. The latest version of this license is in:
210
211 http://www.latex-project.org/lppl.txt
212
213 and version 1.3 or later is part of all distributions of
214 LaTeX version 2005/12/01 or later.
215
216 The `apacite' package consists of the files apacite.dtx and
217 apacite.ins, and the following generated files:
218 apacite.sty, apacdoc.sty, apacite.drv,
219 apacite.bst, apacitex.bst, apacann.bst, apacannx.bst,
220 apa5ex.bib, apacxmpl.tex,
221 english.apc, dutch.apc, finnish.apc, french.apc,
222 german.apc, ngerman.apc, greek.apc, norsk.apc,
223 spanish.apc, swedish.apc.
224
225 This work has the LPPL maintenance status `maintained'
226
227 The Current Maintainer of this work is Erik Meijer
228
229 This file may only be distributed together with a copy of the
230 source files of the apacite package, i.e., apacite.dtx and
231 apacite.ins. You may however distribute the apacite package without
232 the generated files.
233
234 You are allowed to make changes to this file, in order to generate
235 the user's manual with your preferred settings (e.g., to choose
236 whether or not to include the documented source code). Please
237 do not change apacite.dtx for this purpose.
238
239 \endpreamble
240
241 \edef\noendinputpostamble{%
242 \MetaPrefix ^^J%
243 \MetaPrefix\space End of file `\outFileName'.%
244 }
245
246 \askonceonly
247 \generate{%
248 \usepreamble\mainpreamble
249 \file{apacite.sty}{\from{apacite.dtx}{package}}
250 \file{apacdoc.sty}{\from{apacite.dtx}{docpkg}}
251 \file{english.apc}{\from{apacite.dtx}{english}}
252 \file{dutch.apc}{\from{apacite.dtx}{dutch}}
253 \file{finnish.apc}{\from{apacite.dtx}{finnish}}
254 \file{french.apc}{\from{apacite.dtx}{french}}
255 \file{german.apc}{\from{apacite.dtx}{german}}
256 \file{ngerman.apc}{\from{apacite.dtx}{ngerman}}
257 \file{greek.apc}{\from{apacite.dtx}{greek}}
258 \file{norsk.apc}{\from{apacite.dtx}{norsk}}
259 \file{spanish.apc}{\from{apacite.dtx}{spanish}}
260 \file{swedish.apc}{\from{apacite.dtx}{swedish}}
261 \file{apacxmpl.tex}{\from{apacite.dtx}{xmpl}}
262 \usepreamble\drvpreamble
263 \file{apacite.drv}{\from{apacite.dtx}{driver}}
264 \usepreamble\mainpreamble
265 \usepostamble\noendinputpostamble
266 \file{apa5ex.bib}{\from{apacite.dtx}{bibdb}}
267 \file{apacite.bst}{\from{apacite.dtx}{bibstyle}}
268 \file{apacitex.bst}{\from{apacite.dtx}{xbibstyle}}
269 \file{apacann.bst}{\from{apacite.dtx}{bibstyle,annotated}}
270 \file{apacannx.bst}{\from{apacite.dtx}{xbibstyle,annotated}}
271 }
272
273 \obeyspaces
274 \Msg{*****************************************************}
275 \Msg{* *}
276 \Msg{* To finish the installation you have to move the *}
277 \Msg{* following files into a directory searched by TeX: *}
278 \Msg{* *}
279 \Msg{* All *.apc, *.sty *}
280 \Msg{* *}
281 \Msg{* and to move the following files into a directory *}
282 \Msg{* searched by BibTeX: *}
283 \Msg{* *}
284 \Msg{* All *.bib, *.bst *}
285 \Msg{* *}
286 \Msg{* To produce the documentation, run the following *}
287 \Msg{* script (or something similar, depending on your *}
288 \Msg{* operating system): *}
289 \Msg{* *}
290 \Msg{* pdflatex apacite.drv *}
291 \Msg{* bibtex apacite *}
292 \Msg{* pdflatex apacite.drv *}
293 \Msg{* pdflatex apacite.drv *}
294 \Msg{* pdflatex apacite.drv *}
295 \Msg{* makeindex -o apacite.and apacite.adx *}
296 \Msg{* pdflatex apacite.drv *}
297 \Msg{* pdflatex apacite.drv *}
298 \Msg{* *}
299 \Msg{* See the README file for a brief explanation and *}
300 \Msg{* the file apacite.drv for how to customize the *}
301 \Msg{* manual (e.g., to include the documented source *}
302 \Msg{* code. *}
303 \Msg{* *}
304 \Msg{* Happy TeXing! *}
305 \Msg{* *}
306 \Msg{*****************************************************}
307
308 \endbatchfile
309 \end{filecontents*}
310 %</install>
311 %<*gobble>
312 \IfFileExists{apacdoc.sty}{%
313 \let\finishprematurely\relax
314 }{%
315 \typeout{**************************************************%
316 ********************}%
317 \typeout{*}%
318 \typeout{* To extract the package, style, and support files
319 of apacite,}%
320 \typeout{* run TeX on apacite.ins}%
321 \typeout{*}%
322 \typeout{* To (re)generate the apacite documentation, first
323 run TeX on}%
324 \typeout{* apacite.ins and then run LaTeX on apacite.drv
325 or apacite.dtx}%
326 \typeout{*}%
327 \typeout{**************************************************%
328 ********************^^J}%
329 \makeatletter
330 \edef\finishprematurely{\csname @@end\endcsname}%
331 \makeatother
332 }
333 \finishprematurely
334 %</gobble>
335 % \fi
336 %
337 % \DoNotIndex{\begin,\CodelineIndex,\CodelineNumbered,\def,\DisableCrossrefs}
338 % \DoNotIndex{\DocInput,\documentclass,\EnableCrossrefs,\end,\GetFileInfo}
339 % \DoNotIndex{\NeedsTeXFormat,\OnlyDescription,\RecordChanges,\usepackage}
340 % \DoNotIndex{\ProvidesClass,\ProvidesPackage,\ProvidesFile,\RequirePackage}
341 % \DoNotIndex{\LoadClass,\PassOptionsToClass,\PassOptionsToPackage}
342 % \DoNotIndex{\DeclareOption,\CurrentOption,\ProcessOptions,\ExecuteOptions}
343 % \DoNotIndex{\AtEndOfClass,\AtEndOfPackage,\AtBeginDocument,\AtEndDocument}
344 % \DoNotIndex{\InputIfFileExists,\IfFileExists,\ClassError,\PackageError}
345 % \DoNotIndex{\ClassWarning,\PackageWarning,\ClassWarningNoLine}
346 % \DoNotIndex{\PackageWarningNoLine,\ClassInfo,\PackageInfo,\MessageBreak}
347 % \DoNotIndex{\space,\protect,\DeclareRobustCommand,\CheckCommand}
348 % \DoNotIndex{\newcommand,\renewcommand,\providecommand,\newenvironment}
349 % \DoNotIndex{\renewenvironment,\newif,\newlength,\newcounter,\setlength}
350 % \DoNotIndex{\setcounter,\if,\ifx,\ifcase,\ifnum,\ifdim,\else,\fi}
351 % \DoNotIndex{\texttt,\textbf,\textrm,\textsl,\textsc,\reset@font}
352 % \DoNotIndex{\textup,\textit,\textmd,\textsf,\emph,\futurelet}
353 % \DoNotIndex{\ttfamily,\rmfamily,\sffamily,\mdseries,\bfseries,\upshape}
354 % \DoNotIndex{\slshape,\scshape,\itshape,\em,\LaTeX,\LaTeXe}
355 % \DoNotIndex{\filename,\fileversion,\filedate,\let,\makeindex}
356 % \DoNotIndex{\@auxout,\@for,\@gobble,\@ifnextchar,\@m,\@mkboth,\@nil}
357 % \DoNotIndex{\@noitemerr,\@tempa,\@tempswafalse,\@tempswatrue,\@warning}
358 % \DoNotIndex{\advance,\arabic,\AtBeginDocument,\bf,\bibname,\chapter}
359 % \DoNotIndex{\citation,\clubpenalty,\CodelineNumbered,\csname}
360 % \DoNotIndex{\DisableCrossrefs,\do,\edef,\else,\endcsname,\endlist}
361 % \DoNotIndex{\expandafter,\fi,\gdef,\global,\hbox,\hfill,\hskip,\hspace}
362 % \DoNotIndex{\if,\if@filesw,\if@tempswa,\ifx,\immediate,\itemindent,\labelsep}
363 % \DoNotIndex{\labelwidth,\lastskip,\leftmargin,\list,\mbox,\newblock}
364 % \DoNotIndex{\newpage,\p@enumiv,\parindent,\penalty,\refname}
365 % \DoNotIndex{\relax,\section,\settowidth,\sfcode,\sloppy,\small,\string}
366 % \DoNotIndex{\theenumiv,\thepage,\unskip,\uppercase,\usecounter,\vskip}
367 % \DoNotIndex{\widowpenalty,\write,\xdef,\z@,\catcode,\ifnum,\the}
368 % \DoNotIndex{\@empty,\@ifundefined,\@latex@warning,\@minus,\@plus,\ }
369 % \DoNotIndex{\document,\@namedef,\@listi,\markboth,\or,\p@}
370 % \DoNotIndex{\listparindent,\noexpand,\par,\parsep,\pb,\pbf,\pbfseries}
371 % \DoNotIndex{\pc,\pd,\pem,\pit,\pitshape,\pmdseries,\prm,\prmfamily,\psc}
372 % \DoNotIndex{\pscshape,\psf,\psffamily,\psl,\pslshape,\ptt,\pttfamily}
373 % \DoNotIndex{\pupshape,\@iden,\@firstofone,\@unexpandable@protect}
374 % \DoNotIndex{\if@draft,\typeout}
375 % \DoNotIndex{\@ifclassloaded,\@ifstar,\@onlypreamble,\@preamblecmds}
376 % \DoNotIndex{\addtolength,\endinput,\@bsphack,\begingroup,\@wrindex}
377 % \DoNotIndex{\@listctr,\bibname,\enddocument,\hfil,\ignorespaces,\item}
378 % \DoNotIndex{\NAT@temp,\refname,\stepcounter,\@ifpackageloaded}
379 % \DoNotIndex{\@gobbletwo,\index,\itemsep,\markright,\scriptsize}
380 % \DoNotIndex{\textsuperscript,\@undefined}
381 % \DoNotIndex{\@celt,\@cite@list,\@citea,\@citeb,\@compress@cite}
382 % \DoNotIndex{\@bsphack,\@esphack,\@h@ld,\@make@cite@list,\@ne}
383 % \DoNotIndex{\@sort@celt,\@tempcnta,\@tempcntb,\delimiter,\endgroup}
384 % \DoNotIndex{\ifcat,\m@ne,\number}
385 % \DoNotIndex{\@markboth,\@mkboth,\nobreak,\SK@,\SK@@citex}
386 % \DoNotIndex{\SK@@label,\SK@@ref,SK@def,\SK@lbibitem,\bbl@redefine}
387 % \DoNotIndex{\@safe@activesfalse,\@save@activestrue,\active@prefix}
388 %
389 % \DoNotIndex{\ ,\&,\{,\},\.,\!,\",\#,\%,\',\(,\),\*,\,,\-,\/}
390 % \DoNotIndex{\:,\;,\<,\=,\>,\?,\@,\[,\\,\],\^,\_,\`,\|,\~}
391 % \DoNotIndex{\@backslashchar,\@citec,\@element@,\@input@,\@nameuse}
392 % \DoNotIndex{\@makeschapterhead,\@restonecolfalse,\@restonecoltrue}
393 % \DoNotIndex{\@old@endthebibliography,\@oldbibpreamble,\@orig@@cite}
394 % \DoNotIndex{\@orig@@nocitemeta,\@orig@nocite}
395 % \DoNotIndex{\@tmp@arg,\@xp,\AA,\aa,\addcontentsline}
396 % \DoNotIndex{\afterassignment,\aftergroup,\alph,\ast,\b@ex}
397 % \DoNotIndex{\backslash,\baselineskip,\BibTeX,\bigskip,\bs}
398 % \DoNotIndex{\clearpage,\cmd,\cmdfour,\cmdthree,\cmdthreealt}
399 % \DoNotIndex{\cmdthreepre,\cmdtwo,\columnsep,\columnseprule,\count@}
400 % \DoNotIndex{\dag,\do@url@hyp,\EM,\ensuremath,\entryname,\envirname}
401 % \DoNotIndex{\evensidemargin,\fieldname,\flqq,\fname,\fontencoding}
402 % \DoNotIndex{\fontfamily,\footnotesize,\footskip,\frqq}
403 % \DoNotIndex{\g@addto@macro,\GlossaryPrologue,\headheight,\headsep}
404 % \DoNotIndex{\hoffset,\if@mainmatter,\ifcodeline@index,\iffalse}
405 % \DoNotIndex{\ifhave@multicol,\index@prologue,\IndexMin,\IndexParms}
406 % \DoNotIndex{\IndexPrologue,\input,\jobname,\kern,\langle,\LaTeXrtf}
407 % \DoNotIndex{\latextohtml,\lbrace,\LC,\ldots,\linewidth,\lower}
408 % \DoNotIndex{\makeatletter,\makeatother,\MakeIndex,\MakeUppercase}
409 % \DoNotIndex{\marginparpush,\marginparsep,\marginparwidth,\mid}
410 % \DoNotIndex{\mathbin,\mathchar,\mathord,\newskip,\newwrite}
411 % \DoNotIndex{\normalsize,\oddsidemargin,\oldBED,\oldBEd,\oldBEDS}
412 % \DoNotIndex{\oldbibinitial,\oldbibliteral,\oldbibskipbracenodot}
413 % \DoNotIndex{\oldBIn,\oldBRetrieved,\oldevensidemargin,\oldfootskip}
414 % \DoNotIndex{\oldheadheight,\oldheadsep,\oldhoffset,\oldlinewidth}
415 % \DoNotIndex{\oldmarginparpush,\oldmarginparsep,\oldmarginparwidth}
416 % \DoNotIndex{\oldoddsidemargin,\oldtextheight,\oldtextwidth}
417 % \DoNotIndex{\oldtopmargin,\oldvoffset,\onecolumn,\openout,\opt}
418 % \DoNotIndex{\orig@printindex,\origbibDSM,\parskip,\Perl,\pfill}
419 % \DoNotIndex{\pkg,\pkgoption,\protected@edef,\protected@write}
420 % \DoNotIndex{\quad,\raggedright,\raisebox,\rangle,\rbrace,\rm,\sc}
421 % \DoNotIndex{\selectfont,\simpleguillemots,\symbol,\TeX,\TeXht}
422 % \DoNotIndex{\textheight,\textwidth,\thinspace,\thispagestyle}
423 % \DoNotIndex{\thr@@,\times,\tiny,\topmargin,\triangleright}
424 % \DoNotIndex{\twocolumn,\undefined,\voffset,\vspace,\X,\Y}
425 %
426 % \iffalse
427 %<*driver>
428 \documentclass{ltxdoc}
429 %<driver>%\documentclass[twoside]{ltxdoc}
430 %<driver>%\documentclass[a4paper]{ltxdoc}
431 %<driver>%\documentclass[twoside,a4paper]{ltxdoc}
432 %%
433 \usepackage{apacdoc}[2013/07/21 v6.03]
434 %% The |\providecommand|s make sure we don't get an error during
435 %% installation.
436 %% Define document-specific macros that are not interesting for
437 %% users.
438 \providecommand{\SetupAPACdoc}{}%
439 \SetupAPACdoc
440 %% Document page layout.
441 \providecommand{\APACdocPageLayout}{}%
442 \APACdocPageLayout
443 %% Index styles for the source code documentation
444 \providecommand{\SetupAPACdocPrologues}{}%
445 \SetupAPACdocPrologues
446 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
447 %% LOADING OF PACKAGES
448 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
449 %% The following line is used for references to internet sources.
450 %% It is not generally necessary for apacite, but used in the examples.
451 \usepackage{url}
452 %%
453 %% Loading apacite with author index option.
454 \usepackage[ltxemindex,bibnewpage]{apacite}[2013/07/21 v6.03]
455 %%
456 \raggedbottom
457 %%
458 %% To include the detailed explanation of the coding, comment out
459 %% the next line
460 \OnlyDescription
461 %%
462 %% To produce a command index: add the following line for one run,
463 %% then run makeindex -s gind.ist apacite
464 %% and reprocess, with or without this line (much faster without)
465 %<driver>% \EnableCrossrefs\CodelineIndex
466 %%
467 %% To produce a change history: add the following line for one run,
468 %% then run makeindex -s gglo.ist -o apacite.gls apacite.glo
469 %% and reprocess, with or without this line (faster without)
470 %<driver>% \RecordChanges
471 %%
472 \DisableCrossrefs % May stay; zapped by \EnableCrossrefs
473 \CodelineNumbered % May stay
474 %%
475 \begin{document}
476 \DocInput{apacite.dtx}
477 \end{document}
478 %</driver>
479 % \fi
480 %
481 % ^^A (I have to find out how to get the following remark in the right
482 % ^^A place in the documentation.)
483 % ^^A The earlier version numbers have been assigned retroactively;
484 % ^^A originally, apacite had only release dates.
485 %
486 % \changes{v1.0}{1994/11/30}{First public version}
487 % \changes{v2.0}{2000/09/22}{Second packaged version, the result of
488 % continuous updating over many years. Not officially released through
489 % ctan because there was no update of the documentation, but this was
490 % available through my homepage at the time. Many additions in terms
491 % of customizability, and introduction of the author indexing
492 % facilities, which were first used in my PhD thesis in 1998.}
493 % \changes{v2.1}{2003/03/27}{First official release since 1994. Compared
494 % to 2.0, this primarily solved some important compatibility problems
495 % with other packages.}
496 % \changes{v2.2}{2003/09/05}{Updated for the 5th edition of the APA
497 % manual, up to date documentation and test document, reorganized the
498 % material, and improved compatibility.}
499 % \changes{v3.0}{2004/07/01}{Now adds initials if necessary to
500 % distinguish first authors; now adds 2nd and later authors if necessary
501 % to distinguish references; now truncates author list after 6th author
502 % and editor list after 1st in reference list if there are more than 6
503 % authors/editors; improved sorting for reference list; improved author
504 % index support; added explicit support for reporting a meta-analysis.}
505 % \changes{v3.1}{2005/06/01}{Introduces explicit non-English language
506 % support, solves some compatibility problems.}
507 % \changes{v3.2}{2005/06/08}{Fix of a small but annoying bug.}
508 % \changes{v4.00}{2007/09/03}{Solved many compatibility issues; improved
509 % and extended language support; more extensive customizability.}
510 % \changes{v4.05}{2009/03/01}{Some bug fixes; extended language support;
511 % annotated bibliographies.}
512 % \changes{v6.00}{2012/02/14}{First step toward compliance with v6 of
513 % the APA manual; version number now indicates which version of the APA
514 % manual is implemented.}
515 % \changes{v6.01}{2012/02/25}{Bug fix}
516 % \changes{v6.02}{2013/07/04}{Bug fixes}
517 % \changes{v6.03}{2013/07/21}{Thesis formatting adapted to 6th edition
518 % requirements}
519 %
520 % \GetFileInfo{apacite.sty}
521 %
522 % \setcounter{IndexColumns}{2}
523 % \setlength{\IndexMin}{10cm}
524 %
525 % ^^A Start documentation here.
526 %
527 %
528 % \iffalse
529 %<*dtx>
530 % \fi
531 \MakePercentComment
532 %
533 % User's reference manual and test of the apacite package.
534 % Written by Erik Meijer
535 %
536
537 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
538 %%% START OF ``NORMAL'' PART OF DOCUMENT
539 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
540 \title{The \pkg{apacite} package%
541 \thanks{This document describes \pkg{apacite} version~\fileversion{}
542 dated \filedate.}
543 \vspace{0.3\baselineskip}\\
544 \large Citation and reference list with \LaTeX{} and \BibTeX{}
545 according to the rules of the American Psychological Association}
546 \author{Erik Meijer\\
547 \textsf{apacite at gmail.com}
548 }
549 \date{\filedate}
550 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
551 % If ecmr (T1) font not available:
552 \simpleguillemots
553 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
554 \maketitle
555 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
556 \begin{abstract}
557 \noindent
558 This document describes and tests the \pkg{apacite} package
559 \APACversiondate{\filedate}. This is a package that can be used with
560 \LaTeX{} and \BibTeX{} to generate citations and a reference list,
561 formatted according to the rules of the American Psychological Association.
562 Furthermore, \pkg{apacite} contains an option to (almost) automatically
563 generate an author index as well. The package can be customized in many
564 ways.
565 \end{abstract}
566 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
567 \clearpage
568 \tableofcontents
569 \clearpage
570 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
571 \section{Introduction}
572 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
573 The American Psychological Association (APA) is very strict about the style in
574 which manuscripts submitted to its journals are written and formatted. The
575 requirements of the APA are described in the \emph{Publication Manual of the
576 American Psychological Association}, the latest version of which is the 6th
577 edition \cite{APAManual6}. In the sequel, this is simply called the \emph{APA
578 manual}.
579
580 The APA manual discusses how candidate authors should write their manuscripts:
581 writing style, parts of a manuscript and their order, presentation of the
582 results in the form of tables and figures, and so forth. Candidate authors
583 should study this and adhere to this.
584
585 The APA manual also gives specific rules about the formatting of a manuscript.
586 This includes double spacing, a running head, the typographic style of section
587 headings, the placement of tables and figures on separate pages at the end of
588 the document, and so forth. \LaTeX{} users will recognize these as ``style''
589 elements that should be defined in a package (\fname{.sty} file) or class
590 (\fname{.cls} file). Their specific documents (\fname{.tex} file) should be
591 largely style-independent. This idea of separating content and logical
592 structure from specific formatting is one of the basic elements of \LaTeX{}
593 \cite[p.~7]{LaTeXbook}.
594
595 An implementation of the formatting rules of the APA manual for use with
596 \LaTeX{} is the \pkg{apa6} class by Brian Beitzel, which is a continuation of
597 the earlier \pkg{apa} class by Athanassios Protopapas. This handles all kinds of
598 issues about general document formatting, title page, section headings, figures
599 and tables, and so forth. Therefore, if you intend to submit a manuscript to an
600 APA journal, I strongly recommend using the \pkg{apa6} class.
601
602 An important part of the APA style is the way citations and the reference list
603 should be formatted. This takes 56 pages in the APA manual (pp.~169--224). This
604 part is not handled by the \pkg{apa6} class, but by the \pkg{apacite} package.
605 \pkg{apacite} can be used without \pkg{apa6}. The current document, for example,
606 does not use the \pkg{apa6} class, because I find it desirable that possible
607 users can study the \pkg{apacite} package and its documentation without having
608 to install several other classes and packages first. Therefore, the current
609 document uses standard \LaTeX{} as much as possible. (The \pkg{apa} class used
610 to require the \pkg{apacite} package, but this was dropped because there is now
611 also the \pkg{biblatex-apa} citation package as an alternative to
612 \pkg{apacite}.)
613
614 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
615 \subsection*{Philosophy of \pkg{apacite}}
616 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
617 The first priority of \pkg{apacite} is to implement the rules of the APA manual
618 with regard to citation and reference list as closely as possible. However, just
619 like its predecessors (culminating in Young U. Ryu's \pkg{theapa} package), and
620 actually expanding much beyond their realm, \pkg{apacite} offers many
621 possibilities for customization as well. Many details of \pkg{apacite},
622 particularly punctuation and some fixed texts (e.g., ``Tech.\ Rep.'') can be
623 changed easily by the user by redefining some commands in \LaTeX{}. Furthermore,
624 \pkg{apacite} also offers several proper options to change some of its settings.
625
626 Whether certain options or customizable aspects are implemented depends on two
627 criteria: (1) Is it possible, easy (enough), and convenient to implement them
628 without compromising the ability to adhere to the APA rules, and (2) Do I (EM)
629 consider them important or useful enough to spend time to implement them.
630 Actually, the decision process is the reverse of this: First, I decide whether
631 I find it a relevant or useful option. If not, I will not implement it. If so,
632 I will think about if and how I can implement it. If I have an idea for a
633 solution that is practically feasible, I will pursue it. If I don't see a
634 solution, if I think it will take me too much time, or if I think a solution
635 will be inconvenient to other users, then I will not pursue it.
636
637 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
638 \subsection*{New in this version}
639 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
640
641 Changes with respect to the previous version (v6.02,
642 \APACversiondate{2013/07/04}):
643 \begin{itemize}
644
645 \item
646 Thesis formatting (\entryname{@phdthesis}, \entryname{@mastersthesis})
647 rewritten in order to conform to the 6th edition of the APA Manual.
648
649 \item
650 Added the \cmd{\APACaddressSchool} and \cmd{\APACtypeAddressSchool}
651 commands to facilitate customization of the formatting of theses.
652
653 \item
654 Added the \cmd{\APACredefineOnce} command to \fname{apacdoc.sty}.
655
656 \item
657 Added examples 31--44 from the APA manual to \fname{apacxmpl.tex} and
658 \fname{apa5ex.bib}.
659
660 \item
661 Improved source code documentation in the \fname{.dtx} file.
662
663 \item
664 Some minor changes and bug fixes.
665
666 \end{itemize}
667
668 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
669 \subsection*{About this document}
670 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
671 The current document describes how to use \pkg{apacite} and largely assumes
672 knowledge of or access to the standard \BibTeX{} documentation, such as
673 \citeA{Pata88}, \citeA[Chapter~12]{KoDa04}, or \citeA[Chapters~12 and~13]{TLC2}.
674 Hence, this document does not always describe how to use some of the citation
675 commands or how to construct a bibliography database file in detail if there
676 is no \pkg{apacite}-specific element to it. This document comes in two
677 versions. The version supplied with the distribution is the user's manual.
678 As is customary with packages that are distributed in \fname{.dtx} form, it is
679 also possible to regenerate the user's manual in such a way that it includes
680 the documented source code of the package as well. This is currently still
681 in a primitive form compared to other packages, but it will be improved
682 with later releases. The \fname{README} file describes how the documented
683 source code can be included in this manual. \citeA{meijer07} contains some
684 simple examples in which \pkg{apacite} is compared to standard \LaTeX/\BibTeX{}
685 citation, as well as a description of how \pkg{apacite} works technically.
686
687 {\bfseries Note that this manual is not completely up to date.}
688 This is primarily the case for the specific discussion of the examples
689 in section~\ref{sec:xmpl}, which focus on the 5th edition of the APA
690 manual, but there may be some obsolete discussions or omissions elsewhere
691 in the document as well.
692
693 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
694 \section{Installation, package loading, and running \BibTeX{}}
695 \label{sec:usage}
696 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
697 \pkg{apacite} is distributed as a \fname{.dtx} file, like
698 most \LaTeX{} packages. The file \fname{apacite.dtx} is supplemented by a
699 \fname{README} file, which gives a brief introduction and installation
700 instructions, the user's manual in the file \fname{apacite.pdf} (which you are
701 reading right now), and the installation file \fname{apacite.ins}. Strictly
702 speaking, only the \fname{apacite.dtx} file is necessary, because the
703 installation file is regenerated from it if it is not available, and the user's
704 manual is generated by running \LaTeX{} on \fname{apacite.dtx}. But it is
705 customary (and convenient for potential users) to include the other files as
706 well.
707
708 The \LaTeX{} packages, \BibTeX{} style files, and other files in the
709 distribution are generated by running \LaTeX{} on \fname{apacite.ins}.
710 This generates the following files:
711 \begin{description}
712 \item[\fname{apacite.sty}] The \LaTeX{} citation package. This must
713 be placed in a directory where \TeX{} can find it.
714 \item[\fname{apacite.bst}] The \BibTeX{} reference list style. This
715 must be placed in a directory where \BibTeX{} can find it.
716 \item[\fname{apacitex.bst}] The \BibTeX{} reference list style with
717 added author index support. This must also be placed in a directory
718 where \BibTeX{} can find it.
719 \item[\fname{apacann.bst}]
720 \item[\fname{apacannx.bst}] Versions of \fname{apacite.bst} and
721 \fname{apacitex.bst} that generate annotated bibliographies (if the
722 \fieldname{annote} and/or \fieldname{annotate} fields are provided). Again,
723 these must be placed in a directory where \BibTeX{} can find it. Most
724 probably, some time in the future, the four \fname{.bst} files will be
725 combined in \fname{apacite.bst}, with the desired behavior induced by
726 options, but this is nontrivial and currently not implemented yet.
727 \item[\fname{apacxmpl.tex}] \LaTeX{} file that (with the bibliography
728 database) implements the examples from the APA manual.
729 This can best be kept in the same directory as \fname{apacite.dtx}.
730 \item[\fname{apa5ex.bib}] The file with bibliographic information
731 of the examples from the APA manual, this user's manual.
732 This is useful for users to find out how
733 certain nontrivial problems can be solved. This can best be kept
734 in the same directory as \fname{apacite.dtx}.
735 \item[\fname{apacite.drv}] Documentation driver. Run \LaTeX{} on this
736 file to regenerate the user's manual. This is the current document,
737 and can also be ontained by running \LaTeX{} on \fname{apacite.dtx},
738 but you can edit the file \fname{apacite.drv} to change some settings,
739 e.g., choose whether or not the documented source code must be
740 included in the manual or not. Please don't edit \fname{apacite.dtx}
741 itself. The file \fname{apacite.drv} can best be kept
742 in the same directory as \fname{apacite.dtx}.
743 \item[\fname{*.apc}] Language-specific modifications of \pkg{apacite}.
744 See section~\ref{sec:compat-babel} for a discussion of these.
745 These must be placed in a directory where \LaTeX{} can find them.
746 The files that are currently supplied are \fname{english.apc},
747 \fname{dutch.apc}, \fname{finnish.apc}, \fname{french.apc},
748 \fname{german.apc}, \fname{ngerman.apc}, \fname{greek.apc},
749 \fname{norsk.apc}, \fname{spanish.apc}, and \fname{swedish.apc}.
750 \item[\fname{apacdoc.sty}] A \LaTeX{} package that contains commands
751 and settings used in this user's manual. This can be placed in a
752 directory where \TeX{} can find it, but given that it is primarily
753 useful for processing the user's manual and not intended as a
754 package for wider usage, it can also be left in the same directory as
755 \fname{apacite.dtx}. See section~\ref{sec:apacdoc} for a further discussion
756 of this package.
757 \end{description}
758
759 The \fname{apacite.sty} \LaTeX{} package is loaded by putting
760 \mbox{}\vspace{0.7\baselineskip}\\
761 \cmdthreealt{usepackage}{options}{apacite}
762 \mbox{}\vspace{0.7\baselineskip}\\
763 somewhere in your document between \cmd{\documentclass} and
764 |\begin{document}|, or putting
765 \mbox{}\vspace{0.7\baselineskip}\\
766 \cmdthreealt{RequirePackage}{options}{apacite}
767 \mbox{}\vspace{0.7\baselineskip}\\
768 in your own personal \LaTeX{} package (say, \fname{mysettings.sty})
769 that is loaded by your document.
770
771 To load the \fname{apacite.bst} or \fname{apacitex.bst} bibliography style in
772 \BibTeX{}, put
773 \mbox{}\vspace{0.7\baselineskip}\\
774 |\bibliographystyle{apacite}|
775 \mbox{}\vspace{0.7\baselineskip}\\
776 (or |apacitex|, |apacann|, or |apacannx|) in your document
777 before the \cmd{\bibliography} command. The
778 position of the bibliography (reference list) is determined by the line
779 \mbox{}\vspace{0.7\baselineskip}\\
780 \cmdtwo{bibliography}{bibfiles}
781 \mbox{}\vspace{0.7\baselineskip}\\
782 where \opt{bibfiles} is a list of filenames with \fname{.bib} extension, which
783 contain the bibliographic information that is used by \BibTeX{} to construct the
784 reference list. Usually, the \cmd{\bibliographystyle} and \cmd{\bibliography}
785 are kept together (immediately follow each other) in the document, although when
786 you are using the \pkg{apa6} document class with \pkg{apacite} support, the
787 \cmd{\bibliographystyle} is defined by the class and you are not supposed to use
788 the \cmd{\bibliographystyle} command yourself. See the documentation of the
789 \pkg{apa6} documentclass for details about this.
790
791 If you use one of the author indexing options, the author index is put in
792 the \LaTeX{} output by the line
793 \begin{verbatim}
794 \printindex[autx]
795 \end{verbatim}
796 If you put this line in your document, but don't use one of the author
797 indexing options, it will be ignored. For more on author indexing, see
798 section~\ref{sec:autindex}.
799
800 To get all parts in the final output, the following sequence of runs should
801 typically be taken (when starting from scratch): (1) \LaTeX{}, (2) \BibTeX{},
802 (3) \LaTeX{}, (4) \LaTeX{}, and, when author indexing is on, (5) \MakeIndex{},
803 (6) \LaTeX{}, and (7) \LaTeX{}. The last one is to get the index in the table
804 of contents. If the table of contents is on a regular page, i.e., an
805 arabic-numbered page instead of a roman-numbered page in the front matter, it
806 may even be necessary to run \MakeIndex{} another time, followed by \LaTeX{}
807 once or twice. Occasionally, somewhere in the process, \LaTeX{} may complain
808 about labels that may have changed, which requires even more additional
809 \LaTeX{} runs at that stage. So the number of runs that are necessary to get
810 everything right may become large.
811
812 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
813 \section{Package options}
814 \label{sec:options}
815 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
816 The following options are recognized by \pkg{apacite}:
817 \begin{description}
818 \item[\pkgoption{apaciteclassic}]
819 \item[\pkgoption{natbibapa}]
820 \item[\pkgoption{nocitation}] \mbox{}\\
821 These three option determine which citation commands are defined in
822 \pkg{apacite}. \pkgoption{apaciteclassic} defines the ``classic''
823 \pkg{apacite} citation commands \cmd{\cite}, \cmd{\citeA}, \cmd{\citeNP},
824 and so forth, which use angled bracket syntax for prenotes, for example,
825 |\cite<see>[for more details]{ex1}|. These are the commands
826 described in section~\ref{sec:cite} below. This is the default in the
827 current version, but this may change in the future.
828
829 \pkgoption{natbibapa}
830 loads the \pkg{natbib} package for the citation commands. These
831 commands, such as \cmd{\citet} and \cmd{\citep}, use double square
832 brackets, for example, |\citep[see][for more details]{ex1}|.
833 Because these commands are not defined by \pkg{apacite} but by
834 \pkg{natbib}, they are not documented in this manual. See the
835 \pkg{natbib} documentation for their usage. Using \pkg{natbib} has a
836 few advantages over using the classic \pkg{apacite} commands:
837 (i) the citation commands are robust, which means they can be used
838 inside other commands, such as \cmd{\caption}, whereas the \pkg{apacite}
839 commands, like the traditional \LaTeX{} \cmd{\cite} command, are
840 fragile and must be \cmd{\protect}ed when used inside other commands;
841 (ii) the angled brackets do not normally occur in text mode and when
842 they do, they have special meaning; this may lead to incompatibilities;
843 (iii) \pkg{natbib} supports sorting citations within a citation
844 command, and has commands such as \cmd{\Citet} that capitalize the
845 first letter of a citation; the classic \pkg{apacite} commands lack
846 this functionality;
847 (iv) it is easier to switch to other styles, even to numbered styles.
848
849 When the \pkgoption{nocitation} option is requested, no citation
850 commands (except for \cmd{\nocitemeta}) are defined in \pkg{apacite}.
851 This may be useful if you want to use another citation package and
852 want to avoid potential compatibility conflicts.
853
854 The option \pkgoption{natbibapa} is different from
855 \pkgoption{nocitation} combined with loading of \pkg{natbib} by the
856 user, because \pkgoption{natbibapa} modifies \pkg{natbib}'s and
857 \pkg{apacite}'s behavior in a way that better satisfies the APA
858 rules and fixes some compatibility problems.
859
860 \item[\pkgoption{BCAY}] \mbox{}\\
861 This is a technical option for backwards compatibility with old versions
862 (pre-\APACversiondate{2003/09/05}) of \pkg{apacite}. In those versions of
863 \pkg{apacite}, the \cmd{\BCAY} construction was used to pass relevant
864 citation information from the \fname{.bbl} file (\BibTeX{}'s output) to
865 \LaTeX{}. This was taken over from its immediate predecessor, Young U. Ryu's
866 \pkg{theapa}. However, \pkg{natbib} does not recognize the \cmd{\BCAY}
867 construction, but it does recognize the analogous \cmd{\citeauthoryear}
868 construction, which was also used by an earlier predecessor of
869 \pkg{apacite}, \pkg{newapa}. Therefore, \pkg{apacite} has reverted to
870 \cmd{\citeauthoryear} as well. This makes different versions of
871 \pkg{apacite} incompatible with each other, because it is not possible to
872 support both constructions at the same time. This option is used to fix
873 that: In the (unlikely) event that you \emph{must} use a \fname{.bbl} file
874 that is generated by an old version of \pkg{apacite}, you can turn this
875 option on.
876
877 \item[\pkgoption{mask}]
878 \item[\pkgoption{unmask}] \mbox{}\\
879 Many journals use a double blind refereeing process. To conceal the
880 author's identity in such a masked review, it may be necessary to
881 suppress some citations, for example, to the working paper version
882 of the manuscript under review. \pkg{apa6} introduced masked citation
883 commands, which are now included in \pkg{apacite} as well. These
884 work as ordinary citations when the \pkgoption{mask} option is not
885 requested (or when the \pkgoption{unmask} option is chosen, which
886 is the default) and print a message mentioning suppression of citations
887 when \pkg{apacite} is loaded with the \pkgoption{mask} option.
888
889 \item[\pkgoption{index}]
890 \item[\pkgoption{indexpackage}]
891 \item[\pkgoption{noindexpackage}] \mbox{}\\
892 The \pkgoption{index} option turns author indexing on. See
893 section~\ref{sec:autindex} for a discussion of the author indexing facility.
894 The \pkgoption{index} option should be used with the \fname{apacitex.bst}
895 (or \fname{apacannx.bst})
896 \BibTeX{} style, although it does not give errors with \fname{apacite.bst}
897 (or \fname{apacann.bst}),
898 but simply does not give author index entries, so then this option
899 typically does not have any effect (and an undesirable effect if
900 it does). The \pkgoption{indexpackage} and \pkgoption{noindexpackage}
901 select whether the author index entries should be generated according
902 to the method of the \pkg{index} package or using a more standard-\LaTeX{}
903 method.
904
905 By default, if the \pkgoption{index} option is requested, the
906 \pkgoption{indexpackage} option is turned on as well, consistent with
907 the behavior of previous versions of \pkg{apacite}.
908
909 \item[\pkgoption{noindex}] \mbox{}\\
910 Turns author indexing off (the default). Typically used with
911 \fname{apacite.bst}, but can also be used with \fname{apacitex.bst}. In the
912 latter case, the author indexing commands are simply ignored. Therefore,
913 \fname{apacite.bst} is actually superfluous, but because author indexing
914 will be used rarely and \fname{apacitex.bst} is more likely to lead to errors
915 or incompatibilities, a ``clean'' (no author indexing) version,
916 \fname{apacite.bst}, is provided as well.
917
918 \item[\pkgoption{suppresscorporate}] \mbox{}\\
919 Excludes corporate authors from the author index. The \cmd{\bibcorporate}
920 command must be used in the \fname{.bib} file to denote a corporate author;
921 see sections~\ref{subsec:fields}, \ref{subsec:labels}, and~\ref{sec:autindex}.
922
923 \item[\pkgoption{includecorporate}] \mbox{}\\
924 Includes corporate authors in the author index, provided that an author index
925 is requested of course.
926
927 \item[\pkgoption{stdindex}]
928 \item[\pkgoption{tocindex}]
929 \item[\pkgoption{emindex}]
930 \item[\pkgoption{ltxemindex}] \mbox{}\\
931 These options select the style of index formatting. They all imply the
932 \pkgoption{index} option. The first three of these imply the
933 \pkgoption{indexpackage} option, whereas the fourth implies
934 \pkgoption{noindexpackage}. See section~\ref{sec:autindex}.
935
936 \item[\pkgoption{numberedbib}] \mbox{}\\
937 This option implies that the bibliography (reference list) is a numbered
938 section or chapter, e.g., ``6.~References'', instead of just ``References''.
939
940 \item[\pkgoption{unnumberedbib}] \mbox{}\\
941 The reverse of \pkgoption{numberedbib}: The bibliography is an unnumbered
942 section or chapter. This is the default. However, it is possible that when
943 using the \pkg{apa} document class, then \pkgoption{numberedbib} works
944 better, because that class turns section numbering off anyway and it may be
945 that \pkg{apa}'s page headings work well if the reference list is a
946 \cmd{\section} and not if it is a \cmd{\section*}. I have not experimented
947 with this (yet), however.
948
949 \item[\pkgoption{sectionbib}] \mbox{}\\
950 With this option, the bibliography is a section and not a chapter. Mainly
951 useful in combination with the \pkg{chapterbib} package. Therefore, it will
952 be discussed in more detail in section~\ref{sec:compat-chapterbib}.
953
954 \item[\pkgoption{nosectionbib}] \mbox{}\\
955 With this option, the bibliography is a chapter, if the \cmd{\chapter}
956 command is defined. Otherwise, it is always a section. Again, see
957 section~\ref{sec:compat-chapterbib}.
958
959 \item[\pkgoption{tocbib}] \mbox{}\\
960 This puts the bibliography in the table of contents, even if it is
961 unnumbered, provided of course that a table of contents is requested in the
962 document (by \cmd{\tableofcontents}). This is the default.
963
964 \item[\pkgoption{notocbib}] \mbox{}\\
965 This does not put the bibliography in the table of contents if it is an
966 unnumbered section or chapter. If it's numbered, it is always in the table
967 of contents.
968
969 \item[\pkgoption{bibnewpage}] \mbox{}\\
970 The bibliography is started on a new page. This is required by some journal
971 styles, including the APA manual. The \pkg{apa} class already contained this
972 in its \pkgoption{man} option, but now it has been made available directly
973 in \pkg{apacite}.
974
975 \item[\pkgoption{nobibnewpage}] \mbox{}\\
976 The bibliography is not explicitly started on a new page, although if the
977 bibliography is a chapter, it will be started on a new page anyway, because
978 chapters are started on a new page. This is the default in \pkg{apacite} and
979 thus is the only time a non-APA setting is used as default instead of an
980 available APA setting. Therefore, to satisfy the APA rules, you have to
981 request the \pkgoption{bibnewpage} option explicitly.
982
983 \item[\pkgoption{doi}] \mbox{}\\
984 Includes doi information in the reference list; the default.
985
986 \item[\pkgoption{nodoi}] \mbox{}\\
987 Suppresses doi information in the reference list.
988
989 \end{description}
990 %
991 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
992 \section{The citation commands}
993 \label{sec:cite}
994 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
995 This section describes the commands that can be used to cite a work.
996 Section~\ref{sec:classic} describes the commands available with the
997 \pkgoption{apaciteclassic} option selected. Section~\ref{sec:natbibapa}
998 is devoted to the citation commands with the \pkgoption{natbibapa}
999 command selected. Apart from differences in syntax, there are a few
1000 important differences between these sets of commands:
1001 \begin{itemize}
1002 \item
1003 The \pkgoption{apaciteclassic} commands are \emph{fragile}, like the
1004 standard \LaTeX{} \cmd{\cite} command. This means that they cannot be
1005 used in other commands, like \cmd{\caption}, unless they are protected
1006 by putting \cmd{\protect} before them, for example,
1007 \begin{verbatim}
1008 \caption{Theoretical constructs from \protect\citeA{Jones01}}
1009 \end{verbatim}
1010 In contrast, the \pkg{natbib}/\pkgoption{natbibapa} commands are
1011 \emph{robust}, so they can be used in other commands without the
1012 need for \cmd{\protect}.
1013 \item
1014 The use of the angled brackets (`|<|' and `|>|') in the
1015 \pkgoption{apaciteclassic} commands sometimes causes compatibility
1016 problems, for example, with certain options of the \pkg{babel}
1017 package, such as \pkgoption{spanish}.
1018 \item
1019 With the \pkgoption{sort} option, \pkg{natbib} sorts citations
1020 within the same citation command in the same order as in the reference
1021 list, as required by the APA manual (p.~178). Therefore, when
1022 \pkg{apacite} is loaded with the \pkgoption{natbibapa} option, it
1023 loads \pkg{natbib} with the \pkgoption{sort} option.
1024 Sorting is not implemented in the \pkgoption{apaciteclassic} commands,
1025 and thus the user will need to manually order the citations
1026 alphabetically.
1027 \item
1028 \pkg{natbib} provides a set of commands (e.g., \cmd{\Citet}) that
1029 capitalize the first letter of a citation. This can be used when
1030 a citation, of which the first author's name starts with a lowercase
1031 letter, starts a sentence (APA manual, p.~101). This behavior would
1032 be very hard to reproduce with the \pkgoption{apaciteclassic}
1033 commands.
1034 \end{itemize}
1035 Overall, I believe that the \pkg{natbibapa} option will be preferred
1036 by most users, and I expect that I will make this the default in a
1037 future release of \pkg{apacite}. However, because most users of
1038 \pkg{apacite} will still be working on documents that use the
1039 \pkgoption{apaciteclassic} commands, this is still the default in the
1040 current version.
1041
1042 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1043 \subsection{The ``classic'' \pkg{apacite} citation commands}
1044 \label{sec:classic}
1045 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1046 This section describes the default behavior of the citation commands
1047 that are avilable with the \pkgoption{apaciteclassic} option.
1048 In section~\ref{sec:custom}, customization of this behavior will be
1049 discussed. Extensive examples are given in section~\ref{sec:xmpl}
1050 and the new examples file described there. Table~\ref{tab:basic-cite}
1051 gives a brief impression of the usage and results of the most common
1052 citation commands.
1053
1054 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1055 \begin{table}[tp]
1056 \begin{center}
1057 \caption{Examples of usage of basic citation commands.}
1058 \label{tab:basic-cite}
1059 \begin{tabular}{@{}ll@{}}
1060 \hline
1061 Command & Result \\
1062 \hline
1063 |\cite<e.g.,>[p.~11]{Jone01,Ross87}| &
1064 (e.g., Jones, 2001; Ross, 1987, p.~11) \\
1065 |\citeA<e.g.,>[p.~11]{Jone01,Ross87}| &
1066 e.g., Jones (2001); Ross (1987, p.~11) \\
1067 |\citeauthor<e.g.,>[p.~11]{Jone01,Ross87}| &
1068 e.g., Jones; Ross, p.~11 \\
1069 |\citeyear<e.g.,>[p.~11]{Jone01,Ross87}| &
1070 (e.g., 2001; 1987, p.~11) \\
1071 |\citeyearNP<e.g.,>[p.~11]{Jone01,Ross87}| &
1072 e.g., 2001; 1987, p.~11 \\
1073 |\citeNP<e.g.,>[p.~11]{Jone01,Ross87}| &
1074 e.g., Jones, 2001; Ross, 1987, p.~11 \\
1075 \hline
1076 \end{tabular}
1077 \end{center}
1078 \end{table}
1079 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1080
1081
1082 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1083 \subsubsection*{Structure of the citation commands;
1084 parenthetical citations}
1085 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1086 \DescribeMacro{\cite}
1087 The traditional \LaTeX{} citation command is \cmd{\cite}, and
1088 \pkg{apacite} reimplements this command. This command is used for
1089 \emph{parenthetical} citations. For example,
1090 ``|\cite{Jone01}|'' results in ``(Jones, 2001)''. Here,
1091 |Jone01| is the \emph{key} that identifies the reference; it is
1092 defined in the \fname{.bib} file, see section~\ref{sec:bib}.
1093 An optional postfix---text that follows the actual citation---can
1094 be added as a standard \LaTeX{} optional argument in square brackets:
1095 ``|\cite[p.~11]{Jone01}|'' results in ``(Jones, 2001, p.~11)''.
1096 Similarly, an optional prefix can be added between angled brackets:
1097 ``|\cite<e.g.,>{Jone01}|'' results in ``(e.g., Jones, 2001)''.
1098 Finally, there can be both a prefix and a postfix (in that order):
1099 ``|\cite<e.g.,>[p.~11]{Jone01}|'' results in
1100 ``(e.g., Jones, 2001, p.~11)''. As usual, multiple references
1101 can be included within the same citation:
1102 ``|\cite<e.g.,>[p.~11]{Jone01, Ross87}|'' results in
1103 (e.g., Jones, 2001; Ross, 1987, p.~11). The citation keys of multiple
1104 citations must be separated by commas, with optional spaces after the
1105 commas.
1106
1107 By default, \pkg{apacite} follows the APA rules and includes the
1108 citation in round parentheses, separates the author and year by a
1109 comma, the different references by a semicolon, and the year and
1110 the postfix by a comma, but this can all be changed by the user;
1111 see section~\ref{sec:custom}.
1112
1113 \pkg{apacite} defines a large number of alternative citation
1114 commands, but they all have this same structure:
1115 \cmdfour{command}{prefix}{postfix}{keys}. However, the prefix, and to
1116 a lesser extent the postfix, are most useful with the parenthetical
1117 citation commands.
1118
1119 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1120 \subsubsection*{Text citations; splitting author and year; no
1121 parentheses}
1122 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1123 \DescribeMacro{\citeA}
1124 The \cmd{\citeA} command produces text citations:
1125 ``|\citeA{Jone01}|'' results in ``Jones (2001)'' and.
1126 ``|\citeA[p.~11]{Jone01}|'' results in ``Jones (2001, p.~11)''.
1127 Prefixes are generally not useful for text citations (you can simply
1128 include the prefix in the text), but supported. Multiple citations
1129 are also supported. These are typically only useful for cases in which
1130 the authors are the same and only the year is repeated:
1131 ``|\citeA{Jone01, Jone02}|'' results in ``Jones (2001, 2002)''.
1132 Corresponding with the APA rules, an ``and'' before the last author
1133 is formatted as ``and'' in text citations, whereas it is formatted
1134 as ``\&'' in parenthetical citations:
1135 ``|\citeA{SmJo03}|'' gives ``Smith and Jones (2003)'', whereas
1136 ``|\cite{SmJo03}|'' gives ``(Smith \& Jones, 2003)''.
1137
1138 \DescribeMacro{\citeauthor}
1139 If a proper citation has been given in a paragraph,\footnote{Note that
1140 a paragraph is not a section. Nor does it need to be declared as a
1141 \cmd{\paragraph}. A reminder for Dutch readers: ``section'' =
1142 ``paragraaf'' and ``paragraph'' = ``alinea''.}
1143 the second reference to the source may omit the year if no ambiguity
1144 can arise (APA manual, p.~174). The \cmd{\citeauthor} command can
1145 be used for such purposes:
1146 \begin{verbatim}
1147 \citeA{Jone01} argued that [...]. The empirical results of
1148 \citeauthor{Jone01} supported his argument.
1149 \end{verbatim}
1150 gives ``Jones (2001) argued that [\ldots]. The empirical results of
1151 Jones supported his argument.''
1152
1153 \DescribeMacro{\citeyear}
1154 The \cmd{\citeyear} command gives just the year part of a text
1155 citation. This can be used for constructions like
1156 ``|\citeauthor{Jone01}' \citeyear{Jone01} method|'', which
1157 gives ``Jones' (2001) method''. Note that \cmd{\citeyear} inserts the
1158 parentheses.
1159
1160 \DescribeMacro{\citeyearNP}
1161 Some constructions may require even more flexibility. The
1162 \cmd{\citeyearNP} command (NP = no parentheses) omits the
1163 parentheses, which can be useful for a construction like
1164 ``|In \citeyearNP{Jone01},| |\citeauthor{Jone01}| |introduced|
1165 |his method|'', which gives ``In 2001, Jones introduced his method''.
1166
1167 \DescribeMacro{\citeauthorNP}
1168 As mentioned above, text citations use ``and'' between authors,
1169 whereas parenthetical citations use ``\&''. The, \cmd{\citeauthor}
1170 command is a text citation command and thus should not be used
1171 in a parenthetical citation; \cmd{\citeauthorNP} is the corresponding
1172 parenthetical command, which gives just the authors, but now with
1173 ``\&'' when applicable. Note that neither \cmd{\citeauthor} nor
1174 \cmd{\citeauthorNP} insert parentheses. In hindsight, it would have
1175 been more logical---following \cmd{\cite} and \cmd{\citeA}---to use
1176 \cmd{\citeauthorA} for what is now \cmd{\citeauthor} and
1177 \cmd{\citeauthor} for what is now \cmd{\citeauthorNP}, but
1178 \cmd{\citeauthor} already existed as a text citation command in
1179 \pkg{apacite}'s predecessor \pkg{theapa}, it is used as such in
1180 some other packages (e.g., \pkg{natbib}), and I didn't realize at
1181 the time that \pkg{apacite} would need both. Therefore, the name
1182 \cmd{\citeauthorNP} is modeled after \cmd{\citeNP}
1183
1184 \DescribeMacro{\citeNP}
1185 The \cmd{\citeNP} command is \cmd{\cite} without the parentheses.
1186 This is useful for complex constructions like
1187 \begin{verbatim}
1188 \citeauthor{Jone01} (\citeyearNP{Jone01}; see also \citeNP{SmJo03})
1189 \end{verbatim}
1190 which gives
1191 ``Jones (2001; see also Smith \& Jones, 2003)''.
1192
1193 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1194 \subsubsection*{References without citation}
1195 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1196 \DescribeMacro{\nocite}
1197 The standard \LaTeX{} command \cmd{\nocite} is also provided by
1198 \pkg{apacite}; \cmdtwo{nocite}{keys} includes the references
1199 corresponding with the keys in the reference list, but does not
1200 generate a citation in the text. Therefore, it does not allow a pre-
1201 or postfix. However, it does allow multiple citations. Like the
1202 standard \LaTeX{} command, |\nocite{*}| includes all references
1203 from the \fname{.bib} file in the reference list. In general, the APA
1204 requires (p.~174) that each reference list entry should be cited in
1205 the text, and thus this command will rarely be used in APA style
1206 manuscripts. One potential application is a meta-analysis based
1207 on more than 50 works. (See \cmd{\nocitemeta} below.)
1208
1209 \DescribeMacro{\nocitemeta}
1210 An exception to the one-to-one correspondence requirement between
1211 citations and reference list is when a meta-analysis is reported.
1212 This is a quantitative analysis with results, e.g., regression
1213 coefficients, from published work used as data in the current work.
1214 Studies that are included in the meta-analysis should be included
1215 in the reference list, but do not need to be cited. They should,
1216 however, be marked with an asterisk in the reference list. This
1217 can be obtained by using \cmd{\nocitemeta}, which is otherwise
1218 identical to \cmd{\nocite}: the syntax is \cmdtwo{nocitemeta}{keys}
1219 and |\nocitemeta{*}| includes all entries from the \fname{.bib} file
1220 in the reference list and flags all of them with an asterisk. This
1221 is an unlikely situation, though. Because other packages, in particular
1222 \pkg{natbib} do not define \cmd{\nocitemeta} or an analogous command,
1223 \pkg{apacite} provides \cmd{\nocitemeta} regardless of whether the
1224 \pkgoption{apaciteclassic}, \pkgoption{natbibapa}, or even
1225 \pkgoption{nocitation} option is requested.
1226
1227 If a meta-analysis includes more than 50 studies, these should not
1228 be included in the main reference list, but in a separate online
1229 supplemental archive (APA manual, p.~183). \pkg{apacite} currently
1230 does not count the number of references included in the meta-analysis,
1231 and thus does not check whether the references should be included in
1232 a separate online supplemental archive, it does not disable the
1233 \cmd{\nocitemeta} command, and it does not automatically generate
1234 the supplemental document. This is the responsibility of the user.
1235 If there is demand for it, I might implement such a counter so that
1236 \pkg{apacite} can give a warning at the end of the \LaTeX{} run that
1237 there are more than 50 references included in the meta-analysis.
1238 Presumably, in the online supplemental archive, the references are
1239 not marked with an asterisk, so this would be an example where
1240 \cmd{\nocite} can be useful.
1241
1242 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1243 \subsubsection*{Full and short author lists}
1244 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1245 \DescribeMacro{\fullcite}
1246 \DescribeMacro{\fullciteA}
1247 \DescribeMacro{\fullciteNP}
1248 \DescribeMacro{\fullciteauthor}
1249 \DescribeMacro{\fullciteauthorNP}
1250 When citing a work with one or two authors, all authors are included
1251 in each citation. When citing a work with six or more authors, only
1252 the first author's name is included in the text, followed by
1253 ``et al.\hbox{}''. With three to five authors, the full list is
1254 included the first time the work is cited, and only the first with
1255 ``et al.\hbox{}'' in subsequent citations.
1256
1257 \DescribeMacro{\shortcite}
1258 \DescribeMacro{\shortciteA}
1259 \DescribeMacro{\shortciteNP}
1260 \DescribeMacro{\shortciteauthor}
1261 \DescribeMacro{\shortciteauthorNP}
1262 There are some special cases, where some of the authors and the year
1263 are the same, but not the whole author list, in which more names are
1264 retained on subsequent citations as well. Section~\ref{sec:xmpl}
1265 includes some examples of complex situations and how to deal with
1266 them. All of this is automatically handled by \pkg{apacite}.
1267
1268 However, occasionally one may want to use the full
1269 author list even after a first citation, or the short author list in
1270 the first citation. For such (rare) cases, \pkg{apacite} provides
1271 ``full'' and ``short'' versions of all citation commands that include
1272 an author (list) in the text. Other than forcing the full or short
1273 author list in the text, these commands are identical to the versions
1274 without ``|full|'' or ``|short|''.
1275
1276 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1277 \subsubsection*{Masked citations}
1278 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1279 \DescribeMacro{\maskcite}
1280 \DescribeMacro{\maskciteA}
1281 \DescribeMacro{\maskciteNP}
1282 \DescribeMacro{\maskciteauthor}
1283 \DescribeMacro{\maskciteauthorNP}
1284 \DescribeMacro{\maskciteyear}
1285 \DescribeMacro{\maskciteyearNP}
1286 Many journals use a ``masked'' or double-blind review process, in
1287 which the identities of the authors are concealed from the reviewers.
1288 As the APA manual states (p.~226), it is the responsibility of the
1289 authors to ensure that the content of the manuscript does not reveal
1290 their identities. This may include suppressing citations to other
1291 work by the authors, in particular unpublished material, such as
1292 the working paper version of the manuscript under review. To this
1293 end, the \pkg{apa6} class introduced ``masked'' citation commands,
1294 which produce the desired citation for the unmasked mode, but
1295 insert a message stating that citations have been masked in masked
1296 mode. Because these are citation commands, they are more properly
1297 included in \pkg{apacite}, and they now are. I am coordinating with
1298 \pkg{apa6}'s author Brian Beitzel on this issue (and other points
1299 of interaction between \pkg{apa6} and \pkg{apacite}).
1300
1301 \DescribeMacro{\maskfullcite}
1302 \DescribeMacro{\maskfullciteA}
1303 \DescribeMacro{\maskfullciteNP}
1304 \DescribeMacro{\maskfullciteauthor}
1305 \DescribeMacro{\maskfullciteauthorNP}
1306 All the citation commands introduced in this section have a
1307 corresponding masked version, which has the same syntax and the same
1308 name, except that ``|mask|'' is inserted immediately after the
1309 backslash. Thus, the masked version of \cmd{\cite} is \cmd{\maskcite},
1310 the masked version of \cmd{\fullciteauthorNP} is
1311 \cmd{\maskfullciteauthorNP}, and so forth.
1312
1313 \DescribeMacro{\maskshortcite}
1314 \DescribeMacro{\maskshortciteA}
1315 \DescribeMacro{\maskshortciteNP}
1316 \DescribeMacro{\maskshortciteauthor}
1317 \DescribeMacro{\maskshortciteauthorNP}
1318 When \pkg{apacite} is loaded with the \pkgoption{mask} option, these
1319 masked citation commands insert the message
1320 ``\emph{(1\ citation removed for masked review)}'', or
1321 ``\emph{(2\ citations removed for masked review)}'', and so forth,
1322 depending on the number of citations included in the citation
1323 command. When \pkg{apacite} is loaded with the \pkgoption{unmask}
1324 option (the default), the masked citation commands are equivalent
1325 to the same commands without the ``|mask|''.
1326
1327 \DescribeMacro{\masknocite}
1328 \DescribeMacro{\masktext}
1329 %% \DescribeMacro{\maskcitations}
1330 %% \DescribeMacro{\unmaskcitations}
1331 In addition to the masked citation commands, \pkg{apacite} also
1332 provides \cmd{\masknocite}, although its usefulness seems even more
1333 remote than \cmd{\nocite} itself in APA style documents. Because
1334 \cmd{\nocite} does not insert a citation, \cmd{\masknocite} does
1335 not remove citations in \pkgoption{mask} mode. It only prevents an
1336 entry in the reference list. Therefore, this command does not
1337 insert a message about removed citations in the text either. Hence,
1338 it does nothing in \pkgoption{mask} mode. An additional command
1339 provided by \pkg{apacite} is \cmd{\masktext}. This has one mandatory
1340 argument, the text that is to be masked. It also has an optional
1341 argument, which is the text to be inserted in \pkgoption{mask} mode.
1342
1343
1344 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1345 \subsubsection*{Ad-hoc citation commands}
1346 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1347 In order to format the examples from the APA manual correctly in
1348 section~\ref{sec:xmpl}, the \fname{apacdoc.sty} package defines the
1349 following additional citation commands: \cmd{\DSMcite},
1350 \cmd{\biblecite}, and \cmd{\citesong}, and obvious variations with
1351 |full|, |short|, |A|, and |NP|. I have decided not to include these
1352 in \fname{apacite.sty}, primarily because I find it unattractive to
1353 introduce different types of citation commands for different types of
1354 citations. This also makes it more difficult to use the same document
1355 with another citation package. Perhaps I'll be able to provide,
1356 in a future version of \pkg{apacite}, more elegant solutions to the
1357 problems for which these commands were defined. See
1358 section~\ref{sec:apacdoc} for a description of the \fname{apacdoc.sty}
1359 package and some brief usage instructions.
1360
1361
1362 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1363 \subsection{Using \pkg{natbib} for citations}
1364 \label{sec:natbibapa}
1365 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1366 With the \pkgoption{natbibapa} option, \pkg{apacite} loads \pkg{natbib}
1367 with the options \pkgoption{longnamesfirst} and \pkgoption{sort}. The
1368 former inserts the full author lists in the first citation and the
1369 short author lists in subsequent citations, in the same way the
1370 \pkgoption{apaciteclassic} commands do. The \pkgoption{sort} option
1371 sorts the citations within the same citation command in the same order
1372 as in the reference list, as required by the APA manual (p.~178).
1373 In addition to loading \pkg{natbib}, \pkg{apacite} includes some
1374 code to improve the interoperability, and it defines some additional
1375 commands that are specific to the \pkg{natbib}-\pkg{apacite}
1376 combination. The latter will be described below.
1377
1378 Because the citation commands are defined by \pkg{natbib}, this is
1379 not the place for extensive documentation of them. See the \pkg{natbib}
1380 documentation. However, for completeness, I provide very brief
1381 information here. Table~\ref{tab:natbibapa} lists the commands and
1382 a brief description.
1383
1384 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1385 \begin{table}[tp]
1386 \centering
1387 \caption{The \pkg{natbib} citation commands.}
1388 \label{tab:natbibapa}
1389 \begin{tabular}{@{}ll@{}}
1390 \hline
1391 Command & Description \\
1392 \hline
1393 \cmd{\citep} & Parenthetical citation \\
1394 \cmd{\citet} & Text citation \\
1395 \cmd{\citeauthor} & Author only (text citation) \\
1396 \cmd{\citeyear} & Year only (no parentheses) \\
1397 \cmd{\citeyearpar} & Year citation (with parentheses) \\
1398 \cmd{\citealp} & Parenthetical citation without the parentheses \\
1399 \cmd{\citealt} & Text citation without the parentheses \\
1400 \cmd{\citenum} & Number of the reference \\
1401 \cmd{\nocite} & No citation, only reference list entry \\
1402 \cmd{\Citep} etc. & Capitalized citation \\
1403 \cmd{\citep*} etc. & Full author lists \\
1404 \cmd{\shortcites} & Short author lists \\
1405 \cmd{\defcitealias} & Define alias (e.g., \emph{DSM-IV}) \\
1406 \cmd{\citepalias} & Parenthetical citation of alias \\
1407 \cmd{\citetalias} & Text citation of alias \\
1408 \cmd{\citetext} & Arbitrary text within citation parentheses \\
1409 \hline
1410 \end{tabular}
1411 \end{table}
1412 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1413
1414 Compared to the \pkgoption{apaciteclassic} commands,
1415 the \pkg{natbib} commands use square brackets for both the prefix and
1416 the postfix: ``|\command[prefix][postfix]{keys}|''. If only one
1417 optional argument is present, it is interpreted as a postfix. A
1418 citation with only a prefix is obtained by using both optional
1419 arguments, but leaving the postfix empty:
1420 ``|\command[prefix][]{keys}|''. The full author list is obtained
1421 by adding a star after the command, for example, |\citet*{key}|.
1422 There is no separate command for the short author list, but it can
1423 be obtained with the construction |\shortcites{key}\citet{key}|.
1424 The first letter of the author list is capitalized with citation
1425 commands that capitalize the first letter of the citation command,
1426 such as \cmd{\Citet}.
1427
1428 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1429 \subsubsection*{Filling some gaps and other additions}
1430 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1431 \DescribeMacro{\citeauthorp}
1432 \DescribeMacro{\citeauthort}
1433 \DescribeMacro{\Citeauthorp}
1434 \DescribeMacro{\Citeauthort}
1435 As mentioned in section~\ref{sec:classic}, the APA requires that
1436 ``and'' between authors is ``and'' in text citations and ``\&'' in
1437 parenthetical citations, and therefore the \pkgoption{apaciteclassic}
1438 option defines two author-citing commands: \cmd{\citeauthor} for
1439 text citations and \cmd{\citeauthorNP} for parenthetical citations.
1440 However, \pkg{natbib} only provides \cmd{\citeauthor}. For
1441 consistency with \cmd{\citep} and \cmd{\citet}, when loaded with the
1442 \pkgoption{natbibapa} option, \pkg{apacite} defines
1443 \cmd{\citeauthorp} for parenthetical use and \cmd{\citeauthort} for
1444 text use, and the corresponding capitalized versions \cmd{\Citeauthorp}
1445 and \cmd{\Citeauthort}. The default command \cmd{\citeauthor} is a
1446 text citation command, so it's equivalent to \cmd{\citeauthort}.
1447
1448 %% \DescribeMacro{\citefullauthorp}
1449 %% \DescribeMacro{\citefullauthort}
1450 %% \DescribeMacro{\Citefullauthorp}
1451 %% \DescribeMacro{\Citefullauthort}
1452
1453 \DescribeMacro{\bibstyle@apacite}
1454 \DescribeMacro{\bibstyle@apa}
1455 The \pkg{natbib} package is also highly customizable, and one of
1456 the ways it allows customization is by the \cmd{\bibstyle@xxx}
1457 commands, which typically define the desired punctuation through
1458 \cmd{\bibpunct} and may define other customizations. These are
1459 executed by using the command |\citestyle{xxx}|. Furthermore, when
1460 \pkg{natbib} is loaded, it checks the bibliography style and if it
1461 is \fname{xxx.bst}, then it tries to execute |\citestyle{xxx}| if
1462 defined. With the \pkgoption{natbibapa} option, \pkg{apacite}
1463 defines \cmd{\bibstyle@apacite}, and as a synonym, \cmd{\bibstyle@apa}.
1464 Thus, the APA punctuation defaults can be obtained with
1465 |\citestyle{apacite}| or |\citestyle{apa}|, which are executed
1466 by \pkg{apacite}, so the user only needs to do this if the style
1467 has been changed.
1468
1469 \DescribeMacro{\maskcitep}
1470 \DescribeMacro{\maskcitet}
1471 \DescribeMacro{\maskciteauthor}
1472 \DescribeMacro{\maskciteyear}
1473 \DescribeMacro{\maskciteyearpar}
1474 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1475 \subsubsection*{Masked citations}
1476 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1477 \DescribeMacro{\maskcitealp}
1478 \DescribeMacro{\maskcitealt}
1479 \DescribeMacro{\maskcitenum}
1480 \DescribeMacro{\maskcitetalias}
1481 \DescribeMacro{\maskcitepalias}
1482 Section~\ref{sec:classic} described masked citation commands that
1483 can be used in double-blind review processes in an effort to conceal
1484 the identity of the authors. Because \pkg{natbib} itself does not
1485 define such commands, \pkg{apacite} with the \pkgoption{natbibapa}
1486 option defines a full set of \pkg{natbib}-style masked citation
1487 commands. Again, these are identical to the un-|mask| version if
1488 the \pkgoption{mask} option is not requested, but insert a message
1489 about removed citations when the \pkgoption{mask} option is requested.
1490
1491 \DescribeMacro{\maskCitep}
1492 \DescribeMacro{\maskCitet}
1493 \DescribeMacro{\maskCiteauthor}
1494 \DescribeMacro{\maskCitealp}
1495 \DescribeMacro{\maskCitealt}
1496 %% The |\mbox{}| is necessary to avoid errors about too many
1497 %% unprocessed floats. This gives some ugly vertical whitespace, but
1498 %% the only alternative would be to write some superfluous paragraphs,
1499 %% which is equally unattractive.
1500 \mbox{}
1501
1502 \DescribeMacro{\maskciteauthorp}
1503 \DescribeMacro{\maskciteauthort}
1504 \DescribeMacro{\maskCiteauthorp}
1505 \DescribeMacro{\maskCiteauthort}
1506 \DescribeMacro{\masknocite}
1507 \DescribeMacro{\masktext}
1508 \mbox{}
1509
1510 %% \DescribeMacro{\maskcite}
1511 %% \DescribeMacro{\maskcitefullauthor}
1512 %% \DescribeMacro{\maskCitefullauthor}
1513
1514 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1515 \section{Contents of the bibliography database file}
1516 \label{sec:bib}
1517 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1518 The information that is used by \LaTeX/\BibTeX{} to generate
1519 the citations and reference list must be stored by the user in one
1520 or more files with the \fname{.bib} extension.
1521 A detailed overview of the contents of the \fname{.bib} file is
1522 given in \citeA[section~12.2]{KoDa04} and \citeA[section~13.2]{TLC2}.
1523 Roughly speaking, the
1524 \fname{.bib} file consists of a collection of \emph{entries}
1525 of the form
1526 \mbox{}\vspace{0.7\baselineskip}\\
1527 \verb+@+\opt{entryname}\verb+{+\opt{contents}\verb+}+
1528 \mbox{}\vspace{0.7\baselineskip}\\
1529 Most entries describe a work that may be referenced, e.g., a book
1530 or article. There are, however, two exceptions: a \entryname{preamble}
1531 entry (with \opt{entryname} = \verb+preamble+) and a \entryname{string}
1532 entry (with \opt{entryname} = \verb+string+). There is typically
1533 at most one \entryname{preamble} entry. Its \opt{contents} consist of a
1534 string---according to \BibTeX, i.e., between double quotes (\verb+"+)
1535 or an additional pair of braces (\verb+{+ and \verb+}+). This
1536 string, which typically consists of \LaTeX{} commands like
1537 \verb+\newcommand{\SortNoop}[1]{}+, is literally included
1538 in the document before the bibliography. It can therefore be used
1539 to define commands that are used in the (other) entries of the
1540 \fname{.bib} file and that are not standard \LaTeX{}.
1541
1542 A \entryname{string} entry is similar, but the contents are now not
1543 included in the document. Instead, the string is assigned to a kind of
1544 ``variable'', the name of which may contain characters
1545 not usually associated with variable names, like colons and
1546 hyphens, see \citeA[p.~769]{TLC2}. An example of a
1547 \entryname{string} entry is
1548 \begin{verbatim}
1549 @string{ JPSP = {Journal of Personality and Social Psychology} }
1550 \end{verbatim}
1551 Then, if in a later entry, the journal is
1552 \emph{Journal of Personality and Social Psychology}, you can format this
1553 as
1554 \begin{verbatim}
1555 journal = JPSP,
1556 \end{verbatim}
1557 instead of the usual
1558 \begin{verbatim}
1559 journal = {Journal of Personality and Social Psychology},
1560 \end{verbatim}
1561 This is not only convenient because it saves typing of common
1562 long journal names (and reduces the likelihood of typos), but it can
1563 also be used to define style-specific variations. For example, some
1564 styles abbreviate journal names, such as
1565 \emph{J.~Pers.\ Soc.\ Psych.}\hbox{} instead of
1566 \emph{Journal of Personality and Social Psychology}.
1567 You could then put the definitions of all full journal names
1568 in one \fname{.bib} file (\fname{fulljou.bib}, say) and the definitions
1569 of the abbreviated journal names in another (\fname{abbrjou.bib}, say).
1570 Suppose that the information about the referenced works is stored in a
1571 third file, say, \fname{myrefs.bib}, and that the ``NotAPA''
1572 style rules, implemented in the \fname{notapa.bst} \BibTeX{} style file,
1573 require the abbreviated journal names. Then you can use
1574 \begin{verbatim}
1575 \bibliographystyle{notapa}
1576 \bibliography{abbrjou,myrefs}
1577 \end{verbatim}
1578 to obtain a reference list complying with the ``NotAPA'' rules. If
1579 you change your mind and decide to switch to using the rules of the
1580 APA manual, you only need to change the two lines above into
1581 \begin{verbatim}
1582 \bibliographystyle{apacite}
1583 \bibliography{fulljou,myrefs}
1584 \end{verbatim}
1585 (and additionally load the \fname{apacite.sty} \LaTeX{} package
1586 through \cmd{\usepackage}).
1587
1588 The remaining entry types are types that correspond with the
1589 type of a referenced work, e.g., \entryname{book} or
1590 \entryname{article}. These entry types (reference types) are
1591 discussed in section~\ref{subsec:types} below.
1592 Such entries have the following structure:
1593 \mbox{}\vspace{0.7\baselineskip}\\
1594 \verb+@+\opt{entryname}\verb+{+\opt{key}\verb+,+\\
1595 $\mbox{}\qquad$\opt{fieldname1}\verb+ = +\opt{value1}\verb+,+\\
1596 $\mbox{}\qquad$\opt{fieldname2}\verb+ = +\opt{value2}\verb+,+\\
1597 $\mbox{}\qquad\qquad\vdots$\\
1598 $\mbox{}\qquad$\opt{fieldnameN}\verb+ = +\opt{valueN}\verb+,+\\
1599 \verb+}+
1600 \mbox{}\vspace{0.7\baselineskip}\\
1601 where \opt{key} corresponds to the key used in the citation
1602 commands and matches the entry with the citation (and should
1603 therefore be unique). The fieldnames are \verb+author+, \verb+year+,
1604 etc., which are described in section~\ref{subsec:fields} below.
1605 The values are strings, either defined previously by a
1606 \entryname{string} entry or explicitly indicated as such here
1607 by putting the relevant information between double quotes
1608 (\verb+"+) or a pair of braces (\verb+{+ and \verb+}+).
1609
1610 To be able to obey the rules of the APA manual, \pkg{apacite}
1611 provides several fields and reference types that are not
1612 described in the standard \BibTeX{} documentation
1613 \cite<e.g.,>[Chapter~13]{TLC2}. Furthermore,
1614 the meaning and usage of many fields and reference types that
1615 \emph{are} described there have been altered somewhat. Therefore,
1616 a complete description is given here.
1617 The symbol \LC{} will be used to indicate that the field or
1618 reference type is also described in \citeA[Appendix~B]{LaTeXbook},
1619 \citeA[Chapter~12]{KoDa04}, or \citeA[Chapter~13]{TLC2}, although, as
1620 mentioned above, the specific meaning of the item may have been
1621 changed.
1622
1623 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1624 \subsection{Types of references}
1625 \label{subsec:types}
1626 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1627 In this section, the list of reference types that are recognized by
1628 \pkg{apacite} is given. An overview of which fields can be used for which
1629 reference type is given in Table~\ref{tab:fieldref}. If fields are not
1630 relevant, but you use them anyway in your \fname{.bib} file, they are ignored.
1631 The fields and their use are described in more detail in
1632 section~\ref{subsec:fields}, but here some specific issues will already be
1633 mentioned.
1634
1635 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1636 \begin{table}[p]
1637 \centering
1638 \caption{List of fields that are used by the various reference types
1639 (blank = not used; \X{} = used;
1640 \Y{} = used, but only for citations; \A{} = only used by
1641 \pkg{apacann} and \pkg{apacannx}).}
1642 \label{tab:fieldref}
1643 \small
1644 \makebox[0pt]{% some manipulation to squeeze the table onto the page
1645 \newlength{\oldtabcolsep}
1646 \setlength{\oldtabcolsep}{\tabcolsep}
1647 \setlength{\tabcolsep}{2pt}
1648 \begin{tabular}{@{}l@{}cccccccccc@{}}
1649 \hline
1650 & \multicolumn{10}{c}{Reference type}\\
1651 \cline{2-11}
1652 %
1653 % Normally, I would use the sideways environment of the rotating
1654 % package to format this nicely, but I do not want to require
1655 % other packages to format this document, so I choose an uglier
1656 % solution here.
1657 %
1658 & article\\
1659 & magazine & & & & &
1660 & phdthesis
1661 &
1662 & manual\\
1663 Field
1664 & newspaper & book & incollection & techreport & intechreport & lecture
1665 & mastersthesis
1666 & unpublished
1667 & misc
1668 & literal\\
1669 \hline
1670 address & &\X&\X&\X&\X&\X&\X&\X&\X& \\
1671 annote &\A&\A&\A&\A&\A&\A&\A&\A&\A&\A\\
1672 annotate &\A&\A&\A&\A&\A&\A&\A&\A&\A&\A\\
1673 author &\X&\X&\X&\X&\X&\X&\X&\X&\X& \\
1674 booktitle & & &\X& &\X& & & & & \\
1675 chair & & & & & &\X& & & & \\
1676 chapter & & &\X& & & & & & & \\
1677 day &\X& &\X&\X&\X&\X& &\X&\X& \\
1678 doi &\X&\X&\X&\X&\X&\X&\X&\X&\X&\X\\
1679 edition & &\X&\X&\X&\X& &\X& &\X& \\
1680 editor &\X&\X&\X&\X&\X& & &\X&\X& \\
1681 englishtitle &\X&\X&\X&\X&\X&\X&\X&\X&\X& \\
1682 firstkey &\Y&\Y&\Y&\Y&\Y&\Y&\Y&\Y&\Y&\Y\\
1683 howpublished &\X&\X&\X&\X&\X&\X&\X&\X&\X& \\
1684 institution & & & &\X&\X& & & & & \\
1685 journal &\X& & & & & &\X& & & \\
1686 key &\Y&\Y&\Y&\Y&\Y&\Y&\Y&\Y&\Y&\Y\\
1687 lastchecked &\X&\X&\X&\X&\X&\X&\X&\X&\X& \\
1688 month &\X& &\X&\X&\X&\X& &\X&\X& \\
1689 note &\X&\X&\X&\X&\X&\X&\X&\X&\X& \\
1690 number &\X&\X& &\X&\X& &\X&\X&\X& \\
1691 organization & & & & & & & &\X& & \\
1692 originaladdress &\X&\X&\X& &\X& & & & & \\
1693 originalbooktitle &\X&\X&\X& &\X& & & & & \\
1694 originaledition &\X&\X&\X& &\X& & & & & \\
1695 originaleditor &\X&\X&\X& &\X& & & & & \\
1696 originaljournal &\X&\X&\X& &\X& & & & & \\
1697 originalnumber &\X&\X&\X& &\X& & & & & \\
1698 originalpages &\X&\X&\X& &\X& & & & & \\
1699 originalpublisher &\X&\X&\X& &\X& & & & & \\
1700 originalvolume &\X&\X&\X& &\X& & & & & \\
1701 originalyear &\X&\X&\X&\Y&\X&\Y&\X&\Y&\Y&\Y\\
1702 pages &\X& &\X& &\X& &\X& & & \\
1703 publisher & &\X&\X& & & & & &\X& \\
1704 school & & & & & & &\X& & & \\
1705 series & & & & & & & & & & \\
1706 symposium & & & & & &\X& & & & \\
1707 text & & & & & & & & & &\X\\
1708 title &\X&\X&\X&\X&\X&\X&\X&\X&\X& \\
1709 translator &\X&\X&\X&\Y&\X&\Y&\Y&\Y&\Y&\Y\\
1710 type &\X&\X&\X&\X&\X&\X&\X&\X&\X& \\
1711 url &\X&\X&\X&\X&\X&\X&\X&\X&\X& \\
1712 urldate &\X&\X&\X&\X&\X&\X&\X&\X&\X& \\
1713 volume &\X&\X&\X&\X&\X& &\X& &\X& \\
1714 year &\X&\X&\X&\X&\X&\X&\X&\X&\X&\Y\\
1715 \hline
1716 \end{tabular}%
1717 \setlength{\tabcolsep}{\oldtabcolsep}
1718 }
1719 %
1720 \end{table}
1721 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1722
1723 The following entry types (reference types) are defined in \pkg{apacite}:
1724 \begin{description}
1725 \item[\entryname{article}\LC] \mbox{}\\
1726 A journal article or comparable. If the
1727 ``article'' referenced to is a special issue of a journal or
1728 something else that has editors instead of authors, the
1729 \fieldname{author} field should be empty and the \fieldname{editor}
1730 field should be used for the editors. If the journal paginates
1731 by issue instead of by volume, or when you are referring to a
1732 whole special issue, the issue number should be given
1733 in the \fieldname{number} field. In all other cases (including
1734 referring to an article within a special issue), the
1735 \fieldname{number} field must not be used. The \fieldname{type}
1736 field can be used to denote the type of article, for example,
1737 ``\verb+Letter to the editor+'', or
1738 ``\verb+Review of the book \emph{Life in the middle}+''.
1739
1740 \item[\entryname{magazine}] \mbox{}\\
1741 A magazine article. Unlike in early versions of \pkg{apacite},
1742 this is now equivalent to \entryname{article}. However, with
1743 an \entryname{article}, the \fieldname{month} and \fieldname{day}
1744 fields should generally not be used, unless there is a compelling
1745 reason to use them. For a magazine, the \fieldname{month}, and
1746 \fieldname{day} (for weeklies) fields are commonly used.
1747
1748 \item[\entryname{newspaper}] \mbox{}\\
1749 A newspaper article. This is similar to \entryname{article} and
1750 \fieldname{magazine}, except that the pages are formatted a little
1751 different, with ``pp.~23--49'' instead of just ``23--49''.
1752
1753 \item[\entryname{book}\LC] \mbox{}\\
1754 An entire book. The \fieldname{type} field can be used
1755 to denote a specific type of item (so generally not strictly
1756 a book), e.g., ``\verb+Brochure+''. Similarly, the
1757 \fieldname{number} field can be used if this is considered
1758 useful. (It is used in example 24 in the APA manual, see
1759 below.) This seems quite rare to me, however. It should
1760 certainly \emph{not} be used for ISBN numbers and the like.
1761
1762 \item[\entryname{incollection}\LC] \mbox{}\\
1763 An article in a (usually edited) book, or other kind of larger
1764 work, except a report, for which the \entryname{intechreport}
1765 entry is used. The \fieldname{booktitle} field contains the
1766 title of the whole collection (book). The \fieldname{type}
1767 field is currently used to denote the type of article, as
1768 with the \entryname{article} reference type, although in some
1769 cases, it may be more naturally to let the \fieldname{type}
1770 field contain the type of the whole work (e.g., CD). Therefore,
1771 I may change this somewhat in future versions of \pkg{apacite}.
1772
1773 \item[\entryname{techreport}\LC] \mbox{}\\
1774 A report. This may be a ``technical'' report such as published
1775 by universities, or a report from government organizations or
1776 private companies. The \fieldname{type} field can be used to
1777 indicate what kind of report it is, e.g.,
1778 ``\verb+College Board Rep.+'' or ``\verb+{DHHS} Publication+''.
1779 If the \fieldname{type} field is missing, the default type
1780 ``\verb+Tech.\ Rep.\hbox{}+'' is used. (The \verb+\hbox{}+
1781 ensures that \TeX{} does not view the period as the end of a
1782 sentence, which would insert too much space.) If no type
1783 description should
1784 be given, \verb+\bibnotype+ should be used as the contents of
1785 the \fieldname{type} field. The \fieldname{number} field can
1786 be used to give the report number. The organization that
1787 published the report should be given in the \fieldname{institution}
1788 field.
1789
1790 \item[\entryname{intechreport}] \mbox{}\\
1791 An article in a (usually edited) report. This is more or less
1792 a combination of \entryname{incollection} and
1793 \entryname{techreport}. It uses the same fields as the former
1794 to describe the article itself, except \fieldname{type}, e.g.,
1795 \fieldname{booktitle}, which is in this case the title of the
1796 entire report,
1797 and the same fields as the latter to describe the report.
1798 In particular, the \fieldname{type}, \fieldname{number},
1799 and \fieldname{institution} fields are used for the report.
1800
1801 \item[\entryname{lecture}] \mbox{}\\
1802 A paper presented at a meeting. According to the APA manual,
1803 the year and month should be given, but \pkg{apacite} also
1804 uses the \fieldname{day} field when available.
1805 The \fieldname{symposium} field can be used for the
1806 name of the symposium and the \fieldname{chair} field for the chair of
1807 the meeting. The \fieldname{howpublished} field should be used to
1808 indicate the occasion at which the paper was presented if the
1809 \fieldname{symposium} field is empty, e.g.,
1810 ``\texttt{Paper presented at the meeting of the American
1811 Professional Society on the Abuse of Children}''.
1812 It can also be used to give additional information about
1813 the symposium if the \fieldname{symposium} field is not empty.
1814
1815 \item[\entryname{phdthesis}\LC] \mbox{}\\
1816 A doctoral dissertation. The \fieldname{school} field is used
1817 to denote the university for which the thesis was written.
1818 The \fieldname{type} field can be used for the thesis type,
1819 e.g., ``\verb+PhD thesis+''. If it is empty, the default type
1820 is used, which is ``\verb+Unpublished doctoral dissertation+''
1821 or ``\verb+Doctoral dissertation+'', depending on whether
1822 the \fieldname{journal} field is empty or not.
1823
1824 If the thesis is abstracted in \emph{Dissertation Abstracts
1825 International} or similar, then the \fieldname{journal},
1826 \fieldname{volume}, \fieldname{number}, and \fieldname{pages} fields
1827 can be used as with journal articles. The \fieldname{year} field
1828 should denote the year of the ``journal''.
1829 The \fieldname{originalyear} field should be used to denote the year
1830 of the original thesis, even if it is the same as the year of the
1831 abstract, provided that the original thesis is used, and not
1832 the abstract. Then, the \fieldname{school} field should also
1833 be used, and optionally the \fieldname{type} field. If only
1834 the abstract is used, it should presumably be treated as a
1835 journal article.
1836
1837
1838 \item[\entryname{mastersthesis}\LC] \mbox{}\\
1839 This is equivalent to the \entryname{phdthesis} type, except that
1840 the default ``unpublished'' and ``published'' \fieldname{type}s are
1841 ``\verb+Unpublished master's thesis+'' and
1842 ``\verb+Master's thesis+''.
1843
1844 \item[\entryname{unpublished}\LC] \mbox{}\\
1845 For unpublished manuscripts and similarly ``obscure'' material.
1846 The \fieldname{howpublished} field will typically be used to
1847 indicate what kind of work is referred to (e.g.,
1848 ``\verb+Unpublished manuscript+''). The \fieldname{organization}
1849 field can be used to denote the organization in which the document
1850 was produced, e.g., ``\texttt{Johns Hopkins University, Center
1851 for Social Organization of Schools}''. Note that the larger
1852 organization should be given first and the department after that.
1853 The address (city and state, etc., see the discussion of the
1854 \fieldname{address} field in section~\ref{subsec:fields} below)
1855 of the organization should be given in the \fieldname{address}
1856 field, unless it is already mentioned in the name of the
1857 organization. Presumably, if the organization is
1858 ``\verb+University of Groningen+'', the city name ``Groningen''
1859 should not be given in the \fieldname{address} field, but
1860 the country ``The Netherlands'' should. When both the
1861 \fieldname{organization} and the \fieldname{address} field
1862 are available, \pkg{apacite} formats these as
1863 ``organization, address''. This is different from the
1864 usual ``address: publisher'' form. This behavior cannot
1865 explicitly be deduced from the 5th edition, nor from the
1866 4th edition, of the APA manual, but the 3rd edition
1867 \cite{APAManual3} gives an explicit example (example 53,
1868 p.~131): \citeA{APA-3rd-ed-ex53}.
1869
1870 \item[\entryname{misc}\LC] \mbox{}\\
1871 For works that do not fit into the other categories, such as
1872 motion pictures, cassette recordings, computer software, etc.
1873 The \fieldname{type} field can be used to indicate the type
1874 of work, and \pkg{apacite} recognizes a few specific types
1875 that should be formatted a little differently, see the discussion
1876 of the \fieldname{type} field below. If the \fieldname{address}
1877 and \fieldname{publisher} fields are available, the address and
1878 publisher part is formatted as with books. The \entryname{unpublished}
1879 and \entryname{misc} types are very similar, but there are some
1880 differences. For example, \entryname{unpublished} uses the
1881 \entryname{organization} field and \entryname{misc} uses the
1882 \fieldname{publisher} field, and this part is formatted differently.
1883 Further, the \entryname{unpublished} type requires
1884 \fieldname{author}, \fieldname{editor}, \fieldname{title}, or
1885 \fieldname{type}, whereas with \fieldname{misc},
1886 \fieldname{howpublished} takes the first position if these fields
1887 are all empty. Finally, as briefly indicated above and discussed
1888 in more detail below, \entryname{misc} recognizes some special
1889 types in the \fieldname{type} field.
1890
1891 \item[\entryname{literal}] \mbox{}\\
1892 If the other categories do not format the item correctly, this
1893 category can be used. The \fieldname{text} field is copied literally
1894 to the bibliography. The \fieldname{firstkey}, \fieldname{key},
1895 \fieldname{year}, and possibly \fieldname{originalyear} and
1896 \fieldname{translator} fields are necessary to get correct
1897 in-text citations. However, I have never needed to use this
1898 entry type and I think that \entryname{misc} should also
1899 be able to format the entry correctly. Furthermore, the
1900 correct placement of \entryname{literal} references in the
1901 reference list (alphabetizing, sorting), may be problematic.
1902
1903 \item[\entryname{manual}\LC] \mbox{}\\
1904 This is treated as a \entryname{misc}, except that when the
1905 \fieldname{type} field is empty, it is assumed to be a
1906 \cmd{\bibcomputersoftwaremanual}. See also the description of
1907 the \fieldname{type} field below.
1908
1909 \item[\entryname{booklet}\LC]
1910 \item[\entryname{inbook}\LC]
1911 \item[\entryname{inproceedings}\LC]
1912 \item[\entryname{proceedings}\LC] \mbox{}\\
1913 These categories are defined by all standard citation styles. They
1914 are, however, not needed for the examples in the APA manual. For
1915 compatibility, however, they are included and defined as follows:
1916 \entryname{booklet} = \entryname{proceedings} =
1917 \entryname{misc}; \entryname{inbook} = \entryname{inproceedings} =
1918 \entryname{incollection}. \citeA[p.~230]{KoDa04} also mention
1919 \entryname{conference} as being the same as \entryname{inproceedings};
1920 for compatibility, this is now supported in \pkg{apacite}.
1921 \end{description}
1922
1923 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1924 \subsection{Fields}
1925 \label{subsec:fields}
1926 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1927 The following fields can be used to describe a reference in the
1928 \fname{.bib} file:
1929 \begin{description}
1930
1931 \item[\fieldname{address}\LC] \mbox{}\\%
1932 The address (usually the city and state or country) of the
1933 publisher, school, institution, or organization that published
1934 the item or at which the item was produced. The APA manual
1935 requires that the state or territory of a U.S.-city must be given
1936 in the official two-letter U.S. Postal Services form.
1937
1938 \item[\fieldname{annote}\LC]
1939 \item[\fieldname{annotate}\LC] \mbox{}\\
1940 These are used with the \pkg{apacann} and \pkg{apacannx} bibliography
1941 styles to generate annotated bibliographies, see
1942 section~\ref{sec:annotate}. They are simply ignored without warning by
1943 the \pkg{apacite} and \pkg{apacitex} bibliography styles.
1944
1945 \item[\fieldname{author}\LC] \mbox{}\\
1946 The author(s) of the work. This may also be a corporate
1947 author when applicable, but some specific measures must
1948 then be taken to prevent the corporate name from being
1949 interpreted as a first name and last name
1950 (such as ``Association, A. P.''):
1951 \begin{verbatim}
1952 author = {{\bibcorporate{American Psychological Association}}},
1953 \end{verbatim}
1954 It is important to surround the \cmd{\bibcorporate}\marg{Author}
1955 by an additional pair of braces. Otherwise, \BibTeX{} sorts
1956 the entry as if its name was ``Bibcorporate\marg{Author}''.
1957 Section~\ref{sec:xmpl} contains more examples.
1958
1959 As discussed in the standard \BibTeX{} documentation,
1960 multiple authors must be separated by the word \verb+and+,
1961 and each author's name can either be given in the form
1962 ``\opt{firstnames}\verb+ +\opt{lastnames}'' or
1963 ``\opt{lastnames}\verb+, +\opt{firstnames}''. However,
1964 ``von'' parts and ``junior'' parts complicate issues
1965 a bit. See the examples and the discussion of them.
1966
1967 I would generally give the full first name(s) in the \fname{.bib}
1968 file, even though the APA manual only requires initials,
1969 because other styles require full first name(s) and
1970 \pkg{apacite} abbreviates to initials automatically.
1971 I have done this only occasionally with the examples,
1972 because the APA manual only gives the initials.
1973 Therefore, I have only provided first names with a few
1974 examples for which I knew the authors' first names.
1975
1976 Previous versions of the APA manual required that, if there
1977 are more than six authors, only the first six should be named
1978 in the reference list, followed by ``et al.'', which allowed
1979 one to include only the first six plus ``|and others|'' in the
1980 \fname{.bib} file. In the 6th edition, however, the APA changed
1981 this. Now, when there are up to seven authors, they should
1982 all be listed, but with eight or more, the first six should
1983 be listed, plus dots (\ldots), plus the last author. Therefore,
1984 ``|and others|'' should not be used anymore in the \fname{.bib}
1985 file. (It was already discouraged in earlier versions of the
1986 \pkg{apacite} documentation.) Thus, one should list all authors
1987 in the \fname{.bib} file.
1988
1989 \item[\fieldname{booktitle}\LC] \mbox{}\\
1990 The title of the larger work, typically book, but sometimes
1991 something else, like a report, in which the referenced item
1992 (article) was published.
1993
1994 \item[\fieldname{chair}] \mbox{}\\
1995 The chair(s) of a symposium or meeting. Used for lectures.
1996 It is formatted the same way as editors.
1997
1998 \item[\fieldname{chapter}\LC] \mbox{}\\
1999 The chapter number if the referenced item is a chapter in
2000 a larger collection. Typically used if the referenced work
2001 is a chapter in an internet document. If the collection is
2002 a book, page numbers (in the \fieldname{pages} field)
2003 should be used instead according to the APA rules.
2004
2005 \item[\fieldname{crossref}\LC] \mbox{}\\
2006 The \pkg{apacite} package does not recognize this field,
2007 because the APA manual does not discuss explicit
2008 cross-referencing. If the referenced work is a chapter
2009 (article) in an edited book, all relevant information
2010 should be given in the reference list as part of the
2011 information about the referenced chapter, not as, e.g.,
2012 ``In Wainrib (1992)''. If several chapters from the
2013 book edited by Wainrib are referenced, the same information
2014 about this book is given with each referenced chapter,
2015 and the work itself is not a separate entry in the reference
2016 list (unless it is explicitly referred to).
2017
2018 However, the \fieldname{crossref} field
2019 \emph{can} be used, as part of standard \BibTeX{} usage.
2020 Missing fields for the referenced work are then copied from
2021 the cross-referenced entry, which must come \emph{after}
2022 the referring entry in the \fname{.bib} file. If you use
2023 this, remember to put the title of the book (also) in the
2024 \fieldname{booktitle} field, because the \fieldname{title}
2025 field of the referring entry is not empty (it contains
2026 the chapter title).
2027
2028 I have not tested cross-referencing in detail, so I do not
2029 know whether it behaves well (i.e., complies with the implicit
2030 or explicit APA rules) under various circumstances.
2031 Therefore, I do not recommend using it without thorough
2032 testing.
2033
2034 \item[\fieldname{day}] \mbox{}\\
2035 The day of the month on which the referenced item was published,
2036 produced, or presented. Mainly used for articles in daily or
2037 weekly magazines or newspapers, for lectures (although the
2038 APA manual only specifies the month), and electronic documents.
2039
2040 \item[\fieldname{doi}] \mbox{}\\
2041 Digital object identifier (DOI). The 6th edition of the APA manual
2042 asks authors to supply this whenever available.
2043
2044 \item[\fieldname{edition}\LC] \mbox{}\\
2045 The edition of the book or report. Traditionally, this is of the
2046 form ``1st'', ``2nd'', ``3rd'', etc., or ``Rev.'' for a revised edition.
2047 This form is still supported, but \pkg{apacite} now also supports
2048 the form in which only the number is given: ``1'', ``2'', etc.
2049 If \pkg{apacite} detects that only a number is given, it inserts
2050 ``\cmd{\PrintOrdinal}\marg{number}'' in the \fname{.bbl} file.
2051 This \LaTeX{} function converts the number again to ``1st'', etc.
2052 The advantage of this is that the same bibliography database can be
2053 used for documents in different languages: In the language-specific
2054 (\fname{.apc}) files supplied with \pkg{apacite},
2055 \cmd{\PrintOrdinal} is redefined according to the document
2056 language.
2057
2058 \item[\fieldname{editor}\LC] \mbox{}\\
2059 The editor(s) of a book, report, or special issue of a journal.
2060 In the examples, this field is also ``misused'' for the
2061 producer of a television series.
2062
2063 \item[\fieldname{englishtitle}] \mbox{}\\
2064 The English translation of the title of an item with a non-English
2065 title. The APA manual requires that if the referenced work has a
2066 non-English title, an English translation should be given as well. For
2067 an article in a journal with a non-English name or in a book with a
2068 non-English title, the journal name or book title should not be
2069 translated or put in this field, only the title of the referenced work
2070 itself must be translated. Because, as of version
2071 \APACversiondate{2005/06/01}, \pkg{apacite} contains some support of
2072 other languages for the main document (see
2073 section~\ref{sec:compat-babel}), this field needs rethinking, which
2074 will be deferred to a future version (but, as always, suggestions
2075 are welcome).
2076
2077 \item[\fieldname{firstkey}] \mbox{}\\
2078 The \fieldname{firstkey} field, if not empty, is used as
2079 ``author'' for the first citation to an item. Subsequent citations
2080 then use the \fieldname{key} field. This can be used if there is
2081 no author or editor field that can be used for citations, or in
2082 certain cases with corporate authors, where the citation in the
2083 text uses an abbreviation of the author's name for second and
2084 subsequent citations, where the abbreviation is introduced in the
2085 first citation. It can also be used to ``trick'' the system
2086 in difficult cases. See also \fieldname{key}.
2087
2088 \item[\fieldname{howpublished}\LC] \mbox{}\\
2089 A description of how something was ``published''. For example,
2090 ``Unpublished manuscript'' or ``Paper presented at the meeting
2091 of the American Professional Society on the Abuse of Children''.
2092 Also used for more retrieval information about electronic
2093 documents, e.g., ``Retrieved November 19, 2000, from the
2094 PsycARTICLES database'', or
2095 \begin{verbatim}
2096 howpublished = {Retrieved August 24, 2000, from Columbia University,
2097 Institute for Learning Technologies Web site:
2098 \url{http://www.ilt.columbia.edu/
2099 publications/papers/newwine1.html}\bibnodot{.}}
2100 \end{verbatim}
2101 However, if the retrieval information consists only of a
2102 date and/or a URL, it is better to use the \fieldname{lastchecked}
2103 and \fieldname{url} fields for this and let \pkg{apacite}
2104 format this information. See also the \fieldname{note} field
2105 for an alternative to the \fieldname{howpublished} field.
2106
2107 \item[\fieldname{institution}\LC] \mbox{}\\
2108 The institution, university, or company that published a
2109 (technical) report.
2110
2111 \item[\fieldname{journal}\LC] \mbox{}\\
2112 The journal, magazine, newspaper, etc.{} in which an
2113 article, a review, or an abstract of a thesis was published.
2114
2115 \item[\fieldname{key}\LC] \mbox{}\\
2116 See \fieldname{firstkey}. The \fieldname{key} field, if not
2117 empty, is used for second and subsequent citations, or all citations
2118 if \fieldname{firstkey} is missing. If \fieldname{author} is
2119 empty and \fieldname{editor} is empty or can not be used as
2120 author (e.g., in \entryname{incollection}), the \fieldname{key}
2121 field may be necessary to obtain a useful citation. This is
2122 so, because the APA manual requires an abbreviation of the
2123 title as in-text citation, and the abbreviation must be
2124 sensible. In the current version, \pkg{apacite} uses the
2125 whole title if \fieldname{firstkey} and \fieldname{key} are missing.
2126 Therefore, if the title is considered too long to use in citations,
2127 the user must provide an abbreviation in the \fieldname{key} field.
2128 Furthermore, the user must then also define the formatting:
2129 If the key is used for a difficult kind of author (e.g.,
2130 corporate author), it should be formatted as an author,
2131 i.e., in plain text, with names capitalized.
2132 If the key is used for an abbreviation of an article
2133 title, it should be in plain text, with major words capitalized
2134 (unlike in the reference list), and between double quotes
2135 (`` and ''; also unlike in the reference list).
2136 If the key is used for an abbreviation of a book title, it
2137 should be emphasized, with major words capitalized
2138 (unlike in the reference list), but not between quotes.
2139
2140 In a field in the \fname{.bib} file that is also
2141 used for the citations, such as the \fieldname{key} field,
2142 formatting through, e.g.,
2143 \begin{verbatim}
2144 key = {{\itshape Text}},
2145 key = {{\em Text\/}},
2146 \end{verbatim}
2147 can be done (note the extra pair of braces!), but the
2148 seemingly more logical variations
2149 \begin{verbatim}
2150 key = {\textit{Text}},
2151 key = {{\textit{Text}}},
2152 key = {\emph{Text}},
2153 key = {{\emph{Text}}},
2154 \end{verbatim}
2155 do not work.
2156 However, it is generally preferable to use as less explicit
2157 formatting in the \fname{.bib} files as possible, because this
2158 decreases the possibilities of successfully using the
2159 same \fname{.bib} file with other styles. The following works
2160 excellent:
2161 \begin{verbatim}
2162 key = {{\APACcitebtitle{Text}}},
2163 \end{verbatim}
2164 where the \cmd{\APACcitebtitle} macro recognizes that the argument
2165 should be formatted as a booktitle (i.e., in italics according to the
2166 APA rules). This macro, and its companion \cmd{\APACciteatitle} for
2167 article title formatting, are used by \pkg{apacite} if the
2168 \fieldname{firstkey} and \fieldname{key} fields are missing,
2169 but can also be used by the user. Note that if you use such a
2170 \fname{.bib} file with another style, you have to provide
2171 definitions of these macros yourself (which can be copied from
2172 the \pkg{apacite} source code).
2173
2174 \emph{Warning:} the \fieldname{key} field, which acts
2175 as a kind of pseudo-author, should not be confused with the
2176 (citation) \opt{key} that is used to match citations with
2177 entries in a \fname{.bib} file.
2178
2179 \item[\fieldname{lastchecked}] \mbox{}\\
2180 The date on which a web page was last visited. Only used in
2181 combination with the \fieldname{url} field. Currently,
2182 \pkg{apacite} does not contain language-specific code to
2183 dissect this date, but copies its contents literally to the
2184 \fname{.bbl} file. Hence, if you intend to use the same
2185 bibliography database for documents in different languages,
2186 you may have to use a self-defined command for this. You can
2187 use the \pkg{apacite} commands \cmd{\APACrefYearMonthDay}
2188 and \cmd{\APACmonth} as templates for this. I will probably
2189 provide such a facility in a future version of \pkg{apacite}.
2190
2191 \item[\fieldname{month}\LC] \mbox{}\\
2192 The month something was published. Mainly used for
2193 magazine or newspaper articles, lectures, and electronic documents.
2194 Use the month macros \verb+jan+, \verb+feb+, etc. These are
2195 predefined strings in the \fname{.bst} files, reverting to
2196 ``\verb+{\APACmonth{01}}+'', etc. You can also use the additional
2197 macros \verb+winter+, \verb+spring+, \verb+summer+, and \verb+fall+,
2198 which the \fname{.bst} files translate into
2199 ``\verb+{\APACmonth{13}}+''--``\verb+{\APACmonth{16}}+''.
2200 The \cmd{\APACmonth} command translates the numbers to the month or
2201 season names. This system allows language-specific behavior at
2202 the \LaTeX{} stage.
2203
2204 \item[\fieldname{note}\LC] \mbox{}\\
2205 A note. This puts additional information between parentheses
2206 at the end of a reference list entry. In the examples from
2207 the APA manual, it is used for NTIS No., ERIC No., and UMI No.,
2208 and for notes about how to obtain the work
2209 (``Available from \opt{organization}, \opt{full address}'').
2210 If however, the work has been obtained from the internet
2211 or from an ``aggregated database'', then the
2212 \fieldname{howpublished} or \fieldname{url} field should be
2213 used, because it should not be between parentheses then.
2214
2215 Finally, the \fieldname{note} field is used to give the
2216 recording date (i.e., year) of a song when this is different
2217 from the date (year) of copyright. The latter should be
2218 put in the \fieldname{year} field.
2219
2220 Do not use the \fieldname{note} field to denote the original
2221 publication of a reprint or translation, because the
2222 \fieldname{originalyear} field must be used in those cases to
2223 obtain the correct citation in the text \cite<e.g.,>{ex39}.
2224
2225 \item[\fieldname{number}\LC] \mbox{}\\
2226 The number of a journal issue or a report. This can be quite
2227 complex, for example, ``\verb+PRM~92-01+'', or
2228 ``\verb+3, Pt.~2+'', or ``\verb+1, Serial No.~231+''.
2229 These latter examples imply that the generality (language and
2230 style independence) of the \fname{.bib} file is somewhat lost.
2231 Furthermore, if the journal paginates by year and not by issue,
2232 the issue number should not be mentioned at all (except when
2233 referring to a whole special issue). Of course, \pkg{apacite}
2234 does not know whether the journal paginates by issue or by year.
2235 If the \fieldname{number} field is available, \pkg{apacite}
2236 simply assumes that it should be included. It is the user's
2237 responsibility to ensure that this is indeed the case.
2238
2239 \item[\fieldname{organization}\LC] \mbox{}\\
2240 Used for the \entryname{unpublished} reference type to denote
2241 the organization in which the unpublished work was produced.
2242
2243 \item[\fieldname{originaladdress}]
2244 \item[\fieldname{originalbooktitle}]
2245 \item[\fieldname{originaledition}]
2246 \item[\fieldname{originaleditor}]
2247 \item[\fieldname{originaljournal}]
2248 \item[\fieldname{originalnumber}]
2249 \item[\fieldname{originalpages}]
2250 \item[\fieldname{originalpublisher}]
2251 \item[\fieldname{originalvolume}]
2252 \item[\fieldname{originalyear}] \mbox{}\\
2253 These (\fieldname{original*-}) fields have the same
2254 meaning as their counterparts without the ``original'' prefix,
2255 except that they refer to the book or journal in which the
2256 work was originally published. This can be used in referring to
2257 translations or reprints of articles in journals or books. If the
2258 original work is a book or other ``standalone'' work,
2259 only the \fieldname{originalyear} field should be used. If the
2260 original work is a (PhD or Master's) thesis that is also abstracted
2261 in \emph{Dissertation Abstracts International},
2262 \emph{Masters Abstracts International}, or comparable, the
2263 \fieldname{originalyear} field should be used to denote the year
2264 of the dissertation and the \fieldname{year} field to
2265 denote the year of publication of the abstract, even if they
2266 are the same.
2267
2268 \item[\fieldname{pages}\LC] \mbox{}\\
2269 The (inclusive) page numbers of the article that is referred to,
2270 in the journal or book in which it was published. If a range of
2271 pages is given (which is usually the case), an en-dash should
2272 be used: ``\verb+29--43+''. Other styles sometimes allow a
2273 single hyphen (``\verb+29-43+''), which is then automatically
2274 formatted as an en-dash (``29--43''), rather than as a hyphen
2275 (``29-43''), but I have encountered situations, such as software
2276 manuals (LISREL) and reports for the U.S. Government, in which
2277 the page number was of the form ``II-3'',
2278 meaning page~3 of chapter~2. In such a situation, you may
2279 get page numbers like ``II-1--II-15'', where the distinction
2280 between a hyphen and an en-dash becomes important. Therefore,
2281 \pkg{apacite} does not perform such automatic transformations.
2282
2283 \item[\fieldname{publisher}\LC] \mbox{}\\
2284 The publisher of the item. Primarily used for books.
2285
2286 \item[\fieldname{school}\LC] \mbox{}\\
2287 The school or university for which a PhD thesis or
2288 master's thesis was written.
2289
2290 \item[\fieldname{series}\LC] \mbox{}\\
2291 Not used, although the APA manual has a rule for series.
2292 If you refer to a volume in a series, the series title,
2293 volume number, and volume title should be joined into
2294 a two-part title , e.g., \emph{Handbook of child psychology:
2295 Vol.~4. Socialization, personality, and social development},
2296 see ex.~36. In \pkg{apacite} this whole part must be put in
2297 the \fieldname{title} or \fieldname{booktitle} field
2298 (whichever is appropriate).
2299
2300 For a long time, I have intended to support the
2301 \fieldname{series} field to allow disentangling such
2302 situations. However, in the end, I have decided not to
2303 do this. The reason for this is that, according to my
2304 interpretation, the meaning of ``series'' in the APA manual
2305 is quite different from the meaning of the \fieldname{series}
2306 field, as intended by Oren Patashnik (the author of \BibTeX{}
2307 and the original style files). Many books are published in
2308 some sort of series. For example, my book with Tom Wansbeek
2309 \cite{WaMe00}, is vol.~37 in the \emph{Advanced Textbooks
2310 in Economics} series, of which the series editors are
2311 C.~J. Bliss and M.~D. Intriligator. The intention of the
2312 \fieldname{series} field is to generate a reference list entry
2313 like
2314 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2315 \begin{list}{\relax}{\labelsep=0em%
2316 \parsep=0pt%
2317 \itemsep=0pt plus .3pt\relax%
2318 \leftmargin=2.5em%
2319 \itemindent=-2.5em}%
2320 \sloppy\clubpenalty4000\widowpenalty4000
2321 \sfcode`\.=1000\relax
2322 \item
2323 Wansbeek, T., \& Meijer, E.
2324 \unskip\ \hskip .11em plus .33em minus .07em
2325 (2000).
2326 \unskip\ \hskip .11em plus .33em minus .07em
2327 \Bem{Measurement error and latent variables in econometrics}
2328 (Advanced Textbooks in Economics No.~37).
2329 \unskip\ \hskip .11em plus .33em minus .07em
2330 Amsterdam: North-Holland.
2331 \end{list}
2332 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2333 In economics (and often in psychology, I guess), mentioning
2334 the series usually does not add much relevant information,
2335 and it is therefore typically omitted. I think this is how
2336 the APA intends it as well. However, in computer science, it
2337 is often very convenient, because certain series, like Springer's
2338 \emph{Lecture Notes in Computer Science} (LNCS) have a certain
2339 status of their own, and researchers know how to find volumes
2340 in this series.
2341
2342 In my interpretation, the APA ``series'' refers to a single
2343 multivolume work with separate editors for the constituent
2344 volumes, but with a series editor who initiates the whole
2345 series. In the example from the APA manual, the
2346 \emph{Handbook of child psychology} is not a loose collection
2347 of separate books by different authors, but a combined effort
2348 managed by the series editor to give an overview of the field.
2349 In this case, the series editor may be considered the primary
2350 author and it makes sense to have the different volumes of the
2351 series together in the reference list. With my book with
2352 Tom Wansbeek, the series editors act more like journal editors,
2353 and different volumes of the series are unrelated books that
2354 do not need to be gathered together in the reference list.
2355 It would make no sense to cite this book as
2356 ``Bliss, Intriligator, Wansbeek, \& Meijer (2000)''.
2357
2358 Because in my interpretation, the usual meaning of the
2359 \fieldname{series} field should not be included in the
2360 reference list according to the APA rules, \pkg{apacite}
2361 ignores the \fieldname{series} field. Perhaps I'll
2362 implement the APA manual ``series'' rules by introducing
2363 a \fieldname{volumetitle} field, but this will further reduce
2364 compatibility with other citation styles.
2365
2366 \item[\fieldname{symposium}] \mbox{}\\
2367 The name of the symposium or meeting at which a
2368 lecture was given. This is typically used for the
2369 construction ``In \opt{chair} (Chair), \opt{symposium}'',
2370 see ex.~51. I have never used it myself, however,
2371 I always use the ``Paper presented \dots'' form,
2372 which puts this information in the \fieldname{howpublished}
2373 field.
2374
2375 \item[\fieldname{text}] \mbox{}\\
2376 Used for items of type \entryname{literal}. This field contains
2377 the complete literal text to be used in the bibliography.
2378 I've never used it.
2379
2380 \item[\fieldname{title}\LC] \mbox{}\\
2381 The title of the work.
2382
2383 \item[\fieldname{translator}] \mbox{}\\
2384 The translator of a book or article. This should
2385 be formatted in the same way as \fieldname{author} and
2386 \fieldname{editor}. If the \fieldname{translator} and
2387 \fieldname{editor} fields are identical, they are
2388 formatted as if there were only an editor, except that the
2389 editor receives the suffix ``(Ed. \& Trans.)'' instead of
2390 just ``(Ed.)'', or similarly if there is more than 1 editor.
2391
2392 \item[\fieldname{type}\LC] \mbox{}\\
2393 The type of \entryname{phdthesis} (e.g.,
2394 ``Doctoral dissertation''), type of \entryname{article}
2395 (e.g., ``Letter to the editor''), type of \entryname{techreport}
2396 (e.g., ``DHHS Publication''), type of \entryname{book}
2397 (e.g., ``Brochure''), type of \entryname{misc}
2398 (e.g., ``Cassette recording''), and so forth.
2399
2400 With a review (which is typically an \entryname{article}),
2401 the \fieldname{type} field contains a lot of information
2402 and formatting, e.g.:
2403 \begin{verbatim}
2404 type = {Review of the book {\APACcitebtitle{Life in the middle:
2405 Psychological and social development in middle age}}},
2406 \end{verbatim}
2407 where I used the \cmd{\APACcitebtitle} command introduced above in
2408 the discussion of the \fieldname{key} field.
2409
2410 In one of the APA manual examples, I used the \fieldname{type}
2411 field to give a description of the subject of an unpublished
2412 raw data file (``Auditory response latencies in rat auditory
2413 cortex''), leaving the \fieldname{title} field blank.
2414
2415 For most reference types, if the \fieldname{type} field
2416 is missing, it is simply ignored and no type description
2417 is given. For a \entryname{techreport}, however, if the
2418 \fieldname{type} field is missing, the default type
2419 (``Tech.\ Rep.\hbox{}'') is inserted. In ex.~42 of the APA manual,
2420 a report without a type description is given. To make it
2421 possible to format a report successfully without a
2422 type description, \pkg{apacite} recognizes
2423 \begin{verbatim}
2424 type = {\bibnotype},
2425 \end{verbatim}
2426 indicating that there should be no type description.
2427
2428 Another special purpose use of the \fieldname{type}
2429 field is for a computer program, software, programming
2430 language and/or manual. These are put into a \entryname{misc}
2431 entry, but unlike other \entryname{misc} types (such as
2432 motion pictures) the titles of these types should not
2433 be italicized. This is now recognized by \pkg{apacite}
2434 in the following way: When referring to a computer program,
2435 software, programming language and/or manual, you should
2436 use the \entryname{misc} reference type with
2437 one of the following commands in the \fieldname{type} field:\\
2438 \cmd{\bibcomputerprogram},\\
2439 \cmd{\bibcomputerprogrammanual},\\
2440 \cmd{\bibcomputerprogramandmanual},\\
2441 \cmd{\bibcomputersoftware},\\
2442 \cmd{\bibcomputersoftwaremanual},\\
2443 \cmd{\bibcomputersoftwareandmanual}, or\\
2444 \cmd{\bibprogramminglanguage}.\\
2445 Using any of these commands as type designator of a
2446 \entryname{misc} entry ensures that the title is not italicized,
2447 as required. The \entryname{manual} entry is now equal to
2448 \entryname{misc} with default type \cmd{\bibcomputersoftwaremanual}
2449 if the \fieldname{type} field is empty.
2450
2451 Similarly, if you refer to a message that has been posted to
2452 a newsgroup, internet forum, etc., you should use the
2453 \entryname{misc} reference type with \cmd{\bibmessage} as
2454 \fieldname{type} field.
2455
2456 \item[\fieldname{url}] \mbox{}\\
2457 The web address of a document. Used if the cited document (or
2458 other work) is a website or was obtained from a website. Long
2459 web addresses can cause problems, because \BibTeX{} splits long
2460 lines (more than 80 characters) in the \fname{.bbl} file and inserts
2461 a \TeX{} comment (percent sign). In most situations, this works fine,
2462 because the percent sign ``hides'' the line break, which would be
2463 processed as an undesired space by \TeX{}. But within the argument of
2464 a \cmd{\url} command, a percent sign is copied to the output, because
2465 it is a valid character in a URL. To prevent this problem, insert
2466 line breaks and/or spaces in the URL in the \fname{.bib} file:
2467 \begin{verbatim}
2468 url = {ftp://ftp.princeton.edu/harnad/Psycoloquy/
2469 2000.volume.11/psyc.00.11.001.
2470 language-sex-chromosomes.1.crow},
2471 \end{verbatim}
2472 Then \BibTeX{} breaks lines at the spaces/line breaks if a line
2473 break in the output is considered necessary (but not otherwise).
2474 These spaces are suppressed by default in the output, which is usually
2475 the desired behavior. But see the \pkg{hyperref} and \pkg{url}
2476 documentation if you want this differently. Also note that in the
2477 \fieldname{url} field, special characters like `|%|'
2478 and `|#|' should be entered without a backslash, unlike the normal
2479 situation if they would be used in the text.
2480
2481 \item[\fieldname{urldate}] \mbox{}\\
2482 See \fieldname{lastchecked}. This one is apparently defined in the
2483 \pkg{jurabib} package. It is unfortunate that different packages define
2484 different fields for the same function.
2485
2486 \item[\fieldname{volume}\LC] \mbox{}\\
2487 The volume or volumes of the referenced book(s) or
2488 of the book in which the referenced article was published,
2489 or the volume of the journal (magazine, newspaper, \ldots)
2490 in which the referenced article was published.
2491
2492 \item[\fieldname{year}\LC] \mbox{}\\
2493 The year in which the referenced item was published, or
2494 if it was not published, the year in which it was written
2495 or presented. For manuscripts or books that are accepted
2496 for publication but have not yet been published, ``in press''
2497 should be used according to the APA rules. The best way to do
2498 this is to use the ``\cmd{\BIP}'' command, which can be redefined
2499 by the user if the language or editorial style requires
2500 something else than ``in press''. Furthermore, \cmd{\BIP}
2501 is recognized by \pkg{apacite} and treated a little differently,
2502 because for multiple ``in press'' references with the same
2503 author(s), a hyphen (``-'') should be inserted between the
2504 ``year'' (i.e., ``in press'') and the ``a'', ``b'', etc., that
2505 follow it to distinguish the works, whereas this hyphen must
2506 be omitted if the ``year'' is an ordinary year (1991a, 1991b).
2507
2508 If no date is explicitly given in (or on) the referenced work,
2509 a ``n.d.'' (no date) should be given as year description.
2510 For this, \pkg{apacite} supports the \cmd{\bibnodate}
2511 command. This sometimes leads to different formatting as well,
2512 e.g., by referencing a translation of a work of which there
2513 is no original date. Then the \fieldname{originalyear}
2514 field should be \cmd{\bibnodate} and the \fieldname{year} field
2515 is then, e.g., \verb+1931+. If the \fieldname{translator}
2516 field is not empty, the citation in the text is then formatted
2517 as, e.g., ``\citeA{3.100-2}''.
2518 \end{description}
2519
2520 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2521 \subsection{Overriding the default sorting orders}
2522 \label{subsec:sort}
2523 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2524 Occasionally, it may be necessary to override \BibTeX's default sorting.
2525 For example, the way \BibTeX{} handles accents and other nonstandard
2526 characters, which is typically fine for documents in English, may
2527 not be acceptable for documents in other languages:
2528 ``\verb+\"{u}+'' is treated as ``\verb+u+'', ``\verb+\ss+'' is treated as
2529 ``\verb+ss+'', and ``\verb+\ae+'' is treated as ``\verb+ae+''.
2530 In non-English languages this sorting may not be appropriate and one
2531 may desire that ``\verb+\"{u}+'' is treated as ``\verb+ue+''.
2532 Numerous problems are caused by different conventions in different languages.
2533 Some examples are given in the documentation of the \textsf{amsrefs}
2534 package. Non-latin scripts (Greek, Hebrew, Arabic, Chinese, etc.) may not be
2535 handled correctly as well. I am not able to judge this, nor does it seem
2536 to be a problem that must be solved in \textsf{apacite}. It has been
2537 announced that \BibTeX~1.0, when it will be released, will support
2538 non-English languages as well.
2539
2540 An issue that occurs in English (APA) documents is that, according to
2541 the APA, numbers should be sorted as if they were spelled in words:
2542 ``2003'' must be sorted as if it says ``\mbox{twothousandandthree}'';
2543 see example~4.04 in section~\ref{sec:xmpl} below.
2544
2545 \DescribeMacro{\APACSortNoop}
2546 Overriding the default sorting order can be done by using the
2547 \cmd{\APACSortNoop} command in the \fname{.bib} file. This is a \LaTeX{}
2548 command provided by \pkg{apacite}. It has one mandatory argument, but it
2549 outputs nothing. However, \BibTeX{} does not know this and uses the
2550 contents of this command to sort the entry. For example,
2551 \begin{verbatim}
2552 author = {M{\"{u}}ller, Gerd},
2553 \end{verbatim}
2554 is sorted as ``\verb*+muller g+'', whereas
2555 \begin{verbatim}
2556 author = {{\APACSortNoop{Mueller}}M{\"{u}}ller, Gerd},
2557 \end{verbatim}
2558 is sorted as ``\verb*+muellermuller g+'', which typically results
2559 in the correct ordering. In the typeset document, both look like
2560 ``M{\"{u}}ller''. Note that the extra pair of braces around the
2561 \cmd{\APACSortNoop} command are necessary to suggest to \BibTeX{}
2562 that it is an ``accent''. The specification
2563 \begin{verbatim}
2564 author = {\APACSortNoop{Mueller}M{\"{u}}ller, Gerd},
2565 \end{verbatim}
2566 is sorted as ``\verb*+apacsortnoopmuellermuller g+'', which is
2567 incorrect.
2568
2569 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2570 \section{Customization}
2571 \label{sec:custom}
2572 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2573 The description in the previous sections, with the exception of
2574 section~\ref{sec:options}, primarily discussed the default behavior of
2575 \pkg{apacite}. However, as mentioned in the introduction, in addition to the
2576 options, \pkg{apacite} offers many possibilities for customization. Most
2577 punctuation used in the citations and reference list are implemented through
2578 \LaTeX{} commands instead of explicit symbols. Consequently, the user can
2579 fine-tune the behavior of \pkg{apacite} by redefining these commands, through
2580 \cmd{\renewcommand} after \pkg{apacite} has been loaded. Analogously, most
2581 fixed texts, like ``Tech.\ Rep.\hbox{}'' and ``Eds.\hbox{}'' are implemented
2582 through \LaTeX{} commands as well, and can similarly be changed by the user.
2583 The commands used by \pkg{apacite} are discussed in this section. Of course,
2584 the defaults are based on the rules of the APA manual.
2585
2586 Some commands, predominantly punctuation, are used both in citations and in
2587 the reference list. If you want their definitions in citations to be different
2588 from their definitions in the reference list, you can simply redefine their
2589 definitions before starting the bibliography.
2590
2591 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2592 \subsection{Punctuation and small formatting issues}
2593 \label{sec:custom-punct}
2594 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2595 The following punctuation commands are provided and used for
2596 the citations and reference list.
2597
2598 \DescribeMacro{\BAstyle}
2599 \DescribeMacro{\BAastyle}
2600 \cmd{\BAstyle} defines the text style of the authors (or whatever
2601 takes their place) for an in-text citation. It defaults to nothing:
2602 The authors use the same fonts as the text surrounding it. Introduced
2603 because some journals use a different style. For example,
2604 \emph{Statistica Neerlandica} uses small caps, so for that journal,
2605 you would define
2606 \begin{verbatim}
2607 \renewcommand{\BAstyle}{\scshape}
2608 \end{verbatim}
2609 Do not use the \cmd{\textsc}-type commands, but \cmd{\scshape},
2610 \cmd{\bfseries}, and so forth. The \cmd{\BAstyle} command is used for
2611 the author part by the \pkgoption{apaciteclassic} citation commands,
2612 except the author-only citation commands. \cmd{\BAastyle} is the same
2613 as \cmd{\BAstyle}, except that \cmd{\BAastyle} is used for the
2614 author-only citation commands.
2615
2616 \DescribeMacro{\APACrefauthstyle}
2617 \cmd{\APACrefauthstyle} is similar to \cmd{\BAstyle}, except
2618 that this one is used for formatting authors in the reference list.
2619 In the current implementation, it also applies to editors in the
2620 author position, but not to editors in the editor position and
2621 not to titles and other elements that take the position of authors
2622 if there are no authors and editors.
2623
2624 \DescribeMacro{\BBAA}
2625 \DescribeMacro{\BBAB}
2626 \DescribeMacro{\BAnd}
2627 \cmd{\BBAA} is the ``and'' between authors in a parenthetical
2628 citation and in the reference list, as in
2629 ``(Mooijaart \& Bentler, 1986)'' or ``Mooijaart, A., \&
2630 Bentler, P.~M. (1986).''. Its default is ``\&''.
2631 \cmd{\BBAB} is the same ``and'' in a text citation, as in
2632 ``Mooijaart and Bentler (1986)''. Its default is ``and''.
2633 The third ``and'', \cmd{\BAnd}, is used in the reference list
2634 if someone is both editor and translator:
2635 ``In J. Strachey (Ed. \& Trans.),''. Default is ``\&''.
2636
2637 \DescribeMacro{\BBOP}
2638 \DescribeMacro{\BBCP}
2639 \cmd{\BBOP} (opening parenthesis) and \cmd{\BBCP} (closing parenthesis)
2640 are used for the parentheses in a citation, as in ``(Rao, 1973)'' or
2641 ``Rao (1973)'', and the year in the reference list, as in
2642 ``Rao, C.~R. (1973).'' By default, they are round parentheses
2643 ``('' and ``)''.
2644
2645 \DescribeMacro{\BAP}
2646 \cmd{\BAP} is inserted after the prefix and before the first citation
2647 in a parenthetical citation. It defaults to an ordinary space. Note
2648 that if the prefix ends with a period, \TeX{} interprets this as a
2649 sentence ending and typically inserts a larger space, which is often
2650 not desirable. The standard way to avoid this would be to insert an
2651 explicit space (``|\ |''), but this does not work in a prefix. The
2652 solution is to insert an empty |\hbox{}| after the period:
2653 |\cite<cf.\hbox{}>{Jone01}|.
2654
2655 \DescribeMacro{\BBAY}
2656 \DescribeMacro{\BBYY}
2657 \DescribeMacro{\BBN}
2658 \cmd{\BBAY} is the punctuation between author(s) and year in a
2659 parenthetical citation, as in ``(Rao, 1973)''. \cmd{\BBYY} is the
2660 punctuation between two subsequent years, if two works by the same
2661 author(s) are referenced in a single citation command, as in
2662 ``(Rao, 1965, 1973)'' or ``Rao (1965, 1973)''. \cmd{\BBN} is the
2663 punctuation before a note (postfix) after a citation, as in
2664 ``(Rao, 1973, p.~25)''. Default for all three is a comma and a
2665 space (``, '').
2666
2667 \DescribeMacro{\BBC}
2668 \cmd{\BBC} is the punctuation between multiple cites, as in
2669 ``(Rao, 1973; Mooijaart \& Bentler, 1986)''. Default is a semicolon
2670 and a space (``; '').
2671
2672 \DescribeMacro{\BBOQ}
2673 \DescribeMacro{\BBCQ}
2674 \cmd{\BBOQ} (opening quote) and \cmd{\BBCQ} (closing quote) are the
2675 quotes around an article title in the reference list, for example the
2676 double quotes in ``Random polynomial factor analysis.'' Default is
2677 the empty string: no quotes are used. (The \pkg{theapa} package
2678 required the closing period to be part of the closing quote, but this
2679 has been changed, because the period must be left out if title
2680 comments, such as type, English translation of non-English title, or
2681 translator follow the title.)
2682
2683 \DescribeMacro{\BPBI}
2684 \cmd{\BPBI} is the period between initials. Default is a period and a
2685 non-breaking space (``.~''), as required by the APA manual. However,
2686 many users prefer removing or reducing the space and in some
2687 non-English speaking countries this is customary. This can be achieved
2688 by redefining this command to, for example, just a period (no space),
2689 or ``|.\,|'' (small space). This command cannot be used to remove
2690 periods altogether, because there is still a period at the end. That
2691 is, redefining it as an empty string gives awkward results like
2692 ``Bentler, PM., \& Mooijaart, A.''.
2693
2694 \DescribeMacro{\BHBI}
2695 \cmd{\BHBI} is the hyphen between initials. Introduced for analogy with
2696 \cmd{\BPBI} and used for authors who have two or more first names
2697 with a hyphen between them, e.g., Jean-Paul Sartre. Default is
2698 a period and a hyphen. Unlike \cmd{\BPBI}, I think this one will not be
2699 changed often, although \BibTeX{} suppresses hyphens when it suppresses
2700 spaces between initials as well, so there are people who have different
2701 preferences. (Hence, \pkg{apacite} partly bypasses the standard
2702 \BibTeX{} formatting functions to make this work.)
2703
2704 \DescribeMacro{\BCBT}
2705 \DescribeMacro{\BCBL}
2706 \cmd{\BCBT} is the comma between authors in the reference section when
2707 there are two authors, as in
2708 ``Mooijaart, A., \& Bentler, P.~M. (1986).'' The comma after the ``A.''
2709 is this one. Default is a comma. The APA manual requires it, but other
2710 styles leave out this comma. In such a case, you would redefine this
2711 ``comma'' to be the empty string:
2712 \begin{verbatim}
2713 \renewcommand{\BCBT}{}
2714 \end{verbatim}
2715 Analogously, \cmd{\BCBL} is the comma before the last author when there
2716 are three or more authors in a citation and in the reference section,
2717 as in ``(Gill, Murray, \& Wright, 1981)'' or
2718 ``Gill, P.~E., Murray, W., \& Wright, M.~H. (1981).'' Its default is
2719 also a comma, as required by the APA manual, which is standard U.S.
2720 usage. Other styles, particularly European, such as British English,
2721 omit this comma. Again, in such a case, you would redefine this
2722 ``comma'' to be the empty string. (This is in fact done in several of
2723 the language files. See section~\ref{sec:compat-babel}.)
2724
2725 \DescribeMacro{\BDBL}
2726 \cmd{\BDBL} is the dots before the last author in the reference
2727 section when the reference has more than seven authors. The default
2728 is ``|, \dots{} |''. The APA manual seems to imply that there
2729 shouldn't be space around the dots, but I think it's better to have
2730 the space and I assume editors won't mind. However, if they insist on
2731 removing the space, you can redefine \cmd{\BDBL} accordingly.
2732
2733 \DescribeMacro{\theBibCnt}
2734 \DescribeMacro{\BCnt}
2735 \DescribeMacro{\BCntIP}
2736 \DescribeMacro{\BCntND}
2737 If there are multiple citations with the same author and year, a
2738 letter should be added to the year to distinguish the references.
2739 For example, one may refer to two or more articles by J.~Smith
2740 published in 1982. They should be referred to as ``Smith (1982a)'',
2741 ``Smith (1982b)'', and so forth. To accomplish this, the counter
2742 |BibCnt| is defined in \fname{apacite.sty}. The \cmd{\theBibCnt}
2743 command defines how the value of |BibCnt| is formatted. The default
2744 is ``|\alph{BibCnt}|'', that is, as a plain lowercase letter. To
2745 emphasize (italicize) the ``a'', ``b'', and so forth, you can redefine
2746 this as
2747 \begin{verbatim}
2748 \renewcommand{\theBibCnt}{{\em\alph{BibCnt}\/}}
2749 \end{verbatim}
2750 (This presumably works better than ``\verb+\emph{\alph{BibCnt}}+''.)
2751 To control this behavior, redefining the \cmd{\theBibCnt} command
2752 should normally be sufficient. However, the complete formatting
2753 commands are \cmd{\BCnt}, \cmd{\BCntIP}, and \cmd{\BCntND}. The
2754 second of these is for ``in press'' works, which need an extra hyphen
2755 between ``in press'' and the ``a'' and ``b'' suffixes. The third is
2756 similar, for works without a date, which is formatted as
2757 ``n.d.\hbox{}'' in APA style. Their default definitions
2758 in \fname{apacite.sty} are
2759 \begin{verbatim}
2760 \DeclareRobustCommand{\BCnt}[1]{\setcounter{BibCnt}{#1}\theBibCnt}
2761 \DeclareRobustCommand{\BCntIP}[1]{\setcounter{BibCnt}{#1}\mbox{-\theBibCnt}}
2762 \DeclareRobustCommand{\BCntND}[1]{\setcounter{BibCnt}{#1}\mbox{-\theBibCnt}}
2763 \end{verbatim}
2764
2765 \DescribeMacro{\APACciteatitle}
2766 \DescribeMacro{\APACcitebtitle}
2767 \cmd{\APACciteatitle} determines the formatting of the title of an
2768 article (or similar work) when used as a citation in the text when no
2769 author or editor is available for that purpose. Its default definition
2770 is
2771 \begin{verbatim}
2772 \newcommand{\APACciteatitle}[1]{``#1''}
2773 \end{verbatim}
2774 that is, the title is put between double quotes. Similarly,
2775 \cmd{\APACcitebtitle} determines the formatting of the title of a book
2776 (or other independent work) when used as a citation in the text when no
2777 author or editor is available for that purpose. Its default definition
2778 is
2779 \begin{verbatim}
2780 \newcommand{\APACcitebtitle}[1]{{\em #1\/}}
2781 \end{verbatim}
2782 that is, the title is emphasized (in italics) but not put between
2783 double quotes.
2784
2785 \DescribeMacro{\APACmetastar}
2786 \cmd{\APACmetastar} is the asterisk that precedes an item in the
2787 bibliography to denote that it is included in the meta-analysis.
2788 The default value is ``\verb+\ensuremath{{}^\ast}+'', which
2789 prints as ``\APACmetastar''.
2790
2791 \DescribeMacro{\bibnewpage}
2792 If the \pkgoption{bibnewpage} option is chosen, \cmd{\bibnewpage} is
2793 included before the bibliography. Its default definition is
2794 \cmd{\clearpage}, but \fname{apa.cls} used \cmd{\newpage} in a
2795 similar construction with its \pkgoption{man} option. See
2796 \citeA[p.~215]{LaTeXbook} or \citeA[p.~37]{KoDa04} for the differences
2797 between \cmd{\clearpage} and \cmd{\newpage}.
2798
2799 \DescribeMacro{\bibliographytypesize}
2800 \cmd{\bibliographytypesize} is used before the reference list, but
2801 after the section or chapter heading. It is intended for the font size
2802 of the reference list: For \citeA{WaMe00}, I defined it as \cmd{\small}
2803 (and even then the reference list took up 34 pages). The default value
2804 is \cmd{\normalsize}.
2805
2806 \DescribeMacro{\bibleftmargin}
2807 \DescribeMacro{\bibindent}
2808 \DescribeMacro{\bibitemsep}
2809 \DescribeMacro{\bibparsep}
2810 \DescribeMacro{\biblabelsep}
2811 Several parameters determine the layout of the reference list.
2812 \cmd{\bibleftmargin} gives the indentation of the second and subsequent
2813 lines of a reference list entry, relative to the usual left margin. It
2814 is not a proper command, but a rubber length, which means that it is
2815 not changed by \cmd{\renewcommand} but by \cmd{\setlength}. Its default
2816 value is 2.5em. \cmd{\bibindent} gives the indentation of the
2817 first line of a reference list entry, relative to the second line. It
2818 is also a rubber length, with default value is |-\bibleftmargin|, which
2819 means that the first line starts at the original left margin, and the
2820 second and subsequent lines are indented by 2.5em. \cmd{\biblabelsep}
2821 gives the horizontal separation between the reference list label and
2822 the rest of the entry. Normally, there are no reference list labels
2823 when using \pkg{apacite}, but this command allows one to define them
2824 through redefining \cmd{\@biblabel} and \cmd{\@lbibitem} without having
2825 to redefine the whole \envirname{bibliography} environment. I once used
2826 this to generate a numbered reference list for my CV. It is a rubber
2827 length in principle, but the default is a fixed length of 0pt.
2828 \cmd{\bibitemsep} gives the vertical separation between two reference
2829 list entries. It is also a rubber length, with default value
2830 ``|0pt plus .3pt|'', i.e., 0pt, but it may be stretched a little to
2831 fill the page nicely. If you want to change it, e.g., to get a blank
2832 line between reference list entries, you can use
2833 \begin{verbatim}
2834 \setlength{\bibitemsep}{\baselineskip}
2835 \end{verbatim}
2836 Finally, \cmd{\bibparsep} gives the vertical separation between two
2837 paragraphs within the same reference list entry. Such a situation does
2838 not occur in the default setup, so it is not used, but it is
2839 conceivable that certain customizations lead to its use. It is a
2840 rubber length with default value 0pt.
2841
2842 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2843 \subsection{Labels}
2844 \label{subsec:labels}
2845 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2846 There are many specific pieces of text that can be put into the reference
2847 list or a citation by \pkg{apacite}. Here, these pieces are called
2848 \emph{labels}. Almost all of these are to some extent language-specific, and
2849 sometimes style-specific even within the same language. Therefore, they are
2850 implemented through \LaTeX{} commands, so that users can easily change them.
2851 In this section, these commands and their purposes are described, and their
2852 (U.S.\ English) defaults are given. Section~\ref{sec:compat-babel} below will
2853 discuss how these commands are changed if another language is used.
2854
2855 The following label commands are used:
2856 \begin{description}
2857
2858 \item[\cmd{\onemaskedcitationmsg}] \DescribeMacro{\onemaskedcitationmsg}
2859 \item[\cmd{\maskedcitationsmsg}] \DescribeMacro{\maskedcitationsmsg}
2860 These commands have one mandatory argument (which should always
2861 be 1 for \cmd{\onemaskedcitationmsg}) and define a message
2862 stating that citations are removed for a masked review. The
2863 default messages are
2864 ``\emph{(1\ citation removed for masked review)}'' and
2865 ``\emph{(}|#1|\emph{\ citations removed for masked review)}'',
2866 respectively.
2867
2868 \item[\cmd{\bibmessage}] \DescribeMacro{\bibmessage}
2869 This is the first of 9 specific type
2870 commands that are recognized by \pkg{apacite}. If you
2871 define the \fieldname{type} field of a \entryname{misc}
2872 entry as ``\cmd{\bibmessage}'', the formatting of the
2873 entry is changed (e.g., the title is not italicized),
2874 see the discussion of the \fieldname{type} field in
2875 section~\ref{subsec:fields} above. This one is used for
2876 messages in newsgroups, internet forums, etc.
2877 Default is ``\verb+Msg+''.
2878
2879 \item[\cmd{\bibcomputerprogram}] \DescribeMacro{\bibcomputerprogram}
2880 Default is ``\verb+Computer program+''.
2881
2882 \item[\cmd{\bibcomputerprogrammanual}] \DescribeMacro{\bibcomputerprogrammanual}
2883 Default is ``\verb+Computer program manual+''.
2884
2885 \item[\cmd{\bibcomputerprogramandmanual}] \DescribeMacro{\bibcomputerprogramandmanual}
2886 Default is ``\verb+Computer program and manual+''.
2887
2888 \item[\cmd{\bibcomputersoftware}] \DescribeMacro{\bibcomputersoftware}
2889 Default is ``\verb+Computer software+''.
2890
2891 \item[\cmd{\bibcomputersoftwaremanual}] \DescribeMacro{\bibcomputersoftwaremanual}
2892 Default is ``\verb+Computer software manual+''.
2893
2894 \item[\cmd{\bibcomputersoftwareandmanual}] \DescribeMacro{\bibcomputersoftwareandmanual}
2895 Default is ``\verb+Computer software and manual+''.
2896
2897 \item[\cmd{\bibprogramminglanguage}] \DescribeMacro{\bibprogramminglanguage}
2898 Default is ``\verb+Programming language+''.
2899
2900 \item[\cmd{\bibnotype}] \DescribeMacro{\bibnotype}
2901 This one is a bit different from the previous 8. It is used for
2902 \entryname{techreport} entries to indicate that the type specifier
2903 should be suppressed. Its default value is the empty string, but this
2904 will not have an effect on \pkg{apacite} behavior, because the type
2905 specifier is suppressed anyway by \pkg{apacite}. However, by defining it
2906 as the empty string, formatting may become better (i.e., closer to the
2907 desired formatting) with other styles.
2908
2909 \item[\cmd{\bibnodate}] \DescribeMacro{\bibnodate}
2910 Used in the \fieldname{year} and
2911 \fieldname{originalyear} fields to indicate that no
2912 publication date has been given. Default value is ``\verb+n.d.\hbox{}+''.
2913 The ``\verb+\hbox{}+'' ensures that \TeX{} does not treat
2914 the last period as a sentence-ending period, after which
2915 more space is inserted. This also applies to several other
2916 labels discussed below.
2917
2918 \item[\cmd{\BOthers}] \DescribeMacro{\BOthers}
2919 Used for ``others'' if the number of authors
2920 or editors is too large, as in ``(Gill et al., 1981)''.
2921 The default is ``\verb+et al.\hbox{}+''.
2922
2923 However, the definition contains a slight adaptation, because
2924 in a previous version of \pkg{apacite}, there was a problem
2925 implying that in some cases \BibTeX{} might put an extra period after
2926 \cmd{\BOthers}, not recognizing that it already contains a period,
2927 so that you would get ``et al.\hbox{}.'', which is undesirable.
2928 It depends on the definition of \cmd{\BOthers} whether there should
2929 be a period or not: If it is defined as ``\verb+et al.\hbox{}+'',
2930 there should not be an additional period, but if it is defined
2931 as, say, ``\verb+and others+'', then there should be an additional
2932 period. But \BibTeX{} does not know what the (later) definition
2933 of this command will be in \LaTeX{}. Therefore, the \cmd{\BOthers}
2934 command is defined to have one argument. In \BibTeX,
2935 \pkg{apacite} inserts \verb+\BOthers{.}+ in the output, so no
2936 additional period is inserted by \BibTeX. By default, this
2937 command is defined as ``\verb+et al.\hbox{}+'', and the argument is
2938 simply ignored.
2939
2940 If you redefine the \cmd{\BOthers} command and need the additional
2941 period, you can redefine it appropriately. However, in the current
2942 version, the \cmd{\BOthers} command is distinguished from the
2943 \cmd{\BOthersPeriod} command and I think the mentioned problems
2944 do not occur anymore. Nevertheless, I have kept the definition of the
2945 previous version. I may decide, after thorough testing, to change
2946 this again in a next version.
2947
2948 There is still a complication, however. If you use a \cmd{\citeauthor}
2949 at the end of a sentence, there may be a period too many, if
2950 you end the sentence explicitly with it and \cmd{\BOthers} is
2951 ``et al.\hbox{}''. On the other hand, if you omit the sentence-finishing
2952 period but decide to redefine \cmd{\BOthers} to ``and others'',
2953 the period is missing. Therefore, it seems wise not to end a sentence
2954 with a \cmd{\citeauthor}, or you could define a command, e.g.,
2955 \cmd{\finishsentence}, and insert it in an appropriate place.
2956 Then, this command should be changed along with \cmd{\BOthers}.
2957
2958 \item[\cmd{\BOthersPeriod}] \DescribeMacro{\BOthersPeriod}
2959 Also used for ``others'' if the number of
2960 authors or editors is too large, as in
2961 ``Gill, P. E., et al.\hbox{} (1981)''.
2962 But this one is used for situations when it should always end with
2963 a period. The default is ``\verb+et al.\hbox{}+''.
2964
2965 \item[\cmd{\bibcorporate}] \DescribeMacro{\bibcorporate}
2966 This command can be used in the \fieldname{author}
2967 field (and \fieldname{editor} and \fieldname{translator}) to tell
2968 \pkg{apacite} that the author is a corporate author. See
2969 section~\ref{subsec:fields} for an example of its usage. In combination
2970 with the \pkgoption{includecorporate} and \pkgoption{suppresscorporate}
2971 options, it can be used to include or exclude corporate authors from
2972 the author index. The usage as described above is structured as if
2973 \cmd{\bibcorporate} has an argument, the corporate author name, but
2974 by default, this argument simply would have to be copied to the output
2975 without further processing. Therefore, in the actual implementation,
2976 \cmd{\bibcorporate} does not have an argument and reduces to \cmd{\relax},
2977 i.e., it does nothing in \LaTeX{} and exerts its influence at the
2978 \BibTeX{} stage.
2979
2980 \item[\cmd{\BIP}] \DescribeMacro{\BIP}
2981 ``In press'', the string to be used as year for
2982 in-press references. In the \fname{.bib} file, the \fieldname{year}
2983 field should be ``\verb+\BIP+'', so that \pkg{apacite} can recognize
2984 this and use appropriate formatting and sorting.
2985 The default value is ``\verb+in press+''.
2986
2987 \item[\cmd{\BIn}] \DescribeMacro{\BIn}
2988 Used for \entryname{incollection} and
2989 \entryname{intechreport}, for ``In \opt{editor} (Ed.\hbox{}),
2990 \opt{booktitle}'', and similar phrases. Default value is ``\verb+In+''.
2991
2992 \item[\cmd{\BCHAP}] \DescribeMacro{\BCHAP}
2993 Used for \entryname{incollection} if the
2994 \fieldname{pages} field is empty, to denote the chapter number
2995 of the referenced work in the collection. Used primarily for
2996 internet documents, where there are no page numbers.
2997 Default value is ``chap.\hbox{}''. Note that in the text, in
2998 particular in a citation, the APA (p.~179) prescribes ``Chapter'':
2999 ``(Shimamura, 1989, Chapter~3)''. This is, however, something that
3000 would be typed by the author of the manuscript, not inserted by
3001 \pkg{apacite}, and thus \pkg{apacite} does not have a command
3002 for this.
3003
3004 \item[\cmd{\BCHAPS}] \DescribeMacro{\BCHAPS}
3005 Just like \cmd{\BCHAP}, but this one is used
3006 if the \fieldname{chapter} field refers to more than 1 chapter.
3007 Default value is ``chap.\hbox{}''.
3008
3009 \item[\cmd{\BED}] \DescribeMacro{\BED}
3010 Editor in reference list, as in
3011 ``In P. R. Krishnaiah (Ed.\hbox{})''. Default is ``\verb+Ed.\hbox{}+''.
3012
3013 \item[\cmd{\BEDS}] \DescribeMacro{\BEDS}
3014 Editors (more than one editor) in reference list,
3015 as in ``In C.~R. Rao \& J.~K. Ghosh (Eds.\hbox{})''.
3016 Default is ``\verb+Eds.\hbox{}+''.
3017
3018 \item[\cmd{\BTRANS}] \DescribeMacro{\BTRANS}
3019 Translator, as in ``(J. Strachey, Trans.\hbox{})''.
3020 Default is ``\verb+Trans.\hbox{}+''.
3021
3022 \item[\cmd{\BTRANSS}] \DescribeMacro{\BTRANSS}
3023 Translators. Default is ``\verb+Trans.\hbox{}+''.
3024
3025 \item[\cmd{\BTRANSL}] \DescribeMacro{\BTRANSL}
3026 Translation. Used in a text citation when
3027 referring to a translated work for which there is no date
3028 for the original work. This is then formatted as
3029 ``Aristotle (trans.\hbox{} 1931)''. Default is
3030 ``\verb+trans.\hbox{}+''.
3031
3032 \item[\cmd{\BCHAIR}] \DescribeMacro{\BCHAIR}
3033 Chair of a symposium, etc.
3034 Default is ``\verb+Chair+''.
3035
3036 \item[\cmd{\BCHAIRS}] \DescribeMacro{\BCHAIRS}
3037 Chairs. Default is ``\verb+Chairs+''.
3038
3039 \item[\cmd{\BVOL}] \DescribeMacro{\BVOL}
3040 Volume, as in ``Vol.\hbox{}~1''.
3041 Default is ``\verb+Vol.\hbox{}+''.
3042
3043 \item[\cmd{\BVOLS}] \DescribeMacro{\BVOLS}
3044 Volumes, as in ``Vols.\hbox{} 1--4''.
3045 Default is ``\verb+Vols.\hbox{}+''.
3046
3047 \item[\cmd{\BNUM}] \DescribeMacro{\BNUM}
3048 Number, as in ``Tech.\ Rep.\hbox{}
3049 No.\hbox{}~12''.
3050 Default is ``\verb+No.\hbox{}+''.
3051
3052 \item[\cmd{\BNUMS}] \DescribeMacro{\BNUMS}
3053 Numbers, as in ``Nos.\hbox{} 3--5''.
3054 Default is ``\verb+Nos.\hbox{}+''.
3055
3056 \item[\cmd{\BEd}] \DescribeMacro{\BEd}
3057 Edition, as in ``2nd ed.\hbox{}''.
3058 Default is ``\verb+ed.\hbox{}+''.
3059
3060 \item[\cmd{\BPG}] \DescribeMacro{\BPG}
3061 Page, default is ``\verb+p.\hbox{}+''.
3062
3063 \item[\cmd{\BPGS}] \DescribeMacro{\BPGS}
3064 Pages, default is ``\verb+pp.\hbox{}+''.
3065
3066 \item[\cmd{\BTR}] \DescribeMacro{\BTR}
3067 The (default) technical report type name, which can be
3068 overridden by the \fieldname{type} field. Default is
3069 ``\verb+Tech.\ Rep.\hbox{}+''
3070
3071 \item[\cmd{\BPhD}] \DescribeMacro{\BPhD}
3072 The (default) PhD thesis type name, which can be
3073 overridden by the \fieldname{type} field. Default is
3074 ``\texttt{Doctoral dissertation}''.
3075
3076 \item[\cmd{\BUPhD}] \DescribeMacro{\BUPhD}
3077 The (default) Unpublished PhD thesis type name,
3078 which can be overridden by the \fieldname{type} field. Default is
3079 ``\texttt{Unpublished doctoral dissertation}''.
3080
3081 \item[\cmd{\BMTh}] \DescribeMacro{\BMTh}
3082 The (default) master's thesis type name, which can be
3083 overridden by the \fieldname{type} field. Default is
3084 ``\texttt{Master's thesis}''.
3085
3086 \item[\cmd{\BUMTh}] \DescribeMacro{\BUMTh}
3087 The (default) unpublished master's thesis type name,
3088 which can be overridden by the \fieldname{type} field. Default is
3089 ``\texttt{Unpublished master's thesis}''.
3090
3091 \item[\cmd{\BOWP}] \DescribeMacro{\BOWP}
3092 ``Original work published'', default is
3093 ``\texttt{Original work published}''.
3094
3095 \item[\cmd{\BREPR}] \DescribeMacro{\BREPR}
3096 ``Reprinted from'', default is
3097 ``\texttt{Reprinted from}''.
3098
3099 \item[\cmd{\Bby}] \DescribeMacro{\Bby}
3100 ``by'' in the construction
3101 ``by P.~R. Krishnaiah, Ed.\hbox{}'' referring to the original
3102 editor of a reprinted work. Default is ``\verb+by+''.
3103
3104 \item[\cmd{\BAuthor}] \DescribeMacro{\BAuthor}
3105 ``Author'' as a description of the publisher
3106 if the author and publisher are the same. Default is
3107 ``\verb+Author+''
3108
3109 \item[\cmd{\BAvailFrom}] \DescribeMacro{\BAvailFrom}
3110 ``Available from''. This is used in versions
3111 of \pkg{apacite} up to [2009/03/01] if the \fieldname{url}
3112 field is specified but the \fieldname{lastchecked} field is not.
3113 This is now superseded by \cmd{\BRetrievedFrom}.
3114 Default is ``\verb+Available from\ +''. Note the extra space.
3115 This construction allows customization by redefining this command
3116 as being empty, thereby omitting the phrase altogether, without
3117 undesirable extra space.
3118
3119 \item[\cmd{\BRetrieved}] \DescribeMacro{\BRetrieved}
3120 ``Retrieved from'', used if both the
3121 \fieldname{url} field and the \fieldname{lastchecked} field are
3122 specified. It has one argumnt: the date, i.e., the contents of
3123 the \fieldname{lastchecked} field. The default is
3124 ``\verb+Retrieved {#1}, from\ +'', again with extra space.
3125
3126 \item[\cmd{\BRetrievedFrom}] \DescribeMacro{\BRetrievedFrom}
3127 ``Retrieved from'', used if the \fieldname{url}
3128 field is specified but the \fieldname{lastchecked} field is not.
3129 This was introduced, because the APA manual (p.~192) now states
3130 that retrieval dates should be omitted ``unless the source
3131 material may change over time'', and prescribes ``Retrieved from''
3132 (p.~199).
3133 Default is ``\verb+Retrieved from\ +'', again with extra space.
3134
3135 \item[\cmd{\BMsgPostedTo}] \DescribeMacro{\BMsgPostedTo}
3136 Used for messages to newsgroups and the like.
3137 Default is ``\verb+Message posted to\ +'', with space.
3138
3139 \item[\cmd{\refname}] \DescribeMacro{\refname}
3140 Name of the reference list if it's a section.
3141 (So it's the section name.) Default is ``\verb+References+''.
3142 A problem with the current implementation is, that if you use
3143 \pkg{babel}'s \cmd{\selectlanguage} command, then \cmd{\refname}
3144 and \cmd{\bibname} are overwritten. Because \pkg{babel}'s
3145 definitions of these commands are often (for various languages)
3146 different from the names prescribed by the APA manual and analogous
3147 bodies in other countries, it will often be necessary to redefine
3148 \cmd{\refname} or \cmd{\bibname} if you have used
3149 \cmd{\selectlanguage}. I hope to provide a fix in a next version
3150 of \pkg{apacite}.
3151
3152 \item[\cmd{\bibname}] \DescribeMacro{\bibname}
3153 Name of the reference list if it's a chapter.
3154 Default is ``\verb+References+''. See also \cmd{\refname}.
3155
3156 \item[\cmd{\bibliographyprenote}] \DescribeMacro{\bibliographyprenote}
3157 This command is used before
3158 the reference list, but after the section or chapter heading,
3159 and immediately after \cmd{\bibliographytypesize}.
3160 It is intended for an optional note just before the references
3161 in the reference list. It defaults to nothing, but can be changed
3162 to a list of commands (e.g., if some commands should be different
3163 in the reference list than in the text) and/or some text.
3164
3165 \item[\cmd{\APACmetaprenote}] \DescribeMacro{\APACmetaprenote}
3166 If a meta-analysis is reported, the
3167 works included in the meta-analysis should in the bibliography be
3168 preceded by an asterisk, see the description of \cmd{\APACmetastar}
3169 above. This should then be explained in a note before the references.
3170 This command contains the text of that note. Default is
3171 ``\texttt{References marked with an asterisk indicate studies
3172 included in the meta-analysis.}''.
3173
3174 \item[\cmd{\authorindexname}] \DescribeMacro{\authorindexname}
3175 Name (heading) of the author index.
3176 Default is ``\verb+Author Index+''.
3177
3178 \item[\cmd{\doiprefix}] \DescribeMacro{\doiprefix}
3179 String that is printed before a DOI.
3180 Default is ``\verb+doi:+''.
3181
3182 \end{description}
3183
3184 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3185 \subsection{More drastic formatting changes to the reference list}
3186 \label{sec:custom-big-formatting}
3187 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3188 In earlier versions of \pkg{apacite}, most of the formatting of the
3189 reference list was done in the \BibTeX{} stage, i.e., by the \fname{.bst}
3190 files. This corresponds with most other \BibTeX{} styles. This makes
3191 it difficult for users to customize the formatting of the reference
3192 list: They would have to make their own \fname{.bst} file, by adapting
3193 \fname{apacite.bst}. Certain small changes are relatively easy to make,
3194 but \BibTeX's ``bst'' language is not easy to understand for most users,
3195 and thus most desired changes, though seemingly small, may be too
3196 complicated to implement. Another drawback of this setup is that, each
3197 time I release a new version of \pkg{apacite}, users would have to make
3198 the same adaptations again. In the early days of \pkg{apacite}, wasting
3199 disk space was another drawback, but this is not important anymore.
3200
3201 To overcome the most salient of these problems, \pkg{apacite} has always
3202 deferred some formatting choices to the \LaTeX{} stage, by using tailor-made
3203 formatting commands instead of explicit formatting, as discussed in
3204 sections~\ref{sec:custom-punct} and~\ref{subsec:labels} above. The amount of
3205 formatting thus handled has slightly grown over time, but still most choices
3206 were hard wired in the \BibTeX{} styles.
3207
3208 Since the \APACversiondate{2007/09/03} version of \pkg{apacite}, a big step
3209 has been made in transferring these choices to the \LaTeX{} domain. Hence,
3210 a much larger set of commands, with wider-ranging scope, has been defined,
3211 and considerably fewer choices are made at the \BibTeX{} stage. For
3212 example, \fname{apacite.bst} now inserts
3213 \mbox{}\vspace{0.7\baselineskip}\\
3214 \mbox{\cmd{\APACjournalVolNumPages}%
3215 \marg{journal}%
3216 \marg{volume}%
3217 \marg{number}%
3218 \marg{pages}%
3219 }
3220 \mbox{}\vspace{0.7\baselineskip}\\
3221 in the \fname{.bbl} file for an \entryname{article} entry, and
3222 the actual formatting of this information is defined in
3223 \fname{apacite.sty}. If all four components are available, the
3224 default (APA manual) formatting of this looks like
3225 \mbox{}\vspace{0.7\baselineskip}\\
3226 \mbox{\Bem{Acta Paedopsychiatrica},
3227 \Bem{38}(9),
3228 {229--231}}
3229 \mbox{}\vspace{0.7\baselineskip}\\
3230 but by redefining this command, users can change this, e.g., to
3231 \mbox{}\vspace{0.7\baselineskip}\\
3232 \mbox{\Bem{Acta Paedopsychiatrica}
3233 \textbf{38}, No.~9:
3234 {229--231}}
3235 \mbox{}\vspace{0.7\baselineskip}\\
3236 The advantage of this is that users can fairly easily construct a
3237 customized style by redefining only a few commands in \LaTeX, by
3238 using \cmd{\renewcommand}. Users will generally find it much easier
3239 to do this than adapt the \fname{.bst} files. Furthermore, only
3240 the affected commands need to be redefined, so that, when a new
3241 version of \pkg{apacite} becomes available, all the new features
3242 can be used---with the exception of the redefined commands, of
3243 course---without having to adapt everything again. The drawback
3244 is that the \fname{.bbl} file becomes less readable and more
3245 difficult to adapt: Previously, it was easy to make ad-hoc changes
3246 by editing the \fname{.bbl} file, but this has now become more
3247 difficult. However, I intend to make this facility more user-friendly
3248 in the future, e.g., by introducing options in the \LaTeX{} package
3249 (say, \pkgoption{boldvolume}) or by introducing user-friendly
3250 commands that accomplish the same (say, \cmd{\boldvolume}), so that
3251 the advantages will clearly outweigh the disadvantages for the vast
3252 majority of users.
3253
3254 Some packages (\pkg{amsrefs} and \pkg{biblatex} are the ones I am aware of)
3255 handle the formatting of the reference list completely in the \LaTeX{} domain,
3256 using \BibTeX{} only for sorting the reference list. The current version of
3257 \pkg{apacite} does not go that far; there are still certain choices that are
3258 hardwired in the \BibTeX{} code. Examples are the ordering of the various blocks
3259 (most notably the position of the year; some styles have this at the end) and
3260 the formatting of names. It is doubtful whether \pkg{apacite} will follow the
3261 path toward the end, like these other packages. Some formatting choices are
3262 closely connected with sorting of entries (e.g., by title if there is no author;
3263 this assumes that the title then takes the author position) or other cross-entry
3264 relations (such as adding `a' and `b' suffixes to the year). Therefore, it does
3265 not seem useful to disconnect these choices by handing them over to \LaTeX.
3266
3267 The following commands are currently implemented to format the reference
3268 list. If you want to customize them, you can study the source code in
3269 the file \fname{apacite.sty}, copy it to you own package file, and adapt
3270 the code as desired.\\[-0.3\baselineskip]
3271 \par\noindent\DescribeMacro{\APACmonth}
3272 \makebox[2.1in][l]{\cmd{\APACmonth}}
3273 \makebox{Month name (as function of a number)}
3274 \par\noindent\DescribeMacro{\APACrefYear}
3275 \makebox[2.1in][l]{\cmd{\APACrefYear}}
3276 \makebox{Year in the reference list}
3277 \par\noindent\DescribeMacro{\APACrefYearMonthDay}
3278 \makebox[2.1in][l]{\cmd{\APACrefYearMonthDay}}
3279 \makebox{Year + month + day}
3280 \par\noindent\DescribeMacro{\APACrefatitle}
3281 \makebox[2.1in][l]{\cmd{\APACrefatitle}}
3282 \makebox{Title (article style, default upright)}
3283 \par\noindent\DescribeMacro{\APACrefbtitle}
3284 \makebox[2.1in][l]{\cmd{\APACrefbtitle}}
3285 \makebox{Title (book style, default italicized)}
3286 \par\noindent\DescribeMacro{\APACrefaetitle}
3287 \makebox[2.1in][l]{\cmd{\APACrefaetitle}}
3288 \makebox{English translation of title (article)}
3289 \par\noindent\DescribeMacro{\APACrefbetitle}
3290 \makebox[2.1in][l]{\cmd{\APACrefbetitle}}
3291 \makebox{English translation of title (book)}
3292 \par\noindent\DescribeMacro{\APACjournalVolNumPages}
3293 \makebox[2.1in][l]{\cmd{\APACjournalVolNumPages}}
3294 \makebox{Journal, volume, number, and pages}
3295 \par\noindent\DescribeMacro{\APACaddressPublisher}
3296 \makebox[2.1in][l]{\cmd{\APACaddressPublisher}}
3297 \makebox{Address and publisher}
3298 \par\noindent\DescribeMacro{\APACaddressInstitution}
3299 \makebox[2.1in][l]{\cmd{\APACaddressInstitution}}
3300 \makebox{Address and institution (for technical reports)}
3301 \par\noindent\DescribeMacro{\APACaddressPublisherEqAuth}
3302 \makebox[2.1in][l]{\cmd{\APACaddressPublisherEqAuth}}
3303 \makebox{Address and publisher if the publisher is the author}
3304 \par\noindent\DescribeMacro{\APACaddressInstitutionEqAuth}
3305 \makebox[2.1in][l]{\cmd{\APACaddressInstitutionEqAuth}}
3306 \makebox{Address and institution if the latter is the author}
3307 \par\noindent\DescribeMacro{\APACaddressSchool}
3308 \makebox[2.1in][l]{\cmd{\APACaddressSchool}}
3309 \makebox{Address and school (for theses)}
3310 \par\noindent\DescribeMacro{\APACtypeAddressSchool}
3311 \makebox[2.1in][l]{\cmd{\APACtypeAddressSchool}}
3312 \makebox{Type, address, and school (for theses)}
3313 \par\noindent\DescribeMacro{\APAChowpublished}
3314 \makebox[2.1in][l]{\cmd{\APAChowpublished}}
3315 \makebox{\fieldname{howpublished} field}
3316 \par\noindent\DescribeMacro{\APACorigED}
3317 \makebox[2.1in][l]{\cmd{\APACorigED}}
3318 \makebox{Original editor for reprints and translations}
3319 \par\noindent\DescribeMacro{\APACorigEDS}
3320 \makebox[2.1in][l]{\cmd{\APACorigEDS}}
3321 \makebox{Ditto, multiple editors}
3322 \par\noindent\DescribeMacro{\APACrefnote}
3323 \makebox[2.1in][l]{\cmd{\APACrefnote}}
3324 \makebox{Formatting of \fieldname{note} field}
3325 \par\noindent\DescribeMacro{\APACorigyearnote}
3326 \makebox[2.1in][l]{\cmd{\APACorigyearnote}}
3327 \makebox{Original year + optional note}
3328 \par\noindent\DescribeMacro{\APACorigjournalnote}
3329 \makebox[2.1in][l]{\cmd{\APACorigjournalnote}}
3330 \makebox{Original journal (+ volume, number, pages) + optional note}
3331 \par\noindent\DescribeMacro{\APACorigbooknote}
3332 \makebox[2.1in][l]{\cmd{\APACorigbooknote}}
3333 \makebox{Formatting of ``original'' information if the original is a book}
3334 \par\noindent\DescribeMacro{\APACbVolEdTR}
3335 \makebox[2.1in][l]{\cmd{\APACbVolEdTR}}
3336 \makebox{Technical report information}
3337 \par\noindent\DescribeMacro{\APACbVolEdTRpgs}
3338 \makebox[2.1in][l]{\cmd{\APACbVolEdTRpgs}}
3339 \makebox{Ditto, for \entryname{intechreport}}
3340 \par\noindent\DescribeMacro{\doi}
3341 \makebox[2.1in][l]{\cmd{\doi}}
3342 \makebox{Formatting of DOI string}\\[0.7\baselineskip]
3343 In addition, the following environments are used:\\[-0.3\baselineskip]
3344 \par\noindent\DescribeEnv{APACrefauthors} \makebox[1.3in][l]{\envirname{APACrefauthors} } \makebox{Formatting of authors (or editors acting as authors) in the reference list.}
3345 \par\noindent\DescribeEnv{APACrefURL} \makebox[1.3in][l]{\envirname{APACrefURL} } \makebox{Formatting of \fieldname{url} field}
3346 \par\noindent\DescribeEnv{APACrefDOI} \makebox[1.3in][l]{\envirname{APACrefDOI} } \makebox{Formatting of \fieldname{doi} field}
3347 \par\noindent\DescribeEnv{APACrefURLmsg} \makebox[1.3in][l]{\envirname{APACrefURLmsg} } \makebox{Formatting of \fieldname{url} field for messages}
3348 \par\noindent\DescribeEnv{APACrefannotation}\makebox[1.3in][l]{\envirname{APACrefannotation}} \makebox{Formatting of \fieldname{annote} or \fieldname{annotate} fields for annotated bibliographies.}
3349 \\[0.7\baselineskip]
3350 It is likely that these lists will be expanded in future versions of
3351 \pkg{apacite}.
3352
3353 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3354 \section{Language support}
3355 \label{sec:compat-babel}
3356 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3357 The APA is, of course, American, and therefore the rules in the APA manual
3358 are also based on the (U.S.) English language. Because \pkg{apacite} was
3359 primarily designed to implement the APA rules, and because I write all
3360 my scientific work in English, \pkg{apacite} originally did not contain
3361 explicit support for other languages. However, most language-specific
3362 elements have been implemented in the form of \LaTeX{} commands, so that
3363 users could define their own \LaTeX{} package in which these elements were
3364 changed. The labels discussed in section~\ref{subsec:labels} above are the
3365 most important part of this.
3366
3367 Furthermore, when writing in a non-English language, the \pkg{babel} package
3368 will usually be loaded. The \pkg{babel} package is an extensive package that
3369 facilitates using \LaTeX{} for documents in languages other than English.
3370 There have been some compatibility problems between \pkg{babel} and
3371 \pkg{apacite}, and therefore since 2003 \pkg{apacite} contained some
3372 explicit code to overcome the compatibility problems. I think this works
3373 well, provided that \pkg{apacite} is loaded \emph{after} \pkg{babel}.
3374
3375 Thus, although \pkg{apacite} did not support non-English languages
3376 explicitly, it did facilitate them. Supporting non-English languages is
3377 not a main objective of \pkg{apacite}, because it is not needed for
3378 the APA. Nevertheless, it potentially is a useful addition. Many journals in
3379 non-English languages and universities in countries where other languages
3380 are spoken base their rules on the APA manual. Therefore, it is
3381 efficient if, with a few adaptations, \pkg{apacite} can also be used in
3382 these circumstances. For this reason, and based on user requests,
3383 \pkg{apacite} has contained some explicit language support since June 2005.
3384
3385 The unpacked \pkg{apacite} distribution contains files that have names
3386 according to the construction \opt{language}\fname{.apc}, i.e.,
3387 \fname{english.apc}, \fname{dutch.apc}, etc.
3388 These files define the language-specific modifications of \pkg{apacite},
3389 mainly translations of terms like ``and'', ``Ed.\hbox{}'', etc. They have been
3390 written by \pkg{apacite} users who are (native) speakers of the languages
3391 involved. If the \pkg{babel}, \pkg{german}, or \pkg{ngerman} package is
3392 loaded, \pkg{apacite} is able to determine the language of the document that
3393 is processed. Then the corresponding \fname{.apc} file, when available, is
3394 read. In this way, language-specific elements are changed to the relevant
3395 language. This is done fully automatically, the user does not have to do
3396 anything explicitly. However, sometimes an \fname{.apc} file makes some
3397 assumptions or choices that are nontrivial. Therefore, look at the source
3398 code of the \fname{.apc} file (or in the Implementation section of this
3399 manual if you have generated this manual with the \cmd{\AlsoImplementation}
3400 option) if you obtain unexpected results. These files contain some brief
3401 documentation of the specific issues relevant for the language at hand.
3402
3403 The list with available \fname{.apc} files has been given in
3404 section~\ref{sec:usage}. One file is defined for each ``language'', which can
3405 be used for several ``dialects'' (in \pkg{babel} terminology). For example,
3406 \fname{english.apc} is also used if the language is ``american''. See the
3407 documentation of the \pkg{babel} and \pkg{(n)german} packages for a list of
3408 dialects of the language files supplied. If an \fname{.apc} file is not
3409 available for the language you need, you can use one of the supplied ones as a
3410 template and write your own. If you send it to me, I can include it in a next
3411 version of \pkg{apacite}.
3412
3413 The \pkg{babelbib} package offers very sophisticated support of
3414 different languages. Perhaps some of the features that it offers are
3415 useful additions to \pkg{apacite} as well, and these may be included
3416 in a future version of \pkg{apacite}.
3417
3418
3419 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3420 \subsection{Language-specific issues}
3421 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3422 This section lists issues that are specific to one or more language
3423 files. It is currently very incomplete. Again, I suggest you study
3424 the \fname{.apc} file of your language for more information.
3425
3426 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3427 \subsubsection*{Spanish}
3428 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3429 \pkg{apacite}'s usage of |<| and |>| for pre-notes, as in
3430 |\cite<e.g.,>{jones06}| (inherited from its predecessor, \fname{theapa.sty}),
3431 conflicts with \pkg{babel}'s \pkgoption{spanish} option, which makes |<| and |>|
3432 active characters. Hence, either you must avoid using prenotes with
3433 \pkg{apacite}'s construction or you must disable \pkg{babel}'s behavior by
3434 inserting the command \cmd{\deactivatequoting} after loading \pkg{babel}.
3435
3436 \DescribeMacro{\usespanishe}
3437 The default ``and'' between authors in Spanish is `y', but when the
3438 subsequent author's last name starts with an `I', this should be `e'.
3439 Therefore, \fname{spanish.apc} introduces the command \cmd{\usespanishe},
3440 which takes a comma-separated list of citation keys as argument. The ``and''
3441 in these citations is then formatted as `e'. So
3442 \begin{verbatim}
3443 \citeA{AnIn93},
3444 \citeA{AnIn95},
3445 \usespanishe{AnIn93, AnIn95}
3446 \citeA{AnIn93},
3447 \citeA{AnIn95}.
3448 \end{verbatim}
3449 gives as output ``Anderson y Ingram (1993), Anderson y Ingram (1995),
3450 Anderson e Ingram (1993), Anderson e Ingram (1995).''
3451
3452 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3453 \subsection{Setting up \MiKTeX}
3454 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3455 \MiKTeX{} preloads the \pkg{babel} package and often uses \pkgoption{french}
3456 as the default language. The result is that \pkg{apacite} formats
3457 the heading of the reference list and other text strings in French.
3458 (Other distributions also preload \pkg{babel} but use
3459 \pkgoption{english} or \pkgoption{nohyphenation} as default.)
3460 I have received many reports from \pkg{apacite} users who use \MiKTeX{},
3461 who just want the default English, but get French output and don't
3462 know how to turn this off. Therefore, even though I believe this is a
3463 \MiKTeX{} issue and not an \pkg{apacite} issue, I\footnote{Actually,
3464 most of this investigation, testing, etc., was done by David Huffer,
3465 because I don't have \MiKTeX. Thanks, David!} have reluctantly
3466 decided to investigate this issue, and as a result of my investigation,
3467 provide this section.
3468
3469 So here is the way to solve this problem (for \MiKTeX{} version 2.7;
3470 presumably it works similar for other versions):
3471 \begin{enumerate}
3472 \item
3473 Click Start $\rightarrow$ Programs $\rightarrow$ MiKTeX 2.7 $\rightarrow$
3474 Settings to open the \MiKTeX{} Options window. Click on the Languages tab.
3475 \item
3476 Select ``\pkgoption{english}'', ``\pkgoption{nohyphenation}'', or whatever
3477 else you'd like to be the default language, and use the Down button to move
3478 this to the bottom. The \emph{last} checked language is the default main
3479 document language.
3480 \item
3481 Click on the General tab and click on Update Formats.
3482 \end{enumerate}
3483 If you do this with ``\pkgoption{english}'' or ``\pkgoption{nohyphenation}''
3484 as default language, \pkg{apacite} will use English strings and punctuation.
3485
3486 If you want to override the default (and/or you are not able to set the
3487 default, perhaps because you don't have the administrative permissions),
3488 you can also insert the line
3489 \begin{verbatim}
3490 \usepackage[english]{babel}
3491 \end{verbatim}
3492 in your document, before loading \pkg{apacite}.
3493
3494 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3495 \section{Compatibility}
3496 \label{sec:compat}
3497 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3498 Generally speaking, I would want \pkg{apacite} to be compatible with other
3499 packages, of course. However, what does compatibility mean? It can mean
3500 various things:
3501 \begin{enumerate}
3502 \item \label{compat1}%
3503 The same \fname{.bib} file can be used with
3504 different \BibTeX{} styles and \LaTeX{} citation packages;
3505 \item \label{compat2}%
3506 The same citation commands as other citation packages;
3507 \item \label{compat3}%
3508 Another \LaTeX{} citation package can be used with a
3509 \fname{.bbl} file that is generated by the \pkg{apacite}
3510 \BibTeX{} style;
3511 \item \label{compat4}%
3512 The \pkg{apacite} \LaTeX{} citation package can be used with a
3513 \fname{.bbl} file that is generated by another \BibTeX{} style;
3514 \item \label{compat5}%
3515 The \pkg{apacite} \LaTeX{} citation package can be loaded at the
3516 same time as other packages without errors or undesirable
3517 side-effects.
3518 \end{enumerate}
3519 Because of the complicated rules of the APA manual, it is not always possible
3520 to achieve all kinds of compatibility with all other packages. Later in this
3521 section, I will discuss compatibility issues with other packages with which
3522 known incompatibility problems exist or have existed. A first example of this,
3523 the \pkg{babel} package, has already been mentioned above in
3524 section~\ref{sec:compat-babel}.
3525
3526 Point~\ref{compat1} is the most important. If you have to write a completely
3527 different \fname{.bib} file for different citation styles, there does not seem
3528 to be an advantage in using \BibTeX{}. You might as well write the reference
3529 list explicitly in \LaTeX{} then. However, not even this point can be achieved
3530 completely, although the vast majority of the items will be the same for
3531 different styles. But there remain a number of choices that are style-specific
3532 and that lead to differences in the \fname{.bib} file. Examples from the APA
3533 manual are:
3534 \begin{itemize}
3535 \item If a referenced book is volume~III according to its title
3536 page, this should be referenced as Vol.~3 according to the
3537 APA manual rules, but that may not be the case with other
3538 styles;
3539 \item Journal names are abbreviated by some styles, but not
3540 according to the APA manual rules;
3541 \item Publisher names should be abbreviated according to the
3542 APA manual, e.g., ``John Wiley \& Sons'' becomes ``Wiley''.
3543 Other styles do not do this;
3544 \item The issue number of a journal should only be given if
3545 the journal starts each issue with page~1, not if page
3546 numbers of different issues in the same volume are consecutive.
3547 Other styles may require the issue number in all cases;
3548 \item Page ranges are given as ``341--351'' in APA style, whereas
3549 other styles use ``341--51'';
3550 \item The APA rules require a capital after a colon (`\verb+:+'),
3551 so that subtitles start with a capital as well. Other styles
3552 may not do this;
3553 \item The APA has specific rules about the address: For a U.S. city,
3554 the state (or territory) should be given as a 2-letter code
3555 from the U.S. Postal Services, and the province and country
3556 should be given if it is a non-U.S. city. There
3557 are some exceptions if the name of the state (and sometimes
3558 even city) is already mentioned in the university name and
3559 the university acts as publisher;
3560 \item Yearbooks like \emph{Annual Review of Psychology} should be treated
3561 as journals according to the APA rules, whereas other styles
3562 treat these as books;
3563 \item The additional fields (such as \fieldname{translator} and the
3564 \fieldname{original*}-fields) that are used by \pkg{apacite} but are
3565 not defined in other \BibTeX{} styles are of course
3566 \pkg{apacite}-specific.
3567 \end{itemize}
3568 Some of these problems can be handled relatively elegantly. For example,
3569 the user could use a command like ``\verb+\RomanVol{3}+'' in the
3570 \fieldname{volume} field. Then, the user could define a counter,
3571 \verb+RomanVolcounter+, say, in \LaTeX{} and then define
3572 \cmd{\RomanVol} (similar to \cmd{\BCnt} discussed earlier) as
3573 \begin{verbatim}
3574 \newcommand{\RomanVol}[1]{%
3575 \setcounter{RomanVolcounter}{#1}\theRomanVolcounter}
3576 \end{verbatim}
3577 where \cmd{\theRomanVolcounter} is defined as \verb+\arabic{RomanVolcounter}+
3578 if \pkg{apacite} is loaded and as \verb+\Roman{RomanVolcounter}+ if another
3579 package is loaded that desires this. The example with style-specific
3580 \fname{.bib} files that contain the definitions of journal-strings was already
3581 given in section~\ref{sec:bib} above. However, many users will not go through
3582 all this trouble, and not all problems can be solved in this way. So we have
3583 to realize that not all entries in the \fname{.bib} file will be suitable for
3584 all citation styles. On the other hand, most citation styles and journals are
3585 not as critical as APA journals and many styles in psychology and other social
3586 sciences (including economics) are very similar, so a \fname{.bib} file that
3587 is tailor-made for \pkg{apacite} is likely to be suitable enough for the
3588 styles of most relevant alternative journals.
3589
3590 Point~\ref{compat2} above is currently not fulfilled. The \pkg{apacite}
3591 citation commands are directly based on those of its immediate
3592 predecessor, \pkg{theapa}. But the use of `|<|' and `|>|' for prefixes
3593 is not used by other packages. The \pkg{chicago} package uses
3594 \cmd{\citeA} instead of \cmd{\citeauthor}, many ``numerical'' citation
3595 styles only recognize \cmd{\cite}, and so forth. Because \pkg{natbib}
3596 is widely used and versatile, the \pkgoption{natbibapa} option loads
3597 \pkg{natbib} for the citation commands, thereby allowing at least a
3598 little ``compatibility'' (actuallu, borrowing) of citation commands.
3599
3600 I think that points~\ref{compat3} and~\ref{compat4} are not that
3601 important. It seems to me that there is not much wrong with defining
3602 a style through a combination of a \fname{.sty} and \fname{.bst} file,
3603 each requiring the other to work. However, given the possibilities and
3604 philosophy of the \pkg{natbib} package, it is desirable that
3605 \fname{natbib.sty} can be used with \fname{apacite.bst}. This is the
3606 case, especially with the \pkgoption{natbibapa} option.
3607
3608 Point~\ref{compat5} is very important, especially with other packages that are
3609 complementary to \pkg{apacite} in some sense. It would be very annoying having
3610 to choose between using \pkg{babel} and \pkg{apacite}, or between
3611 \pkg{hyperref} and \pkg{apacite}, etc. These packages serve totally different
3612 purposes, cannot usefully be compared, and are more valuable when they can be
3613 used jointly. The rest of this section addresses this issue for a number of
3614 packages with which compatibility problems are known to exist or have existed.
3615
3616
3617 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3618 \subsection{\pkg{natbib}}
3619 \label{sec:compat-natbib}
3620 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3621 The \pkg{natbib} package is a general purpose citation package that is
3622 intended to work with a broad range of \BibTeX{} (and non-\BibTeX{}) styles
3623 that generate the bibliography. The \pkg{natbib} package is quite advanced and
3624 can be used to switch easily between completely different citation styles.
3625 Furthermore, the apparent popularity of \pkg{natbib} has inspired writers of
3626 packages that would otherwise be incompatible with \pkg{natbib} to write code
3627 to resolve these incompatibilities. I will mention some of these packages
3628 below.
3629
3630 Using \pkg{natbib} for the citations has some advantages over using
3631 \pkg{apacite} for the citations. Apart from the abovementioned sorting
3632 of citations within a single citation command, these are mainly
3633 \pkg{natbib}'s better compatibility with some other important packages,
3634 although many compatibility problems with \pkg{apacite} have now been
3635 solved.
3636
3637 When you want to use \pkg{natbib} for citation and \pkg{apacite} for the
3638 reference list, you still need to load the \LaTeX{} package \fname{apacite.sty}
3639 (with \cmd{\usepackage}), because of the commands that are included in the
3640 \BibTeX{} output (as defined in section~\ref{sec:custom} above). The best
3641 interoperability is obtained by loading \pkg{apacite} with the
3642 \pkgoption{natbibapa} option. There is then no need to load
3643 \pkg{natbib} explicitly, because \pkg{apacite} already does this.
3644
3645
3646 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3647 \subsection{\pkg{hyperref}, \pkg{backref}, and \pkg{url}}
3648 \label{sec:compat-hyper}
3649 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3650 The \pkg{hyperref} package turns (\mbox{cross-}) references into hypertext
3651 links. This can be used in conjunction with a program such as \latextohtml{} to
3652 compose \fname{.html} files with clickable links, to internet pages or within
3653 the same document, or it can be used to create a \fname{.pdf} document with
3654 clickable crossreferences. Evidently, citations are also references. Therefore,
3655 the \pkg{hyperref} package transforms these into hypertext links as well, and
3656 needs to redefine the citation commands and reference list commands in order to
3657 do so. These redefinitions have caused severe incompatibility problems between
3658 \pkg{apacite} and \pkg{hyperref} in the past. These incompatibility
3659 problems have been solved and \pkg{apacite} is compatible with \pkg{hyperref},
3660 provided that \pkg{apacite} is loaded \emph{after} \pkg{hyperref}.
3661 However, some of the ``dirty tricks'' I needed for
3662 complicated examples in section~\ref{sec:xmpl} still conflict with
3663 \pkg{hyperref}. You will probably not encounter these problems very often, but
3664 if you do these can be easily solved by editing the \fname{.bbl} file instead of
3665 using dangerous tricks; see also section~\ref{sec:autindex} below.
3666
3667 The \pkg{backref} package adds to each entry in the bibliography a list of pages
3668 (or sections) on which it is referenced. Hence, it serves as an alternative to
3669 an author index, in which not the entries themselves are backreferenced, but the
3670 authors of these entries, see section~\ref{sec:autindex}. Note that \pkg{natbib}
3671 offers yet another possibility, viz.\ the citations in the standard index, or a
3672 separate citation index, see the \pkg{natbib} documentation. In my opinion, the
3673 \pkg{backref} way of indexing the page numbers of the citations is more logical.
3674 Moreover, it is more condensed as well.
3675
3676 Obviously, the \pkg{backref} package has to change the citation commands and
3677 reference list to be able to do its backreferencing. Because \pkg{apacite}
3678 redefines these as well, they are conflicting to some degree. A similar
3679 compatibility problem between \pkg{backref} and \pkg{natbib} was noticed by the
3680 author of \pkg{backref}. Therefore, \pkg{backref} contains some code to make it
3681 compatible with \pkg{natbib}. This code has been adapted for \pkg{apacite} and
3682 incorporated in \pkg{apacite}. Thus, \pkg{backref} as a standalone package has
3683 been made compatible with \pkg{apacite}. The drawback of this solution is that
3684 if changes are made in the \pkg{backref} package, this may result in new
3685 incompatibilities with \pkg{apacite} unless \pkg{apacite} is changed as well.
3686 Whether, and if so, when, this will occur will be a question for the future.
3687
3688 Apart from being a standalone package, \pkg{backref} can also be combined with
3689 \pkg{hyperref}. It is then not loaded separately, but through the
3690 \pkgoption{backref} or \pkgoption{pagebackref} option of the \pkg{hyperref}
3691 package. In this case, the backreferences become hypertext links. See the
3692 discussion of the \pkg{hyperref} package above.
3693
3694 The \pkg{url} package provides the \cmd{\url} command for formatting URLs, i.e.,
3695 web addresses. It is typically loaded if \pkg{hyperref} is also loaded, but it
3696 is very useful on its own as well. There are no compatibility problems with
3697 \pkg{apacite} and it is not required when using \pkg{apacite}. However, if you
3698 use the \fieldname{url} field, \pkg{apacite} puts it into a \cmd{\url} command.
3699 If the \cmd{\url} command is not defined by another package, \pkg{apacite}
3700 provides a crude definition, so that no errors are generated. But the formatting
3701 thus obtained usually does not satisfy the APA rules about formatting,
3702 especially its rules about line breaking within a URL. The default line breaking
3703 rules of the \pkg{url} package are fairly close to the APA rules, but there are
3704 some differences. Therefore, \pkg{apacite} provides several URL-styles that
3705 adhere to the APA line breaking rules, supplemented by the additional
3706 suggestions in \citeA[p.~645]{chicago}. These styles apply to URL formatting
3707 through the \cmd{\url} command anywhere in the document, not only in the
3708 reference list and not only in the \fieldname{url} field.
3709
3710 The only difference between the URL styles defined by \pkg{apacite} is which
3711 font family they use: \verb+APACtt+ uses \cmd{\ttfamily}, \verb+APACsf+ uses
3712 \cmd{\sffamily}, \verb+APACrm+ uses \cmd{\rmfamily}, and \verb+APACsame+ does
3713 not define a font family, and thus uses the font family that is active at the
3714 start of the URL. \verb+APACtt+ is selected by default, but you can select
3715 another URL style by inserting the command \cmd{\urlstyle}\marg{style} in your
3716 document, after \verb+\begin{document}+. See the documentation of the \pkg{url}
3717 package for more details.
3718
3719 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3720 \subsection{Multiple bibliographies}
3721 \label{sec:compat-chapterbib}
3722 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3723 The \pkg{chapterbib} package allows separate bibliographies for separate
3724 chapters of a book, or, technically, separate \cmd{\include}d files. To work
3725 properly, it needs some small changes to the citation package, which are
3726 clearly described in the \pkg{chapterbib} documentation. These changes have
3727 been incorporated in \pkg{apacite}, and therefore \pkg{apacite} is compatible
3728 with \pkg{chapterbib}.
3729
3730 It is generally advisable not to use the \pkgoption{sectionbib} option of
3731 \pkg{chapterbib}, because this redefines \cmd{\thebibliography}, which
3732 interferes with the redefinition by \pkg{apacite}. You can use the
3733 \pkgoption{sectionbib} option of \pkg{apacite} to accomplish that the
3734 bibliography or bibliographies are sections, rather than chapters.
3735
3736 Moreover, \pkg{apacite} is configured such that it takes a section as default
3737 if it is in the main matter (signified by \cmd{\mainmatter}) of the document.
3738 In the back matter (\cmd{\backmatter}) the bibliography is put in a chapter.
3739 This is also the case if \cmd{\chapter} is defined but \cmd{\mainmatter} not.
3740 (Is this possible? Perhaps for reports?) Consequently, the
3741 \pkgoption{sectionbib} option is only useful in specific circumstances. The
3742 \pkgoption{nosectionbib} forces the bibliography to be a chapter, provided
3743 \cmd{\chapter} is defined. (I figured a \pkgoption{chapterbib} option would be
3744 a bit confusing, so I stuck with \pkgoption{nosectionbib}.)
3745
3746 The \pkg{bibunits} package is an alternative to \pkg{chapterbib}. It allows a
3747 greater flexibility in choosing the scope of a bibliography (chapter, section,
3748 or arbitrarily defined part of the document). In previous versions, there
3749 have been some compatibility problems between \pkg{apacite} and \pkg{bibunits},
3750 but these have now been solved.
3751
3752 The \pkg{multibib} and \pkg{multibbl} packages support using multiple
3753 bibliographies simultaneously. Thus, one can cite entries from multiple
3754 bibliographies in the same part of the document. This may be useful of one
3755 wants thematically different bibliographies or separate bibliographies for
3756 references in different scripts (e.g., Latin and Greek). These packages
3757 accomplish this by introducing different citation commands for the different
3758 bibliographies. \pkg{apacite} contains compatibility code such that these
3759 packages can be used jointly with \pkg{apacite}.
3760
3761 The \pkg{bibtopic} package offers a similar functionality, but instead of
3762 using separate citation commands, it requires the user to keep the references
3763 in different \fname{.bib} files, so that there is one bibliography per
3764 \fname{.bib} file. \pkg{apacite} contains a little bit of compatibility code,
3765 which largely seems to work, but ``and'' between authors is always ``\&'', even
3766 in \cmd{\citeA}. I hope to fix this in a future version of \pkg{apacite}.
3767
3768 Another package that offers similar functionality is \pkg{splitbib}. This
3769 uses neither different citation commands, nor separate \fname{.bib} files.
3770 rather, it requires the user to declare the ``category'' of each cited
3771 reference, typically at the beginning of the document. Again, \pkg{apacite}
3772 contains compatibility code such that simultaneous redefinitions of some
3773 of the citation and reference list commands do not conflict.
3774
3775 A few caveats must be mentioned here. First, simultaneous bibliographies
3776 only work well if it is guaranteed that there are no ambiguities in the
3777 reference lists. With a single bibliography, ambiguities are resolved at the
3778 \BibTeX{} stage by adding initials to ambiguous first author names,
3779 adding additional authors before (or instead of) ``et al.\hbox{}'' to
3780 ambiguous multiple-author lists, and adding ``a'' and ``b'' suffixed to
3781 the year for references to different documents with the same authors published
3782 in the same year. Because, with the exception of \pkg{splitbib}, these
3783 packages require multiple \BibTeX{} runs on separate selections of references,
3784 \fname{apacite.bst} can only resolve ambiguities within the same bibliography.
3785 When there are cross-bibliography ambiguities, these are not resolved. It
3786 seems like these packages are primarily intended to work with numbered
3787 citation styles, or otherwise labeled citation styles, so that unique
3788 cross-bibliography numbers or labels can be generated at the \LaTeX{} stage.
3789
3790 Second, I wrote the compatibility code in early 2006 and have not
3791 recently tested it thoroughly.
3792 Please let me know if you encounter problems. Then I'll
3793 try to fix them or at the least mention them in the next version of the
3794 manual. In particular, I believe that usage of \cmd{\nocitemeta} is not
3795 prefectly integrated yet: You may get the ``References marked\dots'' message
3796 even if the relevant bibliography does not contain marked references,
3797 or references that are \cmd{\nocitemeta}'d for one bibliography but not
3798 for another are marked for both. I don't think the \cmd{\nocitemeta}
3799 command is used much, so I would be surprised if anybody encountered
3800 such problems, but please let me know if you do. Then I'll try to fix them.
3801
3802 Third, the compatibility code for all of these packages either follows
3803 instructions given in those packages, or brutally redefines part of the
3804 code of those packages. If these packages change, this may mean that
3805 new compatibility problems are created, or that improved features of
3806 these packages are not available when combined with \pkg{apacite}. I do
3807 not have the time to regularly check for updates of these packages and
3808 then study changes and/or test compatibility again. Instead, I only take
3809 action when a user notifies me of a problem, or I coincidentally find out
3810 myself. Therefore, again, please let me know if you encounter problems.
3811
3812 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3813 \subsection{\pkg{bibentry}}
3814 \label{sec:compat-bibentry}
3815 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3816 \pkg{bibentry} is a package that allows including a complete reference
3817 list entry in the text (or a footnote, which is arguably more common).
3818 Previous versions of \pkg{apacite} were incompatible with \pkg{bibentry},
3819 but I believe this has been fixed now. However, the APA reference format,
3820 which uses periods to separate the elements of a reference list entry and
3821 not commas, does not appear to be very suitable for in-text use, so this
3822 is most likely only useful for footnotes that do not contain any other text.
3823 Also note that the final period of the reference entry is not suppressed.
3824
3825 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3826 \subsection{Programs for conversion to html, rtf, etc.}
3827 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3828 There are several programs that convert \LaTeX{} files to other types
3829 of files, most notably \fname{html} and \fname{rtf}. This may, for example,
3830 be useful if you want to publish your document on the internet or if you
3831 are requested to send a ``Word'' file to a journal. I have received reports
3832 that \latextohtml{} and \LaTeXrtf{} do not handle documents that use
3833 \pkg{apacite} well. Therefore, I have studied these programs. This section
3834 contains my observations. Note that these are quite old and not updated, and
3835 it is quite likely that the software mentioned in this section has been
3836 altered (improved) considerably. Therefore, the information may be outdated.
3837 Please let me know if there are major changes that I should be aware of.
3838
3839 \latextohtml{} is a \Perl{} program that converts a \LaTeX{} input
3840 file into one or more \fname{.html} files, so that a document that is prepared
3841 with \LaTeX{} can be used as a (user-friendly) internet document.
3842 Similarly, \LaTeXrtf{} is a standalone program that converts a \LaTeX{}
3843 document to \fname{.rtf} format, which can be read by most word processors.
3844 This may be convenient if you (a \LaTeX{} user) want to share a document with
3845 someone who does not work with \LaTeX{}, or as mentioned above, if you are
3846 required to send a ``Word'' file to a journal.
3847 Both \latextohtml{} and \LaTeXrtf{} implement \LaTeX{} macros etc.\ in
3848 another programming language (\latextohtml{}: \Perl{}; \LaTeXrtf{}: C) and
3849 process the \fname{.tex} files directly. This design implies that the
3850 conversion program must know the definitions of all \LaTeX{} macros that
3851 are used. A drawback of this design is that essentially the same code has
3852 to be written in different programming languages (\LaTeX{} macros for the
3853 \fname{.sty} file, \Perl{} for \latextohtml{}, and C for \LaTeXrtf{}), but
3854 typically with some adaptations specific for the application at hand.
3855
3856 With \LaTeXrtf{}, the \LaTeX{} macros that it is able to process are included
3857 in the C source code that is compiled. Consequently, no user additions are
3858 possible in principle. However, the source code is freely available, so if you
3859 define a \LaTeX{} macro, you could adapt \LaTeXrtf{}'s source code and
3860 recompile \LaTeXrtf{}. It is obvious that this is very inconvenient,
3861 especially if \LaTeX{} macros are defined differently for different styles or
3862 if they are defined differently in different parts of the same document.
3863 Version~1.9.15 and higher of \LaTeXrtf{} contains some support for
3864 \pkg{apacite}, but lags a few versions of \pkg{apacite} behind and thus
3865 doesn't work with recent versions of \pkg{apacite}. Moreover, even if this
3866 would be fixed, e.g., because I (or you) send patches to the \LaTeXrtf{}
3867 authors, this wouldn't do justice to the flexibility of \pkg{apacite}, i.e.,
3868 its customization options.
3869
3870 In contrast with this, \latextohtml{} allows the possibility to supply
3871 external \Perl{} scripts. If \latextohtml{} encounters a
3872 \cmdtwo{usepackage}{package} command in the document, it attempts to read the
3873 corresponding \opt{package}\fname{.perl} \Perl{} script. \latextohtml{} is
3874 shipped with many such \Perl{} scripts. There is not one for \pkg{apacite},
3875 but there is one for \pkg{natbib}, which could possibly be adapted for
3876 \pkg{apacite}. Alternatively, you could use the \pkg{natbib} citation commands
3877 and use the \pkg{natbib} package (e.g., through loading \pkg{apacite}
3878 with the \pkgoption{natbibapa} option), which should work.
3879
3880 An alternative to both \latextohtml{} and \LaTeXrtf{} is \TeXht{}. This is
3881 a collection of programs and style files that convert \LaTeX{} to
3882 various formats, such as html, xml, and OpenOffice format. If you have
3883 OpenOffice, the latter can be used to convert to Word (or rtf) format.
3884 The principle of \TeXht{} is to let \LaTeX{} do most of the formatting and
3885 processing of commands, and do the conversion at low-level \TeX{} commands.
3886 In this way, all newly defined commands and user-defined changes are
3887 automatically supported. This even carries over to redefinitions of macros
3888 in the middle of a document. However, for some specific purposes, there are
3889 some additional things that must be arranged. Therefore, \TeXht{} contains a
3890 large list of \fname{.4ht} files that are necessary to support various
3891 \LaTeX{} packages. One of these is the \fname{apacite.4ht} file. The main
3892 purpose of this file is to make citations into hyperlinks to the corresponding
3893 entries in the reference list. Currently, this only works partially, but
3894 the citation text itself is formatted correctly, so this is only a
3895 relatively minor inconvenience. But, of course, it would be better if this
3896 would work perfectly. Perhaps I'll study the problems in the future and
3897 solve this for a future version (although, technically, it is a \TeXht{}
3898 problem and not an \pkg{apacite} problem).
3899
3900 The choice of which converter to use will typically not (only) depend on how
3901 good it works in conjunction with \pkg{apacite}. Furthermore, apart from the
3902 converters mentioned above, there are several additional converters that I
3903 haven't studied at all. I will only study them if I receive reports about
3904 incompatibility and even then it is far from certain that I will be willing or
3905 able to fix the problems. It would be very demanding if I would have to define
3906 the \pkg{apacite} commands in a large number of programming languages for a
3907 large number of different converters. Because I prefer the design of \TeXht{}
3908 and because this converter seems to work best at the moment, I will give a
3909 bit more attention to this one.
3910
3911
3912 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3913 \section{Generating an author index}
3914 \label{sec:autindex}
3915 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3916 The \pkg{apacite} package contains an option to (almost) automatically
3917 generate an author index. This is done by using the \fname{apacitex.bst}
3918 \BibTeX{} style file instead of \fname{apacite.bst} and loading the
3919 \fname{apacite.sty} \LaTeX{} package with the \pkgoption{index} option,
3920 either explicitly or implicitly through one of the \pkgoption{stdindex},
3921 \pkgoption{tocindex}, \pkgoption{emindex}, or \pkgoption{ltxemindex} options.
3922
3923 In earlier versions of \pkg{apacite}, the \pkgoption{index} option
3924 automatically loaded the \pkg{index} package for multiple indexes, so that
3925 you can have a subject index as well as an author index. However,
3926 the current document uses the standard \pkg{ltxdoc} class for documenting
3927 \LaTeX{} packages, and this class uses another method for supporting
3928 multiple indexes, which appears incompatible with the \pkg{index} package.
3929 I have been unable to resolve these compatibility problems and,
3930 therefore, have implemented another way to generate an author index in
3931 addition to other indexes. This uses the same principles as \pkg{ltxdoc}
3932 and thus does work for this user's manual. As a consequence,
3933 \pkg{apacite} now offers options that generate the author index either
3934 with the \pkg{index} package or without it.
3935
3936 The \pkgoption{indexpackage} option implies that author indexing is done
3937 according to the \pkg{index}-scheme, whereas the \pkgoption{noindexpackage}
3938 uses the \pkg{ltxdoc}-based scheme. These options are ignored if the
3939 \pkgoption{index} option of \pkg{apacite} is not requested. When the
3940 \pkgoption{index} option is requested, the \pkgoption{indexpackage} option
3941 loads the \pkg{index} package. This is the default unless it is disabled
3942 by using either the \pkgoption{noindexpackage} option or the
3943 \pkgoption{ltxemindex} option.
3944
3945 Obviously, the \pkg{index} package must be available in a directory that
3946 is read by \LaTeX{} if the \pkgoption{indexpackage} option is requested,
3947 either explicitly or implicitly. If a subject index is desired, it must be
3948 defined by the user, it is not defined by \pkg{apacite}. See the manual of
3949 the \pkg{index} package on how to do this. A default author index \emph{is}
3950 defined by \pkg{apacite}. The author index is then requested by putting
3951 \begin{verbatim}
3952 \printindex[autx]
3953 \end{verbatim}
3954 at the point in the \LaTeX{} document where the index is supposed to appear.
3955 To include the author index in the processed document, the following sequence
3956 must be followed: First, \LaTeX{}, which puts citation entries in the
3957 \fname{.aux} file. Second, \BibTeX{}, which generates the bibliography in the
3958 \fname{.bbl} file. Third, \LaTeX{} (at least) twice, which puts index entries
3959 in a \fname{.adx} file, Fourth, \MakeIndex{}, which uses the \fname{.adx} file
3960 as input and puts the formatted index in a \fname{.and} file, which can be
3961 processed by \LaTeX{}. So, if the main document is \fname{filename.tex}, then
3962 \MakeIndex{} must be called as follows:
3963 \begin{verbatim}
3964 makeindex -o filename.and filename.adx
3965 \end{verbatim}
3966 although the command with which the \MakeIndex{} program must be called
3967 may on some systems be slightly different, e.g., \fname{makeinde} or
3968 \fname{makeindx}. Furthermore, several additional options may be chosen
3969 on the \MakeIndex{} command line. Fifth, run \LaTeX{} again, which
3970 (finally) includes the formatted author index in the typeset document
3971 (\fname{.dvi} or \fname{.pdf} file).
3972
3973 The \pkg{apacite} package provides some options to change the appearance of
3974 the index somewhat. With (only) the \pkgoption{index} option, the indexing
3975 facility is turned on, but the \envirname{theindex} environment is not explicitly
3976 (re)defined by \pkg{apacite}. This means that this environment is defined just
3977 like in standard \LaTeX{}, or the \pkg{index} package, or some other package
3978 that has been loaded that redefines this environment.
3979
3980 The \pkgoption{stdindex} option explicitly uses the definition of the
3981 \envirname{theindex} environment that is defined in the \pkg{index} package
3982 [1995/09/28 v4.1beta Improved index support (dmj)].
3983 With this definition, the index does not appear in the table of contents. With
3984 the \pkgoption{tocindex} option, this definition is augmented with a table of
3985 contents entry. With the \pkgoption{emindex} option, there are some alternative
3986 definitions. It writes a table of contents entry as well, but the index itself
3987 is now set in two columns using the \pkg{multicol} package instead of the
3988 \cmd{\twocolumn} command, the text of the index is set in small type, and the
3989 page head is not put in uppercase. The \pkgoption{ltxemindex} option uses
3990 the same style as the \pkgoption{emindex} option, except that it does not
3991 load the \pkg{index} package and is thus tailored to a somewhat different
3992 indexing method.
3993
3994 When a table of contents entry is desired, another additional \LaTeX{} run is
3995 required to obtain the table of contents with the author index included. In
3996 exceptional cases, the extra line in de table of contents may cause the text
3997 to be moved as well, so that it may be necessary to run \MakeIndex{} a second
3998 time, followed by yet one or two more \LaTeX{} runs.
3999
4000 \DescribeMacro{\APACstdindex}
4001 \DescribeMacro{\APACtocindex}
4002 \DescribeMacro{\APACemindex}
4003 \DescribeMacro{\APACltxemindex}
4004 The definitions of the index discussed apply to all indexes in the
4005 document, so to, for example, the subject index as well as the author
4006 index. This may be undesirable, and therefore \pkg{apacite} provides
4007 the \cmd{\APACstdindex}, \cmd{\APACtocindex}, \cmd{\APACemindex}, and
4008 \cmd{\APACltxemindex} commands to switch index styles.
4009 These correspond to the package options \pkgoption{stdindex},
4010 \pkgoption{tocindex}, \pkgoption{emindex}, and \pkgoption{ltxemindex},
4011 respectively. Note, however, that the \pkgoption{ltxemindex} option
4012 and/or the \cmd{\APACltxemindex} command generally cannot be used in
4013 a document that uses one of the other styles, and vice versa, because
4014 the way \pkg{index} works is incompatible with how standard \LaTeX{}
4015 indexing works.
4016
4017 If you want a different index style, either for all indexes in your document or
4018 only for some indexes, you can define such a style using the
4019 \cmd{\renewenvironment} command in the appropriate place. See the standard
4020 \LaTeX{} documentation for this command. The source code of the four commands
4021 mentioned here can be used as a template for such a style definition.
4022
4023 Finally, some elements of the formatting of the index itself can be changed
4024 by using (and/or writing) an \fname{.ist} file containing the preferred
4025 options. \MakeIndex{} should then be called with the filename of this index
4026 style file after a ``\verb+-s+'' option on the command line, so, e.g.,
4027 \begin{verbatim}
4028 makeindex -s mystyle.ist -o filename.and filename.adx
4029 \end{verbatim}
4030 The \MakeIndex{} documentation discusses the possible options that can be put
4031 into the \fname{.ist} file.
4032
4033 As discussed in sections~\ref{sec:options}, \ref{subsec:fields}, and
4034 \ref{subsec:labels}, the \pkgoption{suppresscorporate} and
4035 \pkgoption{includecorporate} options can be used to either
4036 exclude corporate authors from the author index or include them in it.
4037 The \cmd{\bibcorporate} command must be used in the \fname{.bib} file
4038 to denote a corporate author.
4039
4040 For some of the examples from the APA manual, I had to use quite advanced
4041 \LaTeX{} tricks to obtain the correct formatting in the text, the reference
4042 list, and the author index; see section~\ref{sec:xmpl} below. This will
4043 typically not be necessary in practice. In the unlikely event that you
4044 encounter similar difficult cases, it will usually be sufficient to use
4045 a relatively simple trick in the \fname{.bib} file. In rare situations,
4046 this may still give incorrect formatting, most likely in the author index.
4047 Somewhat less rare is the situation when there is such a problematic case
4048 but you also want to use the \pkg{hyperref} package. The tricks I used
4049 conflict with \pkg{hyperref}.
4050
4051 An easy solution to incorrect formatting and/or sorting in the author index is
4052 to edit the \fname{.bbl} file manually. This should be done at a time when
4053 \BibTeX{} will not have to be run again. Otherwise, the changes would be
4054 overwritten by the next \BibTeX{} run. This editing of the \fname{.bbl} file
4055 is not in the \TeX-spirit, but in my experience---I used it for two books
4056 with lots of references \cite{meijer1998, WaMe00}, with a previous version of
4057 \pkg{apacite} that caused a fair amount of problematic cases---this takes very
4058 little time, usually only minutes. Compare that with the time spent on writing
4059 a book, or with the time that would be necessary to manually make an author
4060 index. I also used it more recently for an edited book \cite{dLMe08a}
4061 with an adapted version of \pkg{apacite}, with essentially the current
4062 author indexing code, and had to do very little editing. The author index
4063 of the current document is automatically generated and does not contain
4064 any manual editing, although it does contain some advanced \LaTeX{} code
4065 to fix some issues.
4066
4067 \DescribeMacro{\AX}
4068 The connection between the \fname{.bbl} file and the author index is through
4069 \cmd{\AX} commands that are entered by \fname{apacitex.bst} in the
4070 \fname{.bbl} file. These are responsible for the author indexing facilities.
4071 By looking at the contents of the \fname{.bbl} file, it is not difficult
4072 to see how problematic cases must be edited. For example, the entry for Bender
4073 is generated by the following lines:
4074 \begin{verbatim}
4075 \AX{bender jdirector
4076 @Bender, J\BPBI
4077 {\protect\bibliteral{(Director)}\protect\indexskipbracenodot}.}%
4078 \end{verbatim}
4079 This can be changed to
4080 \begin{verbatim}
4081 \AX{bender j
4082 @Bender, J.}%
4083 \end{verbatim}
4084 which is formatted correctly in the author index without the need for
4085 advanced \LaTeX{} code, and conflicts with \pkg{hyperref} are resolved.
4086 Note that \pkg{apacite} uses the \opt{key}|@|\opt{visual} form of
4087 indexing. This form is used in \MakeIndex{} to distinguish between the actual
4088 representation in the index and the place where it should occur. The \opt{key}
4089 is used by \MakeIndex{} to sort the entry, but the entry actually appearing in
4090 the index is \opt{visual}. In the \opt{key} part as formatted by
4091 \pkg{apacite}, all names are in lower case letters and all accents and
4092 punctuation are removed. Furthermore, \pkg{apacite} inserts \emph{two} spaces
4093 between surname and initials, and to \MakeIndex{}, two spaces are different
4094 from one space. Spaces between surnames are removed, as well as spaces between
4095 initials. Finally, note that \pkg{apacite} always inserts a new line before
4096 the ``|@|''. This is to avoid bad line breaks by \BibTeX. To \MakeIndex,
4097 this means that each citation \opt{key} ends with a space.
4098
4099 The author index of the current document does not contain entries for the authors
4100 Shocked and Goodenough as cited in section~\ref{sec:xmpl}, although it does for
4101 the reference list part. The reason for this is that the \fieldname{key} field was
4102 used for the citations. If you use the \fieldname{key} (and \fieldname{firstkey})
4103 field and you want the authors in the author index as well, you have to include
4104 the index command \cmd{\AX} explicitly. For example, the \fieldname{key} field
4105 for Michelle Shocked is
4106 \begin{verbatim}
4107 key = {{\protect\bibsong{Shocked}{1992}{Over the
4108 Waterfall}{track~5}}},
4109 \end{verbatim}
4110 and if we change this into
4111 \begin{verbatim}
4112 key = {{\protect\bibsong{Shocked\AX{shocked m
4113 @Shocked, M.}}{1992}{Over the Waterfall}{track~5}}},
4114 \end{verbatim}
4115 then citations to her are included in the author index.
4116
4117 \DescribeMacro{\corporateAX}
4118 For corporate authors, the \cmd{\corporateAX} command is used instead of the
4119 \cmd{\AX} command. Depending on whether the \pkgoption{suppresscorporate}
4120 option or the \pkgoption{includecorporate} option is requested, either explicitly
4121 or implicitly, \cmd{\corporateAX} either swallows its argument or is equivalent
4122 to \cmd{\AX}. To make sure that this ends up correctly in the author index,
4123 it is important that this command as entered in the \fieldname{key} and/or
4124 \fieldname{firstkey} field is exactly as output by \fname{apacite.bst} for
4125 the \fieldname{author} field. The easiest way to accomplish this is to start
4126 with \fieldname{key} and/or \fieldname{firstkey} fields that do not have
4127 the \cmd{\corporateAX} command yet. Then, run \LaTeX{} and \BibTeX{} and
4128 extract the correct \cmd{\corporateAX} command from the \fname{.bbl} file
4129 and insert this in the \fieldname{key} and/or \fieldname{firstkey} fields.
4130 Rerun \BibTeX{} and after that proceed as usual. For example, the following
4131 is an excerpt from an entry for one of the examples from section~3.96 in the
4132 APA manual:
4133 \begin{verbatim}
4134 author = {{\bibcorporate{National Institute of Mental Health}}},
4135 firstkey = {{National Institute of Mental Health [NIMH]}},
4136 key = {{NIMH}},
4137 \end{verbatim}
4138 If I run \LaTeX{} and \BibTeX{} on the current document, the \fname{.bbl}
4139 file contains the lines
4140 \begin{verbatim}
4141 \corporateAX{nationalinstituteofmentalhealth
4142 @{\bibcorporate{National Institute of Mental Health}}}%
4143 \end{verbatim}
4144 Note the \cmd{\bibcorporate} command and the additional braces. If these
4145 are left out,
4146 \begin{verbatim}
4147 firstkey = {{National Institute of Mental Health
4148 [NIMH]}\corporateAX{nationalinstituteofmentalhealth
4149 @{National Institute of Mental Health}}},
4150 key = {{NIMH}\corporateAX{nationalinstituteofmentalhealth
4151 @{National Institute of Mental Health}}},
4152 \end{verbatim}
4153 then this organization gets two separate entries in the author index, which
4154 is incorrect. Instead, if we copy them literally,
4155 \begin{verbatim}
4156 firstkey = {{National Institute of Mental Health
4157 [NIMH]}\corporateAX{nationalinstituteofmentalhealth
4158 @{\bibcorporate{National Institute of Mental Health}}}},
4159 key = {{NIMH}\corporateAX{nationalinstituteofmentalhealth
4160 @{\bibcorporate{National Institute of Mental Health}}}},
4161 \end{verbatim}
4162 then everything is as desired. The additional spaces before the ``\verb+@+''
4163 sign make no difference, but percentage signs should not be included in
4164 the \fname{.bib} file at the end of lines to hide a line break (as in
4165 \LaTeX{}), because \BibTeX{} does not recognize the percentage sign as
4166 a comment. Rather, it includes it in the \fname{.bbl} file and sometimes
4167 puts additional code behind it, which would then not be read by \LaTeX{}
4168 because \LaTeX{} does interpret the percent sign as a comment. This
4169 behavior has now become less likely, because \pkg{apacite} inserts
4170 numerous line breaks in the \fname{.bbl} file to avoid this problem and,
4171 more importantly, line breaks inserted by \BibTeX{} at undesired
4172 locations (e.g., in the middle of a command name or in the argument of
4173 a \cmd{\url} command), but is still a possibility.
4174
4175 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4176 \section{Annotated bibliographies}
4177 \label{sec:annotate}
4178 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4179 Annotated bibliographies can be obtained by requesting
4180 \begin{verbatim}
4181 \bibliographystyle{apacann}
4182 \end{verbatim}
4183 instead of
4184 \begin{verbatim}
4185 \bibliographystyle{apacite}
4186 \end{verbatim}
4187 or
4188 \begin{verbatim}
4189 \bibliographystyle{apacannx}
4190 \end{verbatim}
4191 instead of
4192 \begin{verbatim}
4193 \bibliographystyle{apacitex}
4194 \end{verbatim}
4195 The \BibTeX{} style files \fname{apacann.bst} and \fname{apacannx.bst} are
4196 almost identical to \fname{apacite.bst} and \fname{apacitex.bst}, respectively.
4197 The only relevant difference is that these styles include the contents of the
4198 \fieldname{annote} or \fieldname{annotate} field in the output, thereby
4199 generating an annotated bibliography.
4200
4201 According to \citeA[pp.~810--811]{TLC2}, the \pkg{annotation} style uses the
4202 \fieldname{annote} field for annotations, whereas the \pkg{annotate} style
4203 defines the \fieldname{annotate} field for this purpose. To be compatible with
4204 both, \pkg{apacann} and \pkg{apacannx} support both of these fields. However,
4205 they are not both included in the output for the same reference, in case
4206 someone wants to make a file that is compatible with both the \pkg{annotate}
4207 and \pkg{annotation} styles and thus duplicates the information. In such a case,
4208 the contents of the \fieldname{annote} field is included in the output.
4209
4210 \DescribeEnv{APACrefannotation}
4211 The annotation is inserted in the \fname{.bbl} file within a
4212 \envirname{APACrefannotation} environment. Hence, its formatting can be
4213 changed by the user by redefining this environment.
4214
4215
4216 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4217 \section{Auxiliary, ad hoc, and experimental commands in
4218 \fname{apacdoc.sty}}
4219 \label{sec:apacdoc}
4220 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4221 Section~\ref{sec:xmpl} below cites all examples from the APA manual.
4222 This is a test of \pkg{apacite} and a proof that it does what it's
4223 supposed to do---format citations and reference lists complying with
4224 the APA rules. However, the APA manual discusses many nonstandard
4225 issues and several of them need nonstandard treatment. Some of these
4226 can only be formatted by what I call ``tricking'' the system. This
4227 has been done by defining several \LaTeX{} commands that are too
4228 specifically tailored for a certain reference, or ad hoc in other
4229 ways, or more generally experimental and not well tested, and likely
4230 to lead to more (compatibility) errors. Therefore,
4231 I do not consider these commands suitable for inclusion in the
4232 \pkg{apacite} package proper, that is, the file \fname{apacite.sty}.
4233
4234 They are not important enough for that, and thus you would rarely need
4235 them, and for most of them I anticipated (or hoped) at one point that
4236 better solutions would be available in the future. Thus, it seemed
4237 quite likely that major changes in these commands would be made,
4238 and I didn't want to feel obliged to keep supporting them for backwards
4239 compatibility. Rather, I considered these as illustrations of the
4240 power of \LaTeX{} and templates that users can base their own tricks
4241 upon. I still largely feel the same way about these commands, although
4242 I'm not convinced anymore that within reasonable time I will come up
4243 with elegant solutions that make them obsolete. Nevertheless, I still
4244 make improvements in this direction.
4245
4246 These auxiliary, ad hoc, and experimental commands are defined in a
4247 supplementary package file, \fname{apacdoc.sty}. As
4248 this name indicates, it is a package that is intended to be used
4249 for the \pkg{apacite} documentation (i.e., the current document).
4250 It contains several commands and settings (like page margins) that
4251 are not interesting outside this document. However, as mentioned
4252 above, I needed many of the commands defined in this file for the
4253 examples in section~\ref{sec:xmpl}. Thus, you might encounter
4254 similar situations as well, and these commands may be useful for you.
4255
4256 Because most of the commands in \fname{apacdoc.sty} will not be
4257 useful for you, it is generally not a good idea to load this file with
4258 \cmd{\usepackage} to use the commands that are useful to you.
4259 Instead, if you want to use them, you can copy their definitions
4260 to the top of your own document or personal style file (say,
4261 \fname{mysettings.sty}), study their behavior, and perhaps improve
4262 them. This reflects the ``illustration'' or ``template'' nature
4263 of these commands.
4264
4265 Accordingly, this section briefly mentions the commands that may
4266 be useful outside the context of the current document. Thorough
4267 documentation is outside the scope of this manual; their definitions
4268 can be studied in the source code of \fname{apacdoc.sty}, and their
4269 usage is illustrated in section~\ref{sec:xmpl}. I will mildly
4270 support them, though: If you want to use them, you can ask me
4271 questions, but I will not put as much effort in fixing possible
4272 problems as I do with proper \pkg{apacite} issues.
4273
4274 The list below mentions (some of) the numbered examples in
4275 section~\ref{sec:xmpl} in which the commands are used.
4276 \begin{description}
4277
4278 \item[\cmd{\biblecite}]
4279 \DescribeMacro{\biblecite}
4280 \DescribeMacro{\bibleciteA}
4281 \DescribeMacro{\bibleciteNP}
4282 \DescribeMacro{\fullbiblecite}
4283 \DescribeMacro{\fullbibleciteA}
4284 \DescribeMacro{\fullbibleciteNP}
4285 \DescribeMacro{\shortbiblecite}
4286 \DescribeMacro{\shortbibleciteA}
4287 \DescribeMacro{\shortbibleciteNP}
4288 This command, and its siblings \cmd{\bibleciteA}, \cmd{\bibleciteNP},
4289 \cmd{\fullbiblecite}, \cmd{\fullbibleciteA}, \cmd{\fullbibleciteNP},
4290 \cmd{\shortbiblecite}, \cmd{\shortbibleciteA}, and
4291 \cmd{\shortbibleciteNP} are commands for citing the Bible. They
4292 have one mandatory argument: the relevant chapter and verse, for
4293 example, |\biblecite{1~Cor.\ 13:1}| (ex.~3.100-3).
4294
4295 \item[\cmd{\bibleversion}]
4296 \DescribeMacro{\bibleversion}
4297 This defines the version of the Bible used:
4298 |\bibleversion{Revised Standard Version}|. Use this before using
4299 the bible citing commands, typically in the preamble of your document.
4300 Note that the Bible is not included in the reference list. You can use
4301 these commands as templates for references to other ``classic'' works.
4302 See ex.~3.100-3.
4303
4304 \item[\cmd{\citesong}]
4305 \DescribeMacro{\citesong}
4306 \DescribeMacro{\citeAsong}
4307 \DescribeMacro{\citesongNP}
4308 \DescribeMacro{\fullcitesong}
4309 \DescribeMacro{\fullciteAsong}
4310 \DescribeMacro{\fullcitesongNP}
4311 \DescribeMacro{\shortcitesong}
4312 \DescribeMacro{\shortciteAsong}
4313 \DescribeMacro{\shortcitesongNP}
4314 This command and its siblings \cmd{\citeAsong}, \cmd{\citesongNP},
4315 \cmd{\fullcitesong}, \cmd{\fullciteAsong}, \cmd{\fullcitesongNP},
4316 \cmd{\shortcitesong}, \cmd{\shortciteAsong}, and \cmd{\shortcitesongNP}
4317 cite a song as required by the APA (except for the relative
4318 placement of closing quotes and comma). See ex.~69.
4319
4320 \item[\cmd{\bibsong}]
4321 \DescribeMacro{\bibsong}
4322 For \cmd{\citesong} and its siblings, the \fieldname{key} field
4323 (and possibly \fieldname{firstkey}) should contain the relevant
4324 information in the form of a protected \cmd{\bibsong} command:
4325 \begin{verbatim}
4326 key = {{\protect\bibsong{author}{year}{song title}{track info}}},
4327 \end{verbatim}
4328 See ex.~69.
4329
4330 \item[\cmd{\bibInstring}]
4331 \DescribeMacro{\bibInstring}
4332 This command has one argument. The macro changes the definition of
4333 the macro \cmd{\BIn} to the argument and then immediately changes
4334 the definition back to the old definition. So it makes a one-time
4335 change. Used to change ``In'' a book to ``On'' a CD for citing songs.
4336 See ex.~69.
4337
4338 \item[\cmd{\BOn}]
4339 \DescribeMacro{\BOn}
4340 ``On'', for citing songs ``On'' a CD. See ex.~69.
4341
4342 \item[\cmd{\DSMcite}]
4343 \DescribeMacro{\DSMcite}
4344 \DescribeMacro{\DSMciteA}
4345 \DescribeMacro{\DSMciteNP}
4346 \DescribeMacro{\DSMfullcite}
4347 \DescribeMacro{\DSMfullciteA}
4348 \DescribeMacro{\DSMfullciteNP}
4349 \DescribeMacro{\DSMshortcite}
4350 \DescribeMacro{\DSMshortciteA}
4351 \DescribeMacro{\DSMshortciteNP}
4352 This command and its siblings \cmd{\DSMciteA}, \cmd{\DSMciteNP},
4353 \cmd{\DSMfullcite}, \cmd{\DSMfullciteA}, \cmd{\DSMfullciteNP},
4354 \cmd{\DSMshortcite}, \cmd{\DSMshortciteA}, and \cmd{\DSMshortciteNP}
4355 cite the DSM. See ex.~29. They can also be used for other
4356 ``named'' works. \pkg{natbib} offers a similar functionality
4357 through the definition of an \emph{alias}, but I think that to
4358 get this working in the way the APA wants (i.e., the alias is not
4359 used for the first citation, but only for second and subsequent
4360 citations), it cannot be directly used. But the technical
4361 implementation of its functionality may form a useful basis
4362 for a better (more elegant) solution for this type of citation.
4363
4364 \item[\cmd{\bibDSM}]
4365 \DescribeMacro{\bibDSM}
4366 For \cmd{\DSMcite} and its siblings, the \fieldname{key} field
4367 (and possibly \fieldname{firstkey}) should contain the relevant
4368 \cmd{\bibDSM} command:
4369 \begin{verbatim}
4370 key = {{\bibDSM{American Psychiatric Association}{Diagnostic
4371 and Statistical Manual of Mental Disorders}{4th
4372 ed.\hbox{}}{DSM-IV}}},
4373 \end{verbatim}
4374 See ex.~29.
4375
4376 \item[\cmd{\DSMauthor},
4377 \cmd{\DSMfulltitle},
4378 \cmd{\DSMedition},
4379 \cmd{\DSMshorttitle}]
4380 \DescribeMacro{\DSMauthor}
4381 \DescribeMacro{\DSMfulltitle}
4382 \DescribeMacro{\DSMedition}
4383 \DescribeMacro{\DSMshorttitle}
4384 These four commands extract the four elements of a \cmd{\bibDSM}
4385 command. They are used in the \cmd{\DSMcite} command and its
4386 siblings, but may occasionally be useful by themselves.
4387
4388 \item[\cmd{\bibliteral}] \DescribeMacro{\bibliteral}
4389 This command is used in some of the examples in
4390 section~\ref{sec:xmpl} to put some literal text into the
4391 reference list that would otherwise be abbreviated to a
4392 single ``initial'' at the \BibTeX{} stage. For example, in
4393 ex.~4.08, the authors are ``Bulatao, E. (with Winford, C.~A.)'',
4394 where ``(with Winford, C.~A.)'' is inserted by wrapping it
4395 in a \cmd{\bibliteral} command, which itself is wrapped in
4396 an additional pair of braces, so that \BibTeX{} treats it a
4397 a complicated ``accent'' and the argument as a complicated
4398 single character. This text should not be put in the author
4399 index, and therefore some manipulation through redefining
4400 the meaning of this command before and after the reference
4401 list is used to suppress this text, as well as an additional
4402 period, there. Used in examples 4.08, 65, 66, 68, and 70.
4403
4404 \item[\cmd{\bibinitial}] \DescribeMacro{\bibinitial}
4405 This command is similar to \cmd{\bibliteral}. It is used in
4406 one example (ex.~67), where the ``author'' is a ``(Producer)'',
4407 but the initial of the author is put in the text because there
4408 is another author with the same surname (Miller). This
4409 causes problems not encountered in the examples where
4410 \cmd{\bibliteral} is used, and after a lot of trial and error,
4411 the current definition of \cmd{\bibinitial} was developed
4412 to format this particular author correctly in text, reference
4413 list, and author index. It looks like this is an improved
4414 version of the \cmd{\bibliteral} command, so perhaps in the
4415 next release I'll use \cmd{\bibinitial} for all the examples
4416 in which now \cmd{\bibliteral} is used.
4417
4418 \item[\cmd{\bibreftext}] \DescribeMacro{\bibreftext}
4419 This command takes two arguments. By default, it ignores the
4420 first and inserts the second in the output. In this manual,
4421 it is redefined before the reference list to ignore its
4422 second argument and insert the first argument in the output.
4423 This is used in ex.~17, where the year in the in-text
4424 citation should be ``1992/1993'', whereas in the reference
4425 list, it should be 1992 (and the 1993 is mentioned elsewhere).
4426 For reprints and translations, this is handled automatically
4427 by \pkg{apacite} if you use the \fieldname{original*} fields,
4428 but this one is different.
4429
4430 \item[\cmd{\Dutchvon}] \DescribeMacro{\Dutchvon}
4431 This command is equivalent to \cmd{\bibreftext}, but is used
4432 for a different situation, and therefore, depending on
4433 language, subtle style differences, and other preferences,
4434 you might want to change the definition of one but not of
4435 the other. This one illustrates how the Dutch way to treat
4436 ``von'' parts of surnames can be handled. It is discussed
4437 in ex.~B-2, although it is not actually used in the examples,
4438 because the Dutch way to treat ``von'' parts is not APA
4439 style.
4440
4441 \item[\cmd{\SwapArgs}] \DescribeMacro{\SwapArgs}
4442 This command takes two arguments and swaps their order. This
4443 is useful if you cite a work whose title, (corporate) author,
4444 or other element starts with an article that should be
4445 disregarded for ordering. \pkg{apacite} disregards ``a'',
4446 ``an'', and ``the'' in the sorting of titles, but these are
4447 obviously English. For French, you could say
4448 \begin{verbatim}
4449 title = {\SwapArgs{Marseillaise}{La }},
4450 \end{verbatim}
4451 which is thus alphabetized under M. (Not used in the examples.)
4452
4453 \item[\cmd{\swallownext}] \DescribeMacro{\swallownext}
4454 Eats up the next character. Dangerous but sometimes useful.
4455 Used in the definitions of some of the following commands.
4456
4457 \item[\cmd{\swallowdot}] \DescribeMacro{\swallowdot}
4458 Eats up the next character, but only if it's a dot (`.').
4459 Used in the definitions of some of the following commands.
4460
4461 \item[\cmd{\bibnodot}] \DescribeMacro{\bibnodot}
4462 Used as |\bibnodot{.}|. Eats the period, but prevents \BibTeX{}
4463 from adding one. Used in examples 78, 79, 87, 91, and 95.
4464 This is likely to be useful for many users, and is stable, so it
4465 may be upgraded to \fname{apacite.sty} in the next release of
4466 \pkg{apacite}. The only thing against this is that it is used in
4467 highly unelegant manual formatting of a fairly large piece of the
4468 description of a reference to a website in a
4469 \fieldname{howpublished} field. I'd prefer to avoid this, but that
4470 would require either adding another idiosyncratic field or even
4471 less elegant trickery in the \fname{.bib} file.
4472
4473 \item[\cmd{\bibskipbracenodot}] \DescribeMacro{\bibskipbracenodot}
4474 Suppresses the period after a subsequent closing brace. Quickly leads
4475 to errors because it uses very low level \TeX{} code that (locally)
4476 changes some fundamental settings. This is used in some examples
4477 (65, 68) where \cmd{\bibliteral} is used to insert a description
4478 of a first ``author'', such as ``(Producer)''. This is
4479 interpreted by \BibTeX{} as a complicated one-letter first
4480 name, and thus it adds a period to make it into an initial.
4481 This period is the one that's eaten by this command.
4482 Used in examples 65 and 68.
4483
4484 \item[\cmd{\indexskipbracenodot}] \DescribeMacro{\indexskipbracenodot}
4485 This serves the same purpose as \cmd{\bibskipbracenodot}, and it
4486 uses the same code, but whereas \cmd{\bibskipbracenodot} is
4487 activated for the reference list, \cmd{\indexskipbracenodot}
4488 is only activated for the author index. This has technical
4489 reasons and it does not work under all circumstances. Used in
4490 examples 4.08-3, 65, 66, and 68.
4491
4492 \item[\cmd{\APACredefineOnce}] \DescribeMacro{\APACredefineOnce}
4493 This macro takes two arguments: (1) the name of a command (without the
4494 backslash) and (2) arbitrary \TeX{} code. It then redefines the
4495 command (1) to the \TeX{} code (2) as a one-time change, so after the
4496 command (1) has been invoked once, it reverts to its definition before
4497 \cmd{\APACredefineOnce} was issued. This can be used to redefine, say,
4498 \cmd{\BRetrievedFrom} from ``Retrieved from'' to ``Retrieved from
4499 Poverty Alleviation website'' for a single reference but restore it
4500 to ``Retrieved from'' immediately afterwards.
4501
4502 \item[\cmd{\bibeditortype}] \DescribeMacro{\bibeditortype}
4503 This has one argument. The macro changes the definitions of the macros
4504 \cmd{\BED} and \cmd{\BEDS} to the argument and then immediately
4505 changes the definitions back to their old definitions. So it makes a
4506 one-time change. This is used when there is someone in an ``editor-type''
4507 role, but with another designation, such as ``producer'' or ``director''.
4508 Ex.\ 36, 67, and 68.
4509
4510 \item[\cmd{\renewbibeditortype}] \DescribeMacro{\renewbibeditortype}
4511 The above-mentioned definition of \cmd{\bibeditortype} is only relevant
4512 in the reference list: In the citations in the text and in the author
4513 index, the command should do nothing. Therefore, the command is
4514 initially defined as ``nothing''. The definition discussed above is
4515 initialized by \cmd{\renewbibeditortype}. This command is executed
4516 just before the reference list in the current document. (After the
4517 reference list, \cmd{\bibeditortype} becomes ``nothing'' again.)
4518
4519 \item[\cmd{\BAbstractRetrieved}] \DescribeMacro{\BAbstractRetrieved}
4520 This command is similar to \cmd{\BRetrieved}, except that it
4521 inserts ``Abstract retrieved'' instead of ``Retrieved''. Used in
4522 examples 82 and 83.
4523
4524 \item[\cmd{\BmakeAbstractRetrieved}]
4525 \DescribeMacro{\BmakeAbstractRetrieved}
4526 This command functions much like \cmd{\bibeditortype}: It replaces
4527 the next instance of \cmd{\BRetrieved} by \cmd{\BAbstractRetrieved}.
4528 Used in examples 82 and 83.
4529
4530 \item[\cmd{\noedition}] \DescribeMacro{\noedition}
4531 Suppresses the ``ed.'' (or ``\cmd{\BEd}'', rather) of an
4532 \fieldname{edition}. Used in examples 92 and 94 to format a
4533 string like ``Version~4'' as an \fieldname{edition}.
4534
4535 \item[\cmd{\APACmanBeforeBib}] \DescribeMacro{\APACmanBeforeBib}
4536 Illustrates how some of the commands defined above are used in practice:
4537 This command is given just before the \cmd{\bibliography} command, and
4538 redefines some of the commands above, so that their meaning
4539 is different in the reference list from their meaning in the main text.
4540 Similar commands: \cmd{\APACmanBeforeIndex}, \cmd{\APACmanAfterIndex}.
4541
4542 \end{description}
4543
4544 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4545 \section{Known problems and todo-list}
4546 \label{sec:todo}
4547 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4548 With any kind of software, there is usually a list with known problems (bugs)
4549 and desirable future work (to-do), and \pkg{apacite} is no exception. These
4550 subjects will be discussed in this section.
4551
4552 A class of problems was already discussed in section~\ref{sec:compat} above.
4553 This concerns the incompatibility of the \fname{.bib} file with other citation
4554 styles, through \pkg{apacite}-specific fields, APA-specific contents of
4555 fields, or through special tricks. These lead to correctly formatted
4556 references in APA style, but may cause problems with using the \fname{.bib}
4557 file with other styles (in case APA journals reject your article~\ldots). As
4558 discussed there, however, this problem is unavoidable and presumably not a
4559 very big problem to most users.
4560
4561 An incomplete list of other known problems and things that I would
4562 like to do with \pkg{apacite} follows below. Several items of this list
4563 are the direct result of the tricks I had to use for the examples in
4564 section~\ref{sec:xmpl} below.
4565 \begin{itemize}
4566 \item Fix a bug (which is unlikely to show up) in the \fname{.bst} file:
4567 If there are two or more references, published in the same year, each
4568 with 6 authors, the first 5 of which are the same but the 6th authors
4569 are different, then these lead to ambiguous citations. The same thing
4570 happens when one has 6 authors and another 7, with the same first 6
4571 authors.
4572 \item In an \entryname{unpublished} entry, if \fieldname{author} and
4573 \fieldname{organization} are equivalent, maybe we should replace
4574 the latter with
4575 ``Author'' in the output, analogous to the situation where
4576 \fieldname{publisher} or \fieldname{institution} are equal to
4577 \fieldname{author} in several of the other entry types.
4578 \item Solve several other rare cases where \pkgoption{apacite} does not
4579 correctly implement the APA rules: (p.~175) If additional authors
4580 are needed to resolve an ambiguity, end with ``et al.\hbox{}'',
4581 even if this is only one author; (p.~179) citing the Qur'an;
4582 (p.~184) same last name and same initials, but different first name;
4583 (p.~185) ``ca.\hbox{}''; (p.~198) Advance online publication;
4584 (p.~202) Abstract retrieved from; (pp.~208, 212) better deal with
4585 named archives; (p.~214) uncertain author;
4586 update the language files (\fname{.apc}) with correct definitions
4587 of new text string commands; finish the examples file.
4588 Many of these cases will not be a feature, but an ad-hoc workaround,
4589 similar to the tricks that are described in section~\ref{sec:xmpl}.
4590 Please contact me if you encounter any of these (or other
4591 formatting errors) and need a workaround.
4592 \item Study referencing legal materials (Appendix~7.1).
4593 \item Support nonstandard types of authors, like ``Director'' and
4594 ``Series Ed.\hbox{}''. This currently must be tricked in a
4595 nonelegant way. Perhaps I (or you) can think of a better solution.
4596 \item If a work is authored by someone, ``with'' someone else: This
4597 currently must be tricked in a nonelegant way. Perhaps I (or you)
4598 can think of a better solution.
4599 \item Add more options and/or commands for easier customization of reference
4600 list and author index.
4601 \item Continue with transferring reference list formatting code from
4602 \BibTeX{} to \LaTeX.
4603 \item Introduce options for the \BibTeX{} part, e.g., index vs.\ noindex (so
4604 that \fname{apacitex.bst} becomes superfluous); full first names
4605 instead of only initials, or perhaps options for putting initials
4606 in front of (2nd and later) author names; unsorted reference lists
4607 or lists sorted chronologically (forward or reverse; for CVs); etc.
4608 \item Extend the \cmd{\bibcorporate} command with an optional argument that
4609 gives the abbreviated form, so that the \fieldname{firstkey} and
4610 \fieldname{key} fields do not have to be used for this common situation.
4611 \item Define \BibTeX{} macros or strings for commonly encountered
4612 journals (at least the APA journals).
4613 \item Allow \fieldname{lastchecked} fields of the form |2009-02-01| and/or
4614 |2009/02/01| and/or other schemes, and translate these into
4615 language-specific date strings.
4616 \item Rewrite and reorganize the documentation; perhaps create a ``getting
4617 started'' document.
4618 \item Improve the source code documentation, esp.\ the formatting,
4619 indexing, and cross-referencing. (You only see this if you regenerate
4620 this manual with the \cmd{\AlsoImplementation} flag set.)
4621 \end{itemize}
4622 Quite likely, other problems will come up when using the current version of
4623 \pkg{apacite}. I have lots of ideas for improvements, extensions, options, and
4624 so forth, but not much time to devote to it. Therefore, it is difficult to give
4625 a good estimate of when I will release a new update. However, in the meantime,
4626 if you have questions, remarks, suggestions, or bug reports, you can e-mail them
4627 to me.
4628
4629 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4630 \section{Examples of the APA manual}
4631 \label{sec:xmpl}
4632 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4633 {\bfseries Note: the text of this section has not been updated and
4634 reflects the working of the [2009/03/01] version of \pkg{apacite}
4635 vis-\`a-vis the 5th edition of the APA manual. The actual formatting
4636 is done by the current version of \pkg{apacite} and thus may not
4637 correspond to the text. This section is retained for the moment, because
4638 the majority may still be relevant and I haven't finished incorporating
4639 the examples from the 6th edition yet, and because it describes various
4640 workarounds and tips that may still be useful.}
4641
4642 In this section, the \pkg{apacite} package is tested by citing the examples of
4643 the 5th edition of the APA manual \cite[pp.~207--281]{APAManual5}, and some
4644 additional references for additional purposes.
4645
4646 The following list gives the examples from chapter~3 of the 5th edition of
4647 the APA manual, with
4648 section number. For these and all later examples, whenever I thought it
4649 necessary or desirable, I added some comments. These are indicated by the \EM{}
4650 symbol. Especially for later examples (from Chapter~4), the comments frequently
4651 pertain to the corresponding reference list entry.
4652
4653 \begin{itemize}
4654 \item[3.94] \citeA{3.94-1} compared reaction times\\
4655 In a recent study of reaction times \cite{3.94-1}\\
4656 In \citeyearNP{3.94-1} \citeauthor{3.94-1} compared
4657 reaction times\\
4658 In a recent study of reaction times, \citeA{3.94-1}
4659 described the method\ldots. \citeauthor{3.94-1} also found
4660 \item[3.95] \citeA{3.95-1} found\\
4661 \citeA{3.95-1} found\\
4662 \citeauthor{3.95-1} found\\
4663 \fullcite{3.95-2} and \fullcite{3.95-3}\\
4664 \citeA{3.95-2} and \citeA{3.95-3}\\
4665 \EM It seems that if ``et al.\hbox{}'' would refer to one additional
4666 author, then this author is named instead of the ``et al.\hbox{}''
4667 clause.\\
4668 \citeA{3.95-4} and \citeA{3.95-5}\\
4669 as \citeA{3.95-6} demonstrated\\
4670 \EM The comma after ``Nightlinger'' in the reference list
4671 does not look right, but is explicitly required by the APA.
4672 Of course, with people as authors,
4673 one almost always has initials (although I have seen
4674 an example of an econometrician who only had
4675 one name), so this problem is not likely to occur.
4676 With nicknames (``screen names'' as they are called in the
4677 APA manual below ex. 85) in messages to newsgroups, initials
4678 are typically missing, but then there is usually (always?)
4679 only one author, so the problem does not exist either.
4680 The problem can, however, come up when there are two authors,
4681 the first of which is a corporate author, or with artists,
4682 e.g., the song ``Into the Groove'' is written by
4683 Madonna and Stephen Bray. \\
4684 as has been shown \cite{3.95-7}
4685 \item[3.96] \cite{3.96-1}\\
4686 \cite{3.96-1}\\
4687 \cite{3.96-2}\\
4688 \EM If the \fieldname{firstkey} field is different for different
4689 references
4690 and the \fieldname{key} field is the same, then, analogous
4691 to the use of extra authors in 3.95 above, \pkg{apacite}
4692 uses the \fieldname{firstkey} field for all citations:\\
4693 \citeA{3.96-3}, \citeA{3.96-4}, \citeA{3.96-5}, \citeA{3.96-6};\\
4694 \citeA{3.96-3}, \citeA{3.96-4}, \citeA{3.96-5}, \citeA{3.96-6}.\\
4695 Although this is a constructed example, these organizations
4696 really exist. The ``Koninklijke Nederlandse Schaakbond''
4697 is the Royal Dutch Chess Association and the
4698 ``Koninklijke Nederlandse Schaatsbond'' is the Royal Dutch
4699 Skating Association. Both are abbreviated to KNSB and
4700 presumably, both publish an annual report each year.
4701 Furthermore, in these examples, I copied the contents of the
4702 \fieldname{author} field to the \fieldname{publisher} field.
4703 \pkg{apacite} recognizes this and puts the APA-requirement
4704 ``Author'' as publisher description in the reference list.
4705 Other styles may prefer the full publisher name again.
4706 \item[3.97] on free care \cite{3.97-1}\\
4707 \EM The order of the
4708 closing quotes and the comma is different from the
4709 APA manual. I think this one is more logical, although the
4710 APA manual's is the conventional one, presumably for
4711 aesthetic reasons. I hope to implement this in a future
4712 version.\\
4713 the book \citeA{3.97-2}\\
4714 \cite{3.97-3}\\
4715 \EM If two articles both have no author and the title and
4716 the year are the same, a's and b's should be used:
4717 \citeA{3.97-4}, \citeA{3.97-5}, and \citeA{3.97-6}.
4718 The latter two entries are correctly sorted by month,
4719 through the way the month macros are defined in
4720 the \fname{.bst} files.
4721 \item[3.98] \citeA{3.98-1} and \citeA{3.98-2} also found\\
4722 \citeA{3.98-3} and \citeA{3.98-4} studied
4723 \item[3.99] Past research \cite{3.99-1,3.99-2}\\
4724 Past research \cite{3.99-3,3.99-4,3.99-5}\\
4725 Several studies
4726 \cite{3.99-6,3.99-7,3.99-8,3.99-9,3.99-10,3.99-11}\\
4727 Several studies \cite{3.99-12,3.99-13,3.99-14}\\
4728 \EM \pkg{apacite} does not (yet?) sort the cited
4729 references in the text (of course it does for the reference
4730 list), as required by the APA manual.\\
4731 (\citeNP{3.99-15}; see also \citeNP{3.99-16,3.99-17})\\
4732 \EM Note that I had to use \cmd{\citeNP} here.
4733 \item[3.100] \cite{3.100-1}\\
4734 \EM This is not an example, but a rule in the text.
4735 The ``\bibnodate'' is handled by the \cmd{\bibnodate}
4736 macro. It is not clear whether it is really meant that the
4737 in-text form is \citeauthor{3.100-1}, \citeyearNP{3.100-1}
4738 or the more logically consistent \citeA{3.100-1}.
4739 The former can (currently) only be accomplished by using
4740 \cmd{\citeauthor} and \cmd{\citeyearNP} explicitly,
4741 whereas the latter is simply obtained by \cmd{\citeA}.\\
4742 \cite{3.100-1b}\\
4743 \EM Again, this is not an example, but a rule in the text.\\
4744 \cite{3.100-2}\\
4745 \citeA{3.100-3}\\
4746 \EM For citations to the bible, I used \cmd{\biblecite} and
4747 several obvious variations on it, as discussed in
4748 section~\ref{sec:apacdoc}:\\
4749 \cmd{\bibleciteA}, first cite: \bibleciteA{1 Cor.\ 13:1}\\
4750 \cmd{\bibleciteA}, second cite: \bibleciteA{1 Cor.\ 13:1}\\
4751 \cmd{\biblecite}, first cite: \fullbiblecite{1 Cor.\ 13:1}\\
4752 \cmd{\biblecite}, second cite: \biblecite{1 Cor.\ 13:1}\\
4753 (\cmd{\bibleciteNP}, first cite:
4754 \fullbibleciteNP{1 Cor.\ 13:1} and some text surrounding it)\\
4755 (\cmd{\bibleciteNP}, second cite:
4756 \bibleciteNP{1 Cor.\ 13:1} and some text surrounding it)\\
4757 \EM Here, there probably should be a comma if it's the first
4758 cite and not a comma when it's a later cite. A difficult one.\\
4759 \EM Ancient Greek and Roman works should be treated similarly,
4760 i.e., not be listed in the reference list. But it seems to me
4761 that title and/or author must be given in the text as well.
4762 Maybe I will try to construct a tentative example of this in
4763 a future release.
4764 \item[3.101] \cite[p.~332]{3.101-1}\\
4765 \cite[Chapter~3]{3.101-2}\\
4766 \EM If you like, you can use the \pkg{apacite}-defined
4767 abbreviation commands \verb+\BPG+ and \verb+\BCHAP+.\\
4768 \cite[\P~5]{3.101-3}\\
4769 \cite[Conclusion section, para.~1]{3.101-4}
4770 \item[3.102] \EM Personal communication is not really citation and should
4771 be done manually:\\
4772 T.~K. Lutes (personal communication, April 18, 2001)\\
4773 (V.-G. Nguyen, personal communication, September 28, 1998)
4774 \item[3.103] \cite<see Table~2 of>[for complete data]{3.103-1}
4775 \end{itemize}
4776
4777 \noindent
4778 Chapter~4 of the APA manual deals with the reference list
4779 and only mentions some in-text citation issues in passing.
4780 Therefore, the rest mainly requires a lot of moving back and forth
4781 between the reference list and this part. I start with the
4782 more general part, sections 4.01--4.15, presented similar to
4783 the sections from chapter~3 as presented above.
4784 \begin{itemize}
4785 \item[4.04] \EM First, some examples mentioned in the text:\\
4786 \citeA{4.04-t1},
4787 \citeA{4.04-t2},
4788 \citeA{4.04-t3},
4789 \citeA{4.04-t4},
4790 \citeA{4.04-t5},
4791 \citeA{4.04-t6},
4792 \citeA{4.04-t7},
4793 \citeA{4.04-t8},
4794 \citeA{4.04-t9}\\
4795 \EM The APA manual states that prefixes must be treated
4796 according to the rules of the language of origin. These rules
4797 can differ a lot between languages (and countries) and it
4798 is impossible to know all these rules. The APA manual gives two
4799 examples, one in which ``De Vries'' is treated as the surname,
4800 and one in which ``Helmholtz'' is the surname and ``von'' is
4801 the ``von'' part of the name.
4802
4803 In the former case, the author is referred to as, say, ``De Vries
4804 (1999)'' in text and ``De Vries, J. (1999).'', alphabetized under
4805 ``D'' in the reference list. In the second example, the author is
4806 referred to as, say, ``Helmholtz (1870)'' and listed in the
4807 reference list as ``Helmholtz, H. L. F. von. (1870).'',
4808 alphabetized under ``H''. To get this right, the author must be
4809 defined as
4810 \begin{verbatim}
4811 author = {H. L. F. von Helmholtz},
4812 \end{verbatim}
4813 or
4814 \begin{verbatim}
4815 author = {von Helmholtz, H. L. F.},
4816 \end{verbatim}
4817 then \BibTeX{} will assign the correct parts to the first names,
4818 ``von''-part, and last name. The seemingly logical
4819 \begin{verbatim}
4820 author = {Helmholtz, H. L. F. von},
4821 \end{verbatim}
4822 will not be formatted correctly, because ``von'' is now
4823 considered to be part of the first names and therefore
4824 abbreviated to ``v.''.
4825
4826 Below, under example B-2, I will further discuss some
4827 issues about ``von'' parts.
4828
4829 \EM The APA manual requires that numerals are alphabetized
4830 as if they were spelled out. This is not done by \pkg{apacite},
4831 so when applicable should be done by the user, e.g.\ by using
4832 the \cmd{\APACSortNoop} command as discussed in
4833 section~\ref{subsec:sort}. I give one fictitious example
4834 \cite{4.04-t10}.
4835
4836 \citeA{4.04-1}\\
4837 \citeA{4.04-2}\\
4838 \citeA{4.04-3}\\
4839 \citeA{4.04-4}\\
4840 \citeA{4.04-5}\\
4841 \citeA{4.04-6}\\
4842 \citeA{4.04-7}\\
4843 \citeA{4.04-8}\\
4844 \citeA{4.04-9}\\
4845 \citeA{4.04-10}\\
4846 \citeA{4.04-11}\\
4847 \citeA{4.04-12}\\
4848 \EM As stated in the APA manual, an exception to the rule
4849 of sorting by title if author and year are the same occurs
4850 when the works are identified as a series. Then ordering
4851 the parts of the series sequentially can be done using the
4852 \cmd{\APACSortNoop} command.\\
4853 \EM Here, it says that only ``A'' and ``The'' are excluded
4854 from the sorting (if they are the initial words), but I
4855 assume they mean ``An'' as well. This is how it is
4856 implemented in \pkg{apacite}.
4857
4858 \citeA{4.04-13}\\
4859 \citeA{4.04-14}\\
4860 \EM I have not (yet?) studied referencing legal materials.
4861 In the first version of \pkg{apacite}, I defined a
4862 \entryname{literal} type, so that the users can
4863 literally format such entries themselves. This is still
4864 available. However, I think that if you need to refer to
4865 legal cases, you can find a way to use the
4866 \entryname{misc} type to get it right. I might study this
4867 and give examples in a next version of \pkg{apacite}.
4868 \item[4.05] \citeA{4.05-1}\\
4869 \nocitemeta{4.05-2}\citeA{4.05-2}\\
4870 \EM Here I used the \cmd{\nocitemeta} command to let
4871 \pkg{apacite} know that a meta-analysis is reported and this
4872 work is included in it. As you can see, you can still cite
4873 the work by using the normal citation commands such as
4874 \cmd{\citeA}.
4875 \item[4.08] \citeA{4.08-1}\\
4876 \citeA{4.08-2}\\
4877 \citeA{4.08-3}\\
4878 \EM To obtain the ``(with \dots)'' description in the
4879 reference list, I used the \cmd{\bibliteral} command.
4880 Furthermore, to get this formatted correctly in the author
4881 index, I used the \cmd{\indexskipbracenodot} command to
4882 suppress an additional period. These commands are described
4883 in section~\ref{sec:apacdoc}.
4884
4885 To \BibTeX{}, the \cmd{\bibliteral} construction is a complicated
4886 accented character, which is the second initial of the author.
4887 Consequently, this does not work properly with styles that put
4888 the initials \emph{before} the surnames, and care must be
4889 exercised with ``junior'' parts (see ex.~70). Furthermore,
4890 this construction must be put between a pair of
4891 braces in order for \BibTeX{} to treat it as an accented letter,
4892 instead of abbreviating it.
4893 \item[4.09] \citeA{4.09-1}
4894 \item[4.10] \citeA{4.10-1}\\
4895 \citeA{4.10-2}
4896 \item[4.11] \citeA{4.11-1}\\
4897 \citeA{4.11-2}\\
4898 \EM Note that in the \fname{.bib} file, the ``junior'' part comes
4899 directly after the surname and a comma, with the initials
4900 after the ``junior'' part, whereas in the formatted
4901 reference list, the more logical order \opt{surname},
4902 \opt{initials}, \opt{junior}, is used.
4903 \item[4.12] \citeA{4.12-1}
4904 \item[4.13] \citeA{4.13-1}\\
4905 \EM ``For substantial reference works with a large editorial
4906 board, naming the lead editor followed by \texttt{et al.} is
4907 acceptable''. This is now implemented in \pkg{apacite} as
4908 follows: If there are 7 or more editors, only the first one
4909 is named, followed by ``et al.\hbox{}'' \cite{4.13-2}.
4910 \item[4.15] \citeA{4.15-1}\\
4911 \EM Here I used the new \fieldname{url} and
4912 \fieldname{lastchecked} fields.\\
4913 \citeA{4.15-2}
4914 \end{itemize}
4915
4916 \noindent
4917 The rest is from section~4.16, the examples section. The section number
4918 is omitted, but A--I are used instead for the unnumbered examples. For
4919 the numbered examples, only the number is given.
4920 The following enumerated list gives the example number, and
4921 the two basic in-text citation commands, both in a full and
4922 short form, of the examples.
4923 \begin{enumerate}
4924 \item[A-1] \cite{A-1} \\ \cite{A-1} \\ \fullciteA{A-1} \\ \citeA{A-1}
4925 \item \cite{ex1} \\ \cite{ex1} \\ \fullciteA{ex1} \\ \citeA{ex1}
4926 \item \cite{ex2} \\ \cite{ex2} \\ \fullciteA{ex2} \\ \citeA{ex2}
4927 \item \cite{ex3} \\ \cite{ex3} \\ \fullciteA{ex3} \\ \citeA{ex3}
4928 \item \cite{ex4} \\ \cite{ex4} \\ \fullciteA{ex4} \\ \citeA{ex4}\\
4929 \cite{ex4-2} \\ \cite{ex4-2} \\ \fullciteA{ex4-2} \\ \citeA{ex4-2}\\
4930 \EM Note that the list of authors can be finished with
4931 ``\verb+and others+'' if there are more than 6 authors, or
4932 all authors can be given, in which case \pkg{apacite} truncates
4933 the list after the first~6. For compatibility with other styles,
4934 the latter is preferable.
4935 \item \cite{ex5} \\ \cite{ex5} \\ \fullciteA{ex5} \\ \citeA{ex5}
4936 \item \cite{ex6} \\ \cite{ex6} \\ \fullciteA{ex6} \\ \citeA{ex6}
4937 \item \cite{ex7} \\ \cite{ex7} \\ \fullciteA{ex7} \\ \citeA{ex7}\\
4938 \EM Here, I used
4939 \begin{verbatim}
4940 month = spring,
4941 \end{verbatim}
4942 using the new \verb+spring+ macro defined in the \fname{.bst} files.
4943 \item \cite{ex8} \\ \cite{ex8} \\ \fullciteA{ex8} \\ \citeA{ex8}\\
4944 \EM Here, again, the order of the closing quotes and the
4945 following comma should be reversed according to the APA rules.\\
4946 \EM The \fieldname{month} field is formatted as
4947 \begin{verbatim}
4948 month = aug # "/" # sep,
4949 \end{verbatim}
4950 which uses the month macros and \BibTeX's concatenation
4951 operator `\verb+#+'.
4952 \item \cite{ex9} \\ \cite{ex9} \\ \fullciteA{ex9} \\ \citeA{ex9}\\
4953 \EM Here, again, the order of the closing quotes and the
4954 following comma should be reversed according to the APA rules.
4955 \item \cite{ex10} \\ \cite{ex10}\\ \fullciteA{ex10}\\ \citeA{ex10}
4956 \item \cite{ex11} \\ \cite{ex11}\\ \fullciteA{ex11}\\ \citeA{ex11}\\
4957 \EM Apparently, a weekly newspaper is not a magazine and should
4958 therefore include ``p.\hbox{}'' or ``pp.\hbox{}'' in front of
4959 the page
4960 number(s), whereas a magazine article should not. I do not
4961 understand the distinction very well and find it not very
4962 useful as well, but will adhere to it. It means that the
4963 \entryname{newspaper} type gets the ``pp.\hbox{}'', whereas
4964 \entryname{magazine} and \entryname{article}, which are now
4965 identical, do not.
4966 \item \cite{ex12} \\ \cite{ex12}\\ \fullciteA{ex12}\\ \citeA{ex12}\\
4967 \EM Here, \verb+\emph{DSM-IV}+ must be entered without an extra
4968 pair of braces in the title field; see ex.~73 for the intricacies
4969 of braces and \verb+\emph+ in the title field.
4970 \item \cite{ex13} \\ \cite{ex13}\\ \fullciteA{ex13}\\ \citeA{ex13}\\
4971 \EM Here, the \fieldname{number} field is \verb+1, Serial No.~231+.
4972 \item \cite{ex14} \\ \cite{ex14}\\ \fullciteA{ex14}\\ \citeA{ex14}\\
4973 \EM Here, the \fieldname{number} field is \verb+3, Pt.~2+.
4974 \item \cite{ex15} \\ \cite{ex15}\\ \fullciteA{ex15}\\ \citeA{ex15}
4975 \item \cite{ex16} \\ \cite{ex16}\\ \fullciteA{ex16}\\ \citeA{ex16}
4976 \item \cite{ex17} \\ \cite{ex17}\\ \fullciteA{ex17}\\ \citeA{ex17}\\
4977 \EM This case is the opposite of the more common situation where a
4978 reprint is cited and an original publication year is given. I could
4979 implement similar code to handle this case (and I may if I get requests
4980 to do this), but for the moment, I decided to trick the system: I
4981 used the \cmd{\bibreftext} command mentioned in
4982 section~\ref{sec:apacdoc}. It must be called with two
4983 arguments. Initially, it places the second argument in the text, but
4984 just before the bibliography, its definition is changed so that the
4985 first argument is placed in the reference list. By defining
4986 \begin{verbatim}
4987 year = {{\protect\bibreftext{1992}{1992/1993}}},
4988 \end{verbatim}
4989 in the \fname{.bib} file, the year is ``1992'' in the reference
4990 list and ``1992/1993'' in the text citations. The \cmd{\protect}
4991 is necessary to make sure that the \cmd{\bibreftext} macro is not
4992 written out in the label-part of the bibliography, because then
4993 only ``1992'' would appear in the text reference. The additional
4994 pair of braces are necessary to make sure that the entry
4995 is alphabetized correctly. When these are omitted, the entry
4996 is alphabetized under the ``P'' of ``protect''. Of course, the
4997 latter is only important if the reference list contains
4998 multiple works by the same author(s), but the same phenomenon
4999 is encountered when the \fieldname{author} or \fieldname{editor}
5000 field starts with a command, or when there is no author or editor
5001 and the \fieldname{title} field starts with a command, as in
5002 the entry \citeA{4.04-t10} introduced in 4.04 above.
5003
5004 Of course, you can save yourself a lot of trouble by
5005 obtaining the original article and citing that.
5006 \item \cite{ex18} \\ \cite{ex18}\\ \fullciteA{ex18}\\ \citeA{ex18}\\
5007 \EM Here, the \fieldname{number} field is \verb+Suppl.~2+.
5008 \item \cite{ex19} \\ \cite{ex19}\\ \fullciteA{ex19}\\ \citeA{ex19}\\
5009 \EM Other styles treat the \emph{Annual Review} as a book
5010 (\emph{Sociological Methodology} is an even stronger example),
5011 so this is a point where the \fname{.bib} file becomes
5012 highly incompatible between styles. This cannot be avoided.
5013 \item \cite{ex20} \\ \cite{ex20}\\ \fullciteA{ex20}\\ \citeA{ex20}\\
5014 \EM Here, the \fieldname{englishtitle} field is used for the
5015 English translation of the German title. To get the German
5016 capitalization of the title right, the capitalized words must
5017 be protected by an additional pair of braces.
5018 \item \cite{ex21} \\ \cite{ex21}\\ \fullciteA{ex21}\\ \citeA{ex21}\\
5019 \EM Apparently, a translator and original publication date
5020 do not have to be mentioned here.
5021 \item Seidenberg and McClelland's study \cite<as cited in>{ex22}\\
5022 %\cite{ex22} \\ \cite{ex22}\\ \fullciteA{ex22}\\ \citeA{ex22}\\
5023 \EM The APA website (\url{http://www.apastyle.org/faqs.html})
5024 mentions that the year should generally also be mentioned,
5025 making it a complete cite, except that there is no reference
5026 list entry. In my opinion, it would be better to list the
5027 complete original work in the reference list as well, in case
5028 readers do have access to the original work, but not to the
5029 secondary source. But this is not the APA rule. \\
5030 \EM You may like to have the authors of the unlisted reference
5031 in the author index as well. Use the \cmd{\AX} command for
5032 this, as explained in section~\ref{sec:autindex}.
5033 \item[B-1] \cite{B-1} \\ \cite{B-1} \\ \fullciteA{B-1} \\ \citeA{B-1}
5034 \item \cite{ex23} \\ \cite{ex23}\\ \fullciteA{ex23}\\ \citeA{ex23}\\
5035 \EM Here, and in several other references, I put \verb+\hbox{}+
5036 after the ``\verb+Jr.+'', so that \TeX{} does not consider the
5037 period as a sentence-ending period.\\
5038 \EM \pkg{apacite} now supports only an integer value (``\verb+3+'')
5039 in the \fieldname{edition} field, and transforms this to
5040 ``3rd''.
5041 \item \cite{ex24} \\ \cite{ex24}\\ \fullciteA{ex24}\\ \citeA{ex24}\\
5042 \EM The APA manual gives a number, which would not ordinarily be
5043 done with proper books and which suggests that it could also
5044 be treated as a report. In that case, the default
5045 ``Tech.\ Rep.\hbox{}''
5046 description should be left out, however. This can be accomplished
5047 by defining
5048 \begin{verbatim}
5049 type = {\bibnotype},
5050 \end{verbatim}
5051 which flags that the type must be left out, see ex.~42.
5052 However, for books, it now works fine leaving the \fieldname{type}
5053 field empty and giving the number in the \fieldname{number} field.
5054 \item \cite{ex25} \\ \cite{ex25}\\ \fullciteA{ex25}\\ \citeA{ex25}\\
5055 \EM According to the note after ex.~25 in the APA manual,
5056 an edited book with ``just one'' author should list
5057 the editor (and translator, when available) after the
5058 title, just like the translator. An example of this is
5059 \citeA{ex25-t1}. (Should the original years of publication
5060 be used here?)
5061
5062 However, what does ``just one author'' mean here? Does it mean that if
5063 there are 2 authors and 1 or more editors, the editors should
5064 not be mentioned, or the authors should not be mentioned?
5065 Presumably, it means the following:
5066 In the default case, an edited book consists of several chapters,
5067 with different chapters written by different authors. In this case,
5068 the reference to the whole book lists only the editor(s).
5069 If every chapter is written by the same author, and there are 1
5070 or more editors, their condition holds. I think that if all
5071 chapters are written by the same $n$ ($\geq 2$) authors, it should
5072 also be treated in this way, i.e., with the authors in the
5073 author position and the editor behind the title. A difficult
5074 case would appear if the book were a collection of works of, say,
5075 2 authors, with some chapters written by one and some by the
5076 other, and some jointly, as in \citeA{ex25-t2}. These choices have
5077 to be made by the user, however, \pkg{apacite} will format author,
5078 editor, and translator, whenever available.
5079 \item \cite{ex26} \\ \cite{ex26}\\ \fullciteA{ex26}\\ \citeA{ex26}\\
5080 \EM According to section~3.97, the title should be in italics.
5081 In this example, in the citation, it is not given in italics,
5082 but this must be an error, because they do give it in italics
5083 on p.~219 (but give no date there).
5084 \item \cite{ex27} \\ \cite{ex27}\\ \fullciteA{ex27}\\ \citeA{ex27}\\
5085 \EM Here, the \fieldname{edition} field has value
5086 ``\verb+Rev.\hbox{}+'' and \pkg{apacite} handles this
5087 noninteger value correctly as well.
5088 \item \cite{ex28} \\ \cite{ex28}\\ \fullciteA{ex28}\\ \citeA{ex28}\\
5089 \EM Use the en-dash (``\verb+--+'') and not simply a hyphen
5090 (``\verb+-+''), because the latter is not considered to mean
5091 ``to'' by \pkg{apacite} (cf.\hbox{} ``Vol.~A-1'').
5092 \item \EM As mentioned in section~\ref{sec:apacdoc}, \fname{apacdoc.sty}
5093 provides the \cmd{\DSMcite} macro and some related
5094 alternatives to get the \emph{DSM} references right. On rereading
5095 the description in the APA manual, I discovered that previous
5096 versions of \pkg{apacite} did not format the first citation
5097 correctly, although the description is a bit ambiguous as to
5098 how exactly the first citation should be formatted. Therefore,
5099 I looked at a recent issue of
5100 \emph{Journal of Abnormal Psychology}, \emph{116}(3); and
5101 \emph{Psychological Assessment}, \emph{19}(2). These show
5102 some slight variations, some of which have good reasons, but
5103 others seem arbitrary. In all articles I looked at, the first
5104 citation was an in-text citation, and the following form was
5105 the most frequently used, and thus implemented in
5106 \fname{apacdoc.sty}:\\
5107 \cmd{\DSMciteA}, first citation: \DSMciteA{ex29} \\
5108 \EM The following citations then only use the abbreviated title:\\
5109 \cmd{\DSMciteA}, second citation: \DSMciteA{ex29} \\
5110 \EM Because I haven't found a parenthetical first cite, I
5111 have to use some logic and common sense to define it:\\
5112 \cmd{\DSMcite}, first citation: \DSMfullcite{ex29} \\
5113 \EM Subsequent parenthetical cites are formatted as\\
5114 \cmd{\DSMcite}, second citation: \DSMcite{ex29} \\
5115 \EM Finally, here are ``\verb+NP+'' versions of them:\\
5116 \cmd{\DSMciteNP}, first citation: \DSMfullciteNP{ex29} \\
5117 \cmd{\DSMciteNP}, second citation: \DSMciteNP{ex29} \\
5118 To use these citation commands, you have to provide a
5119 \fieldname{key} field that contains a \cmd{\bibDSM}
5120 command:
5121 \begin{verbatim}
5122 key = {{\bibDSM{American Psychiatric Association}{Diagnostic
5123 and Statistical Manual of Mental Disorders}{4th
5124 ed.\hbox{}}{DSM-IV}}},
5125 \end{verbatim}
5126 As is evident from this example, the four arguments are
5127 author, full title, edition, short title. Thus, because
5128 all this information is provided in the \fname{.bib}
5129 entry (and not preprogrammed in \pkg{apacite}), it is
5130 conceivable that this command is useful for other types
5131 of works as well. The generality is a bit limited, though,
5132 because all four arguments must be available and have
5133 meaningful content (i.e., should not be empty). But it
5134 is relatively straightforward to write your own specialized
5135 citation commands, based on the \cmd{\DSMcite} code,
5136 which do not require all parts to be available.
5137
5138 However, the \cmd{\DSM*} macros are still very rough. Multiple
5139 citations are not handled well, so only one work should
5140 be cited with such a macro. Furthermore, the pre- and
5141 postfixes (through \verb+<...>+ and \verb+[...]+) are not
5142 available. Note also that the edition should be spelled
5143 out as ``\verb+4th ed.\hbox{}+''. When I experimented with
5144 just ``\verb+4+'', trying to use the \cmd{\PrintOrdinal}
5145 function, things went terribly wrong. Even if I put
5146 \verb+\PrintOrdinal{4}+ in the \fieldname{key} field, it
5147 didn't work. Finally, the ``ed.\hbox{}'' must be added
5148 to allow reference to the ``3rd ed., rev.\hbox{}'' and the
5149 ``4th ed., text rev.\hbox{}'' as well.
5150
5151 \EM In some of the articles I studied, ordinary citations
5152 were used, esp.\ when page numbers were given in
5153 parenthetical cites. Thus, you can also use\\
5154 \verb+\cite[p.~25]{ex29}+: \cite[p.~25]{ex29}
5155 \item \cite{ex30} \\ \cite{ex30}\\ \fullciteA{ex30}\\ \citeA{ex30}\\
5156 \EM Here, ``6th ed.'' comes before ``Vols.\ 1--20'', so it is
5157 Vols.\ 1--20 of the 6th edition. Pre-[2003/09/05] versions
5158 of \pkg{apacite} placed volumes before editions,
5159 which is appropriate when different volumes of a series
5160 are not updated jointly, so that you may have the 3rd edition
5161 of Vol.~2, but only the 1st edition of Vol.~6. Should you
5162 want this, you have to trick the system by putting both
5163 elements in the \fieldname{edition} field:
5164 \begin{verbatim}
5165 edition = {\BVOLS\ 1--20, 6th},
5166 \end{verbatim}
5167 and leaving the \fieldname{volume} field empty.\\
5168 \EM Does the remark about large editorial boards mean that the
5169 APA intended to add ``et al.\hbox{}'' here? Anyway, here is an
5170 example of such a situation: \citeA{ex30-2}.
5171 \item \cite{ex31} \\ \cite{ex31}\\ \fullciteA{ex31}\\ \citeA{ex31}
5172 \item \cite{ex32} \\ \cite{ex32}\\ \fullciteA{ex32}\\ \citeA{ex32}
5173 \item \cite{ex33} \\ \cite{ex33}\\ \fullciteA{ex33}\\ \citeA{ex33}\\
5174 \EM This illustrates that a \fieldname{type} field can be used
5175 with a \entryname{book} entry.
5176 \item[B-2] \cite{B-2} \\ \cite{B-2} \\ \fullciteA{B-2} \\ \citeA{B-2} \\
5177 \EM This is a suitable point to discuss ``von'' parts further.
5178 One of the editors in the current example is called
5179 P. van den Broek. I am Dutch and I recognize this as a Dutch
5180 name, so let's assume that this person is Dutch. Let us now
5181 consider the situation that this person is the (only) author.
5182 Then according to the Dutch rules, this person would be listed in the
5183 reference list as ``Broek, P. van den. (1992)'' and listed under ``B'',
5184 but referred to in the text as ``Van den Broek (1992)'', including
5185 the ``von'' part and capitalizing the first letter. When an
5186 initial precedes the ``von'' part (e.g., when there are two
5187 primary authors with this surname, but with different initials),
5188 then this person would be referred to in the text as
5189 ``P. van den Broek (1992)'', including the ``von'' part, but now
5190 in lower case. The Dutch rules are very difficult to do right in
5191 \BibTeX{}/\LaTeX{} and they conflict with the rules for other
5192 languages, and presumably with the rules of the APA, which would
5193 require this person to be alphabetized under ``V'', at least.
5194
5195 For the current editor position, there is no big problem with
5196 the APA rules. The ``von'' part can really be put in the ``von''
5197 part as recognized by \BibTeX{}, which I did, or it can be enclosed
5198 in braces, making the whole last name one part. Either will come
5199 out right and the editor will not be referred to in the text
5200 anyway. With styles that put the initials behind the surname,
5201 it will only work right when put in the ``von'' part. In the
5202 author position, however, things are different. Then this author
5203 could be formatted as
5204 \begin{verbatim}
5205 author = {Van {\lowercase{D}}en Broek, P.},
5206 \end{verbatim}
5207 where the \verb+{\lowercase{D}}+ construction is used to prevent
5208 \BibTeX{} from interpreting it as a ``von'' part, or
5209 \begin{verbatim}
5210 author = {Van{\ }den{\ }Broek, P.},
5211 author = {{Van den Broek}, P.},
5212 \end{verbatim}
5213 which in most situations gives the correct version according to the
5214 Dutch rules with the correct alphabetizing according to the APA
5215 rules. Only in situations when the initial would appear
5216 \emph{before} the surname (when there are other authors with the
5217 same surname or when using other styles), this would lead to
5218 unwanted results.
5219
5220 If you really want to alphabetize according to the Dutch rules
5221 (which is \emph{not} APA in my interpretation), you can use the
5222 following trick. \fname{apacdoc.sty} defines a macro \cmd{\Dutchvon}
5223 with two arguments, which is equivalent to the \cmd{\bibreftext}
5224 macro discussed in ex.~17 above. That is, in the beginning
5225 of the document, it is defined as echoing its second argument,
5226 and just before the reference list, it is redefined to echo
5227 its first argument. Then define the author as
5228 \begin{verbatim}
5229 author = {van den {\protect\Dutchvon{Broek}{Van den Broek}}, P.},
5230 \end{verbatim}
5231 which, combined with the \pkg{apacite} formatting implies
5232 that in text, ``Van den Broek'' is used, whereas the author
5233 is alphabetized under ``B'' in the reference list, and listed
5234 as ``Broek, P. van den''. Of course, we could simply have
5235 used \cmd{\bibreftext} again, but that was used to cover a
5236 completely different situation, and I can easily imagine that
5237 when switching to another citation style, the former application
5238 (i.e., 1992/1993) must be kept, but the ``von'' part is handled
5239 differently, so that \cmd{\Dutchvon} must be redefined.
5240 Based on this example, users should be able to define their
5241 own tricks for similar peculiarities.
5242
5243 Finally, note that in Belgium, where many people
5244 speak Dutch as well, it is customary to alphabetize under ``V''
5245 anyway (``Van Damme'').
5246 \item \cite{ex34} \\ \cite{ex34}\\ \fullciteA{ex34}\\ \citeA{ex34}
5247 \item \cite{ex35} \\ \cite{ex35}\\ \fullciteA{ex35}\\ \citeA{ex35}\\
5248 \EM The series title, volume number, and volume title are all
5249 put into the \fieldname{booktitle} field.
5250 \item \cite{ex36} \\ \cite{ex36}\\ \fullciteA{ex36}\\ \citeA{ex36}\\
5251 \EM Again, the series title, volume number, and volume title are
5252 all put into the \fieldname{booktitle} field.\\
5253 \EM I had to use some tricks to get the Series and Volume Editors'
5254 descriptions right. The ``(Series Ed.\hbox{})'' is according to
5255 \BibTeX{} part of the last name of the first editor,
5256 and I used the \cmd{\bibeditortype} macro from
5257 \fname{apacdoc.sty} to get the volume editor right.
5258 See section~\ref{subsec:fields} for my interpretation of
5259 APA's usage of the term ``series''.
5260 \item \cite{ex37} \\ \cite{ex37}\\ \fullciteA{ex37}\\ \citeA{ex37}\\
5261 \EM Note that ``Van'' in the first editor's surname is
5262 capitalized here, as in the APA manual. In the original Dutch,
5263 this would be in lower case.
5264 \item \cite{ex38} \\ \cite{ex38}\\ \fullciteA{ex38}\\ \citeA{ex38}
5265 \item \cite{ex39} \\ \cite{ex39}\\ \fullciteA{ex39}\\ \citeA{ex39}\\
5266 \EM Here, it is stated that the translator's name should be put
5267 after the editor's name when both are different, but in ex.~40,
5268 the translators are put after the title, before the editors.
5269 Apparently, if the book is a collection of works by one
5270 author(-group), edited and translated, then the translator
5271 should come after the editor, but if different chapters
5272 are translated by different translators, or perhaps not all
5273 are translated works, then the translator should come after
5274 the title. Of course, \pkg{apacite} has no way of knowing this.
5275 In the current implementation, for an \entryname{incollection},
5276 if the editor and translator are the same, they are formatted as
5277 in this example, whereas if they are different, they are treated
5278 as in ex.~40 below. I think this will be satisfactory in
5279 most cases. If you really want the translator after the editor
5280 when they are different, you can trick the system in a way
5281 similar to ex.~36.
5282 \item \cite{ex40} \\ \cite{ex40}\\ \fullciteA{ex40}\\ \citeA{ex40}\\
5283 \EM See my comments to ex.~39 above.
5284
5285 A test of the \fieldname{originaljournal} formatting:
5286 \citeA{ex40-t1}.
5287 \item[C-1] \cite{C-1} \\ \cite{C-1} \\ \fullciteA{C-1} \\ \citeA{C-1}\\
5288 \EM The APA manual initially formats the number with an
5289 en-dash: ``91--5''. When it discusses the number separately,
5290 however (p.~256), it uses a single hyphen: ``91-5''. Logically,
5291 the latter makes more sense to me (and is generally used in
5292 other numbers in the APA manual as well), so that's what I
5293 did here. Moreover, if the en-dash would be entered as
5294 ``\verb+--+'' in the \fieldname{number} field, \pkg{apacite}
5295 would interpret this as ``to'' and insert ``Nos.\hbox{}''
5296 instead of ``No.\hbox{}''. Thus, if you want the en-dash,
5297 you have to put this in the \fname{.bib} file in a different
5298 way, e.g., using the \cmd{\textendash} command.
5299 \item \cite{ex41} \\ \cite{ex41}\\ \fullciteA{ex41}\\ \citeA{ex41}
5300 \item \cite{ex42} \\ \cite{ex42}\\ \fullciteA{ex42}\\ \citeA{ex42}\\
5301 \EM I used the \cmd{\bibnotype} command to suppress the default
5302 ``(Tech.\ Rep.\hbox{})'' description. Actually, I don't think
5303 there is anything wrong with calling a report a report, be it
5304 ``technical'' by default, or by specifying
5305 \begin{verbatim}
5306 type = {Report},
5307 \end{verbatim}
5308 except that it's not done so in this specific example in the
5309 APA manual. But there does not seem to be a rule against it.
5310
5311 \EM The NTIS information is put in a \fieldname{note} field.
5312 \item \cite{ex43} \\ \cite{ex43}\\ \fullciteA{ex43}\\ \citeA{ex43}\\
5313 \EM The ERIC number is given in the \fieldname{note} field.
5314 \item \cite{ex44} \\ \cite{ex44}\\ \fullciteA{ex44}\\ \citeA{ex44}
5315 \item \cite{ex45} \\ \cite{ex45}\\ \fullciteA{ex45}\\ \citeA{ex45}
5316 \item \cite{ex46} \\ \cite{ex46}\\ \fullciteA{ex46}\\ \citeA{ex46}\\
5317 \EM Note that in the example in the APA manual, ``Western Australia''
5318 \emph{is} mentioned in the publisher location, whereas their rule
5319 explicitly states that this should not be the case in this
5320 situation, and they stress that again below the example.
5321 Therefore, I did not mention ``Western Australia'' in the
5322 \fieldname{publisher} field.
5323 \item \cite{ex47} \\ \cite{ex47}\\ \fullciteA{ex47}\\ \citeA{ex47}
5324 \item \cite{ex48} \\ \cite{ex48}\\ \fullciteA{ex48}\\ \citeA{ex48}
5325 \item \cite{ex49} \\ \cite{ex49}\\ \fullciteA{ex49}\\ \citeA{ex49}
5326 \item \cite{ex50} \\ \cite{ex50}\\ \fullciteA{ex50}\\ \citeA{ex50}
5327 \item \cite{ex51} \\ \cite{ex51}\\ \fullciteA{ex51}\\ \citeA{ex51}\\
5328 \EM As of this version of \pkg{apacite}, the location of a
5329 \entryname{lecture} can be given in the \fieldname{address}
5330 field.
5331 \item \cite{ex52} \\ \cite{ex52}\\ \fullciteA{ex52}\\ \citeA{ex52}
5332 \item \cite{ex53} \\ \cite{ex53}\\ \fullciteA{ex53}\\ \citeA{ex53}
5333 \item \cite{ex54} \\ \cite{ex54}\\ \fullciteA{ex54}\\ \citeA{ex54}
5334 \item \cite{ex55} \\ \cite{ex55}\\ \fullciteA{ex55}\\ \citeA{ex55}\\
5335 \EM It seems logical to suppress the original year in the
5336 citation if it's the same as the year of the abstract, cf.\
5337 the comment to ex.~17 in the APA manual (5th ed., p.~245).
5338
5339 \EM According to example 54 and the text below it, an ``A''
5340 or ``B'' should be added to the volume number of \emph{DAI}
5341 of this entry, presumably an ``A'', but because they did not
5342 give one, I left it out as well.
5343 \item \cite{ex56} \\ \cite{ex56}\\ \fullciteA{ex56}\\ \citeA{ex56}
5344 \item \cite{ex57} \\ \cite{ex57}\\ \fullciteA{ex57}\\ \citeA{ex57}\\
5345 \EM In ex.~59, the city should not be mentioned because it is
5346 already mentioned in the name of the university. Here, the
5347 city \emph{is} mentioned again, which seems contradictory.
5348 This is all in the \fname{.bib} file; \pkg{apacite} uses
5349 whatever is given there, so this is not a formatting problem
5350 for \pkg{apacite} itself.
5351 \item \cite{ex58} \\ \cite{ex58}\\ \fullciteA{ex58}\\ \citeA{ex58}
5352 \item \cite{ex59} \\ \cite{ex59}\\ \fullciteA{ex59}\\ \citeA{ex59}\\
5353 \EM See ex.~57 for the city issue.
5354 \item \cite{ex60} \\ \cite{ex60}\\ \fullciteA{ex60}\\ \citeA{ex60}
5355 \item \cite{ex61} \\ \cite{ex61}\\ \fullciteA{ex61}\\ \citeA{ex61}\\
5356 \EM The description of the data goes into the
5357 \fieldname{type} field. It may be more logical to put it
5358 in the \fieldname{title} field, with some trickery to indicate
5359 that it's a description and not a title, but putting it in the
5360 \fieldname{type} field already ensures that it's formatted
5361 correctly, so I think I'm gonna be lazy on this one. The same
5362 applies more or less to reviews (G-1, 63, 64), although there
5363 it is logical to put at least ``Review'' in the \fieldname{type}
5364 field, so as we're already there, we might as well make it
5365 complete.
5366 \item \cite{ex62} \\ \cite{ex62}\\ \fullciteA{ex62}\\ \citeA{ex62}\\
5367 \EM ``Available from'' an address should be spelled out in the
5368 \fieldname{note} field, to get the parentheses. ``Available
5369 from'' a website is without parentheses, see ex.~95.
5370 \item[G-1] \cite{G-1} \\ \cite{G-1} \\ \fullciteA{G-1} \\ \citeA{G-1}\\
5371 \EM See my comments to ex.~61 above about the logic of the
5372 \fieldname{type} field. For a review, the \fieldname{type}
5373 field must contain the message that it is a review of a
5374 \emph{book} (or motion picture, or whatever it is a review of)
5375 and give the title of the reviewed work in italics, which must
5376 be manually formatted, e.g., by using the \cmd{\APACcitebtitle}
5377 macro. The author of the reviewed work should apparently not be
5378 mentioned.
5379 \item \cite{ex63} \\ \cite{ex63}\\ \fullciteA{ex63}\\ \citeA{ex63}
5380 \item \cite{ex64} \\ \cite{ex64}\\ \fullciteA{ex64}\\ \citeA{ex64} \\
5381 \EM Here, the title of the motion picture,
5382 \APACcitebtitle{Discovering Psychology}, is capitalized,
5383 whereas this was not done with book titles in ex.~G-1 and 63.
5384 I don't know whether this is an error or an implicit rule,
5385 but this formatting must be done in the \fname{.bib} file,
5386 so it's up to the user to do this as desired.
5387 \item \EM The rules for movies, television series, etc.\ do not appeal
5388 very much to me, although they are not nearly as bad as those
5389 for music recordings (ex.~69 and further, see below). My
5390 primary objection is that when referring to movies and TV series,
5391 the title is the most important characteristic. The director
5392 may be a good second in some cases, but producers and writers are
5393 almost always unknown to the general public and not relevant
5394 when referring to them. You talk about the movie \emph{Jaws}
5395 and not about Spielberg (1975) or whoever wrote the script.
5396 Recognizing the primary creative input or authorship may be
5397 politically correct, but not particularly informative.
5398 However, you may think that my objections are mainly
5399 driven by the difficulties of trying to format the entries
5400 in \BibTeX{}. Anyway, here are my attempts to implement
5401 the APA rules.\\
5402 \cite{ex65-1} \\ \cite{ex65-1}\\ \fullciteA{ex65-1}\\ \citeA{ex65-1} \\
5403 \EM I find ``United States'' a somewhat uninformative address.
5404
5405 \cite{ex65-2} \\ \cite{ex65-2}\\ \fullciteA{ex65-2}\\ \citeA{ex65-2} \\
5406 \EM Note again that this and the following ``Available from''
5407 must be between
5408 parentheses (accomplished by putting it in the \fieldname{note} field),
5409 whereas ``Available from'' some web site must not be between
5410 parentheses, cf.\ ex.~95.
5411
5412 \EM In these examples, I used the \cmd{\bibliteral},
5413 \cmd{\bibskipbracenodot}, and \cmd{\indexskipbracenodot} commands
5414 from \fname{apacdoc.sty}.\\
5415 \cite{ex65-3} \\ \cite{ex65-3}\\ \fullciteA{ex65-3}\\ \citeA{ex65-3}\\
5416 \EM Here, I simply let ``(Producer)'' be part of the author name,
5417 but because of this addendum, the entry is not sorted correctly
5418 in the reference list: It should be before \citeA{APAManual6},
5419 but because of the addendum, the authors are different to \BibTeX{}
5420 and this one comes after \citeA{APAManual6}. The ordering can be
5421 corrected by using the \cmd{\APACSortNoop} command as discussed in
5422 section~\ref{subsec:sort}. However, the authors of these entries will
5423 still be different. If it's important that they are the same (e.g.,
5424 for the author index), the \fname{.bbl} file should be edited manually.
5425 This seems an extremely rare event, though.
5426 \item \cite{ex66} \\ \cite{ex66}\\ \fullciteA{ex66}\\ \citeA{ex66} \\
5427 \EM Here, I used the same tricks as in ex.~65.
5428 \item \cite{ex67} \\ \cite{ex67}\\ \fullciteA{ex67}\\ \citeA{ex67} \\
5429 \EM I used several tricks introduced before: the \cmd{\bibeditortype}
5430 (cf.\ ex.~36) construction to be able to use ``(Producer)'' in
5431 the editor position instead of ``(Ed.\hbox{})'', and the ones used
5432 in the previous examples. Because there is another Miller as well,
5433 the initial is given here. To make sure that \BibTeX{} thinks
5434 that there is only one initial, but the ``(Producer)'' is formatted
5435 correctly, the name is defined as follows:
5436 \begin{verbatim}
5437 editor = {Miller, {\bibinitial{R\bibeditortype{Producer}}}},
5438 \end{verbatim}
5439 using the \cmd{\bibinitial} and \cmd{\bibeditortype} commands from
5440 \fname{apacdoc.sty}.
5441 It is then formatted correctly both in the text and in the reference
5442 list if \cmd{\bibeditortype} is defined to swallow its argument
5443 in the text, and redefined prior to the bibliography. After the
5444 bibliography (before the index), it has to be redefined again
5445 to swallow its argument.
5446 \item \cite{ex68} \\ \cite{ex68}\\ \fullciteA{ex68}\\ \citeA{ex68}\\
5447 \EM Again, I used several tricks that were also used in the previous
5448 examples.
5449 \item \EM The rules for music recordings do not make any sense, and they
5450 are not entirely clear as well. It would seem to me that
5451 most pop, rock, and other ``light'' music songs are almost always
5452 attributed to the performing artist. You can usually read who the
5453 composer and lyricist of the song are on the inlay-details
5454 of the CD, but if you want the reader to refer to ``My Way'',
5455 the reader will easier find it (in a CD store or on the
5456 internet, for example) under ``Frank Sinatra'' than under
5457 the composer's name (whoever that may be). Furthermore, the
5458 year of release of the CD (or other medium) seems more relevant
5459 in referring to the CD than the year of copyright of the
5460 specific song, or the recording date.
5461
5462 For classical music, things are different. Then, the writer (composer)
5463 is often more important than the performing artist, although
5464 the percentage of people who know who wrote the lyrics for
5465 Mozart's operas may not be high. Furthermore, it may be
5466 time-consuming and not very relevant for most authors and
5467 readers to find the year in which a certain piece was written,
5468 although strictly speaking, we should use the ``date of copyright'',
5469 which is not relevant for a lot of classical music.
5470
5471 However, when referring to Beethoven's 9th symphony, say, it will
5472 typically not be very informative to refer to a specific recording on a
5473 specific CD, unless that specific recording is the subject of interest,
5474 but then it would seem that the ``performing artist'' (conductor or
5475 orchestra) should take the role of ``author''. For example, when
5476 comparing a performance of this symphony conducted in 1975 by Masur with
5477 a performance of this symphony conducted in 1990 by Bernstein (assuming
5478 this exists), it does not seem logical to compare ``9th Symphony''
5479 (Beethoven, 1823a, tracks~1--4) with ``9th Symphony'' (Beethoven, 1823b,
5480 tracks~1--4), but more logical to compare Masur (1975) with
5481 Bernstein (1990).
5482
5483 Finally, it seems a bit strange that the track number should be
5484 mentioned in text, but not in the reference list.
5485
5486 Again, you may think that my objections are mainly
5487 driven by the difficulties of trying to format the entries
5488 in \BibTeX. Nevertheless, here are my attempts to implement
5489 the APA rules, using variations of the \cmd{\citesong}
5490 command, defined in \fname{apacdoc.sty}:\\
5491 \begin{tabular}{ll}
5492 \cmd{\citeAsong}: & \citeAsong{ex69-1} \\
5493 \cmd{\citesong}: & \citesong{ex69-1} \\
5494 \cmd{\citesongNP}: & \citesongNP{ex69-1}\\
5495 \cmd{\citeAsong}: & \citeAsong{ex69-2} \\
5496 \cmd{\citesong}: & \citesong{ex69-2} \\
5497 \cmd{\citesongNP}: & \citesongNP{ex69-2}
5498 \end{tabular}\\
5499 \EM The \fieldname{key} field contains the relevant
5500 information in the form of a protected \cmd{\bibsong} command:
5501 \begin{verbatim}
5502 key = {{\protect\bibsong{author}{year}{song title}{track info}}},
5503 \end{verbatim}
5504 Furthermore, I used some tricks to get the reference list
5505 entry right. I used the \entryname{incollection} type as
5506 a basis, with the CD title in the \fieldname{booktitle} field.
5507 At first sight, it seems natural to define
5508 \begin{verbatim}
5509 type = {CD},
5510 \end{verbatim}
5511 but with an \entryname{incollection}, the \fieldname{type}
5512 field is put after the title, not after the book title.
5513 I may change this for music-types (CD, record, etc.),
5514 but this is currently not yet implemented. This means that the
5515 ``[CD]'' description must be put in the \fieldname{booktitle}
5516 field, after the CD title and with explicit formatting
5517 commands:
5518 \begin{verbatim}
5519 booktitle = {Arkansas Traveler {\upshape[\uppercase{CD}]}},
5520 \end{verbatim}
5521 On the other hand, we can now use the \fieldname{type}
5522 field to put the recording artists in for the second example:
5523 \begin{verbatim}
5524 type = {Recorded by G. Bok, A. Mayo, \& E. Trickett},
5525 \end{verbatim}
5526 We have to change the ``In'' string to ``On''
5527 (``In'' a book versus ``On'' a CD). This is done with a
5528 macro similar to the \cmd{\bibeditortype} macro discussed
5529 in ex.~36. In this case, the macro is \cmd{\bibInstring},
5530 defined in \fname{apacdoc.sty},
5531 which has one argument. The macro changes the definition of
5532 the macro \cmd{\BIn} to the argument and then immediately changes
5533 the definition back to the old definition. So it makes a one-time
5534 change. Of course, the \cmd{\bibInstring} macro only works
5535 if it is executed \emph{before} the \cmd{\BIn} macro. The latter
5536 macro comes before the \fieldname{booktitle}, so
5537 \cmd{\bibInstring} must be added to a field that comes before
5538 that. I put it in the \fieldname{title} field:
5539 \begin{verbatim}
5540 title = {Over the Waterfall{\bibInstring{\BOn}}},
5541 \end{verbatim}
5542 where \cmd{\BOn} is defined by default as ``\BOn''.
5543 Finally, the recording date of the second example (1990) must
5544 be put in the \fieldname{note} field.
5545
5546 If you want an author index, you would want the authors of
5547 these works in the index as well. Because of the usage of the
5548 \fieldname{key} field, this is not automatically done for the
5549 citations. The \cmd{\AX} command has to be inserted explicitly,
5550 see section~\ref{sec:autindex} above.
5551
5552 Note that this is all trickery within the \LaTeX{} domain
5553 and the \fname{.bib} file, i.e., the user-definable and
5554 user-customizable area.
5555 \item \cite{ex70} \\ \cite{ex70}\\ \fullciteA{ex70}\\ \citeA{ex70}
5556 \item \cite{ex71-1} \\ \cite{ex71-1}\\ \fullciteA{ex71-1}\\ \citeA{ex71-1} \\
5557 \cite{ex71-2} \\ \cite{ex71-2}\\ \fullciteA{ex71-2}\\ \citeA{ex71-2} \\
5558 \EM In contrast with earlier versions of \pkg{apacite}, in which
5559 the ``Retrieved \dots'' message had to be formatted in the
5560 \fieldname{howpublished} field, this is now formatted
5561 automatically by using the \fieldname{url} and
5562 \fieldname{lastchecked} fields.
5563 \item \cite{ex72} \\ \cite{ex72}\\ \fullciteA{ex72}\\ \citeA{ex72}
5564 \item \cite{ex73} \\ \cite{ex73}\\ \fullciteA{ex73}\\ \citeA{ex73} \\
5565 \EM Note that the APA manual breaks a line \emph{after} a
5566 period instead of before, against their own rules. Furthermore,
5567 the APA manual uses a typeface in which `1' (one) and `l' (ell)
5568 are not distinguishable. This requires some guessing of the
5569 correct URLs. I think that this conflicts with their own stress
5570 on accuracy w.r.t.\ URLs.
5571
5572 \EM Note the subtle use of braces to get \emph{Homo sapiens}
5573 correctly formatted: The capital in \verb+\emph{Homo}+
5574 is retained by \BibTeX, whereas the capital in
5575 \verb+{\emph{Sapiens}}+ is changed into a lower case letter
5576 by \BibTeX, because of the extra pair of braces.
5577 \item \cite{ex74} \\ \cite{ex74}\\ \fullciteA{ex74}\\ \citeA{ex74}
5578 \item \cite{ex75} \\ \cite{ex75}\\ \fullciteA{ex75}\\ \citeA{ex75}\\
5579 \EM Note that \BibTeX{} does not consider a question mark
5580 or an exclamation point as the end of the title and the beginning
5581 of the subtitle. Hence, if there is a subtitle after it, the
5582 capitalization of its first word is not retained (unlike
5583 after a colon), so we have to protect it using braces in the
5584 \fname{.bib} file.
5585 \item \cite{ex76} \\ \cite{ex76}\\ \fullciteA{ex76}\\ \citeA{ex76}
5586 \item \cite{ex77} \\ \cite{ex77}\\ \fullciteA{ex77}\\ \citeA{ex77}
5587 \item \cite{ex78} \\ \cite{ex78}\\ \fullciteA{ex78}\\ \citeA{ex78}\\
5588 \EM For this example, the source is not simply the URL, but
5589 with the qualification ``Columbia University, Institute for
5590 Learning Technologies Web site:''. This means that we cannot
5591 simply use the \fieldname{lastchecked} and \fieldname{url}
5592 fields, but must revert to the way I proposed to format
5593 references to electronic sources in previous versions of
5594 \pkg{apacite}: by putting all the information in a
5595 \fieldname{howpublished} field. This includes explicitly using
5596 the \cmd{\url} command and adding ``\verb+\bibnodot{.}+''
5597 immediately after the URL. The \cmd{\bibnodot} command,
5598 defined in \fname{apacdoc.sty}, swallows the period, so that
5599 there is no period after the URL in the reference list, thus
5600 complying with the APA rules. This also applies to examples
5601 79, 87, 91, and 95, and all the examples that do not list
5602 a specific URL, but only a description, like
5603 ``the PsycARTICLES database'' (ex.~88).
5604 \item \cite{ex79} \\ \cite{ex79}\\ \fullciteA{ex79}\\ \citeA{ex79}
5605 \item \cite{ex80} \\ \cite{ex80}\\ \fullciteA{ex80}\\ \citeA{ex80}
5606 \item \cite{ex81} \\ \cite{ex81}\\ \fullciteA{ex81}\\ \citeA{ex81}
5607 \item \cite{ex82} \\ \cite{ex82}\\ \fullciteA{ex82}\\ \citeA{ex82}\\
5608 \EM Here and in ex.~83, I used the \cmd{\BAbstractRetrieved}
5609 and \cmd{\BmakeAbstractRetrieved} commands defined in
5610 \fname{apacdoc.sty} to replace ``Retrieved'' by
5611 ``Abstract retrieved''.
5612 \item \cite{ex83} \\ \cite{ex83}\\ \fullciteA{ex83}\\ \citeA{ex83} \\
5613 \item \cite{ex84} \\ \cite{ex84}\\ \fullciteA{ex84}\\ \citeA{ex84}
5614 \item \cite{ex85} \\ \cite{ex85}\\ \fullciteA{ex85}\\ \citeA{ex85} \\
5615 \EM When referring to a message to a newsgroup, internet forum, etc.,
5616 use the \entryname{misc} type. Then define
5617 \begin{verbatim}
5618 type = {\bibmessage},
5619 \end{verbatim}
5620 and use the \fieldname{number} field when relevant. The URL
5621 of the message is given in the \fieldname{url} field. Then
5622 the entry is formatted
5623 correctly: If the message has a number, say 1, it reverts to
5624 ``\verb+[\bibmessage~1]+'', i.e., ``[Msg~1]'' with the default
5625 definition of \cmd{\bibmessage}. If there is no number, the
5626 type identifier is omitted (because it is mentioned as
5627 ``Message posted to [\dots]'' anyway). In both cases,
5628 the title is formatted as an article title, i.e., not
5629 italicized.
5630 \item \cite{ex86} \\ \cite{ex86}\\ \fullciteA{ex86}\\ \citeA{ex86}
5631 \item \cite{ex87} \\ \cite{ex87}\\ \fullciteA{ex87}\\ \citeA{ex87}
5632 \item \cite{ex88} \\ \cite{ex88}\\ \fullciteA{ex88}\\ \citeA{ex88}
5633 \item \cite{ex89} \\ \cite{ex89}\\ \fullciteA{ex89}\\ \citeA{ex89}
5634 \item \cite{ex90} \\ \cite{ex90}\\ \fullciteA{ex90}\\ \citeA{ex90} \\
5635 \EM Here, ``de Ridder'' may well be a Dutch name. If the APA
5636 manual is serious about its rule to format names as they
5637 should according to the rule of the country of origin,
5638 this name should then be formatted as ``De Ridder''.
5639 \item \cite{ex91} \\ \cite{ex91}\\ \fullciteA{ex91}\\ \citeA{ex91}
5640 \item \cite{ex92} \\ \cite{ex92}\\ \fullciteA{ex92}\\ \citeA{ex92}\\
5641 \EM From ex.~94 below, I deduce that the version information
5642 should be treated as an edition and not as part of the title.
5643 Therefore, in this example and ex.~94, the version is formatted
5644 in the \fieldname{edition} field:
5645 \begin{verbatim}
5646 edition = {Version~4.0\noedition\ignorespaces},
5647 \end{verbatim}
5648 using the \cmd{\noedition} command from \fname{apacdoc.sty},
5649 which temporarily redefines \cmd{\BEd} to do nothing, and
5650 \cmd{\ignorespaces}, which eats up the space that is ordinarily
5651 present between the edition number and the ``ed.\hbox{}'' string.
5652 \item \cite{ex93} \\ \cite{ex93}\\ \fullciteA{ex93}\\ \citeA{ex93}\\
5653 \EM To test the \entryname{manual} entry: \citeA{ex93-t1}.
5654 \item \cite{ex94} \\ \cite{ex94}\\ \fullciteA{ex94}\\ \citeA{ex94}\\
5655 \EM The example in the APA manual does not list a date, not even
5656 a ``n.d.\hbox{}''. Given the logic of the APA manual, this seems
5657 an error to me, so I added a ``\cmd{\bibnodate}'' in the
5658 \fieldname{year} field, which becomes ``\bibnodate'' in the
5659 output. If it would really be the rule to omit the year, then
5660 it is not clear when a year must be omitted and when not, or
5661 replaced by ``n.d.\hbox{}''. Furthermore, formatting in both
5662 the \fname{.sty} file and the \fname{.bst} file would have to
5663 be adapted to anticipate a missing year. Currently, I assume
5664 that there should always be something that acts like a date
5665 (a year, an ``in press'', or a ``n.d.\hbox{}'').
5666
5667 \EM See ex.~92 for the treatment of the version.
5668 \item \cite{ex95} \\ \cite{ex95}\\ \fullciteA{ex95}\\ \citeA{ex95}\\
5669 \EM Note that here, unlike ex.~44 and ex.~91,
5670 ``U.S.'' is omitted before ``Department of Health and Human
5671 Services''.
5672 \end{enumerate}
5673
5674
5675 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5676 \StopEventually{%
5677 \MakePercentComment
5678 %
5679 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5680 %
5681 % Change History
5682 \PrintChanges
5683 %
5684 % Redefine commands that should be different in the bibliography.
5685 \APACmanBeforeBib
5686 %
5687 % Request apacite or apacitex bibliography style
5688 % depending on whether an index option was requested or not.
5689 \bibliographystyle{\APACbibstyle}%
5690 % Include the bibliography
5691 \bibliography{apa5ex}%
5692 %
5693 % Again redefine commands.
5694 \APACmanBeforeIndex
5695 %
5696 % Include the author index if the index option is on.
5697 \printindex[autx]
5698 %
5699 % Again redefine commands.
5700 \APACmanAfterIndex
5701 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5702 \PrintIndex
5703 \MakePercentIgnore
5704 }
5705 %
5706 \MakePercentIgnore
5707 % \iffalse
5708 %</dtx>
5709 % \fi
5710 %
5711 % \clearpage
5712 % \APACcodePageLayout
5713 % \section{Implementation}
5714 % The following sections describe the source code of the various
5715 % constituent parts of \pkg{apacite}.
5716 %
5717 %
5718 % \section{\LaTeX\ package (\fname{apacite.sty})}
5719 % This is the \LaTeX\ package part of \pkg{apacite}. We start with some
5720 % comments at the top of the package to recognize borrowed code.
5721 %
5722 % \begin{macrocode}
5723 %<*package>
5724 %%
5725 %% apacite.sty : citation and reference list according to APA manual
5726 %% Written by Erik Meijer
5727 %%
5728 %% Contains code adapted from
5729 %% index.sty [1995/09/28 v4.1beta Improved index support (dmj)],
5730 %% hyperref.dtx [6.71, 2000/10/04],
5731 %% babel.def [2001/03/01, v3.7h],
5732 %% backref.dtx [1.20, 2002/06/09],
5733 %% ltbibl.dtx [2004/02/15 v1.1q LaTeX Kernel (Bibliography)],
5734 %% bibtopic.dtx [2002/08/22 v1.0k],
5735 %% multibib.dtx [2004/01/28 v1.3 Multiple bibliographies for one document.],
5736 %% multibbl.dtx [2004/07/27 v1.1],
5737 %% amsrefs.dtx [2004/06/30 v2.0]
5738 %% ltidxglo.dtx [1996/01/20 v1.1e LaTeX Kernel (Index and Glossary)]
5739 %% doc.dtx [2004/02/09 v2.1b Standard LaTeX documentation package (FMi)]
5740 %% and code (used with permission) provided by:
5741 %% Stefan Bj\"ork.
5742 %%
5743 % \end{macrocode}
5744 %
5745 % \subsection{Options}
5746 %
5747 % ^^A There does not appear to be a \cmd{\DescribeOption} command.
5748 %
5749 % \subsubsection{Backwards compatibility}
5750 %
5751 % \begin{macro}{\@year@}
5752 % The \pkg{theapa} package used the \cmd{\BCAY} command where \pkg{newapa}
5753 % used \cmd{\citeauthoryear} for the same purpose. Because the first version
5754 % of \pkg{apacite} descended from \pkg{theapa}, it used \cmd{\BCAY} as well.
5755 % However, \pkg{natbib} does not recognize \cmd{\BCAY}, but it does
5756 % recognize \cmd{\citeauthoryear}. Therefore, since
5757 % \APACversiondate{2003/09/05}, \pkg{apacite} uses \cmd{\citeauthoryear}.
5758 % Unfortunately, the construction below can only be defined for one of them.
5759 % Therefore, this is a backwards compatibility option.
5760 % \begin{macrocode}
5761 \def\@year@\citeauthoryear#1#2#3{#3} % default
5762 \DeclareOption{BCAY}{% compatibility with old .bbl files
5763 \def\@year@\BCAY#1#2#3{#3}%
5764 }
5765 % \end{macrocode}
5766 % \end{macro}
5767 %
5768 % \subsubsection{Citation}
5769 %
5770 % \begin{macro}{\if@APAC@classic@cite}
5771 % \begin{macro}{\if@APAC@natbib@emu}
5772 % \begin{macro}{\if@APAC@natbib@apa}
5773 % \begin{macro}{\if@APAC@classic@or@emu}
5774 % \begin{macro}{\if@APAC@any@natbib}
5775 % \begin{macro}{\if@APAC@anycitation}
5776 % Allow different sets of citation commands through different options,
5777 % implemented through |\if| commands that enable and disable the relevant
5778 % parts of the code. \pkgoption{apaciteclassic} is the default, but this
5779 % may change in the future.
5780 % \begin{macrocode}
5781 \newif\if@APAC@classic@cite
5782 \newif\if@APAC@natbib@emu
5783 \newif\if@APAC@natbib@apa
5784 \newif\if@APAC@classic@or@emu
5785 \newif\if@APAC@any@natbib
5786 \newif\if@APAC@anycitation
5787 \DeclareOption{apaciteclassic}{%
5788 \@APAC@classic@citetrue
5789 \@APAC@natbib@emufalse
5790 \@APAC@natbib@apafalse
5791 \@APAC@classic@or@emutrue
5792 \@APAC@any@natbibfalse
5793 \@APAC@anycitationtrue
5794 }
5795 \DeclareOption{natbibemu}{%
5796 \@APAC@classic@citefalse
5797 \@APAC@natbib@emutrue
5798 \@APAC@natbib@apafalse
5799 \@APAC@classic@or@emutrue
5800 \@APAC@any@natbibtrue
5801 \@APAC@anycitationtrue
5802 }
5803 \DeclareOption{natbibapa}{%
5804 \@APAC@classic@citefalse
5805 \@APAC@natbib@emufalse
5806 \@APAC@natbib@apatrue
5807 \@APAC@classic@or@emufalse
5808 \@APAC@any@natbibtrue
5809 \@APAC@anycitationtrue
5810 }
5811 \DeclareOption{nocitation}{%
5812 \@APAC@classic@citefalse
5813 \@APAC@natbib@emufalse
5814 \@APAC@natbib@apafalse
5815 \@APAC@classic@or@emufalse
5816 \@APAC@any@natbibfalse
5817 \@APAC@anycitationfalse
5818 }
5819 % \end{macrocode}
5820 % \end{macro}
5821 % \end{macro}
5822 % \end{macro}
5823 % \end{macro}
5824 % \end{macro}
5825 % \end{macro}
5826 %
5827 % The \pkgoption{mask} option masks citations that are flagged as
5828 % self-citations with the |\mask|-citation commands. The
5829 % \pkgoption{unmask} option (default) ignores the masking.
5830 %
5831 % \begin{macrocode}
5832 \newif\if@APAC@mask
5833 \DeclareOption{mask}{\@APAC@masktrue}
5834 \DeclareOption{unmask}{\@APAC@maskfalse}
5835 % \end{macrocode}
5836 %
5837 % \subsubsection{Bibliography}
5838 %
5839 % Various options for changing the formatting of the reference list. Most of
5840 %% ^^A \cmd{\if} somehow gives an error
5841 % these are implemented through |\if| commands, deferring the actual
5842 % implementation.
5843 % \begin{macro}{\if@numberedbib}
5844 % Should the bibliography section or chapter be numbered?
5845 % \begin{macrocode}
5846 \newif\if@numberedbib
5847 % \end{macrocode}
5848 % \end{macro}
5849 % The bibliography is a section or chapter with a number (e.g.,
5850 % section~6 or chapter~10). This does not work properly when the section or
5851 % chapter is in the backmatter.
5852 % \begin{macrocode}
5853 \DeclareOption{numberedbib}{\@numberedbibtrue}
5854 % \end{macrocode}
5855 % The bibliography is a section or chapter without a number (i.e.,
5856 % a section* or chapter*). This is the default.
5857 % \begin{macrocode}
5858 \DeclareOption{unnumberedbib}{\@numberedbibfalse}
5859 % \end{macrocode}
5860 % The next options determine whether the bibliography should be a section or
5861 % a chapter.
5862 % \begin{macro}{\if@sectionbib}
5863 % \begin{macro}{\if@sectionbibdefault}
5864 % With the \pkgoption{sectionbib} option, the bibliography is a section. This
5865 % is typically used with the \pkg{chapterbib} package; then each chapter has a
5866 % bibliography section. The \pkgoption{nosectionbib} option makes the
5867 % bibliography a chapter (if chapters are defined). If none of these options
5868 % are requested, \pkg{apacite} tries to guess the most logical choice. The
5869 % bibliography is a section if chapters are not defined or if we are in the
5870 % ``mainmatter'' of a document. Otherwise, i.e., in the ``backmatter'' of a
5871 % document that has chapters, it is a chapter. |\if@sectionbibdefault|
5872 % registers whether the default should be used (neither
5873 % \pkgoption{sectionbib} nor \pkgoption{nosectionbib} chosen) and if
5874 % the default is not used, |\if@sectionbib| registers which option was
5875 % chosen.
5876 % \begin{macrocode}
5877 \newif\if@sectionbib
5878 \newif\if@sectionbibdefault
5879 \@sectionbibfalse
5880 \@sectionbibdefaulttrue
5881 \DeclareOption{sectionbib}{%
5882 \@sectionbibdefaultfalse
5883 \@sectionbibtrue
5884 }
5885 \DeclareOption{nosectionbib}{%
5886 \@sectionbibdefaultfalse
5887 \@sectionbibfalse
5888 }
5889 % \end{macrocode}
5890 % \end{macro}
5891 % \end{macro}
5892 %
5893 % \begin{macro}{\if@tocbib}
5894 % These options determine whether the bibliography should be in the table of
5895 % contents.
5896 % \begin{macrocode}
5897 \newif\if@tocbib
5898 % \end{macrocode}
5899 % The bibliography in the table of contents, even if it's unnumbered. This is
5900 % the default.
5901 % \begin{macrocode}
5902 \DeclareOption{tocbib}{\@tocbibtrue}
5903 % \end{macrocode}
5904 % The bibliography not in the table of contents if it's unnumbered. This is
5905 % ignored if it's numbered.
5906 % \begin{macrocode}
5907 \DeclareOption{notocbib}{\@tocbibfalse}
5908 % \end{macrocode}
5909 % \end{macro}
5910 %
5911 % \begin{macro}{\@bibnewpage}
5912 % Start the bibliography on a new page? This is ignored if it's a chapter.
5913 % \begin{macrocode}
5914 \DeclareOption{bibnewpage}{\def\@bibnewpage{\bibnewpage}}
5915 \DeclareOption{nobibnewpage}{\let\@bibnewpage\relax}
5916 % \end{macrocode}
5917 % \end{macro}
5918 %
5919 % \begin{macro}{\if@doi}
5920 % Should DOI information be printed in the reference list?
5921 % \begin{macrocode}
5922 \newif\if@doi
5923 \DeclareOption{doi}{\@doitrue}
5924 \DeclareOption{nodoi}{\@doifalse}
5925 % \end{macrocode}
5926 % \end{macro}
5927 %
5928 % \subsubsection{Author indexing}
5929 %
5930 % \begin{macro}{\if@APAC@index}
5931 % No author index.
5932 %% ^^A \cmd{\if} somehow gives an error
5933 % The |\if| is necessary because packages can not be required here, so
5934 % we must handle the consequences of the \pkgoption{index} and
5935 % \pkgoption{noindex} options later.
5936 % \begin{macrocode}
5937 \newif\if@APAC@index
5938 \DeclareOption{noindex}{\@APAC@indexfalse}%
5939 % \end{macrocode}
5940 % \end{macro}
5941 %
5942 % Request author index.
5943 % \begin{macrocode}
5944 \DeclareOption{index}{\@APAC@indextrue}%
5945 % \end{macrocode}
5946 %
5947 % \begin{macro}{\if@APAC@include@corporate}
5948 % Include corporate authors in index?
5949 %% ^^A \cmd{\if} somehow gives an error
5950 % Use an |\if| here, the real definitions are handled within the index
5951 % options.
5952 % \begin{macrocode}
5953 \newif\if@APAC@include@corporate
5954 \DeclareOption{includecorporate}{\@APAC@include@corporatetrue}%
5955 \DeclareOption{suppresscorporate}{\@APAC@include@corporatefalse}%
5956 % \end{macrocode}
5957 % \end{macro}
5958 %
5959 % \begin{macro}{\if@APAC@index@package}
5960 % Use \pkg{index} package or standard \LaTeX\ index? Again, we only define the
5961 % boolean.
5962 % \begin{macrocode}
5963 \newif\if@APAC@index@package
5964 \DeclareOption{indexpackage}{\@APAC@index@packagetrue}%
5965 \DeclareOption{noindexpackage}{\@APAC@index@packagefalse}%
5966 % \end{macrocode}
5967 % \end{macro}
5968 %
5969 % \begin{environment}{index}
5970 % Some options for changing the \envirname{index} environment. The actual
5971 % definitions are done through macros below; here these macros are used.
5972 %
5973 % The first option uses the definition from the \pkg{index} package
5974 % |[1995/09/28 v4.1beta Improved index support (dmj)]|,
5975 % which is the same code as in |(v3.02, 15 September 1993)|,
5976 % i.e., without table of contents entry.
5977 % \begin{macrocode}
5978 \DeclareOption{stdindex}{%
5979 \ExecuteOptions{index}% Request author index
5980 \ExecuteOptions{indexpackage}% This option requires the index package
5981 \AtEndOfPackage{\APACstdindex}% index environment as in index package
5982 }%
5983 % \end{macrocode}
5984 % The next option adds a table of contents entry to the standard index.
5985 % \begin{macrocode}
5986 \DeclareOption{tocindex}{%
5987 \ExecuteOptions{index}% Request author index
5988 \ExecuteOptions{indexpackage}% This option requires the index package
5989 \AtEndOfPackage{\APACtocindex}% index environment as in index package
5990 %% with toc entry added
5991 }%
5992 % \end{macrocode}
5993 % This option defines my (EM) own favorite index style. Maybe you like it too.
5994 % \begin{macrocode}
5995 \DeclareOption{emindex}{%
5996 \ExecuteOptions{index}% Request author index
5997 \ExecuteOptions{indexpackage}% This option requires the index package
5998 \AtEndOfPackage{\APACemindex}% EM's index environment (see below)
5999 }%
6000 % \end{macrocode}
6001 % The next option is a variation on the \pkgoption{emindex} option, but uses
6002 % standard \LaTeX\ code (adapted from the \pkg{ltxdoc} class) instead of the
6003 % the \pkg{index} package to support multiple indexes.
6004 % \begin{macrocode}
6005 \DeclareOption{ltxemindex}{%
6006 \ExecuteOptions{index}% Request author index
6007 \ExecuteOptions{noindexpackage}% Don't use the index package
6008 \AtEndOfPackage{\APACltxemindex}% EM's index environment without the index
6009 %% package (see below)
6010 }
6011 % \end{macrocode}
6012 % \end{environment}
6013 %
6014 % \subsubsection{Obsolete compatibility options}
6015 %
6016 % For compatibility with older versions of \pkg{apacite}.
6017 % \begin{macrocode}
6018 \DeclareOption{hyper}{%
6019 \PackageWarningNoLine{apacite}{Obsolete option `hyper' ignored}%
6020 }
6021 \DeclareOption{nohyper}{%
6022 \PackageWarningNoLine{apacite}{Obsolete option `nohyper' ignored}%
6023 }
6024 \DeclareOption{accentfix}{%
6025 \PackageWarningNoLine{apacite}{Obsolete option `accentfix' ignored}%
6026 }
6027 \DeclareOption{noaccentfix}{%
6028 \PackageWarningNoLine{apacite}{Obsolete option `noaccentfix' ignored}%
6029 }
6030 % \end{macrocode}
6031 %
6032 % \subsection{Option processing}
6033 %
6034 % Execute default options.
6035 % \begin{macrocode}
6036 \ExecuteOptions{apaciteclassic,noindex,indexpackage,unnumberedbib,tocbib,%
6037 nobibnewpage,suppresscorporate,doi,unmask}
6038 % \end{macrocode}
6039 % Execute user-requested options.
6040 % \begin{macrocode}
6041 \ProcessOptions
6042 % \end{macrocode}
6043 %
6044 % \subsection{Citation commands}
6045 %
6046 % \begin{macro}{\citeauthoryear}
6047 % The \cmd{\citeauthoryear} command is defined within the citation commands,
6048 % but some packages (\pkg{splitbib}, \pkg{bibentry}) choke if it has not
6049 % been defined. Therefore, we start with defining it to do nothing. However,
6050 % \pkg{natbib} defines this with a \cmd{\newcommand}, so if \pkg{natbib} is
6051 % loaded after \pkg{apacite}, defining it here would give an error. Therefore,
6052 % we postpone this to |\begin{document}| and only initialize it then if it
6053 % hasn't been defined before.
6054 % \begin{macrocode}
6055 \AtBeginDocument{%
6056 \@ifundefined{citeauthoryear}{\def\citeauthoryear#1#2#3{}}{}%
6057 }
6058 % \end{macrocode}
6059 % \end{macro}
6060 %
6061 % \begin{macro}{\themaskedRefs}
6062 % A counter for the number of masked citations, which should be
6063 % defined for all the citation options.
6064 % This construction ensures that there is no conflict if the
6065 % |maskedRefs| counter has already been defined (in \fname{apa6.cls}).
6066 % \begin{macrocode}
6067 \AtBeginDocument{%
6068 \@ifundefined{themaskedRefs}{\newcounter{maskedRefs}}{}}
6069 % \end{macrocode}
6070 % \end{macro}
6071 %
6072 % \subsubsection{Shared code between the \pkgoption{apaciteclassic} and
6073 % \pkgoption{natbibemu} options}
6074 %
6075 % Define a few |\if|s outside the main |\if|, because \TeX{} otherwise
6076 % chokes.
6077 % \begin{macro}{\if@F@cite}
6078 % First citation in a multi-citation.
6079 % \begin{macrocode}
6080 \newif\if@F@cite\@F@citetrue
6081 % \end{macrocode}
6082 % \end{macro}
6083 %
6084 % \begin{macro}{\if@A@cite}
6085 % \begin{macro}{\if@Y@cite}
6086 % Two flags to denote whether only the author or only the year must be cited
6087 % or both.
6088 % \begin{macrocode}
6089 \newif\if@A@cite\@A@citefalse
6090 \newif\if@Y@cite\@Y@citefalse
6091 % \end{macrocode}
6092 % \end{macro}
6093 % \end{macro}
6094 %
6095 % \begin{macrocode}
6096 \if@APAC@classic@or@emu
6097 % \end{macrocode}
6098 %
6099 % \begin{macro}{\nocite}
6100 % This induces an entry in the reference list, but not in the text. It is
6101 % also called by the other citation commands to handle some bookkeeping.
6102 % \begin{macrocode}
6103 \def\nocite#1{%
6104 % \end{macrocode}
6105 % No flag-setting in \cmd{\nocite}: a no-cite is not a citation, so a
6106 % subsequent citation may be the first one.
6107 % \begin{macrocode}
6108 \@bsphack
6109 \ifx\@onlypreamble\document
6110 % \end{macrocode}
6111 % We are after |\begin{document}|, so we can do the citations.
6112 % \begin{macrocode}
6113 \@for\@citeb:=#1\do{%
6114 \edef\@citeb{\expandafter\@firstofone\@citeb}%
6115 % \end{macrocode}
6116 % The \cmd{\@newciteauxhandle} is for compatibility with \pkg{multibib}.
6117 % \begin{macrocode}
6118 \if@filesw
6119 \immediate\write\@newciteauxhandle{\string\citation{\@citeb}}%
6120 \fi
6121 \@ifundefined{b@\@citeb\APAC@extra@b@citeb}{%
6122 % \end{macrocode}
6123 % Check for |\nocite{*}|.
6124 % \begin{macrocode}
6125 \edef\B@my@dummy{*}%
6126 \ifx\@citeb\B@my@dummy
6127 \else
6128 \G@refundefinedtrue
6129 \@latex@warning{Citation `\@citeb' undefined}%
6130 \fi
6131 }{}%
6132 }%
6133 \else
6134 % \end{macrocode}
6135 % \pkg{apacite} has no compatibility problems with \LaTeX~2.09, because it
6136 % does not work with \LaTeX~2.09 anyway, so we can do the following,
6137 % suggested in \fname{ltbibl.dtx}:
6138 % \begin{macrocode}
6139 \AtBeginDocument{\nocite{#1}}%
6140 \fi
6141 \@esphack
6142 % \end{macrocode}
6143 % For compatibility with \pkg{multibib}.
6144 % \begin{macrocode}
6145 \@restore@auxhandle
6146 }
6147 % \end{macrocode}
6148 % \end{macro}
6149 %
6150 % \begin{macro}{\B@my@dummy}
6151 % This needs to be initialized to avoid errors with \pkg{tex4ht}.
6152 % \begin{macrocode}
6153 \global\def\B@my@dummy{*}%
6154 % \end{macrocode}
6155 % \end{macro}
6156 %
6157 % \begin{macro}{\@ifauthorsequalc@de}
6158 % Code to be executed if current author(s) equal(s) previous.
6159 % \begin{macrocode}
6160 \def\@ifauthorsequalc@de#1{%
6161 \if@F@cite
6162 \@F@citefalse
6163 \else
6164 \if@Y@cite
6165 {\@BBY}%
6166 \fi
6167 \fi
6168 \if@Y@cite
6169 \hyper@natlinkstart{#1}%
6170 {\csname Y@\@citeb\APAC@extra@b@citeb\endcsname}%
6171 \hyper@natlinkend
6172 \fi
6173 }
6174 % \end{macrocode}
6175 % \end{macro}
6176 %
6177 % \begin{macro}{\@ifauthorsunequalc@de}
6178 % Code to be executed if current author(s) do(es) not equal previous.
6179 % \begin{macrocode}
6180 \def\@ifauthorsunequalc@de#1{%
6181 \if@F@cite
6182 \@F@citefalse
6183 \else
6184 \if@Y@cite
6185 {\@BAY}%
6186 \fi
6187 {\@BBC}%
6188 \fi
6189 \edef\@cite@undefined{?}%
6190 \def\BBA{\@BBA}%
6191 \if@A@cite
6192 \hyper@natlinkstart{#1}%
6193 {\csname b@\@citeb\APAC@extra@b@citeb\endcsname}%
6194 \hyper@natlinkend
6195 \if@Y@cite
6196 {\@BBAY}%
6197 \fi
6198 \fi
6199 \if@Y@cite
6200 \hyper@natlinkstart{#1}%
6201 {\csname Y@\@citeb\APAC@extra@b@citeb\endcsname}%
6202 \hyper@natlinkend
6203 \fi
6204 \let\BBA\relax
6205 }
6206 % \end{macrocode}
6207 % \end{macro}
6208 %
6209 % End of shared code.
6210 % \begin{macrocode}
6211 \fi
6212 % \end{macrocode}
6213 %
6214 % \subsubsection{\pkg{apacite} ``classic'' commands}
6215 %
6216 % This defines the citation commands and syntax with angled brackets that
6217 % have traditionally been used by \pkg{apacite}.
6218 % \begin{macrocode}
6219 \if@APAC@classic@cite
6220 % \end{macrocode}
6221 %
6222 % \begin{macro}{\cite}
6223 % \begin{macro}{\fullcite}
6224 % \begin{macro}{\shortcite}
6225 % Parenthetical citation commands.
6226 % \begin{macrocode}
6227 \def\cite{%
6228 \def\BCAY##1##2##3{\BCA{##1}{##2}}% kept for compat. with prev. versions
6229 \def\citeauthoryear##1##2##3{\BCA{##1}{##2}}%
6230 \def\@BBOP{\BBOP}% % open parenthesis
6231 \def\@BBCP{\BBCP}% % close parenthesis
6232 \@ifnextchar<% % >
6233 {\@cite}%
6234 {\@cite<>}%
6235 }
6236 \def\fullcite{%
6237 \def\BCAY##1##2##3{\BCA{##1}{##1}}% kept for compat. with prev. versions
6238 \def\citeauthoryear##1##2##3{\BCA{##1}{##1}}%
6239 \def\@BBOP{\BBOP}% % open parenthesis
6240 \def\@BBCP{\BBCP}% % close parenthesis
6241 \@ifnextchar<% % >
6242 {\@cite}%
6243 {\@cite<>}%
6244 }
6245 \def\shortcite{%
6246 \def\BCAY##1##2##3{\BCA{##2}{##2}}% kept for compat. with prev. versions
6247 \def\citeauthoryear##1##2##3{\BCA{##2}{##2}}%
6248 \def\@BBOP{\BBOP}% % open parenthesis
6249 \def\@BBCP{\BBCP}% % close parenthesis
6250 \@ifnextchar<% % >
6251 {\@cite}%
6252 {\@cite<>}%
6253 }
6254 % \end{macrocode}
6255 % \end{macro}
6256 % \end{macro}
6257 % \end{macro}
6258 %
6259 % \begin{macro}{\citeNP}
6260 % \begin{macro}{\fullciteNP}
6261 % \begin{macro}{\shortciteNP}
6262 % Parenthetical citation commands, but without the actual parentheses.
6263 % \begin{macrocode}
6264 \def\citeNP{%
6265 \def\BCAY##1##2##3{\BCA{##1}{##2}}% kept for compat. with prev. versions
6266 \def\citeauthoryear##1##2##3{\BCA{##1}{##2}}%
6267 \def\@BBOP{}% % open parenthesis
6268 \def\@BBCP{}% % close parenthesis
6269 \@ifnextchar<%% >
6270 {\@cite}%
6271 {\@cite<>}%
6272 }
6273 \def\fullciteNP{%
6274 \def\BCAY##1##2##3{\BCA{##1}{##1}}% kept for compat. with prev. versions
6275 \def\citeauthoryear##1##2##3{\BCA{##1}{##1}}%
6276 \def\@BBOP{}% % open parenthesis
6277 \def\@BBCP{}% % close parenthesis
6278 \@ifnextchar<%% >
6279 {\@cite}%
6280 {\@cite<>}%
6281 }
6282 \def\shortciteNP{%
6283 \def\BCAY##1##2##3{\BCA{##2}{##2}}% kept for compat. with prev. versions
6284 \def\citeauthoryear##1##2##3{\BCA{##2}{##2}}%
6285 \def\@BBOP{}% % open parenthesis
6286 \def\@BBCP{}% % close parenthesis
6287 \@ifnextchar<%% >
6288 {\@cite}%
6289 {\@cite<>}%
6290 }
6291 % \end{macrocode}
6292 % \end{macro}
6293 % \end{macro}
6294 % \end{macro}
6295 %
6296 % \begin{macro}{\@cite}
6297 % Second layer of the parenthetical and NP citation commands.
6298 % \begin{macrocode}
6299 \def\@cite<#1>{%
6300 \def\@BAP{\BAP}% % after precitation [=#1] before first citation
6301 \def\@BBA{\BBAA}% % `and' between authors
6302 \def\@BBAY{\BBAY}% % between author and year
6303 \def\@BAY{}% % after year
6304 \def\@BBY{\BBYY}% % between years of multiple citations with same author
6305 \def\@BBC{\BBC}% % between cites
6306 \def\@BBN{\BBN}% % after last citation before note/postcitation [=#2]
6307 \def\@BAstyle{\BAstyle}% text style of authors
6308 \@A@citetrue% % cite authors
6309 \@Y@citetrue% % cite years
6310 \@ifnextchar[% % ]
6311 {\@@cite<#1>}%
6312 {\@@cite<#1>[]}%
6313 }
6314 % \end{macrocode}
6315 % \end{macro}
6316 %
6317 % \begin{macro}{\citeA}
6318 % \begin{macro}{\fullciteA}
6319 % \begin{macro}{\shortciteA}
6320 % In-text citation commands.
6321 % \begin{macrocode}
6322 \def\citeA{%
6323 \def\BCAY##1##2##3{\BCA{##1}{##2}}% kept for compat. with prev. versions
6324 \def\citeauthoryear##1##2##3{\BCA{##1}{##2}}%
6325 \@ifnextchar<% %>
6326 {\@citeA}%
6327 {\@citeA<>}%
6328 }
6329 \def\fullciteA{%
6330 \def\BCAY##1##2##3{\BCA{##1}{##1}}% kept for compat. with prev. versions
6331 \def\citeauthoryear##1##2##3{\BCA{##1}{##1}}%
6332 \@ifnextchar<% %>
6333 {\@citeA}%
6334 {\@citeA<>}%
6335 }
6336 \def\shortciteA{%
6337 \def\BCAY##1##2##3{\BCA{##2}{##2}}% kept for compat. with prev. versions
6338 \def\citeauthoryear##1##2##3{\BCA{##2}{##2}}%
6339 \@ifnextchar<% %>
6340 {\@citeA}%
6341 {\@citeA<>}%
6342 }
6343 % \end{macrocode}
6344 % \end{macro}
6345 % \end{macro}
6346 % \end{macro}
6347 %
6348 % \begin{macro}{\@citeA}
6349 % Second layer of in-text citation commands.
6350 % \begin{macrocode}
6351 \def\@citeA<#1>{%
6352 \def\@BBOP{}% % open parenthesis.
6353 \def\@BAP{\BAP}% % after precitation [=#1] before first citation
6354 \def\@BBA{\BBAB}% % `and' between authors
6355 \def\@BBAY{ \BBOP}%% between author and year
6356 \def\@BAY{\BBCP}% % after year
6357 \def\@BBY{\BBYY}% % between years of multiple citations with same author
6358 \def\@BBC{\BBC}% % between cites
6359 \def\@BBN{\BBN}% % after last citation before note/postcitation [=#2]
6360 \def\@BBCP{}% % close parenthesis
6361 \def\@BAstyle{\BAstyle}% text style of authors
6362 \@A@citetrue% % cite authors
6363 \@Y@citetrue% % cite years
6364 \@ifnextchar[% % ]
6365 {\@@cite<#1>}%
6366 {\@@cite<#1>[]}%
6367 }
6368 % \end{macrocode}
6369 % \end{macro}
6370 %
6371 % \begin{macro}{\citeauthor}
6372 % \begin{macro}{\fullciteauthor}
6373 % \begin{macro}{\shortciteauthor}
6374 % \begin{macro}{\citeauthorNP}
6375 % \begin{macro}{\fullciteauthorNP}
6376 % \begin{macro}{\shortciteauthorNP}
6377 % Commands that only cite the author, for parenthetical and in-text citations,
6378 % the difference being that `\&' is used in the parenthetical versions,
6379 % whereas the in-text versions use `and' between the authors. Note that all
6380 % are without parentheses; \cmd{\citeauthorA} would be a better name for
6381 % \cmd{\citeauthor} to clarify its role (cf.~\cmd{\citeA}, \cmd{\cite}, and
6382 % \cmd{\citeNP}), but for backwards compatibility and compatibility with
6383 % some other citation packages, it is \cmd{\citeauthor}.
6384 % \begin{macrocode}
6385 \def\citeauthor{%
6386 \def\BCAY##1##2##3{\BCA{##1}{##2}}% kept for compat. with prev. versions
6387 \def\citeauthoryear##1##2##3{\BCA{##1}{##2}}%
6388 \@ifnextchar<% %>
6389 {\@citeauthor}%
6390 {\@citeauthor<>}%
6391 }
6392 \def\fullciteauthor{%
6393 \def\BCAY##1##2##3{\BCA{##1}{##1}}% kept for compat. with prev. versions
6394 \def\citeauthoryear##1##2##3{\BCA{##1}{##1}}%
6395 \@ifnextchar<% %>
6396 {\@citeauthor}%
6397 {\@citeauthor<>}%
6398 }
6399 \def\shortciteauthor{%
6400 \def\BCAY##1##2##3{\BCA{##2}{##2}}% kept for compat. with prev. versions
6401 \def\citeauthoryear##1##2##3{\BCA{##2}{##2}}%
6402 \@ifnextchar<% %>
6403 {\@citeauthor}%
6404 {\@citeauthor<>}%
6405 }
6406 \def\citeauthorNP{%
6407 \def\BCAY##1##2##3{\BCA{##1}{##2}}% kept for compat. with prev. versions
6408 \def\citeauthoryear##1##2##3{\BCA{##1}{##2}}%
6409 \@ifnextchar<% %>
6410 {\@citeauthorNP}%
6411 {\@citeauthorNP<>}%
6412 }
6413 \def\fullciteauthorA{%
6414 \def\BCAY##1##2##3{\BCA{##1}{##1}}% kept for compat. with prev. versions
6415 \def\citeauthoryear##1##2##3{\BCA{##1}{##1}}%
6416 \@ifnextchar<% %>
6417 {\@citeauthorNP}%
6418 {\@citeauthorNP<>}%
6419 }
6420 \def\shortciteauthorA{%
6421 \def\BCAY##1##2##3{\BCA{##2}{##2}}% kept for compat. with prev. versions
6422 \def\citeauthoryear##1##2##3{\BCA{##2}{##2}}%
6423 \@ifnextchar<% %>
6424 {\@citeauthorNP}%
6425 {\@citeauthorNP<>}%
6426 }
6427 % \end{macrocode}
6428 % \end{macro}
6429 % \end{macro}
6430 % \end{macro}
6431 % \end{macro}
6432 % \end{macro}
6433 % \end{macro}
6434 %
6435 % \begin{macro}{\@citeauthor}
6436 % \begin{macro}{\@citeauthorNP}
6437 % Second layer of the author citation commands.
6438 % \begin{macrocode}
6439 \def\@citeauthor<#1>{%
6440 \def\@BBOP{}% % open parenthesis
6441 \def\@BAP{\BAP}% % after precitation [=#1] before first citation
6442 \def\@BBA{\BBAB}% % `and' between authors
6443 \def\@BBAY{}% % between author and year
6444 \def\@BAY{}% % after year
6445 \def\@BBY{}% % between years of multiple citations with same author
6446 \def\@BBC{\BBC}% % between cites
6447 \def\@BBN{\BBN}% % after last citation before note/postcitation [=#2]
6448 \def\@BBCP{}% % close parenthesis
6449 \def\@BAstyle{\BAastyle}% text style of authors
6450 \@A@citetrue% % cite authors
6451 \@Y@citefalse% % do not cite years
6452 \@ifnextchar[% % ]
6453 {\@@cite<#1>}%
6454 {\@@cite<#1>[]}%
6455 }
6456 \def\@citeauthorNP<#1>{%
6457 \def\@BBOP{}% % open parenthesis
6458 \def\@BAP{\BAP}% % after precitation [=#1] before first citation
6459 \def\@BBA{\BBAA}% % `and' between authors
6460 \def\@BBAY{}% % between author and year
6461 \def\@BAY{}% % after year
6462 \def\@BBY{}% % between years of multiple citations with same author
6463 \def\@BBC{\BBC}% % between cites
6464 \def\@BBN{\BBN}% % after last citation before note/postcitation [=#2]
6465 \def\@BBCP{}% % close parenthesis
6466 \def\@BAstyle{\BAastyle}% text style of authors
6467 \@A@citetrue% % cite authors
6468 \@Y@citefalse% % do not cite years
6469 \@ifnextchar[% % ]
6470 {\@@cite<#1>}%
6471 {\@@cite<#1>[]}%
6472 }
6473 % \end{macrocode}
6474 % \end{macro}
6475 % \end{macro}
6476 %
6477 % \begin{macro}{\citeyear}
6478 % \begin{macro}{\citeyearNP}
6479 % Cite only the year; parenthetical and without parentheses.
6480 % \begin{macrocode}
6481 \def\citeyear{%
6482 \def\BCAY##1##2##3{\BCA{##1}{##2}}% kept for compat. with prev. versions
6483 \def\citeauthoryear##1##2##3{\BCA{##1}{##2}}%
6484 \def\@BBOP{\BBOP}% % open parenthesis
6485 \def\@BBCP{\BBCP}% % close parenthesis
6486 \@ifnextchar<% % >
6487 {\@citeyear}%
6488 {\@citeyear<>}%
6489 }
6490 \def\citeyearNP{%
6491 \def\BCAY##1##2##3{\BCA{##1}{##2}}% kept for compat. with prev. versions
6492 \def\citeauthoryear##1##2##3{\BCA{##1}{##2}}%
6493 \def\@BBOP{}% % open parenthesis
6494 \def\@BBCP{}% % close parenthesis
6495 \@ifnextchar<% % >
6496 {\@citeyear}%
6497 {\@citeyear<>}%
6498 }
6499 % \end{macrocode}
6500 % \end{macro}
6501 % \end{macro}
6502 %
6503 % \begin{macro}{\@citeyear}
6504 % Second layer of the year citation commands.
6505 % \begin{macrocode}
6506 \def\@citeyear<#1>{%
6507 \def\@BAP{\BAP}% % after precitation [=#1] before first citation
6508 \def\@BBA{}% % `and' between authors
6509 \def\@BBAY{}% % between author and year
6510 \def\@BAY{}% % after year
6511 \def\@BBY{\BBYY}% % between years of multiple citations with same author
6512 \def\@BBC{\BBC}% % between cites
6513 \def\@BBN{\BBN}% % after last citation before note/postcitation [=#2]
6514 \def\@BAstyle{}% % text style of authors
6515 \@A@citefalse% % do not cite authors
6516 \@Y@citetrue% % cite years
6517 \@ifnextchar[% % ]
6518 {\@@cite<#1>}%
6519 {\@@cite<#1>[]}%
6520 }
6521 % \end{macrocode}
6522 % \end{macro}
6523 %
6524 % We are now arriving at the core citation routines. The following commands
6525 % must have been defined:\\
6526 % \begin{tabular}{@{\qquad}ll@{}}
6527 % \cmd{\@BBOP} & open parenthesis \\
6528 % \cmd{\@BAP} & after precitation before first citation \\
6529 % \cmd{\@BBA} & `and' between authors \\
6530 % \cmd{\@BBAY} & between author and year \\
6531 % \cmd{\@BAY} & after year \\
6532 % \cmd{\@BBY} & between years of multiple citations with same author \\
6533 % \cmd{\@BBC} & between cites \\
6534 % \cmd{\@BBN} & after last citation before note/postcitation \\
6535 % \cmd{\@BBCP} & close parenthesis \\
6536 % \cmd{\@BAstyle} & formatting style of authors (e.g., \cmd{\scshape})
6537 % \end{tabular}
6538 %
6539 % \begin{macro}{\@@cite}
6540 % The core citation command. Standard \LaTeX{} and other packages use
6541 % \cmd{\@citex} for this. It may be useful to change this as well, to increase
6542 % the likelihood of compatibility with some packages.
6543 % \begin{macrocode}
6544 \def\@@cite<#1>[#2]#3{%
6545 % \end{macrocode}
6546 % Write citation(s) to .aux file(s)
6547 % \begin{macrocode}
6548 \nocite{#3}%
6549 % \end{macrocode}
6550 % The previous cite, for multiple citations with same author.
6551 % \begin{macrocode}
6552 \edef\@citeP{}%
6553 % \end{macrocode}
6554 % Open parenthesis and pre-note. The \cmd{\mbox} is to avoid \pkg{hyperref}
6555 % problems if a \cmd{\citeA} follows an \cmd{\item}.
6556 % \begin{macrocode}
6557 \mbox{\@BBOP}%
6558 \ifx\@empty#1\@empty
6559 \else%
6560 {\ignorespaces #1\@BAP}%
6561 \fi%
6562 % \end{macrocode}
6563 % Loop over citation entries
6564 % \begin{macrocode}
6565 \@for\@citeb:=#3\do{%
6566 % \end{macrocode}
6567 % Removes a possible space before the citation key, so that, e.g.,
6568 % \verb*+\cite{key1, key2}+ can be done.
6569 % \begin{macrocode}
6570 \edef\@citeb{\expandafter\@firstofone\@citeb}%
6571 % \end{macrocode}
6572 % For \pkg{backref}.
6573 % \begin{macrocode}
6574 \back@cite{\@citeb}%
6575 % \end{macrocode}
6576 % Check whether the citation is defined.
6577 % \begin{macrocode}
6578 \@ifundefined{b@\@citeb\APAC@extra@b@citeb}%
6579 {\expandafter\def\csname b@\@citeb\APAC@extra@b@citeb\endcsname{?}%
6580 \expandafter\def\csname Y@\@citeb\APAC@extra@b@citeb\endcsname{?}%
6581 %% The following is now handled by \nocite
6582 %% \G@refundefinedtrue
6583 %% \@latex@warning{Citation `\@citeb' undefined}%
6584 }%%
6585 % \end{macrocode}
6586 % If the citation is defined, check whether the flag has been set that
6587 % identifies that this is not the first citation to the work. If this
6588 % flag has not been set, it will be set to |DUMMY|. If this is the first
6589 % citation to the work, the full citation is used; else the short version
6590 % is used.
6591 % \begin{macrocode}
6592 {\@ifundefined{flag@\@citeb\APAC@extra@b@citeb}%
6593 {\global\expandafter
6594 \def\csname flag@\@citeb\APAC@extra@b@citeb\endcsname{DUMMY}%
6595 \def\BCA##1##2{{\@BAstyle ##1}}%
6596 }%
6597 {\def\BCA##1##2{{\@BAstyle ##2}}%
6598 }%
6599 }%
6600 % \end{macrocode}
6601 % Check whether the current author(s) is (are) equivalent to the
6602 % previous. If so, only the year is cited in the text and a \cmd{\@BBY}
6603 % (probably comma and space) is inserted between the two years. The
6604 % \cmd{\protected@edef} fixes the problem with authors with accents
6605 % (e.g., J{\"{o}}reskog). Older versions of \pkg{apacite} solved this
6606 % less elegantly (\pkgoption{accentfix} option). This fix was provided by
6607 % Robert Schlicht. See also the new definition of \cmd{\@citeP} below.
6608 % \begin{macrocode}
6609 \protected@edef\B@my@dummy{\csname
6610 b@\@citeb\APAC@extra@b@citeb\endcsname}%
6611 \ifx\@citeP\B@my@dummy
6612 \@ifauthorsequalc@de{\@citeb\APAC@extra@b@citeb}%
6613 \else
6614 \@ifauthorsunequalc@de{\@citeb\APAC@extra@b@citeb}%
6615 \fi
6616 % \end{macrocode}
6617 % Store the current author(s) for comparison in the next citation (if
6618 % any).
6619 % \begin{macrocode}
6620 \protected@edef\@citeP{\csname b@\@citeb\APAC@extra@b@citeb\endcsname}%
6621 \let\BCA\relax
6622 }%%
6623 % \end{macrocode}
6624 % End of the loop over citation entries. Add the post-note and closing
6625 % parenthesis.
6626 % \begin{macrocode}
6627 \ifx\@empty#2\@empty
6628 \else%
6629 {\@BBN #2}%
6630 \fi%
6631 \if@Y@cite%
6632 {\@BAY}%
6633 \fi%
6634 {\@BBCP}%
6635 % \end{macrocode}
6636 % We're finished with this citation command. Initialize for the next
6637 % \cmd{\@@cite} call.
6638 % \begin{macrocode}
6639 \@F@citetrue %
6640 }
6641 % \end{macrocode}
6642 % \end{macro}
6643 %
6644 % \begin{macro}{\maskcitations}
6645 % \begin{macro}{\unmaskcitations}
6646 % \begin{macro}{\masknocite}
6647 % \begin{macro}{\maskcite}
6648 % \begin{macro}{\maskfullcite}
6649 % \begin{macro}{\maskshortcite}
6650 % \begin{macro}{\maskciteNP}
6651 % \begin{macro}{\maskfullciteNP}
6652 % \begin{macro}{\maskshortciteNP}
6653 % \begin{macro}{\maskciteA}
6654 % \begin{macro}{\maskfullciteA}
6655 % \begin{macro}{\maskshortciteA}
6656 % \begin{macro}{\maskciteauthor}
6657 % \begin{macro}{\maskfullciteauthor}
6658 % \begin{macro}{\maskshortciteauthor}
6659 % \begin{macro}{\maskciteauthorNP}
6660 % \begin{macro}{\maskfullciteauthorNP}
6661 % \begin{macro}{\maskshortciteauthorNP}
6662 % \begin{macro}{\maskciteyear}
6663 % \begin{macro}{\maskciteyearNP}
6664 % \begin{macro}{\masktext}
6665 % These commands allow masking of (self-)citations for a masked
6666 % review.
6667 % The \cmd{maskcitations} command defines the masked citation commands;
6668 % \cmd{unmaskcitations} does the same, but lets them be equal to the
6669 % non-mask versions. The advantage of putting these definitions within
6670 % a command is that we can switch between masked and unmasked within
6671 % the same document. This is not likely to be used very often in
6672 % practice, but is useful for writing tutorials.
6673 % \begin{macrocode}
6674 \newcommand{\maskcitations}{%
6675 \def\masknocite##1{}%
6676 \def\maskcite{%
6677 \@ifnextchar<% % >
6678 {\mask@cite}%
6679 {\mask@cite<>}%
6680 }%
6681 \def\mask@cite<##1>{%
6682 \@ifnextchar[% % ]
6683 {\mask@@cite<##1>}%
6684 {\mask@@cite<##1>[]}%
6685 }%
6686 \def\mask@@cite<##1>[##2]##3{%
6687 \relax
6688 % \end{macrocode}
6689 % Count number of masked references.
6690 % \begin{macrocode}
6691 \setcounter{maskedRefs}{0}%
6692 \@for\@citeb:=##3\do{%
6693 \addtocounter{maskedRefs}{1}%
6694 }%
6695 \ifnum\value{maskedRefs} = 1%
6696 \onemaskedcitationmsg{\themaskedRefs}%
6697 \else
6698 \maskedcitationsmsg{\themaskedRefs}%
6699 \fi
6700 }%
6701 % \end{macrocode}
6702 % Let all other citation commands be identical to \cmd{\maskcite}.
6703 % We could try to do fancy things with parentheses, but it's unlikely
6704 % we will be able to cover all cases of interest, and users can easily
6705 % change their document if they don't like how this comes out.
6706 % \begin{macrocode}
6707 \let\maskfullcite\maskcite
6708 \let\maskshortcite\maskcite
6709 \let\maskciteNP\maskcite
6710 \let\maskfullciteNP\maskciteNP
6711 \let\maskshortciteNP\maskciteNP
6712 \let\maskciteA\maskcite
6713 \let\maskfullciteA\maskciteA
6714 \let\maskshortciteA\maskciteA
6715 \let\maskciteauthor\maskcite
6716 \let\maskfullciteauthor\maskciteauthor
6717 \let\maskshortciteauthor\maskciteauthor
6718 \let\maskciteauthorNP\maskciteauthor
6719 \let\maskfullciteauthorNP\maskciteauthorNP
6720 \let\maskshortciteauthorNP\maskciteauthorNP
6721 \let\maskciteyear\maskcite
6722 \let\maskciteyearNP\maskciteyear
6723 % \end{macrocode}
6724 % A user command to flexibly mask or unmask certain pieces of text.
6725 % An environment is technically more stable than a command, but less
6726 % intuitive for users. Under masking, this command prints the optional
6727 % alternative text |#1|, which defaults to nothing.
6728 % \begin{macrocode}
6729 \DeclareRobustCommand{\masktext}[2][]{##1}%
6730 }
6731 % \end{macrocode}
6732 %
6733 % The ``mask'' citation commands revert to the same commands without
6734 % ``mask'' if the \pkgoption{mask} option is not set.
6735 % \begin{macrocode}
6736 \newcommand{\unmaskcitations}{%
6737 \let\masknocite\nocite
6738 \let\maskcite\cite
6739 \let\maskfullcite\fullcite
6740 \let\maskshortcite\shortcite
6741 \let\maskciteNP\citeNP
6742 \let\maskfullciteNP\fullciteNP
6743 \let\maskshortciteNP\shortciteNP
6744 \let\maskciteA\citeA
6745 \let\maskfullciteA\fullciteA
6746 \let\maskshortciteA\shortciteA
6747 \let\maskciteauthor\citeauthor
6748 \let\maskfullciteauthor\fullciteauthor
6749 \let\maskshortciteauthor\shortciteauthor
6750 \let\maskciteauthorNP\citeauthorNP
6751 \let\maskfullciteauthorNP\fullciteauthorNP
6752 \let\maskshortciteauthorNP\shortciteauthorNP
6753 \let\maskciteyear\citeyear
6754 \let\maskciteyearNP\citeyearNP
6755 % \end{macrocode}
6756 % Unmasked, this command prints the mandatory second argument |#2|.
6757 % \begin{macrocode}
6758 \DeclareRobustCommand{\masktext}[2][]{##2}
6759 }
6760 % \end{macrocode}
6761 % \end{macro}
6762 % \end{macro}
6763 % \end{macro}
6764 % \end{macro}
6765 % \end{macro}
6766 % \end{macro}
6767 % \end{macro}
6768 % \end{macro}
6769 % \end{macro}
6770 % \end{macro}
6771 % \end{macro}
6772 % \end{macro}
6773 % \end{macro}
6774 % \end{macro}
6775 % \end{macro}
6776 % \end{macro}
6777 % \end{macro}
6778 % \end{macro}
6779 % \end{macro}
6780 % \end{macro}
6781 % \end{macro}
6782 %
6783 % End of ``classic'' citation commands.
6784 % \begin{macrocode}
6785 \fi
6786 % \end{macrocode}
6787 %
6788 % \subsubsection{Emulation of \pkg{natbib} citation commands}
6789 %
6790 % If requested, this section defines the \pkg{natbib} citation commands,
6791 % using the same syntax, without actually loading \pkg{natbib}. We also
6792 % define a few additional commands that \pkg{natbib} did not implement,
6793 % but that fit the scheme and serve some useful purpose for APA style
6794 % citation.
6795 %
6796 % |\if@APAC@alias@cite| needs to be defined outside the
6797 % |\if@APAC@natbib@emu| because otherwise \TeX{} does not process the
6798 % nested |\if|'s below correctly.
6799 % \begin{macrocode}
6800 \newif\if@APAC@alias@cite
6801 \@APAC@alias@citefalse
6802 \if@APAC@natbib@emu
6803 % \end{macrocode}
6804 %
6805 % \begin{macro}{\citep}
6806 % \begin{macro}{\shortcitep}
6807 % Parenthetical citation commands.
6808 % \begin{macrocode}
6809 \DeclareRobustCommand\citep{%
6810 \@ifstar{% full cite
6811 \def\BCAY##1##2##3{\BCA{##1}{##1}}% kept for compat. with prev. versions
6812 \def\citeauthoryear##1##2##3{\BCA{##1}{##1}}%
6813 }{% else
6814 \def\BCAY##1##2##3{\BCA{##1}{##2}}% kept for compat. with prev. versions
6815 \def\citeauthoryear##1##2##3{\BCA{##1}{##2}}%
6816 }%
6817 \def\@BBOP{\BBOP}% % open parenthesis
6818 \def\@BBCP{\BBCP}% % close parenthesis
6819 \@ifnextchar[% % ]
6820 {\APACNAT@citep}%
6821 {\APACNAT@citep[]}%
6822 }
6823 \DeclareRobustCommand\shortcitep{%
6824 \def\BCAY##1##2##3{\BCA{##2}{##2}}% kept for compat. with prev. versions
6825 \def\citeauthoryear##1##2##3{\BCA{##2}{##2}}%
6826 \def\@BBOP{\BBOP}% % open parenthesis
6827 \def\@BBCP{\BBCP}% % close parenthesis
6828 \@ifnextchar[% % ]
6829 {\APACNAT@citep}%
6830 {\APACNAT@citep[]}%
6831 }
6832 % \end{macrocode}
6833 % \end{macro}
6834 % \end{macro}
6835 %
6836 % \begin{macro}{\citealp}
6837 % \begin{macro}{\shortcitealp}
6838 % Parenthetical citation commands, but without the actual parentheses.
6839 % \begin{macrocode}
6840 \DeclareRobustCommand\citealp{%
6841 \@ifstar{% full cite
6842 \def\BCAY##1##2##3{\BCA{##1}{##1}}% kept for compat. with prev. versions
6843 \def\citeauthoryear##1##2##3{\BCA{##1}{##1}}%
6844 }{% else
6845 \def\BCAY##1##2##3{\BCA{##1}{##2}}% kept for compat. with prev. versions
6846 \def\citeauthoryear##1##2##3{\BCA{##1}{##2}}%
6847 }%
6848 \def\@BBOP{}% % open parenthesis
6849 \def\@BBCP{}% % close parenthesis
6850 \@ifnextchar[%% ]
6851 {\APACNAT@citep}%
6852 {\APACNAT@citep[]}%
6853 }
6854 \DeclareRobustCommand\shortcitealp{%
6855 \def\BCAY##1##2##3{\BCA{##2}{##2}}% kept for compat. with prev. versions
6856 \def\citeauthoryear##1##2##3{\BCA{##2}{##2}}%
6857 \def\@BBOP{}% % open parenthesis
6858 \def\@BBCP{}% % close parenthesis
6859 \@ifnextchar[%% ]
6860 {\APACNAT@citep}%
6861 {\APACNAT@citep[]}%
6862 }
6863 % \end{macrocode}
6864 % \end{macro}
6865 % \end{macro}
6866 %
6867 % \begin{macro}{\APACNAT@citep}
6868 % Second layer of the parenthetical and alp citation commands.
6869 % \begin{macrocode}
6870 \newcommand\APACNAT@citep{}
6871 \def\APACNAT@citep[#1]{%
6872 \def\@BAP{\BAP}% % after precitation [=#1] before first citation
6873 \def\@BBA{\BBAA}% % `and' between authors
6874 \def\@BBAY{\BBAY}% % between author and year
6875 \def\@BAY{}% % after year
6876 \def\@BBY{\BBYY}% % between years of multiple citations with same author
6877 \def\@BBC{\BBC}% % between cites
6878 \def\@BBN{\BBN}% % after last citation before note/postcitation [=#2]
6879 \def\@BAstyle{\BAstyle}% text style of authors
6880 \@A@citetrue% % cite authors
6881 \@Y@citetrue% % cite years
6882 \@ifnextchar[% % ]
6883 {\@citex[#1]}%
6884 {\@citex[][#1]}%
6885 }
6886 % \end{macrocode}
6887 % \end{macro}
6888 %
6889 % \begin{macro}{\citet}
6890 % \begin{macro}{\shortcitet}
6891 % In-text citation commands.
6892 % \begin{macrocode}
6893 \DeclareRobustCommand\citet{%
6894 \@ifstar{%
6895 \def\BCAY##1##2##3{\BCA{##1}{##1}}% kept for compat. with prev. versions
6896 \def\citeauthoryear##1##2##3{\BCA{##1}{##1}}%
6897 }{% else
6898 \def\BCAY##1##2##3{\BCA{##1}{##2}}% kept for compat. with prev. versions
6899 \def\citeauthoryear##1##2##3{\BCA{##1}{##2}}%
6900 }%
6901 \def\@BBAY{ \BBOP}%% between author and year
6902 \@ifnextchar[% %]
6903 {\APACNAT@citet}%
6904 {\APACNAT@citet[]}%
6905 }
6906 \DeclareRobustCommand\shortcitet{%
6907 \def\BCAY##1##2##3{\BCA{##2}{##2}}% kept for compat. with prev. versions
6908 \def\citeauthoryear##1##2##3{\BCA{##2}{##2}}%
6909 \def\@BBAY{ \BBOP}%% between author and year
6910 \@ifnextchar[% %]
6911 {\APACNAT@citet}%
6912 {\APACNAT@citet[]}%
6913 }
6914 % \end{macrocode}
6915 % \end{macro}
6916 % \end{macro}
6917 %
6918 % \begin{macro}{\citealt}
6919 % \begin{macro}{\shortcitealt}
6920 % Text citation commands, but without the actual parentheses. Not sure when
6921 % this would be useful, but \pkg{natbib} defines them.
6922 % \begin{macrocode}
6923 \DeclareRobustCommand\citealt{%
6924 \@ifstar{% full cite
6925 \def\BCAY##1##2##3{\BCA{##1}{##1}}% kept for compat. with prev. versions
6926 \def\citeauthoryear##1##2##3{\BCA{##1}{##1}}%
6927 }{% else
6928 \def\BCAY##1##2##3{\BCA{##1}{##2}}% kept for compat. with prev. versions
6929 \def\citeauthoryear##1##2##3{\BCA{##1}{##2}}%
6930 }%
6931 \def\@BBOP{}% % open parenthesis
6932 \def\@BBCP{}% % close parenthesis
6933 \def\@BBAY{ }%% between author and year
6934 \@ifnextchar[%% ]
6935 {\APACNAT@citet}%
6936 {\APACNAT@citet[]}%
6937 }
6938 \DeclareRobustCommand\shortcitealt{%
6939 \def\BCAY##1##2##3{\BCA{##2}{##2}}% kept for compat. with prev. versions
6940 \def\citeauthoryear##1##2##3{\BCA{##2}{##2}}%
6941 \def\@BBOP{}% % open parenthesis
6942 \def\@BBCP{}% % close parenthesis
6943 \def\@BBAY{ }%% between author and year
6944 \@ifnextchar[%% ]
6945 {\APACNAT@citet}%
6946 {\APACNAT@citet[]}%
6947 }
6948 % \end{macrocode}
6949 % \end{macro}
6950 % \end{macro}
6951 %
6952 % \begin{macro}{\APACNAT@citet}
6953 % Second layer of in-text and alt citation commands.
6954 % \begin{macrocode}
6955 \newcommand\APACNAT@citet{}
6956 \def\APACNAT@citet[#1]{%
6957 \def\@BBOP{}% % open parenthesis.
6958 \def\@BAP{\BAP}% % after precitation [=#1] before first citation
6959 \def\@BBA{\BBAB}% % `and' between authors
6960 %% \def\@BBAY{ \BBOP}%% between author and year
6961 \def\@BAY{\BBCP}% % after year
6962 \def\@BBY{\BBYY}% % between years of multiple citations with same author
6963 \def\@BBC{\BBC}% % between cites
6964 \def\@BBN{\BBN}% % after last citation before note/postcitation [=#2]
6965 \def\@BBCP{}% % close parenthesis
6966 \def\@BAstyle{\BAstyle}% text style of authors
6967 \@A@citetrue% % cite authors
6968 \@Y@citetrue% % cite years
6969 \@ifnextchar[% % ]
6970 {\@citex[#1]}%
6971 {\@citex[][#1]}%
6972 }
6973 % \end{macrocode}
6974 % \end{macro}
6975 %
6976 % \begin{macro}{\citeauthort}
6977 % \begin{macro}{\shortciteauthort}
6978 % \begin{macro}{\citeauthorp}
6979 % \begin{macro}{\shortciteauthorp}
6980 % \begin{macro}{\citeauthor}
6981 % \begin{macro}{\citefullauthor}
6982 % \begin{macro}{\shortciteauthor}
6983 % Commands that only cite the author, for parenthetical and in-text citations,
6984 % the difference being that `\&' is used in the parenthetical versions,
6985 % whereas the in-text versions use `and' between the authors. Note that all
6986 % are without parentheses.
6987 % \begin{macrocode}
6988 \DeclareRobustCommand\citeauthort{%
6989 \@ifstar{%
6990 \def\BCAY##1##2##3{\BCA{##1}{##1}}% kept for compat. with prev. versions
6991 \def\citeauthoryear##1##2##3{\BCA{##1}{##1}}%
6992 }{% else
6993 \def\BCAY##1##2##3{\BCA{##1}{##2}}% kept for compat. with prev. versions
6994 \def\citeauthoryear##1##2##3{\BCA{##1}{##2}}%
6995 }%
6996 \@ifnextchar[% %]
6997 {\APACNAT@citeauthort}%
6998 {\APACNAT@citeauthort[]}%
6999 }
7000 \DeclareRobustCommand\shortciteauthort{%
7001 \def\BCAY##1##2##3{\BCA{##2}{##2}}% kept for compat. with prev. versions
7002 \def\citeauthoryear##1##2##3{\BCA{##2}{##2}}%
7003 \@ifnextchar[% %]
7004 {\APACNAT@citeauthort}%
7005 {\APACNAT@citeauthort[]}%
7006 }
7007 \DeclareRobustCommand\citeauthorp{%
7008 \@ifstar{%
7009 \def\BCAY##1##2##3{\BCA{##1}{##1}}% kept for compat. with prev. versions
7010 \def\citeauthoryear##1##2##3{\BCA{##1}{##1}}%
7011 }{% else
7012 \def\BCAY##1##2##3{\BCA{##1}{##2}}% kept for compat. with prev. versions
7013 \def\citeauthoryear##1##2##3{\BCA{##1}{##2}}%
7014 }%
7015 \@ifnextchar[% %]
7016 {\APACNAT@citeauthorp}%
7017 {\APACNAT@citeauthorp[]}%
7018 }
7019 \DeclareRobustCommand\shortciteauthorp{%
7020 \def\BCAY##1##2##3{\BCA{##2}{##2}}% kept for compat. with prev. versions
7021 \def\citeauthoryear##1##2##3{\BCA{##2}{##2}}%
7022 \@ifnextchar[% %]
7023 {\APACNAT@citeauthorp}%
7024 {\APACNAT@citeauthorp[]}%
7025 }
7026 \DeclareRobustCommand\citeauthor{\citeauthort}
7027 \DeclareRobustCommand\citefullauthor{\citeauthort*}
7028 \DeclareRobustCommand\shortciteauthor{\shortciteauthort}
7029 % \end{macrocode}
7030 % \end{macro}
7031 % \end{macro}
7032 % \end{macro}
7033 % \end{macro}
7034 % \end{macro}
7035 % \end{macro}
7036 % \end{macro}
7037 %
7038 % \begin{macro}{\APACNAT@citeauthort}
7039 % \begin{macro}{\APACNAT@citeauthorp}
7040 % Second layer of the author citation commands.
7041 % \begin{macrocode}
7042 \newcommand\APACNAT@citeauthort{}
7043 \def\APACNAT@citeauthort[#1]{%
7044 \def\@BBOP{}% % open parenthesis
7045 \def\@BAP{\BAP}% % after precitation [=#1] before first citation
7046 \def\@BBA{\BBAB}% % `and' between authors
7047 \def\@BBAY{}% % between author and year
7048 \def\@BAY{}% % after year
7049 \def\@BBY{}% % between years of multiple citations with same author
7050 \def\@BBC{\BBC}% % between cites
7051 \def\@BBN{\BBN}% % after last citation before note/postcitation [=#2]
7052 \def\@BBCP{}% % close parenthesis
7053 \def\@BAstyle{\BAastyle}% text style of authors
7054 \@A@citetrue% % cite authors
7055 \@Y@citefalse% % do not cite years
7056 \@ifnextchar[% % ]
7057 {\@citex[#1]}%
7058 {\@citex[][#1]}%
7059 }
7060 \newcommand\APACNAT@citeauthorp{}
7061 \def\APACNAT@citep[#1]{%
7062 \def\@BBOP{}% % open parenthesis
7063 \def\@BAP{\BAP}% % after precitation [=#1] before first citation
7064 \def\@BBA{\BBAA}% % `and' between authors
7065 \def\@BBAY{}% % between author and year
7066 \def\@BAY{}% % after year
7067 \def\@BBY{}% % between years of multiple citations with same author
7068 \def\@BBC{\BBC}% % between cites
7069 \def\@BBN{\BBN}% % after last citation before note/postcitation [=#2]
7070 \def\@BBCP{}% % close parenthesis
7071 \def\@BAstyle{\BAastyle}% text style of authors
7072 \@A@citetrue% % cite authors
7073 \@Y@citefalse% % do not cite years
7074 \@ifnextchar[% % ]
7075 {\@citex[#1]}%
7076 {\@citex[][#1]}%
7077 }
7078 % \end{macrocode}
7079 % \end{macro}
7080 % \end{macro}
7081 %
7082 % \begin{macro}{\citeyearpar}
7083 % \begin{macro}{\citeyear}
7084 % Cite only the year; parenthetical and without parentheses. Note that these
7085 % are the \pkg{natbib} conventions, so unlike traditional \pkg{apacite}
7086 % \cmd{\citeyear}, \cmd{\citeyear} here does not include the parentheses.
7087 % \begin{macrocode}
7088 \DeclareRobustCommand\citeyearpar{%
7089 \def\BCAY##1##2##3{\BCA{##1}{##2}}% kept for compat. with prev. versions
7090 \def\citeauthoryear##1##2##3{\BCA{##1}{##2}}%
7091 \def\@BBOP{\BBOP}% % open parenthesis
7092 \def\@BBCP{\BBCP}% % close parenthesis
7093 \@ifnextchar[% % ]
7094 {\APACNAT@citeyear}%
7095 {\APACNAT@citeyear[]}%
7096 }
7097 \DeclareRobustCommand\citeyear{%
7098 \def\BCAY##1##2##3{\BCA{##1}{##2}}% kept for compat. with prev. versions
7099 \def\citeauthoryear##1##2##3{\BCA{##1}{##2}}%
7100 \def\@BBOP{}% % open parenthesis
7101 \def\@BBCP{}% % close parenthesis
7102 \@ifnextchar[% % ]
7103 {\APACNAT@citeyear}%
7104 {\APACNAT@citeyear[]}%
7105 }
7106 % \end{macrocode}
7107 % \end{macro}
7108 % \end{macro}
7109 %
7110 % \begin{macro}{\APACNAT@citeyear}
7111 % Second layer of the year citation commands.
7112 % \begin{macrocode}
7113 \newcommand\APACNAT@citeyear{}
7114 \def\APACNAT@citeyear[#1]{%
7115 \def\@BAP{\BAP}% % after precitation [=#1] before first citation
7116 \def\@BBA{}% % `and' between authors
7117 \def\@BBAY{}% % between author and year
7118 \def\@BAY{}% % after year
7119 \def\@BBY{\BBYY}% % between years of multiple citations with same author
7120 \def\@BBC{\BBC}% % between cites
7121 \def\@BBN{\BBN}% % after last citation before note/postcitation [=#2]
7122 \def\@BAstyle{}% % text style of authors
7123 \@A@citefalse% % do not cite authors
7124 \@Y@citetrue% % cite years
7125 \@ifnextchar[% % ]
7126 {\@citex[#1]}%
7127 {\@citex[][#1]}%
7128 }
7129 % \end{macrocode}
7130 % \end{macro}
7131 %
7132 % \begin{macro}{\APACNAT@citex}
7133 % The core citation command. We will let \cmd{\@citex} revert to this.
7134 % \begin{macrocode}
7135 \newcommand\APACNAT@citex{}
7136 \def\APACNAT@citex[#1][#2]#3{%
7137 % \end{macrocode}
7138 % Write citation(s) to \fname{.aux} file(s)
7139 % \begin{macrocode}
7140 \nocite{#3}%
7141 % \end{macrocode}
7142 % The previous cite, for multiple citations with same author.
7143 % \begin{macrocode}
7144 \edef\@citeP{}%
7145 % \end{macrocode}
7146 % Open parenthesis and pre-note. The \cmd{\mbox} is to avoid \pkg{hyperref}
7147 % problems if a citation command follows an \cmd{\item}. Better to change
7148 % this to using \cmd{\citetext}; for the todo list.
7149 % \begin{macrocode}
7150 \mbox{\@BBOP}%
7151 \ifx\@empty#1\@empty
7152 \else%
7153 {\ignorespaces #1\@BAP}%
7154 \fi%
7155 % \end{macrocode}
7156 % Loop over citation entries
7157 % \begin{macrocode}
7158 \@for\@citeb:=#3\do{%
7159 % \end{macrocode}
7160 % Removes a possible space before the citation key, so that, e.g.,
7161 % \verb*+\cite{key1, key2}+ can be done.
7162 % \begin{macrocode}
7163 \edef\@citeb{\expandafter\@firstofone\@citeb}%
7164 % \end{macrocode}
7165 % For \pkg{backref}.
7166 % \begin{macrocode}
7167 \back@cite{\@citeb}%
7168 % \end{macrocode}
7169 % If this is an alias cite, we should include the alias but not author
7170 % or year, so the code is slightly different.
7171 % \begin{macrocode}
7172 \if@APAC@alias@cite
7173 % \end{macrocode}
7174 % Check whether the alias is defined.
7175 % \begin{macrocode}
7176 \@ifundefined{al@\@citeb\APAC@extra@b@citeb}%
7177 {\PackageWarning{apacite}{Undefined alias for citation \@citeb}
7178 \expandafter\def\csname al@\@citeb\APAC@extra@b@citeb\endcsname{?}%
7179 }{}%
7180 % \end{macrocode}
7181 % Replace the authors by the alias and don't cite years.
7182 % \begin{macrocode}
7183 \@Y@citefalse % do not cite years
7184 \def\BCA##1##2{{\@BAstyle \csname
7185 al@\@citeb\APAC@extra@b@citeb\endcsname}}%
7186 % \end{macrocode}
7187 % Use the ``unequal'' code because the alias takes the place of the
7188 % authors.
7189 % \begin{macrocode}
7190 \@ifauthorsunequalc@de{\@citeb\APAC@extra@b@citeb}%
7191 \else
7192 % \end{macrocode}
7193 % The usual author and/or year citation. Check whether the citation is
7194 % defined.
7195 % \begin{macrocode}
7196 \@ifundefined{b@\@citeb\APAC@extra@b@citeb}%
7197 {\expandafter\def\csname b@\@citeb\APAC@extra@b@citeb\endcsname{?}%
7198 \expandafter\def\csname Y@\@citeb\APAC@extra@b@citeb\endcsname{?}%
7199 }%
7200 % \end{macrocode}
7201 % If the citation is defined, check whether the flag has been set that
7202 % identifies that this is not the first citation to the work. If this
7203 % flag has not been set, it will be set to |DUMMY|. If this is the first
7204 % citation to the work, the full citation is used; else the short version
7205 % is used.
7206 % \begin{macrocode}
7207 {\@ifundefined{flag@\@citeb\APAC@extra@b@citeb}%
7208 {\global\expandafter
7209 \def\csname flag@\@citeb\APAC@extra@b@citeb\endcsname{DUMMY}%
7210 \def\BCA##1##2{{\@BAstyle ##1}}%
7211 }%
7212 {\def\BCA##1##2{{\@BAstyle ##2}}%
7213 }%
7214 }%
7215 % \end{macrocode}
7216 % Check whether the current author(s) is (are) equivalent to the
7217 % previous. If so, only the year is cited in the text and a \cmd{\@BBY}
7218 % (probably comma and space) is inserted between the two years. The
7219 % \cmd{\protected@edef} fixes the problem with authors with accents
7220 % (e.g., J{\"{o}}reskog). Older versions of \pkg{apacite} solved this
7221 % less elegantly (\pkgoption{accentfix} option). This fix was provided by
7222 % Robert Schlicht. See also the new definition of \cmd{\@citeP} below.
7223 % \begin{macrocode}
7224 \protected@edef\B@my@dummy{\csname
7225 b@\@citeb\APAC@extra@b@citeb\endcsname}%
7226 \ifx\@citeP\B@my@dummy
7227 \@ifauthorsequalc@de{\@citeb\APAC@extra@b@citeb}%
7228 \else
7229 \@ifauthorsunequalc@de{\@citeb\APAC@extra@b@citeb}%
7230 \fi
7231 % \end{macrocode}
7232 % Store the current author(s) for comparison in the next citation (if
7233 % any).
7234 % \begin{macrocode}
7235 \protected@edef\@citeP{\csname
7236 b@\@citeb\APAC@extra@b@citeb\endcsname}%
7237 \let\BCA\relax
7238 \fi
7239 }%
7240 % \end{macrocode}
7241 % End of the loop over citation entries. Add the post-note and closing
7242 % parenthesis.
7243 % \begin{macrocode}
7244 \ifx\@empty#2\@empty
7245 \else%
7246 {\@BBN #2}%
7247 \fi%
7248 \if@Y@cite%
7249 {\@BAY}%
7250 \fi%
7251 {\@BBCP}%
7252 % \end{macrocode}
7253 % We're finished with this citation command. Initialize for the next
7254 % \cmd{\APACNAT@citex} call.
7255 % \begin{macrocode}
7256 \@F@citetrue %
7257 }
7258 % \end{macrocode}
7259 % \end{macro}
7260 %
7261 % \begin{macro}{\citetext}
7262 % To place any arbitrary text inside the citation braces, use
7263 % \cmd{\citetext}.
7264 % \begin{macrocode}
7265 \newcommand\citetext[1]{\mbox{}\BBOP{}#1\BBCP}
7266 % \end{macrocode}
7267 % \end{macro}
7268 %
7269 % \begin{macro}{\@citex}
7270 % The core citation command.
7271 % \begin{macrocode}
7272 \let\@citex\APACNAT@citex
7273 % \end{macrocode}
7274 % \end{macro}
7275 %
7276 % \begin{macro}{\cite}
7277 % The use of \cmd{\cite} is considered deprecated in \pkg{natbib}, but
7278 % we provide it as a backwards compatibility definition just like \pkg{natbib}.
7279 % Without optional arguments, it reverts to \cmd{\citep} and with optional
7280 % arguments (even empty ones), it reverts to \cmd{\citet}.
7281 % \begin{macrocode}
7282 \DeclareRobustCommand\cite{%
7283 \@ifstar{%
7284 \@ifnextchar[% %]
7285 {\citep*}%
7286 {\citet*}%
7287 }{%
7288 \@ifnextchar[% %]
7289 {\citep}%
7290 {\citet}%
7291 }%
7292 }
7293 % \end{macrocode}
7294 % \end{macro}
7295 %
7296 % \begin{macro}{\Citet}
7297 % \begin{macro}{\Citep}
7298 % \begin{macro}{\Citealt}
7299 % \begin{macro}{\Citealp}
7300 % \begin{macro}{\Citeauthort}
7301 % \begin{macro}{\Citeauthorp}
7302 % \begin{macro}{\Citeauthor}
7303 % \begin{macro}{\Citefullauthor}
7304 % \begin{macro}{\Cite}
7305 % Commands that capitalize the first name in a citation, to be used at the
7306 % beginning of a sentence. These are currently not implemented yet, so let's
7307 % just define them to be equal to the non-capitalized versions.
7308 % \begin{macrocode}
7309 \DeclareRobustCommand\Citet{\citet}
7310 \DeclareRobustCommand\Citep{\citep}
7311 \DeclareRobustCommand\Citealt{\citealt}
7312 \DeclareRobustCommand\Citealp{\citealp}
7313 \DeclareRobustCommand\Citeauthort{\citeauthort}
7314 \DeclareRobustCommand\Citeauthorp{\citeauthorp}
7315 \DeclareRobustCommand\Citeauthor{\citeauthor}
7316 \DeclareRobustCommand\Citefullauthor{\citefullauthor}
7317 \DeclareRobustCommand\Cite{\cite}
7318 \DeclareRobustCommand\shortCitet{\shortcitet}
7319 \DeclareRobustCommand\shortCitep{\shortcitep}
7320 \DeclareRobustCommand\shortCitealt{\shortcitealt}
7321 \DeclareRobustCommand\shortCitealp{\shortcitealp}
7322 \DeclareRobustCommand\shortCiteauthort{\shortciteauthort}
7323 \DeclareRobustCommand\shortCiteauthorp{\shortciteauthorp}
7324 \DeclareRobustCommand\shortCiteauthor{\shortciteauthor}
7325 % \end{macrocode}
7326 % \end{macro}
7327 % \end{macro}
7328 % \end{macro}
7329 % \end{macro}
7330 % \end{macro}
7331 % \end{macro}
7332 % \end{macro}
7333 % \end{macro}
7334 % \end{macro}
7335 %
7336 % \begin{macro}{\shortcites}
7337 % This declares a list of citations that should be cited in their
7338 % short form. This can be overridden by using the starred form of
7339 % the citation commands later.
7340 % \begin{macrocode}
7341 \newcommand\shortcites[1]{%
7342 \@bsphack
7343 \@for\@citeb:=#1\do{%
7344 \edef\@citeb{\expandafter\@firstofone\@citeb}%
7345 \global\expandafter
7346 \def\csname flag@\@citeb\APAC@extra@b@citeb\endcsname{DUMMY}%
7347 }%
7348 \@esphack
7349 }
7350 % \end{macrocode}
7351 % \end{macro}
7352 %
7353 % \begin{macro}{\defcitealias}
7354 % \begin{macro}{\citetalias}
7355 % \begin{macro}{\citepalias}
7356 % Define an ``alias'', which can be an arbitrary text string, and use
7357 % this instead of the author and year in a citation. Adapted from
7358 % \fname{natbib.dtx}.
7359 % \begin{macrocode}
7360 \newcommand\defcitealias[2]{%
7361 \@ifundefined{al@#1\APAC@extra@b@citeb}{}
7362 {\PackageWarning{apacite}{Overwriting existing alias for citation #1}}
7363 \@namedef{al@#1\APAC@extra@b@citeb}{#2}}
7364 \DeclareRobustCommand\citetalias{%
7365 \@APAC@alias@citetrue
7366 \citet
7367 }
7368 \DeclareRobustCommand\citepalias{%
7369 \@APAC@alias@citetrue
7370 \citep
7371 }
7372 % \end{macrocode}
7373 % \end{macro}
7374 % \end{macro}
7375 % \end{macro}
7376 %
7377 % Define \cmd{\citeindextype}, |\citeindextrue|, and |\citeindexfalse|
7378 % for compatibility with \pkg{natbib}. However, these don't do anything
7379 % in \pkg{apacite}, which supports author indexes using one of the
7380 % ``index'' options and back referencing of specific citations using
7381 % the \pkg{backref} package.
7382 % \begin{macrocode}
7383 \newif\ifciteindex \citeindexfalse
7384 \newcommand\citeindextype{default}
7385 % \end{macrocode}
7386 %
7387 % \begin{macro}{\citenumfont}
7388 % The \pkg{natbib} command \cmd{\citenum} is undefined and thus gives an
7389 % error, but the \cmd{\citenumfont} declaration is harmless and can stay.
7390 % \begin{macrocode}
7391 \let\citenumfont=\@empty
7392 % \end{macrocode}
7393 % \end{macro}
7394 %
7395 % \begin{macro}{\bibpunct}
7396 % This sets various punctuation commands equal to its arguments.
7397 % In contrast with the \pkg{natbib} implementation, the 5th argument
7398 % (4th mandatory argument) is ignored, because \pkg{apacite} currently
7399 % only supports author-year citations. Also, in contrast to the
7400 % \pkg{natbib} implementation, this does not disable subsequent
7401 % \cmd{\bibstyle} commands.
7402 % \begin{macrocode}
7403 \newcommand\bibpunct[7][, ]%
7404 {\gdef\BBOP{#2}\gdef\BBCP{#3}\gdef\BBC{#4}%
7405 \gdef\BBAY{#6}\gdef\BBYY{#7}\gdef\BBN{#1}%
7406 }
7407 % \end{macrocode}
7408 % \end{macro}
7409 %
7410 % \begin{macro}{\bibstyle@apacite}
7411 % \begin{macro}{\bibstyle@apa}
7412 % These commands define the punctuation to be the \pkg{apacite}
7413 % default. This is normally not very useful, because this only
7414 % defines things as they are by default in \pkg{apacite} anyway, but
7415 % it may be useful as a simple reset if different parts of the
7416 % document need to use different styles.
7417 % \begin{macrocode}
7418 \newcommand\bibstyle@apacite{%
7419 \bibpunct[, ]{(}{)}{; }{a}{, }{, }%
7420 \setlength{\bibhang}{2.5em}%
7421 \setlength{\bibsep}{0pt}%
7422 }
7423 \let\bibstyle@apa=\bibstyle@apacite
7424 % \end{macrocode}
7425 % \end{macro}
7426 % \end{macro}
7427 %
7428 % \begin{macro}{\citestyle}
7429 % This command selects a predefined citation punctuation style.
7430 % In contrast to the \pkg{natbib} implementation, this is not
7431 % deactivated at |\begin{document}|, so it's possible to change
7432 % to a different style in the document body.
7433 % \begin{macrocode}
7434 \newcommand\citestyle[1]{\csname bibstyle@#1\endcsname}
7435 % \end{macrocode}
7436 % \end{macro}
7437 %
7438 % \begin{macro}{\setcitestyle}
7439 % This sets individual punctuation parameters. Adapted from
7440 % \fname{natbib.dtx}.
7441 % \begin{macrocode}
7442 \newcommand\setcitestyle[1]{%
7443 \@for\@tempa:=#1\do
7444 {\def\@tempb{round}\ifx\@tempa\@tempb
7445 \renewcommand\BBOP{(}\renewcommand\BBCP{)}\fi
7446 \def\@tempb{square}\ifx\@tempa\@tempb
7447 \renewcommand\BBOP{[}\renewcommand\BBCP{]}\fi
7448 \def\@tempb{angle}\ifx\@tempa\@tempb
7449 \renewcommand\BBOP{$<$}\renewcommand\BBCP{$>$}\fi
7450 \def\@tempb{curly}\ifx\@tempa\@tempb
7451 \renewcommand\BBOP{\{}\renewcommand\BBCP{\}}\fi
7452 \def\@tempb{semicolon}\ifx\@tempa\@tempb
7453 \renewcommand\BBC{; }\fi
7454 \def\@tempb{colon}\ifx\@tempa\@tempb
7455 \renewcommand\BBC{: }\fi
7456 \def\@tempb{comma}\ifx\@tempa\@tempb
7457 \renewcommand\BBC{, }\fi
7458 % \end{macrocode}
7459 % \pkg{apacite} supports author-year citation only, so |authoryear|,
7460 % |numbers|, and |super| are ignored. (Alternatively, we could have
7461 % issued an error for |numbers| and |super|.)
7462 % \begin{macrocode}
7463 \def\@tempb{authoryear}\ifx\@tempa\@tempb
7464 \fi
7465 \def\@tempb{numbers}\ifx\@tempa\@tempb
7466 \fi
7467 \def\@tempb{super}\ifx\@tempa\@tempb
7468 \fi
7469 \expandafter\APAC@find@eq\@tempa=\relax\@nil
7470 \if\@tempc\relax\else
7471 \expandafter\APAC@rem@eq\@tempc
7472 \def\@tempb{open}\ifx\@tempa\@tempb
7473 \xdef\BBOP{\@tempc}\fi
7474 \def\@tempb{close}\ifx\@tempa\@tempb
7475 \xdef\BBCP{\@tempc}\fi
7476 \def\@tempb{aysep}\ifx\@tempa\@tempb
7477 \xdef\BBAY{\@tempc}\fi
7478 \def\@tempb{yysep}\ifx\@tempa\@tempb
7479 \xdef\BBYY{\@tempc}\fi
7480 \def\@tempb{notesep}\ifx\@tempa\@tempb
7481 \xdef\BBN{\@tempc}\fi
7482 \def\@tempb{citesep}\ifx\@tempa\@tempb
7483 \xdef\BBC{\@tempc}\fi
7484 \fi
7485 }%
7486 }
7487 \def\APAC@find@eq#1=#2\@nil{\def\@tempa{#1}\def\@tempc{#2}}
7488 \def\APAC@rem@eq#1={\def\@tempc{#1}}
7489 % \end{macrocode}
7490 % \end{macro}
7491 %
7492 % End of \pkg{natbib} emulation code.
7493 % \begin{macrocode}
7494 \fi
7495 % \end{macrocode}
7496 %
7497 % \subsubsection{Using \pkg{apacite} with \pkg{natbib} for citations}
7498 %
7499 % If requested, this section loads \pkg{natbib} with the options
7500 % \pkgoption{longnamesfirst} and \pkgoption{sort}, which are
7501 % necessary for APA-style adherence. Then, we redefine some
7502 % \pkg{natbib} and \pkg{apacite} commands to improve APA adherence of
7503 % the combination. We also define a few additional commands that
7504 % \pkg{natbib} did not implement, but that fit the scheme and serve
7505 % some useful purpose for APA style citation. Defer loading this part
7506 % until the end of the package, after loading the bibliography part.
7507 % (This needs to be fixed.)
7508 %
7509 % \begin{macrocode}
7510 \newcommand{\BBA@nat}{%
7511 \ifNAT@swa
7512 % \end{macrocode}
7513 % parenthetical; ``\&''
7514 % \begin{macrocode}
7515 \BBAA
7516 \else
7517 % \end{macrocode}
7518 % in-text; ``and''
7519 % \begin{macrocode}
7520 \BBAB
7521 \fi
7522 }
7523 \if@APAC@natbib@apa
7524 \AtEndOfPackage{%
7525 \if@sectionbibdefault
7526 \RequirePackage[longnamesfirst,sort]{natbib}
7527 \else\if@sectionbib
7528 \RequirePackage[longnamesfirst,sort,sectionbib]{natbib}
7529 \else
7530 \RequirePackage[longnamesfirst,sort]{natbib}
7531 \fi\fi
7532 % \end{macrocode}
7533 %
7534 % \begin{macro}{\NAT@parse@date}
7535 % Redefine \pkg{natbib}'s date parsing function to avoid dropping the
7536 % year in ``(2008a, 2008b)''.
7537 % \begin{macrocode}
7538 \renewcommand\NAT@parse@date{}
7539 \def\NAT@parse@date#1#2#3#4#5#6@@{%
7540 \def\NAT@year{#1#2}\def\NAT@exlab{{#3}}}
7541 % \end{macrocode}
7542 % \end{macro}
7543 % ``and'' vs.\ ``\&''.
7544 % \begin{macrocode}
7545 \DeclareRobustCommand{\BBA}{\BBA@nat}
7546 % \end{macrocode}
7547 % In the reflist ``\&''.
7548 % \begin{macrocode}
7549 \let\orig@nat@@lbibitem\@lbibitem
7550 \def\@lbibitem{\NAT@swatrue\orig@nat@@lbibitem}
7551 % \end{macrocode}
7552 %
7553 % Make sure we're in parenthetical mode when in \cmd{\citetext}
7554 % \begin{macrocode}
7555 \renewcommand\citetext[1]{\NAT@open\begingroup\NAT@swatrue
7556 #1\endgroup\NAT@close}
7557 % \end{macrocode}
7558 %
7559 % \begin{macro}{\citeauthort}
7560 % \begin{macro}{\citeauthorp}
7561 % \begin{macro}{\citefullauthort}
7562 % \begin{macro}{\citefullauthorp}
7563 % \begin{macro}{\Citeauthort}
7564 % \begin{macro}{\Citeauthorp}
7565 % \begin{macro}{\Citefullauthort}
7566 % \begin{macro}{\Citefullauthorp}
7567 % There's only one \cmd{\citeauthor}, but we need to distinguish
7568 % between parenthetical and in-text. The most common is in-text, so
7569 % let \cmd{\citeauthor} be the in-text one, but define
7570 % \cmd{\citeauthort} to be the same, and add \cmd{\citeauthorp}.
7571 % \begin{macrocode}
7572 \DeclareRobustCommand\citeauthort{\citeauthor}
7573 \DeclareRobustCommand\Citeauthort{\Citeauthor}
7574 \DeclareRobustCommand\citeauthorp
7575 {\begingroup\NAT@swatrue\let\NAT@ctype\@ne\NAT@parfalse
7576 \@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
7577 \DeclareRobustCommand\Citeauthorp
7578 {\begingroup\NAT@swatrue\let\NAT@ctype\@ne\NAT@parfalse
7579 \let\NAT@up\NAT@Up
7580 \@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
7581 % \end{macrocode}
7582 % For completeness of the system.
7583 % \begin{macrocode}
7584 \DeclareRobustCommand{\Citefullauthor}{\Citeauthor*}
7585 \DeclareRobustCommand{\citefullauthort}{\citeauthort*}
7586 \DeclareRobustCommand{\citefullauthorp}{\citeauthorp*}
7587 \DeclareRobustCommand{\Citefullauthort}{\Citeauthort*}
7588 \DeclareRobustCommand{\Citefullauthorp}{\Citeauthorp*}
7589 % \end{macrocode}
7590 % \end{macro}
7591 % \end{macro}
7592 % \end{macro}
7593 % \end{macro}
7594 % \end{macro}
7595 % \end{macro}
7596 % \end{macro}
7597 % \end{macro}
7598 %
7599 % \begin{macro}{\bibstyle@apacite}
7600 % \begin{macro}{\bibstyle@apa}
7601 % Other settings. I think the \pkg{natbib} defaults are good, but
7602 % let's define this explicitly and allow the usual \pkg{apacite}
7603 % customization options.
7604 % \begin{macrocode}
7605 \providecommand\bibstyle@apacite{%
7606 % \end{macrocode}
7607 % \pkg{natbib} is inconsistent with adding space.
7608 % \begin{macrocode}
7609 \renewcommand{\BBAY}{,}%
7610 \renewcommand{\BBC}{;}%
7611 \renewcommand{\BBYY}{,}%
7612 \bibpunct[\BBN ]{\BBOP }{\BBCP }{\BBC }{a}{\BBAY }{\BBYY }%
7613 \setlength{\bibhang}{2.5em}%
7614 \setlength{\bibsep}{0pt}%
7615 }
7616 \providecommand\bibstyle@apa{\bibstyle@apacite}
7617 \citestyle{apacite}
7618 % \end{macrocode}
7619 % \end{macro}
7620 % \end{macro}
7621 %
7622 % End of \pkg{natbib}--\pkg{apacite} code.
7623 % \begin{macrocode}
7624 }% end \cmd{\AtEndOfPackage}
7625 \fi
7626 % \end{macrocode}
7627 %
7628 % \subsubsection{Shared code for \pkgoption{natbibemu} and
7629 % \pkgoption{natbibapa}}
7630 %
7631 % This section defines some extensions of \pkg{natbib} that are
7632 % useful with both the \pkgoption{natbibemu} and \pkgoption{natbibapa}
7633 % options.
7634 %
7635 % \begin{macrocode}
7636 \if@APAC@any@natbib
7637 % \end{macrocode}
7638 %
7639 % \begin{macro}{\maskcitations}
7640 % \begin{macro}{\unmaskcitations}
7641 % \begin{macro}{\masknocite}
7642 % \begin{macro}{\maskcitep}
7643 % \begin{macro}{\maskcitealp}
7644 % \begin{macro}{\maskcitet}
7645 % \begin{macro}{\maskcitealt}
7646 % \begin{macro}{\maskciteauthor}
7647 % \begin{macro}{\maskcitefullauthor}
7648 % \begin{macro}{\maskciteyearpar}
7649 % \begin{macro}{\maskciteyear}
7650 % \begin{macro}{\maskcite}
7651 % \begin{macro}{\maskcitetalias}
7652 % \begin{macro}{\maskcitepalias}
7653 % \begin{macro}{\maskCitet}
7654 % \begin{macro}{\maskCitep}
7655 % \begin{macro}{\maskCitealt}
7656 % \begin{macro}{\maskCitealp}
7657 % \begin{macro}{\maskCiteauthor}
7658 % \begin{macro}{\maskcitenum}
7659 % \begin{macro}{\maskciteauthort}
7660 % \begin{macro}{\maskciteauthorp}
7661 % \begin{macro}{\maskCitefullauthor}
7662 % \begin{macro}{\maskCiteauthort}
7663 % \begin{macro}{\maskCiteauthorp}
7664 % \begin{macro}{\masktext}
7665 % These commands allow masking of (self-)citations for a masked
7666 % review.
7667 % The \cmd{maskcitations} command defines the masked citation commands;
7668 % \cmd{unmaskcitations} does the same, but lets them be equal to the
7669 % non-mask versions. The advantage of putting these definitions within
7670 % a command is that we can switch between masked and unmasked within
7671 % the same document. This is not likely to be used very often in
7672 % practice, but is useful for writing tutorials.
7673 % \begin{macrocode}
7674 \newcommand{\maskcitations}{%
7675 \def\masknocite##1{}%
7676 \DeclareRobustCommand\maskcite{%
7677 \@ifnextchar[% % ]
7678 {\mask@cite}%
7679 {\mask@cite[]}%
7680 }%
7681 \def\mask@cite[##1]{%
7682 \@ifnextchar[% % ]
7683 {\mask@@cite[##1]}%
7684 {\mask@@cite[##1][]}%
7685 }%
7686 \def\mask@@cite[##1][##2]##3{%
7687 \relax
7688 % \end{macrocode}
7689 % Count number of masked references.
7690 % \begin{macrocode}
7691 \setcounter{maskedRefs}{0}%
7692 \@for\@citeb:=##3\do{%
7693 \addtocounter{maskedRefs}{1}%
7694 }%
7695 \ifnum\value{maskedRefs} = 1%
7696 \onemaskedcitationmsg{\themaskedRefs}%
7697 \else
7698 \maskedcitationsmsg{\themaskedRefs}%
7699 \fi
7700 }%
7701 % \end{macrocode}
7702 % Let all other citation commands be identical to \cmd{\maskcite}.
7703 % We could try to do fancy things with parentheses, but it's unlikely
7704 % we will be able to cover all cases of interest, and users can easily
7705 % change their document if they don't like how this comes out.
7706 % \begin{macrocode}
7707 \let\maskcitep\maskcite
7708 \let\maskcitealp\maskcite
7709 \let\maskcitet\maskcite
7710 \let\maskcitealt\maskcite
7711 \let\maskciteauthor\maskcite
7712 \let\maskcitefullauthor\maskcite
7713 \let\maskciteyearpar\maskcite
7714 \let\maskciteyear\maskcite
7715 \let\maskcitetalias\maskcite
7716 \let\maskcitepalias\maskcite
7717 \let\maskCitet\maskcite
7718 \let\maskCitep\maskcite
7719 \let\maskCitealt\maskcite
7720 \let\maskCitealp\maskcite
7721 \let\maskCiteauthor\maskcite
7722 \let\maskcitenum\maskcite
7723 \let\maskciteauthort\maskcite
7724 \let\maskciteauthorp\maskcite
7725 \let\maskCitefullauthor\maskcite
7726 \let\maskCiteauthort\maskcite
7727 \let\maskCiteauthorp\maskcite
7728 % \end{macrocode}
7729 % A user command to flexibly mask or unmask certain pieces of text.
7730 % An environment is technically more stable than a command, but less
7731 % intuitive for users. Under masking, this command prints the optional
7732 % alternative text |#1|, which defaults to nothing.
7733 % \begin{macrocode}
7734 \DeclareRobustCommand{\masktext}[2][]{##1}%
7735 }
7736 % \end{macrocode}
7737 %
7738 % The ``mask'' citation commands revert to the same commands without
7739 % ``mask'' if the \pkgoption{mask} option is not set.
7740 % \begin{macrocode}
7741 \newcommand{\unmaskcitations}{%
7742 \let\masknocite\nocite
7743 \let\maskcitep\citep
7744 \let\maskcitealp\citealp
7745 \let\maskcitet\citet
7746 \let\maskcitealt\citealt
7747 \let\maskciteauthor\citeauthor
7748 \let\maskcitefullauthor\citefullauthor
7749 \let\maskciteyearpar\citeyearpar
7750 \let\maskciteyear\citeyear
7751 \let\maskcite\cite
7752 \let\maskcitetalias\citetalias
7753 \let\maskcitepalias\citepalias
7754 \let\maskCitet\Citet
7755 \let\maskCitep\Citep
7756 \let\maskCitealt\Citealt
7757 \let\maskCitealp\Citealp
7758 \let\maskCiteauthor\Citeauthor
7759 \let\maskcitenum\citenum
7760 \let\maskciteauthort\citeauthort
7761 \let\maskciteauthorp\citeauthorp
7762 \let\maskCitefullauthor\Citefullauthor
7763 \let\maskCiteauthort\Citeauthort
7764 \let\maskCiteauthorp\Citeauthorp
7765 % \end{macrocode}
7766 % Unmasked, this command prints the mandatory second argument |#2|.
7767 % \begin{macrocode}
7768 \DeclareRobustCommand{\masktext}[2][]{##2}
7769 }
7770 % \end{macrocode}
7771 % \end{macro}
7772 % \end{macro}
7773 % \end{macro}
7774 % \end{macro}
7775 % \end{macro}
7776 % \end{macro}
7777 % \end{macro}
7778 % \end{macro}
7779 % \end{macro}
7780 % \end{macro}
7781 % \end{macro}
7782 % \end{macro}
7783 % \end{macro}
7784 % \end{macro}
7785 % \end{macro}
7786 % \end{macro}
7787 % \end{macro}
7788 % \end{macro}
7789 % \end{macro}
7790 % \end{macro}
7791 % \end{macro}
7792 % \end{macro}
7793 % \end{macro}
7794 % \end{macro}
7795 % \end{macro}
7796 % \end{macro}
7797 %
7798 % End of \pkg{natbib} code.
7799 % \begin{macrocode}
7800 \fi
7801 % \end{macrocode}
7802 %
7803 % This is part of the shared code, but has to be put after loading
7804 % of \pkg{natbib}, so we'll put it here for the moment.
7805 % \begin{macrocode}
7806 \if@APAC@anycitation
7807 \AtEndOfPackage{%
7808 \if@APAC@mask
7809 \maskcitations
7810 \else
7811 \unmaskcitations
7812 \fi
7813 }%
7814 \fi
7815 % \end{macrocode}
7816 %
7817 % \subsubsection{Meta analysis}
7818 %
7819 % To my knowledge. \cmd{\nocitemeta} is not defined by any other citation
7820 % package, so we'll provide it here regardless of the citation option
7821 % chosen.
7822 % \begin{macro}{\definemetaflag}
7823 % \begin{macro}{\nocitemeta}
7824 % This induces an entry in the reference list, but not in the text, and
7825 % compared to \cmd{\nocite} defines an additional flag that indicates that the
7826 % reference has been used in the meta-analysis reported. The construction
7827 % with \cmd{\definemetaflag} is necessary to support \cmd{\nocitemeta} in
7828 % an appendix \emph{after} the reference list. However, the previous version
7829 % did not require the |\if@filesw|, which suggests that that would work if
7830 % we can't write to the \fname{.aux} file, whereas the current one wouldn't.
7831 % I don't know under what conditions this would happen or be useful, but it
7832 % seems extremely rare. If somebody complains, I'll make a fix.
7833 % \begin{macrocode}
7834 \def\definemetaflag#1{%
7835 \@bsphack
7836 % \end{macrocode}
7837 % Define the note that precedes the reference list.
7838 % \begin{macrocode}
7839 \expandafter\global\expandafter\def
7840 \csname APAC@metaprenote@\APAC@extra@b@citeb\endcsname{%
7841 \APACmetaprenote}%
7842 \@for\@citeb:=#1\do{%
7843 \edef\@citeb{\expandafter\@firstofone\@citeb}%
7844 % \end{macrocode}
7845 % Define the meta-analysis flag for the current item.
7846 % \begin{macrocode}
7847 \@ifundefined{flagmeta@\@citeb\APAC@extra@b@citeb}%
7848 {\global\expandafter
7849 \def\csname flagmeta@\@citeb\APAC@extra@b@citeb\endcsname{DUMMY}%
7850 }%
7851 {}%
7852 }%
7853 \@esphack
7854 }
7855 \def\nocitemeta#1{%
7856 \nocite{#1}%
7857 \@bsphack
7858 \if@filesw
7859 \@for\@citeb:=#1\do{%
7860 \edef\@citeb{\expandafter\@firstofone\@citeb}%
7861 \immediate\write
7862 \@newciteauxhandle{\string\definemetaflag{\@citeb}}%
7863 }%
7864 \fi
7865 \@esphack
7866 \@restore@auxhandle
7867 }
7868 % \end{macrocode}
7869 % \end{macro}
7870 % \end{macro}
7871 %
7872 % \subsection{Bibliography structure}
7873 %
7874 % Here we define commands and environments that handle the structure of the
7875 % reference list, various global style parameters, and the communication with
7876 % the citation commands. Commands for detailed aspects of the entries
7877 % themselves are defined below.
7878 %
7879 % \begin{macro}{\bibnewpage}
7880 % Macro for starting a new page before the bibliography, if requested.
7881 % \begin{macrocode}
7882 \def\bibnewpage{\clearpage}%
7883 % \end{macrocode}
7884 % \end{macro}
7885 %
7886 % \begin{macro}{\@biblabel}
7887 % No labels in the bibliography.
7888 % \begin{macrocode}
7889 \def\@biblabel#1{}
7890 % \end{macrocode}
7891 % \end{macro}
7892 %
7893 % \begin{macro}{\@lbibitem}
7894 % Label-bibitem. If \pkg{natbib} is loaded after \pkg{apacite} (or
7895 % \pkg{apacite} is loaded with the \pkgoption{natbibapa} option),
7896 % this is overwritten. I should introduce an option that disables
7897 % \pkg{apacite}'s bibliography-defining commands and/or senses whether
7898 % \pkg{natbib} is loaded, so this is never defined in such cases.
7899 % \begin{macrocode}
7900 \def\@lbibitem[#1]#2{%
7901 \def\BBA{\BBAA}% ``\&''
7902 % \end{macrocode}
7903 % For compatibility with \pkg{chapterbib}, \pkg{bibunits}, \pkg{backref}, and
7904 % \pkg{hyperref}. Adapted from \fname{natbib.dtx}.
7905 % \begin{macrocode}
7906 \item[\hyper@natanchorstart{#2\APAC@extra@b@citeb}%
7907 \@biblabel{#1}%
7908 \hyper@natanchorend]%
7909 \if@filesw{%
7910 \def\BBA{\string\BBA}%
7911 \let\protect\noexpand
7912 % \end{macrocode}
7913 % \pkg{bibunits} redefines \cmd{\bibcite} through \cmd{\AtBeginDocument}
7914 % in a way that is incompatible with \pkg{apacite}'s definition. The
7915 % simplest way to get things working automatically seems to be
7916 % introducing the parallel \cmd{\APACbibcite} command. This should also
7917 % solve many other compatibility problems.
7918 % \begin{macrocode}
7919 \immediate\write\@newciteauxhandle{\string\bibcite{#2}{#1}}%
7920 \immediate\write\@newciteauxhandle{\string\APACbibcite{#2}{#1}}%
7921 \def\BBA{\BBAA}%
7922 }%
7923 \fi
7924 \ignorespaces
7925 }
7926 % \end{macrocode}
7927 % \end{macro}
7928 %
7929 % \begin{macro}{\APACbibcite}
7930 % \begin{macro}{\bibcite}
7931 % These commands pass the author-year information from the reference list to
7932 % the citation commands. See above for the necessity for \cmd{\APACbibcite}.
7933 % \begin{macrocode}
7934 \def\APACbibcite#1#2{%
7935 \global\expandafter
7936 \def\csname b@#1\APAC@extra@binfo\endcsname{#2}% names
7937 \global\expandafter
7938 \def\csname Y@#1\APAC@extra@binfo\endcsname{\@year@#2}% year
7939 }
7940 % \end{macrocode}
7941 % We don't need this one anymore, but other packages may use it.
7942 % \begin{macrocode}
7943 \let\bibcite\APACbibcite
7944 % \end{macrocode}
7945 % \end{macro}
7946 % \end{macro}
7947 %
7948 % \begin{macro}{\st@rtbibsection}
7949 % Start a new section for the reference list.
7950 % \begin{macrocode}
7951 \def\st@rtbibsection{%
7952 \@bibnewpage% start a new page if desired
7953 \if@numberedbib%
7954 \section{\refname}% e.g., 6. References
7955 \else%
7956 \section*{\refname}% e.g., References
7957 \if@tocbib%
7958 \addcontentsline{toc}{section}{\refname}%
7959 \fi%
7960 % \end{macrocode}
7961 % Ideally, we'd use something like |\sectionmark{{\refname}}|, so that
7962 % user-defined page heading styles are respected. But this does not work
7963 % properly, because it generates section numbers. Therefore, we define the
7964 % complete headings here. I need to find a better solution for this.
7965 % \begin{macrocode}
7966 \@ifundefined{chapter}
7967 {\@mkboth{{\refname}}{{\refname}}}%
7968 {\markright{{\refname}}}%
7969 \fi%
7970 }%
7971 % \end{macrocode}
7972 % \end{macro}
7973 %
7974 % \begin{macro}{\st@rtbibchapter}
7975 % Start a new chapter for the reference list.
7976 % \begin{macrocode}
7977 \def\st@rtbibchapter{%
7978 % \end{macrocode}
7979 % Here no \cmd{\@bibnewpage}, because it is assumed that the \cmd{\chapter}
7980 % starts a new page.
7981 % \begin{macrocode}
7982 \if@numberedbib%
7983 \chapter{\bibname}% e.g., 6. References
7984 \else%
7985 \chapter*{\bibname}% e.g., References
7986 \if@tocbib%
7987 \addcontentsline{toc}{chapter}{\bibname}%
7988 \fi%
7989 % \end{macrocode}
7990 % Again, \cmd{\chaptermark} and \cmd{\sectionmark} don't work properly, so
7991 % define headings at a lower level.
7992 % \begin{macrocode}
7993 \@mkboth{{\bibname}}{{\bibname}}%
7994 \fi%
7995 }%
7996 % \end{macrocode}
7997 % \end{macro}
7998 %
7999 % \begin{environment}{thebibliography}
8000 % This environment contains the reference list. For historical reasons, it is
8001 % defined in the plain \TeX{} way through definition of the
8002 % \cmd{\thebibliography} and \cmd{\endthebibliography} macros instead of
8003 % \cmd{\renewenvironment}.
8004 % \begin{macrocode}
8005 \def\thebibliography#1{%
8006 % \end{macrocode}
8007 % If \cmd{\chapter} is not defined, start a bibliography section.
8008 % \begin{macrocode}
8009 \@ifundefined{chapter}%
8010 {\st@rtbibsection}%
8011 % \end{macrocode}
8012 % Else, chapter is defined. Check first whether an explicit option has been
8013 % chosen.
8014 % \begin{macrocode}
8015 {\if@sectionbibdefault
8016 % \end{macrocode}
8017 % No explicit option chosen, so we have to speculate. If \cmd{\mainmatter}
8018 % is not defined (typically a report), assume that the bibliography is
8019 % a chapter. If \cmd{\mainmatter} is defined, a bibliography in the
8020 % main matter is typically a chapter-specific one, so generate a
8021 % bibliography section. A bibliography in the back matter is most likely
8022 % a global one, so then generate a bibliography chapter.
8023 % \begin{macrocode}
8024 {\@ifundefined{@mainmatterfalse}%
8025 {\st@rtbibchapter}%
8026 {\if@mainmatter
8027 \st@rtbibsection
8028 \else
8029 \st@rtbibchapter
8030 \fi
8031 }%
8032 }%
8033 % \end{macrocode}
8034 % If an explicit option has been chosen, simply use this.
8035 % \begin{macrocode}
8036 \else
8037 \if@sectionbib
8038 \st@rtbibsection
8039 \else
8040 \st@rtbibchapter
8041 \fi
8042 \fi
8043 }%
8044 % \end{macrocode}
8045 % Insert some code between the chapter or section heading and the reference
8046 % list. \cmd{\bibliographytypesize} will typically be used for some font
8047 % settings and \cmd{\bibliographyprenote} for explanatory text, but this is
8048 % up to the user. The ``metaprenote'' is a fixed text indicating that
8049 % marked references are included in the meta-analysis reported.
8050 % \begin{macrocode}
8051 \bibliographytypesize % e.g., to put the bibliography in \small type
8052 \bibliographyprenote % some explanatory note before the references
8053 \@ifundefined{APAC@metaprenote@\APAC@extra@b@citeb}%
8054 {}% skip
8055 {\csname APAC@metaprenote@\APAC@extra@b@citeb\endcsname}%
8056 % \end{macrocode}
8057 % Initialize the list environment that holds the reference list.
8058 % \begin{macrocode}
8059 \list{\relax}{\labelsep=\biblabelsep
8060 % \parskip\z@ \@plus .3\p@\relax
8061 \parsep=\bibparsep
8062 \itemsep=\bibitemsep
8063 \leftmargin=\bibleftmargin
8064 \itemindent=\bibindent}% changed to cope with 4th ed.
8065 % \end{macrocode}
8066 % \cmd{\newblock} is inserted between ``blocks'' of a reference entry and
8067 % inserts some stretchable and shrinkable extra space between the blocks.
8068 % \begin{macrocode}
8069 \def\newblock{\hskip .11em plus .33em minus .07em}%
8070 \sloppy\clubpenalty4000\widowpenalty4000
8071 \sfcode`\.=1000\relax %'
8072 % \end{macrocode}
8073 % For compatibility with \pkg{bibtopic}.
8074 % \begin{macrocode}
8075 \bt@beg@thb@hook
8076 % \end{macrocode}
8077 % To overrule \pkg{backref}.
8078 % \begin{macrocode}
8079 \APACrestorebibitem
8080 }
8081 \def\endthebibliography{%
8082 % \end{macrocode}
8083 % For compatibility with \pkg{bibtopic}.
8084 % \begin{macrocode}
8085 \bt@end@thb@hook
8086 % \end{macrocode}
8087 % Warning if no item was included in the list and return to normal font size.
8088 % If \cmd{\bibliographytypesize} includes other formatting as well, the user
8089 % has to reset this explicitly after the bibliography, at least if there is
8090 % text after it.
8091 % \begin{macrocode}
8092 \def\@noitemerr{%
8093 \@latex@warning{Empty `thebibliography' environment}%
8094 }%
8095 \endlist\normalsize
8096 }
8097 % \end{macrocode}
8098 % \end{environment}
8099 %
8100 % \subsection{Reference list formatting}
8101 %
8102 % Traditionally, the reference list formatting is almost completely done by
8103 % the bibliography style (\fname{.bst} file). Modeled after its predecessor,
8104 % \pkg{theapa}, \pkg{apacite} has always supported some possibilities for
8105 % customization through redefinable macros in the reference list. Due to my
8106 % own customization needs, requests by users, and the language support, an
8107 % increasing amount of reference list formatting is handled in this way. This
8108 % section defines the default implementation of these macros, which users
8109 % thus can redefine.
8110 %
8111 % \begin{macro}{\@connect@with@commas}
8112 % An auxiliary function: Make a comma-separated output list of the input,
8113 % recognizing empty arguments. Must be called with one argument, and the
8114 % argument contains a comma-separated list of elements. The elements of this
8115 % should generally be enclosed in braces.
8116 % \begin{macrocode}
8117 \def\@connect@with@commas#1{%
8118 \def\@comma@space{\unskip, }%
8119 \let\@connect@string\relax
8120 % \end{macrocode}
8121 % Loop over elements.
8122 % \begin{macrocode}
8123 \@for\@element@:=#1\do{%
8124 % \end{macrocode}
8125 % Commas should only be inserted if both sides are nonempty.
8126 % \begin{macrocode}
8127 \ifx\@empty\@element@%
8128 \else
8129 % \end{macrocode}
8130 % Not empty: insert connect string (nothing for the first nonempty
8131 % element, a comma and space afterwards).
8132 % \begin{macrocode}
8133 \@connect@string\@element@%
8134 \let\@connect@string\@comma@space
8135 \fi
8136 }%
8137 \let\@connect@string\@undefined
8138 \let\@comma@space\@undefined
8139 }
8140 % \end{macrocode}
8141 % \end{macro}
8142 %
8143 % \begin{macro}{\APACmetastar}
8144 % \begin{macro}{\APACinsertmetastar}
8145 % Insert an asterisk before the names in the reference list for entries that
8146 % are used in a meta-analysis.
8147 % \begin{macrocode}
8148 \newcommand{\APACmetastar}{\ensuremath{{}^\ast}}
8149 \def\APACinsertmetastar#1{%
8150 \@for\@citeb:=#1\do{%
8151 \edef\@citeb{\expandafter\@firstofone\@citeb}%
8152 \@ifundefined{flagmeta@\@citeb\APAC@extra@b@citeb}%
8153 {}% skip
8154 {{\APACmetastar}}%
8155 }%
8156 }
8157 % \end{macrocode}
8158 % \end{macro}
8159 % \end{macro}
8160 %
8161 % \begin{environment}{APACrefauthors}
8162 % An environment that allows some limited customization of author
8163 % formatting in the reference list. In this implementation customization
8164 % is handled through the \cmd{\APACrefauthstyle} macro, which allows some
8165 % style definition, in particular font changes such as \cmd{\sc}.
8166 % \begin{macrocode}
8167 \newenvironment{APACrefauthors}{%
8168 \begingroup \APACrefauthstyle
8169 }{\endgroup }
8170 % \end{macrocode}
8171 % \end{environment}
8172 %
8173 % \begin{macro}{\APACrefYear}
8174 % Formatting of the year in the reference list. Note that instead of redefining
8175 % this command, one can also redefine the parentheses themselves. The argument
8176 % should never be empty. The companion macro \cmd{\APACrefYearMonthDay} is
8177 % defined below in the language-specific section.
8178 % \begin{macrocode}
8179 \newcommand{\APACrefYear}[1]{%
8180 {\BBOP}{#1}{\BBCP}%
8181 }
8182 % \end{macrocode}
8183 % \end{macro}
8184 %
8185 % Title formatting. In these, |#1| is the capitalized title and |#2| is the
8186 % sentence-case title.
8187 %
8188 % \begin{macro}{\APACrefatitle}
8189 % Article title (roman, not capitalized).
8190 % \begin{macrocode}
8191 \newcommand{\APACrefatitle}[2]{#2}
8192 % \end{macrocode}
8193 % \end{macro}
8194 % \begin{macro}{\APACrefbtitle}
8195 % Book title (italic, not capitalized).
8196 % \begin{macrocode}
8197 \newcommand{\APACrefbtitle}[2]{\Bem{#2}}
8198 % \end{macrocode}
8199 % \end{macro}
8200 % \begin{macro}{\APACrefaetitle}
8201 % English translation of a foreign article title (bracketed, roman, not
8202 % capitalized).
8203 % \begin{macrocode}
8204 \newcommand{\APACrefaetitle}[2]{[#2]}
8205 % \end{macrocode}
8206 % \end{macro}
8207 % \begin{macro}{\APACrefbetitle}
8208 % English translation of a foreign book title (bracketed, roman, not
8209 % capitalized).
8210 % \begin{macrocode}
8211 \newcommand{\APACrefbetitle}[2]{[#2]}
8212 % \end{macrocode}
8213 % \end{macro}
8214 %
8215 % \begin{macro}{\APACjournalVolNumPages}
8216 % Journal, volume, number, pages
8217 % (|#1| = journal, |#2| = volume, |#3| = number, |#4| = formatted pages).
8218 % \begin{macrocode}
8219 \newcommand{\APACjournalVolNumPages}[4]{%
8220 \Bem{#1}% journal
8221 \ifx\@empty#2\@empty
8222 \else
8223 \unskip, \Bem{#2}% volume
8224 \fi
8225 \ifx\@empty#3\@empty
8226 \else
8227 \unskip({#3})% issue number
8228 \fi
8229 \ifx\@empty#4\@empty
8230 \else
8231 \unskip, {#4}% pages
8232 \fi
8233 }
8234 % \end{macrocode}
8235 % \end{macro}
8236 %
8237 % \begin{macro}{\APACaddressPublisher}
8238 % \begin{macro}{\APACaddressInstitution}
8239 % \begin{macro}{\APACaddressSchool}
8240 % Address and publisher, institution, or school (|#1| = address,
8241 % |#2| = publisher).
8242 % \begin{macrocode}
8243 \DeclareRobustCommand{\APACaddressPublisher}[2]{%
8244 \ifx\@empty#1\@empty
8245 \ifx\@empty#2\@empty
8246 \else
8247 {#2}% publisher
8248 \fi
8249 \else
8250 {#1}% address
8251 \ifx\@empty#2\@empty
8252 \else
8253 \unskip: {#2}% publisher
8254 \fi
8255 \fi
8256 }
8257 \let\APACaddressInstitution\APACaddressPublisher
8258 \DeclareRobustCommand{\APACaddressSchool}[2]{%
8259 \ifx\@empty#2\@empty
8260 \ifx\@empty#1\@empty
8261 \else
8262 {#1}% address
8263 \fi
8264 \else
8265 {#2}% school
8266 \ifx\@empty#1\@empty
8267 \else
8268 \unskip, {#1}% address
8269 \fi
8270 \fi
8271 }
8272 % \end{macrocode}
8273 % \end{macro}
8274 % \end{macro}
8275 % \end{macro}
8276 %
8277 % \begin{macro}{\APACtypeAddressSchool}
8278 % Type, school, and address in parenthese after the title in a thesis.
8279 % \begin{macrocode}
8280 \DeclareRobustCommand{\APACtypeAddressSchool}[3]{%
8281 \ifx\@empty#1\@empty
8282 \ifx\@empty#3\@empty
8283 \ifx\@empty#2\@empty
8284 \else
8285 ({#2})% address
8286 \fi
8287 \else
8288 ({#3}% school
8289 \ifx\@empty#2\@empty
8290 \else
8291 \unskip, {#2}% address
8292 \fi
8293 )%
8294 \fi
8295 \else
8296 ({#1}% type
8297 \ifx\@empty#3\@empty
8298 \ifx\@empty#2\@empty
8299 \else
8300 \unskip, {#2}% address
8301 \fi
8302 \else
8303 \unskip, {#3}% school
8304 \ifx\@empty#2\@empty
8305 \else
8306 \unskip, {#2}% address
8307 \fi
8308 \fi
8309 )%
8310 \fi
8311 }
8312 % \end{macrocode}
8313 % \end{macro}
8314 %
8315 % \begin{macro}{\APACaddressPublisherEqAuth}
8316 % \begin{macro}{\APACaddressInstitutionEqAuth}
8317 % Address and publisher/institution if the latter is also the author.
8318 % (|#1| = address, |#2| = publisher).
8319 % \begin{macrocode}
8320 \newcommand{\APACaddressPublisherEqAuth}[2]{%
8321 \ifx\@empty#1\@empty
8322 {\BAuthor{}}% Publisher formatted as ``Author''
8323 \else
8324 {#1\unskip: \BAuthor{}}% Address: Author
8325 \fi
8326 }
8327 \let\APACaddressInstitutionEqAuth\APACaddressPublisherEqAuth
8328 % \end{macrocode}
8329 % \end{macro}
8330 % \end{macro}
8331 %
8332 % \begin{macro}{\APAChowpublished}
8333 % Formatting of the \fieldname{howpublished} field. The
8334 % \cmd{\APAChowpublished} macro is only inserted in the \fname{.bbl} file if
8335 % the argument is nonempty. Because we don't want any special formatting, and
8336 % |\def\APAChowpublished#1{#1}| leads to problems with hash marks (`|#|') in
8337 % url's that may be present in \fieldname{howpublished}, we simply pretend
8338 % that \cmd{\APAChowpublished} does not have an argument and does nothing.
8339 % \begin{macrocode}
8340 \let\APAChowpublished\relax
8341 % \end{macrocode}
8342 % \end{macro}
8343 %
8344 % \begin{environment}{APACrefURL}
8345 % URL formatting. Use an environment instead of a macro to avoid some problems
8346 % with url's as arguments of macros. The optional argument is the date that
8347 % the url was last checked.
8348 % \begin{macrocode}
8349 \newenvironment{APACrefURL}[1][]{%
8350 \ifx\@empty#1\@empty
8351 \BRetrievedFrom % Retrieved from
8352 \else
8353 \BRetrieved{#1}% Retrieved <date>, from
8354 \fi
8355 }{}
8356 % \end{macrocode}
8357 % \end{environment}
8358 %
8359 % \begin{environment}{APACrefDOI}
8360 % DOI formatting. Use an environment instead of a macro to avoid some problems
8361 % with url's as arguments of macros.
8362 % \begin{macrocode}
8363 \newenvironment{APACrefDOI}{%
8364 \global\let\old@doi\doi
8365 \if@doi
8366 \doiprefix
8367 \else
8368 % \end{macrocode}
8369 % Suppression of DOIs. For non-APA styles.
8370 % \begin{macrocode}
8371 \global\let\doi\@gobble
8372 \fi
8373 % \end{macrocode}
8374 % Restore definition of \cmd{\doi}, in case a user wants to use this
8375 % command explicitly.
8376 % \begin{macrocode}
8377 }{\global\let\doi\old@doi }
8378 % \end{macrocode}
8379 % \end{environment}
8380 %
8381 % \begin{environment}{APACrefURLmsg}
8382 % URLs of messages.
8383 % \begin{macrocode}
8384 \newenvironment{APACrefURLmsg}{%
8385 \BMsgPostedTo
8386 }{}
8387 % \end{macrocode}
8388 % \end{environment}
8389 %
8390 % \begin{macro}{\APACorigED}
8391 % \begin{macro}{\APACorigEDS}
8392 % Original editor(s) for reprints and translations.
8393 % \begin{macrocode}
8394 \newcommand{\APACorigED}[1]{%
8395 \ifx\@empty#1\@empty
8396 \else
8397 \Bby\ {#1}, \BED{}% ``by E. D. Itor (Ed.)''
8398 \fi
8399 }
8400 \newcommand{\APACorigEDS}[1]{%
8401 \ifx\@empty#1\@empty
8402 \else
8403 \Bby\ {#1}, \BEDS{}% ``by E. D. Itor \& A. N. Other (Eds.)''
8404 \fi
8405 }
8406 % \end{macrocode}
8407 % \end{macro}
8408 % \end{macro}
8409 %
8410 % \begin{macro}{\APACbVolEdTR}
8411 % Volume, edition, type, number, for a technical report (|#1| = formatted
8412 % edition + volume, |#2| = formatted technical report type + number).
8413 % \begin{macrocode}
8414 \newcommand{\APACbVolEdTR}[2]{%
8415 \ifx\@empty#1\@empty
8416 \ifx\@empty#2\@empty
8417 \else
8418 {(#2)}% (Technical Report No.\ <no>)
8419 \fi
8420 \else
8421 ({#1}% (2nd ed., Vol.~1
8422 \ifx\@empty#2\@empty
8423 \else
8424 \unskip; {#2}% ; Technical Report No.\ <no>
8425 \fi
8426 )% Final parenthesis.
8427 \fi
8428 }
8429 % \end{macrocode}
8430 % \end{macro}
8431 %
8432 % \begin{macro}{\APACbVolEdTRpgs}
8433 % Volume, edition, type, number, pages for an \entryname{@intechreport}.
8434 % Arguments: |#1| = formatted edition + volume, |#2| = formatted technical
8435 % report type + number, |#3| = formatted pages.
8436 % \begin{macrocode}
8437 \newcommand{\APACbVolEdTRpgs}[3]{%
8438 \ifx\@empty#1\@empty
8439 \ifx\@empty#2\@empty
8440 \ifx\@empty#3\@empty
8441 \else
8442 {(#3)}%% (pp. 10--30)
8443 \fi
8444 \else
8445 %% (Technical Report No.\ <no>, pp. 10--30)
8446 (\@connect@with@commas{{#2},{#3}})%
8447 \fi
8448 \else
8449 ({#1}% (2nd ed., Vol.~1
8450 \ifx\@empty#2\@empty
8451 \ifx\@empty#3\@empty
8452 \else
8453 \unskip; {#3}% ; pp. 10--30
8454 \fi
8455 \else
8456 %% ; Technical Report No.\ <no>, pp. 10--30
8457 \unskip; \@connect@with@commas{{#2},{#3}}%
8458 \fi
8459 )% Final parenthesis.
8460 \fi
8461 }
8462 % \end{macrocode}
8463 % \end{macro}
8464 %
8465 % Various note formatting functions.
8466 %
8467 % \begin{macro}{\APACrefnote}
8468 % Only a note.
8469 % \begin{macrocode}
8470 \newcommand{\APACrefnote}[1]{%
8471 \ifx\@empty#1\@empty
8472 \else
8473 ({#1})%
8474 \fi
8475 }
8476 % \end{macrocode}
8477 % \end{macro}
8478 %
8479 % \begin{macro}{\APACorigyearnote}
8480 % Original year + optional note (|#1| = year, |#2| = note).
8481 % \begin{macrocode}
8482 \newcommand{\APACorigyearnote}[2]{%
8483 \ifx\@empty#1\@empty
8484 % \end{macrocode}
8485 % Original year empty: format note.
8486 % \begin{macrocode}
8487 \APACrefnote{#2}%
8488 \else
8489 % \end{macrocode}
8490 % Check for \cmd{\bibnodate}. I think the following command does not check
8491 % whether |#1| = `\cmd{\bibnodate}', but expands them; but that should also
8492 % be OK and saves a lot of juggling with \cmd{\expandafter} commands.
8493 % \begin{macrocode}
8494 \ifx\bibnodate#1\@empty
8495 % \end{macrocode}
8496 % Original year unknown: Format (only) note.
8497 % \begin{macrocode}
8498 \APACrefnote{#2}%
8499 \else
8500 % \end{macrocode}
8501 % Original year has been given: ``Original work published''.
8502 % \begin{macrocode}
8503 (\BOWP{} {#1}%
8504 % \end{macrocode}
8505 % Insert note.
8506 % \begin{macrocode}
8507 \ifx\@empty#2\@empty
8508 \else
8509 \unskip; {#2}%
8510 \fi
8511 % \end{macrocode}
8512 % Final parenthesis.
8513 % \begin{macrocode}
8514 )%
8515 \fi
8516 \fi
8517 }
8518 % \end{macrocode}
8519 % \end{macro}
8520 %
8521 % \begin{macro}{\APACorigjournalnote}
8522 % Original journal + optional note.
8523 % Arguments: |#1| = year, |#2| = journal, |#3| = volume, |#4| = issue number,
8524 % |#5| = formatted pages, |#6| = note.
8525 % \begin{macrocode}
8526 \newcommand{\APACorigjournalnote}[6]{%
8527 (\BREPR{} % ``(Reprinted from '' (note the space)
8528 \Bem{#2}% Journal (should not be empty)
8529 \ifx\@empty#1\@empty
8530 \else
8531 \unskip, {#1}% , year
8532 \fi
8533 \ifx\@empty#3\@empty
8534 \else
8535 \unskip, \Bem{#3}% , volume
8536 \fi
8537 \ifx\@empty#4\@empty
8538 \else
8539 \unskip{[#4]}% [issue number]
8540 \fi
8541 \ifx\@empty#5\@empty
8542 \else
8543 \unskip, {#5}% , pages
8544 \fi
8545 \ifx\@empty#6\@empty
8546 \else
8547 \unskip; {#6}% ; note
8548 \fi
8549 )% Final parenthesis
8550 }
8551 % \end{macrocode}
8552 % \end{macro}
8553 %
8554 % \begin{macro}{\APACorigbooknote}
8555 % Original book + optional note. Arguments:
8556 % |#1| = year, |#2| = formatted editor, |#3| = formatted title,
8557 % |#4| = formatted edition, |#5| = formatted volume, |#6| = formatted pages,
8558 % |#7| = address, |#8| = publisher, |#9| = note.
8559 % \begin{macrocode}
8560 \newcommand{\APACorigbooknote}[9]{%
8561 %% ``(Reprinted from '' (note the space)
8562 (\BREPR{} %
8563 %% Title, edition, volume, pages, editor, year, address: publisher
8564 % \end{macrocode}
8565 % These should not all be empty, but this is not checked here, because it's
8566 % done in the \fname{.bst} file.
8567 % \begin{macrocode}
8568 \@connect@with@commas{%
8569 {#3},{#4},{#5},{#6},{#2},{#1},{\APACaddressPublisher{#7}{#8}}%
8570 }%%
8571 \ifx\@empty#9\@empty
8572 \else
8573 ; #9%% ; note
8574 \fi
8575 )% Final parenthesis.
8576 }
8577 % \end{macrocode}
8578 % \end{macro}
8579 %
8580 % \begin{environment}{APACrefannotation}
8581 % Annotations; for annotated bibliographies. Cf.~\citeA[pp.~810--811]{TLC2}.
8582 % \begin{macrocode}
8583 \newenvironment{APACrefannotation}{%
8584 \begin{quotation}\noindent\ignorespaces
8585 }{\end{quotation}}
8586 % \end{macrocode}
8587 % \end{environment}
8588 %
8589 % \subsection{Various specific style settings and utility macros}
8590 %
8591 % \begin{macro}{\BAstyle}
8592 % Text style of authors for citations that include the year as well
8593 % (\cmd{\cite}, \cmd{\shortcite}, \cmd{\fullcite}, \cmd{\citeA},
8594 % \cmd{\shortciteA}, \cmd{\fullciteA}, \cmd{\citeNP}, \cmd{\shortciteNP},
8595 % \cmd{\fullciteNP}).
8596 % \begin{macrocode}
8597 \newcommand{\BAstyle}{}%
8598 % \end{macrocode}
8599 % \end{macro}
8600 %
8601 % \begin{macro}{\BAastyle}
8602 % Text style of authors for \cmd{\citeauthor} and its variants
8603 % (\cmd{\shortciteauthor}, \cmd{\fullciteauthor}, \cmd{\citeauthorNP},
8604 % \cmd{\shortciteauthorNP}, \cmd{\fullciteauthorNP}).
8605 % \begin{macrocode}
8606 \newcommand{\BAastyle}{}%
8607 % \end{macrocode}
8608 % \end{macro}
8609 %
8610 % \begin{macro}{\APACrefauthstyle}
8611 % Text style of authors in reference list.
8612 % \begin{macrocode}
8613 \newcommand{\APACrefauthstyle}{}%
8614 % \end{macrocode}
8615 % \end{macro}
8616 %
8617 % \begin{macro}{\APACciteatitle}
8618 % \begin{macro}{\APACcitebtitle}
8619 % Formatting of ``article'' and ``book'' titles when they are used in a
8620 % citation, typically when there is no author and the title takes this role.
8621 % \begin{macrocode}
8622 \newcommand{\APACciteatitle}[1]{``#1''}
8623 \newcommand{\APACcitebtitle}[1]{{\em #1\/}}
8624 % \end{macrocode}
8625 % \end{macro}
8626 % \end{macro}
8627 %
8628 % \begin{macro}{\APACyear}
8629 % \begin{macro}{\APACexlab}
8630 % Formatting of the year and the extra label (`a', `b', etc.) that is used to
8631 % distinguish different works by the same author(s) in the same year. These
8632 % macros have been introduced to solve some problems with \pkg{natbib}'s
8633 % parsing macros.
8634 % \begin{macrocode}
8635 \newcommand{\APACyear}[1]{{#1}}%
8636 \newcommand{\APACexlab}[1]{{#1}}%
8637 % \end{macrocode}
8638 % \end{macro}
8639 % \end{macro}
8640 %
8641 % \begin{macro}{\theBibCnt}
8642 % \begin{macro}{\BCnt}
8643 % The |BibCnt| counter is used to distinguish multiple citations with the same
8644 % author(s) and year. Using a counter allows the user control over its
8645 % formatting. The default formatting (APA style) is to add roman lowercase
8646 % letters: ``(Kruskal, 1964a, 1964b)''. The \cmd{\protect} is necessary when
8647 % \pkg{natbib} is used.
8648 % \begin{macrocode}
8649 \newcounter{BibCnt}
8650 \renewcommand{\theBibCnt}{\alph{BibCnt}}
8651 \DeclareRobustCommand{\BCnt}[1]{\setcounter{BibCnt}{#1}\theBibCnt}
8652 % \end{macrocode}
8653 % \end{macro}
8654 % \end{macro}
8655 %
8656 % \begin{macro}{\BCntIP}
8657 % \begin{macro}{\BCntND}
8658 % Variations of \cmd{\BCnt} for in-press and no-date citations. The \cmd{\mbox}
8659 % prevents a line break at the hyphen.
8660 % \begin{macrocode}
8661 \DeclareRobustCommand{\BCntIP}[1]{\setcounter{BibCnt}{#1}\mbox{-\theBibCnt}}
8662 \DeclareRobustCommand{\BCntND}[1]{\setcounter{BibCnt}{#1}\mbox{-\theBibCnt}}
8663 % \end{macrocode}
8664 % \end{macro}
8665 % \end{macro}
8666 %
8667 % \begin{macro}{\bibliographytypesize}
8668 % Font size of the references, but this macro can be abused to insert lots of
8669 % other style commands and/or text between the section or chapter heading and
8670 % the actual references as well.
8671 % \begin{macrocode}
8672 \let\bibliographytypesize\normalsize
8673 % \end{macrocode}
8674 % \end{macro}
8675 %
8676 % \begin{macro}{\bibliographyprenote}
8677 % An optional note just before the references in the reference list (but after
8678 % \cmd{\bibliographytypesize}). It defaults to nothing, but can be changed to
8679 % a list of commands (e.g., if author formatting should be different in the
8680 % reference list) and/or text (e.g., for an explanatory note).
8681 % \begin{macrocode}
8682 \newcommand{\bibliographyprenote}{}
8683 % \end{macrocode}
8684 % \end{macro}
8685 %
8686 % \begin{macro}{\bibleftmargin}
8687 % \begin{macro}{\bibindent}
8688 % \begin{macro}{\bibparsep}
8689 % \begin{macro}{\bibitemsep}
8690 % \begin{macro}{\biblabelsep}
8691 % Declare a few length parameters for the reference list and give them
8692 % default values. Supporting the \pkg{natbib} length \cmd{\bibhang} would
8693 % be nice, but I don't see a way to do this in a user-friendly way that
8694 % allows loading \pkg{apacite} both with and without \pkg{natbib} and
8695 % also allows changing \cmd{\bibindent} and \cmd{\bibleftmargin}
8696 % separately.
8697 % \begin{macrocode}
8698 \newskip{\bibleftmargin}
8699 \newskip{\bibindent}
8700 \newskip{\bibparsep}
8701 \newskip{\bibitemsep}
8702 \newskip{\biblabelsep}
8703 \setlength{\bibleftmargin}{2.5em}
8704 \setlength{\bibindent}{-\bibleftmargin}
8705 \setlength{\bibparsep}{0pt}
8706 \setlength{\bibitemsep}{0pt plus .3pt}
8707 \setlength{\biblabelsep}{0pt}
8708 % \end{macrocode}
8709 % \end{macro}
8710 % \end{macro}
8711 % \end{macro}
8712 % \end{macro}
8713 % \end{macro}
8714 %
8715 % \begin{macro}{\bibcorporate}
8716 % Formatting of corporate (group) authors. Its primary function is in the
8717 % \BibTeX{} stage. It is recognized by \fname{apacite.bst}, which handles
8718 % such authors slightly differently from ordinary authors.
8719 % \begin{macrocode}
8720 \let\bibcorporate\relax
8721 % \end{macrocode}
8722 % \end{macro}
8723 %
8724 % \begin{macro}{\BBA}
8725 % Initialize this command, which formats the ``and'' between authors.
8726 % \begin{macrocode}
8727 \newcommand{\BBA}{\BBAA}% `\&'
8728 % \end{macrocode}
8729 % \end{macro}
8730 %
8731 % \begin{macro}{\Bem}
8732 % Emphasis in the bibliography. A relic from \pkg{theapa}. It allows to use
8733 % underlining in the bibliography and italics in the text, but the default is
8734 % italics.
8735 % \begin{macrocode}
8736 \let\Bem\emph
8737 % \end{macrocode}
8738 % \end{macro}
8739 %
8740 % \begin{macro}{\bibnotype}
8741 % This macro indicates that the type information should be left empty. It is
8742 % used for \entryname{@techreport} and \entryname{@intechreport}, where
8743 % ``\cmd{\BTR}'' is the default type if the field is left empty. As such, it
8744 % primarily modifies the behavior of \fname{apacite.bst}.
8745 % \begin{macrocode}
8746 \newcommand{\bibnotype}{}
8747 % \end{macrocode}
8748 % \end{macro}
8749 %
8750 % \begin{macro}{\APACSortNoop}
8751 % \begin{macro}{\bibphant}
8752 % The \cmd{\APACSortNoop} macro can be used to change the sorting order:
8753 % When put between a pair of braces at the beginning of a field, the entry is
8754 % sorted on the argument of this command, but the argument is never displayed.
8755 % \cmd{\bibphant} is the same as \cmd{\APACSortNoop}, so it is not discussed
8756 % in the main documentation. It is only kept for backwards compatibility with
8757 % old versions of \pkg{apacite}, in which it was documented.
8758 % \begin{macrocode}
8759 \newcommand{\APACSortNoop}[1]{}
8760 \let\bibphant\APACSortNoop
8761 % \end{macrocode}
8762 % \end{macro}
8763 % \end{macro}
8764 %
8765 % \begin{macro}{\makehashother}
8766 % \begin{macro}{\makehashmacropar}
8767 % Setting the catcode of the hash mark `|#|'. This is mainly useful in some
8768 % cases in which the bibliography contains urls containing `|#|' symbols.
8769 % These are analogous to \cmd{\makeatother} and \cmd{\makeatletter}.
8770 % (They are undocumented in the main documentation!)
8771 % \begin{macrocode}
8772 \def\makehashother{\catcode`\#=12\relax}
8773 \def\makehashmacropar{\catcode`\#=6\relax}
8774 % \end{macrocode}
8775 % \end{macro}
8776 % \end{macro}
8777 %
8778 % \subsection{Author index setup and index styles}
8779 %
8780 % Here, the author index options are implemented. It also defines some index
8781 % styles and defines most of the index-related commands to do nothing in case
8782 % no author index is requested.
8783 %
8784 % \begin{macro}{\AX}
8785 % \begin{macro}{\corporateAX}
8786 % \begin{macro}{\@AXfile}
8787 % \begin{macro}{\currentindexname}
8788 % \begin{macro}{\printindex}
8789 % \begin{macro}{\PrintAX}
8790 % \begin{macro}{\orig@printindex}
8791 % \begin{macro}{\APAC@printindex}
8792 % \begin{macro}{\check@printindex}
8793 % Define the author-indexing macros and the index-printing commands.
8794 % \begin{macrocode}
8795 \if@APAC@index
8796 % \end{macrocode}
8797 % Author index requested.
8798 % \begin{macrocode}
8799 \if@APAC@index@package
8800 % \end{macrocode}
8801 % Load \pkg{index} package.
8802 % \begin{macrocode}
8803 \RequirePackage{index}[1995/09/28]
8804 % \end{macrocode}
8805 % Define the author index. This may be changed in the preamble of the
8806 % document (or in a user-provided package) by a \cmd{\renewindex}
8807 % command.
8808 % \begin{macrocode}
8809 \newindex{autx}{adx}{and}{\authorindexname}
8810 % \end{macrocode}
8811 % Author indexing command. Some trial and error and adapting code from
8812 % other packages to get this right, esp.\ when \pkg{hyperref} is also
8813 % loaded.
8814 % \begin{macrocode}
8815 \DeclareRobustCommand{\AX}[1]{%
8816 \if@filesw{%
8817 \protected@write\@auxout{}{%
8818 \string\protected@write\string\tf@autx{}{%
8819 \string\string\string
8820 \indexentry{\string#1|hyperpage}{\thepage}}}%
8821 }%
8822 \fi
8823 }%
8824 \else
8825 % \end{macrocode}
8826 % Without the \pkg{index} package, using standard \LaTeX{}. This includes
8827 % a bit of code adapted from \fname{ltidxglo.dtx} and \fname{doc.dtx}.
8828 % \begin{macrocode}
8829 \newwrite\@AXfile
8830 \immediate\openout\@AXfile=\jobname.adx
8831 \typeout
8832 {Writing author index file \jobname.adx }%
8833 \DeclareRobustCommand{\AX}[1]{%
8834 \protected@write\@AXfile{}%
8835 {\string\indexentry{\string#1}{\thepage}}%
8836 }%
8837 \def\PrintAX{\edef\currentindexname{\authorindexname}%
8838 \@input@{\jobname.and}%
8839 \global\let\PrintAX\@empty
8840 }%
8841 \AtBeginDocument{%
8842 % \end{macrocode}
8843 % Make sure that \cmd{\printindex} is defined.
8844 % \begin{macrocode}
8845 \@ifundefined{printindex}{\makeindex}{}%
8846 % \end{macrocode}
8847 % Now, redefine \cmd{\printindex} to accommodate both \cmd{\printindex}
8848 % without argument and |\printindex[autx]|.
8849 % \begin{macrocode}
8850 \let\orig@printindex\printindex
8851 \def\printindex{\@ifnextchar[{\APAC@printindex}{%
8852 \orig@printindex}}%
8853 \def\APAC@printindex[autx]{\PrintAX}%
8854 }%
8855 \fi
8856 % \end{macrocode}
8857 % Include corporate authors in the author index?
8858 % \begin{macrocode}
8859 \if@APAC@include@corporate
8860 \let\corporateAX\AX
8861 \else
8862 \let\corporateAX\@gobble
8863 \fi
8864 \else
8865 % \end{macrocode}
8866 % No author index. Wait until |\begin{document}| for checking whether another
8867 % package is loaded that defines \cmd{\printindex}.
8868 % \begin{macrocode}
8869 \AtBeginDocument{%
8870 \@ifundefined{printindex}%
8871 {%
8872 % \end{macrocode}
8873 % \cmd{\printindex} has not been defined. Define \cmd{\printindex} so
8874 % that it suppresses the indexes.
8875 % \begin{macrocode}
8876 \def\printindex{\@ifnextchar[{\check@printindex}{%
8877 \check@printindex[]}}%
8878 \def\check@printindex[#1]{\relax }%
8879 }%
8880 {%
8881 % \end{macrocode}
8882 % \cmd{\printindex} has been defined, so save its definition.
8883 % \begin{macrocode}
8884 \let\orig@printindex\printindex
8885 % \end{macrocode}
8886 % Redefine \cmd{\printindex} so that it suppresses the author index
8887 % but does not change other indexes: (1) If there is no optional
8888 % argument, use the original definition.
8889 % \begin{macrocode}
8890 \def\printindex{\@ifnextchar[{\check@printindex}{\orig@printindex}}%
8891 % \end{macrocode}
8892 % (2) If there is an optional argument, check whether it is equal to
8893 % ``|autx|''. If so, suppress this (author) index. If not, use the
8894 % original definition.
8895 % \begin{macrocode}
8896 \def\check@printindex[#1]{%
8897 % \end{macrocode}
8898 % Use a clumsy way to check whether |#1| = |autx|, but seemingly more
8899 % elegant ways somehow didn't work.
8900 % \begin{macrocode}
8901 \expandafter\def\csname APAC@#1\endcsname{DUMMY}%
8902 \@ifundefined{APAC@autx}%
8903 {\orig@printindex[#1]}%
8904 {\let\APAC@autx\@undefined}%
8905 }%
8906 }%
8907 }%
8908 % \end{macrocode}
8909 % Empty author indexing commands.
8910 % \begin{macrocode}
8911 \let\AX\@gobble
8912 \let\corporateAX\@gobble
8913 \fi
8914 % \end{macrocode}
8915 % \end{macro}
8916 % \end{macro}
8917 % \end{macro}
8918 % \end{macro}
8919 % \end{macro}
8920 % \end{macro}
8921 % \end{macro}
8922 % \end{macro}
8923 % \end{macro}
8924 %
8925 % \begin{environment}{theindex}
8926 % \begin{macro}{\APACstdindex}
8927 % The \envirname{index} environment as defined in the \pkg{index} package;
8928 % literally copied from \fname{index.sty}.
8929 % \begin{macrocode}
8930 \newcommand{\APACstdindex}{%
8931 \@ifclassloaded{article}{%
8932 \renewenvironment{theindex}{%
8933 \edef\indexname{\the\@nameuse{idxtitle@\@indextype}}%
8934 \if@twocolumn
8935 \@restonecolfalse
8936 \else
8937 \@restonecoltrue
8938 \fi
8939 \columnseprule \z@
8940 \columnsep 35\p@
8941 \twocolumn[%
8942 \section*{\indexname}%
8943 \ifx\index@prologue\@empty\else
8944 \index@prologue
8945 \bigskip
8946 \fi
8947 ]%
8948 \@mkboth{\MakeUppercase\indexname}%
8949 {\MakeUppercase\indexname}%
8950 \thispagestyle{plain}%
8951 \parindent\z@
8952 \parskip\z@ \@plus .3\p@\relax
8953 \let\item\@idxitem
8954 }{%
8955 \if@restonecol
8956 \onecolumn
8957 \else
8958 \clearpage
8959 \fi
8960 }
8961 }{%
8962 \renewenvironment{theindex}{%
8963 \edef\indexname{\the\@nameuse{idxtitle@\@indextype}}%
8964 \if@twocolumn
8965 \@restonecolfalse
8966 \else
8967 \@restonecoltrue
8968 \fi
8969 \columnseprule \z@
8970 \columnsep 35\p@
8971 \twocolumn[%
8972 \@makeschapterhead{\indexname}%
8973 \ifx\index@prologue\@empty\else
8974 \index@prologue
8975 \bigskip
8976 \fi
8977 ]%
8978 \@mkboth{\MakeUppercase\indexname}%
8979 {\MakeUppercase\indexname}%
8980 \thispagestyle{plain}%
8981 \parindent\z@
8982 \parskip\z@ \@plus .3\p@\relax
8983 \let\item\@idxitem
8984 }{%
8985 \if@restonecol
8986 \onecolumn
8987 \else
8988 \clearpage
8989 \fi
8990 }%
8991 }%
8992 }
8993 % \end{macrocode}
8994 % \end{macro}
8995 %
8996 % \begin{macro}{\APACtocindex}
8997 % The \envirname{index} environment as defined in the \pkg{index} package, but
8998 % with a table of contents entry added.
8999 % \begin{macrocode}
9000 \newcommand{\APACtocindex}{%
9001 \@ifclassloaded{article}{%
9002 \renewenvironment{theindex}{%
9003 \edef\indexname{\the\@nameuse{idxtitle@\@indextype}}%
9004 \if@twocolumn
9005 \@restonecolfalse
9006 \else
9007 \@restonecoltrue
9008 \fi
9009 \columnseprule \z@
9010 \columnsep 35\p@
9011 \twocolumn[%
9012 \section*{\indexname}%
9013 \ifx\index@prologue\@empty\else
9014 \index@prologue
9015 \bigskip
9016 \fi
9017 ]%
9018 \@mkboth{\MakeUppercase\indexname}%
9019 {\MakeUppercase\indexname}%
9020 % \end{macrocode}
9021 % The following line added by EM.
9022 % \begin{macrocode}
9023 \addcontentsline{toc}{section}{\indexname}%
9024 \thispagestyle{plain}%
9025 \parindent\z@
9026 \parskip\z@ \@plus .3\p@\relax
9027 \let\item\@idxitem
9028 }{%
9029 \if@restonecol
9030 \onecolumn
9031 \else
9032 \clearpage
9033 \fi
9034 }
9035 }{%
9036 \renewenvironment{theindex}{%
9037 \edef\indexname{\the\@nameuse{idxtitle@\@indextype}}%
9038 \if@twocolumn
9039 \@restonecolfalse
9040 \else
9041 \@restonecoltrue
9042 \fi
9043 \columnseprule \z@
9044 \columnsep 35\p@
9045 \twocolumn[%
9046 \@makeschapterhead{\indexname}%
9047 \ifx\index@prologue\@empty\else
9048 \index@prologue
9049 \bigskip
9050 \fi
9051 ]%
9052 \@mkboth{\MakeUppercase\indexname}%
9053 {\MakeUppercase\indexname}%
9054 % \end{macrocode}
9055 % The following line added by EM.
9056 % \begin{macrocode}
9057 \addcontentsline{toc}{chapter}{\indexname}%
9058 \thispagestyle{plain}%
9059 \parindent\z@
9060 \parskip\z@ \@plus .3\p@\relax
9061 \let\item\@idxitem
9062 }{%
9063 \if@restonecol
9064 \onecolumn
9065 \else
9066 \clearpage
9067 \fi
9068 }%
9069 }%
9070 }
9071 % \end{macrocode}
9072 % \end{macro}
9073 %
9074 % \begin{macro}{\APACemindex}
9075 % An alternative style for the \envirname{index} environment, such that
9076 % automatically a chapter or section title is generated, with a corresponding
9077 % table of contents entry. The index is now in a \envirname{multicol}
9078 % environment.
9079 % \begin{macrocode}
9080 \newcommand{\APACemindex}{%
9081 \RequirePackage{multicol}
9082 \renewenvironment{theindex}{%
9083 \edef\@indexname{\the\@nameuse{idxtitle@\@indextype}}%
9084 \@ifundefined{chapter}%
9085 {\section*{\@indexname}%
9086 \addcontentsline{toc}{section}{\@indexname}%
9087 %% \sectionmark{{\@indexname}}% doesn't work: generates numbers
9088 }%
9089 {\chapter*{\@indexname}%
9090 \addcontentsline{toc}{chapter}{\@indexname}%
9091 %% \chaptermark{{\@indexname}}% doesn't work: generates numbers
9092 %% % (except in the backmatter)
9093 %% \sectionmark{{\@indexname}}% doesn't work: generates numbers
9094 }%
9095 \@mkboth{{\@indexname}}{{\@indexname}}% Hence we need this.
9096 \parindent\z@
9097 \parskip\z@ \@plus .3\p@\relax
9098 \let\item\@idxitem
9099 \setlength{\columnsep}{2em}
9100 \small
9101 \begin{multicols}{2}
9102 \raggedright
9103 }%
9104 {\end{multicols}\normalsize
9105 }%
9106 }
9107 % \end{macrocode}
9108 % \end{macro}
9109 %
9110 % \begin{macro}{\APACltxemindex}
9111 % A variation on \cmd{\APACemindex}, but without using the \pkg{index} package,
9112 % which conflicts with the standard \LaTeX{} documentation classes.
9113 % \begin{macrocode}
9114 \newcommand{\APACltxemindex}{%
9115 \RequirePackage{multicol}
9116 \renewenvironment{theindex}{%
9117 % \end{macrocode}
9118 % The index naming scheme of the \pkg{index} package is also absent.
9119 % Therefore, try to guess an index name.
9120 % \begin{macrocode}
9121 \@ifundefined{currentindexname}{%
9122 \@ifundefined{indexname}{%
9123 \edef\@indexname{Index}%
9124 }{\edef\@indexname{\indexname}}%
9125 }{\edef\@indexname{\currentindexname}}%
9126 \@ifundefined{chapter}%
9127 {\section*{\@indexname}%
9128 \addcontentsline{toc}{section}{\@indexname}%
9129 %% \sectionmark{{\@indexname}}% doesn't work: generates numbers
9130 }%
9131 {\chapter*{\@indexname}%
9132 \addcontentsline{toc}{chapter}{\@indexname}%
9133 %% \chaptermark{{\@indexname}}% doesn't work: generates numbers
9134 %% % (except in the backmatter)
9135 %% \sectionmark{{\@indexname}}% doesn't work: generates numbers
9136 }%
9137 \@mkboth{{\@indexname}}{{\@indexname}}% Hence we need this.
9138 \def\pfill{\relax{}}%
9139 \parindent\z@
9140 \parskip\z@ \@plus .3\p@\relax
9141 \let\item\@idxitem
9142 \setlength{\columnsep}{2em}
9143 \small
9144 \begin{multicols}{2}
9145 \raggedright
9146 }%
9147 {\end{multicols}\normalsize
9148 }%
9149 }
9150 % \end{macrocode}
9151 % \end{macro}
9152 % \end{environment}
9153 %
9154 % \subsection{Formatting of urls}
9155 %
9156 % \begin{macro}{\Url@force@Tilde}
9157 % \begin{macro}{\Url@APACdot}
9158 % \begin{macro}{\Url@APACcomma}
9159 % \begin{macro}{\Url@APACquestionmark}
9160 % \begin{macro}{\Url@APACexclamation}
9161 % \begin{macro}{\Url@APAChyphen}
9162 % \begin{macro}{\Url@APACunderscore}
9163 % \begin{macro}{\APACurlBreaks}
9164 % \begin{macro}{\url@APACttstyle}
9165 % \begin{macro}{\url@APACrmstyle}
9166 % \begin{macro}{\url@APACsfstyle}
9167 % \begin{macro}{\url@APACsamestyle}
9168 % The APA manual requires breaking of urls \emph{after} a slash or
9169 % \emph{before} a dot. In particular, there should not be a break between
9170 % ``|http:|'' and ``|//|''. This differs from the standard line breaking
9171 % style of the \pkg{url} package. Therefore, we define an APA-style for
9172 % url formatting here. (Maybe this should be part of the \pkg{apa} class,
9173 % but urls occur most often in the reference list, so we do it here.)
9174 % The \pkg{url} package also defines many other (punctuation) symbols at
9175 % which a line break may occur. The APA manual does not mention these, but
9176 % it seems in the spirit of the APA manual to use these as well. See also
9177 % \citeA[pp.~645--646]{chicago}.
9178 % \begin{macrocode}
9179 \AtBeginDocument{%
9180 \@ifpackageloaded{url}{%
9181 % \end{macrocode}
9182 % To circumvent an ``undefined'' error.
9183 % \begin{macrocode}
9184 \@ifundefined{Url@force@Tilde}{\def\Url@force@Tilde{\relax}}{}%
9185 % \end{macrocode}
9186 % The original dot. Simply using `|.|' causes an infinite loop. This command
9187 % is used below, so that encoding-issues can be resolved easier by redefining
9188 % \cmd{\Url@APACdot}. The same argument holds for the other punctuation
9189 % marks.
9190 % \begin{macrocode}
9191 \def\Url@APACdot{\mathchar"2E }%
9192 \def\Url@APACcomma{\mathchar"2C }%
9193 \def\Url@APACquestionmark{\mathchar"3F }%
9194 \def\Url@APACexclamation{\mathchar"21 }%
9195 \def\Url@APAChyphen{\mathchar"2D }%
9196 \def\Url@APACunderscore{\_}%
9197 % \end{macrocode}
9198 % Define the APA-style line breaks for urls.
9199 % \begin{macrocode}
9200 \def\APACurlBreaks{%
9201 % \end{macrocode}
9202 % Remove dot (`|.|') and slash (`|/|') from the ordinary breaks and add
9203 % the slash to the big breaks, so that |http://| is broken after the second
9204 % slash instead of after the colon. The \cmd{\UrlNoBreaks} and
9205 % \cmd{UrlOrds} are the default ones from the \pkg{url} package, but they
9206 % are repeated here to obtain a complete style, so that we don't have to
9207 % rely on what is the \pkg{url} default (which might change).
9208 % \begin{macrocode}
9209 \def\UrlBreaks{\do\@\do\\\do\|\do\;\do\>\do\]\do\)\do\'\do+\do\=\do\#}%
9210 \def\UrlBigBreaks{\do\/\do\:\do@url@hyp}%
9211 \def\UrlNoBreaks{\do\(\do\[\do\{\do\<}% \)
9212 \def\UrlOrds{\do\*\do\~\do\'\do\"}%
9213 % \end{macrocode}
9214 % Define the dot as an empty binary relation (after which a break may
9215 % occur) followed by a dot-symbol (after which no break may occur).
9216 % \citeA{chicago} requires the same treatment of a few other punctuation
9217 % marks, different from \pkg{url}'s default behavior. We implement these
9218 % as well.
9219 % \begin{macrocode}
9220 \def\UrlSpecials{%
9221 \do\.{\mathbin{}\Url@APACdot }%
9222 \do\,{\mathbin{}\Url@APACcomma }%
9223 \do\-{\mathbin{}\Url@APAChyphen }%
9224 \do\?{\mathbin{}\Url@APACquestionmark }%
9225 \do\!{\mathbin{}\Url@APACexclamation }%
9226 \do\_{\mathbin{}\Url@APACunderscore }%
9227 \do\ {\Url@space}\do\%{\Url@percent}\do\^^M{\Url@space}%
9228 \Url@force@Tilde}% package option may force faked text-ascii-tilde
9229 }%%
9230 % \end{macrocode}
9231 % Change the underscore for when a non-tt font is used.
9232 % \begin{macrocode}
9233 \def\Url@OTnonTT{\do\<{\langle}\do\>{\mathbin{\rangle}}\do
9234 \_{\mathbin{}\_}\do\|{\mid}\do\{{\lbrace}\do\}{\mathbin{\rbrace}}\do
9235 \\{\mathbin{\backslash}}\UrlTildeSpecial}
9236 % \end{macrocode}
9237 % Define four APA url-styles, based on the standard styles in
9238 % \fname{url.sty}, and use the |APACtt|-style as default.
9239 % \begin{macrocode}
9240 \def\url@APACttstyle{\def\UrlFont{\ttfamily}\APACurlBreaks }%
9241 \def\url@APACrmstyle{\def\UrlFont{\rmfamily}\APACurlBreaks }%
9242 \def\url@APACsfstyle{\def\UrlFont{\sffamily}\APACurlBreaks }%
9243 \def\url@APACsamestyle{\def\UrlFont{}\APACurlBreaks }%
9244 \urlstyle{APACtt}%
9245 }{}%
9246 }
9247 % \end{macrocode}
9248 % \end{macro}
9249 % \end{macro}
9250 % \end{macro}
9251 % \end{macro}
9252 % \end{macro}
9253 % \end{macro}
9254 % \end{macro}
9255 % \end{macro}
9256 % \end{macro}
9257 % \end{macro}
9258 % \end{macro}
9259 % \end{macro}
9260 %
9261 % \begin{macro}{\url}
9262 % In case \cmd{\url} is undefined, define a very simple version.
9263 % \begin{macrocode}
9264 \AtBeginDocument{%
9265 \@ifundefined{url}{%
9266 \def\url#1{\texttt{#1}}%
9267 }{}%
9268 }
9269 % \end{macrocode}
9270 % \end{macro}
9271 %
9272 % \begin{macro}{\doi}
9273 % \begin{macro}{\doiprefix}
9274 % Similarly, define \cmd{\doi}. Adapted from code in \fname{plainnat.bst}.
9275 % \begin{macrocode}
9276 \AtBeginDocument{%
9277 \expandafter\ifx\csname urlstyle\endcsname\relax
9278 \providecommand{\doi}[1]{#1}\else
9279 \providecommand{\doi}{\begingroup \urlstyle{APACsame}\Url}\fi
9280 }
9281 \@ifundefined{doiprefix}{%
9282 \newcommand{\doiprefix}{doi:\penalty0{}}%
9283 }{}%
9284 % \end{macrocode}
9285 % \end{macro}
9286 %
9287 % \subsection{Compatibility code}
9288 %
9289 % Many other packages redefine citation commands and reference list commands,
9290 % or at least affect them, even if that is not their core business. This leads
9291 % to all kinds of compatibility problems. Here, these are repaired.
9292 %
9293 % \subsubsection{\pkg{babel}}
9294 %
9295 % From \fname{hyperref.dtx}:
9296 % \begin{quote}
9297 % Package \pkg{babel} redefines \cmd{\bibcite} with macro
9298 % \cmd{\bbl@cite@choice}. It needs to be overwritten to avoid the warning
9299 % ``Label(s) may have changed.''.
9300 % \end{quote}
9301 % Here, a slightly adapted version of the code mentioned above is inserted. The
9302 % other \cmd{\bibcite}-restoring compatibility code above does something
9303 % similar, but does not do the job correctly if \pkg{babel} is loaded (why?).
9304 % This only works if \pkg{babel} is loaded before \pkg{apacite}; putting it in
9305 % a \cmd{\AtBeginDocument} does not work well.
9306 % \begin{macrocode}
9307 \@ifundefined{bbl@cite@choice}{}{%
9308 \g@addto@macro\bbl@cite@choice{%
9309 \let\bibcite\APACbibcite
9310 }%
9311 }
9312 % \end{macrocode}
9313 %
9314 % \subsubsection{\pkg{natbib}}
9315 %
9316 % Above, we implemented some code for the \pkgoption{natbibapa} option.
9317 % The code here is intended as a fix for more general cases, but we
9318 % have to make sure not to conflict with the code above. This applies
9319 % to the redefinition of the \cmd{\NAT@parse@date} command.
9320 % \begin{macrocode}
9321 \if@APAC@natbib@apa
9322 \else
9323 \AtBeginDocument{%
9324 \@ifpackageloaded{natbib}{%
9325 % \end{macrocode}
9326 % Redefine a \pkg{natbib} command. This may be ethically dubious, but without
9327 % it, \pkg{natbib} simply cannot handle \pkg{apacite}-generated \fname{.bbl}
9328 % files. The only reason I can think of why both \pkg{apacite} and \pkg{natbib}
9329 % would be loaded is exactly the situation when you want to use \pkg{natbib}
9330 % for the citations and \pkg{apacite} for the reference list. In this
9331 % situation you would load \fname{apacite.sty}, not for the citation commands,
9332 % but for the punctuation commands and labels defined by \pkg{apacite}. In this
9333 % situation, the redefinition below is necessary and therefore I do this here.
9334 % \begin{macrocode}
9335 \def\NAT@parse@date#1#2#3#4#5#6@@{%
9336 \def\NAT@year{{#1}}\def\NAT@exlab{{#2}}%
9337 }%
9338 }{}%
9339 }
9340 \fi
9341 % \end{macrocode}
9342 % \pkg{natbib} redefines \cmd{\thebibliography}, which interferes a little with
9343 % our purposes. Therefore, add some patches. This goes wrong if
9344 % \cmd{\bibpreamble} is redefined later on, i.e., by the user, but I haven't
9345 % come up with a better hack yet.
9346 % \begin{macrocode}
9347 \AtBeginDocument{%
9348 \@ifpackageloaded{natbib}{%
9349 \let\@oldbibpreamble\bibpreamble
9350 \def\bibpreamble{%
9351 \@oldbibpreamble%
9352 \bibliographytypesize%
9353 \bibliographyprenote%
9354 \@ifundefined{APAC@metaprenote@\APAC@extra@b@citeb}%
9355 {}% skip
9356 {\csname APAC@metaprenote@\APAC@extra@b@citeb\endcsname}%
9357 }%
9358 \let\@old@endthebibliography\endthebibliography
9359 \def\endthebibliography{\@old@endthebibliography%
9360 \normalsize}%
9361 }{}%
9362 }
9363 % \end{macrocode}
9364 %
9365 % \subsubsection{\pkg{hyperref}}
9366 %
9367 % The code here is adapted from \pkg{hyperref}, \pkg{natbib}, and their
9368 % respective documentation, to make use of their interoperability.
9369 % \begin{macrocode}
9370 \AtBeginDocument{%
9371 \@ifundefined{NAT@parse}{%
9372 \def\NAT@parse{This is a fake natbib command to fool hyperref.}}{}%
9373 \@ifundefined{hyper@natlinkstart}{%
9374 \let\hyper@natlinkstart\@gobble}{}%
9375 \@ifundefined{hyper@natlinkend}{%
9376 \let\hyper@natlinkend\relax}{}%
9377 \@ifundefined{hyper@natanchorstart}{%
9378 \let\hyper@natanchorstart\@gobble}{}%
9379 \@ifundefined{hyper@natanchorend}{%
9380 \let\hyper@natanchorend\relax}{}%
9381 \@ifundefined{hyperpage}{%
9382 \def\hyperpage#1{#1}}{}%
9383 % \end{macrocode}
9384 % Remove spaces from hyperlinks (\pkg{hyperref} keeps them, even if they are
9385 % removed from the visible output, so you'd get awkward results like
9386 % |\href{http://my .link}{http://my.link}|).
9387 % \begin{macrocode}
9388 \@ifpackageloaded{hyperref}{%
9389 % \end{macrocode}
9390 % The next should always be true, but just to be sure\ldots
9391 % \begin{macrocode}
9392 \@ifpackageloaded{url}{%
9393 % \end{macrocode}
9394 % Is \pkgoption{obeyspaces} option requested? If not, then remove spaces
9395 % from hyperlinks.
9396 % \begin{macrocode}
9397 \ifx\@empty\Url@ObeySp\@empty
9398 \def\url@#1{\def\@tmp@arg{\string#1}%
9399 \HyPsd@Subst{ }{}{\@tmp@arg}%
9400 \hyper@linkurl{\Hurl{#1}}{\@tmp@arg}}%
9401 \fi
9402 }{}%
9403 }{}%
9404 }
9405 % \end{macrocode}
9406 %
9407 % \subsubsection{\pkg{backref}}
9408 %
9409 % \begin{macro}{\back@cite}
9410 % \begin{macro}{\CurrentBib}
9411 % \begin{macro}{\PrintBackRefs}
9412 % \begin{macro}{\APACrestorebibitem}
9413 % A bit of code that makes life a little easier, adapted from
9414 % \fname{amsrefs.dtx}.
9415 % \begin{macrocode}
9416 \def\back@cite{}%
9417 \def\CurrentBib{}%
9418 \def\PrintBackRefs{}%
9419 \def\APACrestorebibitem{}%
9420 \AtBeginDocument{%
9421 \@ifpackageloaded{backref}{%
9422 % \end{macrocode}
9423 % Make sure that \cmd{\ifBR@verbose} is defined.
9424 % \begin{macrocode}
9425 \@ifundefined{ifBR@verbose}{%
9426 \let\ifBR@verbose\iffalse
9427 \let\fi\fi}{}%
9428 % \end{macrocode}
9429 % A backcite command that makes the code of other commands better readable.
9430 % \begin{macrocode}
9431 \def\back@cite#1{%
9432 \ifBR@verbose
9433 \PackageInfo{backref}{back cite \string`#1\string'}%
9434 \fi
9435 \Hy@backout{#1\APAC@extra@b@citeb}%
9436 }%
9437 % \end{macrocode}
9438 % Adaptation of the \cmd{\bibitem} command so that \pkg{backref} does not
9439 % scan the whole entry. The placement of the backrefs is explicitly done
9440 % through \cmd{\PrintBackRefs}.
9441 % \begin{macrocode}
9442 \def\APACrestorebibitem{%
9443 \def\BR@@lbibitem[##1]##2{%
9444 \BRorg@bibitem[{##1}]{##2}%
9445 \def\CurrentBib{##2\APAC@extra@b@citeb}%
9446 }%
9447 }%
9448 % \end{macrocode}
9449 % Printing the backrefs: Revert to the standard \pkg{backref} macro.
9450 % \begin{macrocode}
9451 \def\PrintBackRefs#1{\BR@backref{#1}}%
9452 }{%
9453 % \end{macrocode}
9454 % Else: \pkg{backref} not loaded.
9455 % \begin{macrocode}
9456 \let\back@cite\@gobble
9457 \let\PrintBackRefs\@gobble
9458 }%
9459 }
9460 % \end{macrocode}
9461 % \end{macro}
9462 % \end{macro}
9463 % \end{macro}
9464 % \end{macro}
9465 %
9466 % \begin{macro}{\BR@@lbibitem}
9467 % Frankly, at the moment, I do not completely understand why we need this. But
9468 % I'm sure it was for a good reason when I included this.
9469 % \begin{macrocode}
9470 \def\BR@@lbibitem[#1]#2#3\par{%
9471 \BRorg@bibitem[#1]{#2}#3%
9472 \BR@backref{#2}%
9473 }%
9474 % \end{macrocode}
9475 % \end{macro}
9476 %
9477 % \subsubsection{\pkg{chapterbib}}
9478 %
9479 % \begin{macro}{\@extra@b@citeb}
9480 % \begin{macro}{\@extra@binfo}
9481 % From the instructions of the \pkg{chapterbib} package.
9482 % \begin{macrocode}
9483 \@ifundefined{@extra@b@citeb}{\def\@extra@b@citeb{}}{}
9484 \gdef\@extra@binfo{}
9485 % \end{macrocode}
9486 % \end{macro}
9487 % \end{macro}
9488 %
9489 % \begin{macro}{\APAC@extra@b@citeb}
9490 % \begin{macro}{\APAC@extra@binfo}
9491 % Replacements of the \pkg{chapterbib} \cmd{\@extra@b@citeb} and
9492 % \cmd{\@extra@binfo} commands. These accumulate all kinds of additional flags
9493 % to accommodate multiple bibliographies of various packages (\pkg{chapterbib},
9494 % \pkg{bibunits}, \pkg{multibbl}).
9495 % \begin{macrocode}
9496 \def\APAC@extra@b@citeb{\APAC@curr@aux\APAC@bu\@extra@b@citeb}%
9497 \def\APAC@extra@binfo{\APAC@curr@aux\APAC@bu\@extra@binfo}%
9498 % \end{macrocode}
9499 % \end{macro}
9500 % \end{macro}
9501 %
9502 % \subsubsection{\pkg{bibunits}}
9503 %
9504 % \begin{macro}{\APACstd@cite}
9505 % \begin{macro}{\APACstd@nocite}
9506 % \begin{macro}{\APACstd@lbibitem}
9507 % \begin{macro}{\APAC@bu}
9508 % Store the standard \pkg{apacite} definitions.
9509 % \begin{macrocode}
9510 \AtEndOfPackage{%
9511 \let\APACstd@cite\cite
9512 \let\APACstd@nocite\nocite
9513 \let\APACstd@lbibitem\@lbibitem
9514 }
9515 % \end{macrocode}
9516 % Default definition, if \pkg{bibunits} is not loaded.
9517 % \begin{macrocode}
9518 \@ifundefined{APAC@bu}{\def\APAC@bu{}}{}
9519 \AtBeginDocument{%
9520 \@ifpackageloaded{bibunits}{%
9521 % \end{macrocode}
9522 % To mimic \pkg{chapterbib} behavior (with flags etc.).
9523 % \begin{macrocode}
9524 \def\APAC@bu{%
9525 \ifx\cite\std@cite
9526 % \end{macrocode}
9527 % Outside a bibunit. The ``|@APACbu|'' strings are intended to minimize
9528 % the possibility of wrong matches, such as |\b@ex11| = |ex11| from the
9529 % global aux or |\b@ex11| = |ex1| from bibunit~1. The last `|@|' is
9530 % similarly intended to avoid confusion if both \pkg{bibunits} and
9531 % \pkg{chapterbib} are loaded (``|11@1|'' = 11th bibunit, 1st
9532 % \pkg{chapterbib} unit; ``|1@11|'' = 1st bibunit, 11th
9533 % \pkg{chapterbib} unit). It seems unlikely that both packages would be
9534 % used at the same time, but safety first.
9535 % \begin{macrocode}
9536 @APACbu0@%
9537 \else
9538 % \end{macrocode}
9539 % Within a bibunit: Use bibunit number to distinguish the bibunits.
9540 % \begin{macrocode}
9541 @APACbu\the\@bibunitauxcnt @%
9542 \fi
9543 }%
9544 % \end{macrocode}
9545 % Standard \pkg{apacite} definition of the \cmd{\cite} and \cmd{\nocite}
9546 % commands. The latter is mainly necessary to avoid incorrect ``Citation
9547 % undefined'' warnings.
9548 % \begin{macrocode}
9549 \let\std@cite\APACstd@cite
9550 \let\std@nocite\APACstd@nocite
9551 % \end{macrocode}
9552 % Restore the \pkg{apacite} definition of \cmd{\bibitem}, mainly because of
9553 % the \cmd{\@newciteauxhandle} instead of \cmd{\@auxout}.
9554 % \begin{macrocode}
9555 \def\std@lbibitem[#1]#2{%
9556 \let\@APACtemp@auxout\@newciteauxhandle
9557 \let\@newciteauxhandle\@bibunitaux
9558 \APACstd@lbibitem[#1]{#2}%
9559 \let\@newciteauxhandle\@APACtemp@auxout
9560 }%
9561 % \end{macrocode}
9562 % To make sure everything works whether \pkg{bibunits} is loaded before or
9563 % after \pkg{apacite}.
9564 % \begin{macrocode}
9565 \let\@lbibitem\std@lbibitem
9566 }{}%
9567 }
9568 % \end{macrocode}
9569 % \end{macro}
9570 % \end{macro}
9571 % \end{macro}
9572 % \end{macro}
9573 %
9574 % \subsubsection{\pkg{bibtopic}}
9575 %
9576 % \begin{macrocode}
9577 \AtBeginDocument{%
9578 \@ifpackageloaded{bibtopic}{%
9579 % \end{macrocode}
9580 % Somewhat rudely disable this command to prevent an undesired error
9581 % message of \pkg{bibtopic}.
9582 % \begin{macrocode}
9583 \renewcommand*\bt@change@thb{\relax}%
9584 }{%
9585 % \end{macrocode}
9586 % These \pkg{bibtopic} hooks are included in the
9587 % \envirname{thebibliography} environment as generated by
9588 % \fname{apacite.bst}, so \pkg{bibtopic} should work correctly. If
9589 % \pkg{bibtopic} is not loaded, they should do nothing.
9590 % \begin{macrocode}
9591 \providecommand{\bt@beg@thb@hook}{\relax}
9592 \providecommand{\bt@end@thb@hook}{\relax}
9593 }%
9594 }
9595 % \end{macrocode}
9596 %
9597 % \subsubsection{\pkg{multibbl}}
9598 %
9599 % Almost all of \pkg{multibbl}'s code is redefined here, mainly because
9600 % \pkg{apacite} needs to distinguish which citation refers to which
9601 % bibliography, so that flags can be correctly set whether a citation
9602 % is the first citation to the work from the specific bibliography and
9603 % correctly includes the meta-analysis flags with the various
9604 % bibliographies.
9605 %
9606 % \begin{macro}{\APAC@curr@aux}
9607 % Default flag definition if \pkg{multibbl} is not loaded.
9608 % \begin{macrocode}
9609 \@ifundefined{APAC@curr@aux}{\def\APAC@curr@aux{}}{}
9610 \AtBeginDocument{%
9611 \@ifpackageloaded{multibbl}{%
9612 % \end{macrocode}
9613 % To mimic \pkg{chapterbib} behavior (with flags etc.).
9614 % \begin{macrocode}
9615 \def\APAC@def@curr@aux#1{\def\APAC@curr@aux{@APACaux@#1@}}%
9616 % \end{macrocode}
9617 % \begin{macro}{\newbibliography}
9618 % Ditto. This puts the \cmd{\bibcite} commands in |#1.aux| instead of in
9619 % the main \fname{.aux} file, so that the flags can be differentiated.
9620 % This also means that the \fname{.aux} file has to be read by \LaTeX{}
9621 % before it is overwritten.
9622 % \begin{macrocode}
9623 \def\newbibliography#1{%
9624 \APAC@def@curr@aux{#1}%
9625 \@input@{#1.aux}%
9626 \begingroup
9627 \if@filesw
9628 \expandafter\newwrite\csname #1@auxfile\endcsname
9629 \expandafter\immediate\openout
9630 \csname #1@auxfile\endcsname #1.aux\relax
9631 \typeout{Writing auxiliary file #1.aux }%
9632 \fi
9633 \endgroup
9634 }%%
9635 % \end{macrocode}
9636 % \end{macro}
9637 % \end{macro}
9638 %
9639 % \begin{macro}{\APAC@mbbl@bibliography}
9640 % \begin{macro}{\bibliography}
9641 % Add the flag to the bibliography.
9642 % \begin{macrocode}
9643 \let\APAC@mbbl@bibliography\bibliography
9644 \def\bibliography#1#2#3{%
9645 \APAC@def@curr@aux{#1}%
9646 \let\@APACtemp@auxout\@newciteauxhandle
9647 \def\@APACtemp{\csname #1@auxfile\endcsname}%
9648 \let\@newciteauxhandle\@APACtemp
9649 \APAC@mbbl@bibliography{#1}{#2}{#3}%
9650 \let\@newciteauxhandle\@APACtemp@auxout
9651 }%%
9652 % \end{macrocode}
9653 % \end{macro}
9654 % \end{macro}
9655 %
9656 % \begin{macro}{\@orig@@cite}
9657 % \begin{macro}{\@@cite}
9658 % Add an extra argument to \cmd{\@@cite}.
9659 % \begin{macrocode}
9660 \let\@orig@@cite\@@cite
9661 \def\@@cite<#1>[#2]#3#4{%
9662 \nocite{#3}{#4}%
9663 \let\@temp@nocite\nocite
9664 \let\nocite\@gobble
9665 \APAC@def@curr@aux{#3}%
9666 \@orig@@cite<#1>[#2]{#4}%
9667 \let\nocite\@temp@nocite
9668 \let\@temp@nocite\@undefined
9669 }%%
9670 % \end{macrocode}
9671 % \end{macro}
9672 % \end{macro}
9673 %
9674 % \begin{macro}{\@orig@nocite}
9675 % \begin{macro}{\nocite}
9676 % Add an extra argument to \cmd{\nocite}.
9677 % \begin{macrocode}
9678 \let\@orig@nocite\nocite
9679 \def\nocite#1#2{%
9680 % \end{macrocode}
9681 % Define a flag.
9682 % \begin{macrocode}
9683 \APAC@def@curr@aux{#1}%
9684 % \end{macrocode}
9685 % No flag-setting in \cmd{\nocite}: A no-cite is not a citation,
9686 % so a subsequent citation may be the first citation.
9687 % \begin{macrocode}
9688 \@bsphack
9689 \ifx\@onlypreamble\document
9690 % \end{macrocode}
9691 % Since we are after |\begin{document}| we can do the citations:
9692 % \begin{macrocode}
9693 \@for\@citeb:=#2\do{%
9694 \edef\@citeb{\expandafter\@firstofone\@citeb}%
9695 % \end{macrocode}
9696 % \cmd{\@newciteauxhandle} for compatibility with \pkg{multibib};
9697 % |#1@auxfile| for compatibility with \pkg{multibbl}.
9698 % \begin{macrocode}
9699 \@ifundefined{#1@auxfile}{%
9700 \if@filesw
9701 \immediate\write\@newciteauxhandle{\string\citation{\@citeb}}%
9702 \fi
9703 }{\if@filesw
9704 \expandafter\immediate%
9705 \write\csname #1@auxfile\endcsname{\string\citation{\@citeb}}%
9706 \fi
9707 }%
9708 \@ifundefined{b@\@citeb\APAC@extra@b@citeb}{%
9709 \edef\B@my@dummy{*}%
9710 \ifx\@citeb\B@my@dummy
9711 \else
9712 \G@refundefinedtrue
9713 \@latex@warning{Citation `\@citeb' undefined}%
9714 \fi
9715 }{}%
9716 }%
9717 \else
9718 % \end{macrocode}
9719 % \pkg{apacite} has no compatibility problems with \LaTeX~2.09,
9720 % because it does not work with \LaTeX~2.09 anyway, so we can do the
9721 % following, suggested in \fname{ltbibl.dtx}:
9722 % \begin{macrocode}
9723 \AtBeginDocument{\nocite{#1}{#2}}%
9724 \fi
9725 \@esphack
9726 % \end{macrocode}
9727 % For compatibility with \pkg{multibib}.
9728 % \begin{macrocode}
9729 \@restore@auxhandle
9730 }%
9731 % \end{macrocode}
9732 % \end{macro}
9733 % \end{macro}
9734 %
9735 % \begin{macro}{\@orig@nocitemeta}
9736 % \begin{macro}{\nocitemeta}
9737 % Add an extra argument to \cmd{\nocitemeta}.
9738 % \begin{macrocode}
9739 \let\@orig@@nocitemeta\nocitemeta
9740 \def\nocitemeta#1#2{%
9741 \nocite{#1}{#2}%
9742 \let\@temp@nocite\nocite
9743 \let\nocite\@gobble
9744 \@orig@@nocitemeta{#2}%
9745 \let\nocite\@temp@nocite
9746 \let\@temp@nocite\@undefined
9747 }%
9748 }{}%
9749 }
9750 % \end{macrocode}
9751 % \end{macro}
9752 % \end{macro}
9753 %
9754 % \subsubsection{\pkg{multibib}}
9755 %
9756 % From the instructions in \fname{multibib.dtx}.
9757 % \begin{macrocode}
9758 \providecommand\@newciteauxhandle{\@auxout}
9759 \def\@restore@auxhandle{\gdef\@newciteauxhandle{\@auxout}}
9760 \AtBeginDocument{%
9761 \@ifundefined{newcites}{\global\let\@restore@auxhandle\relax}{}%
9762 }
9763 % \end{macrocode}
9764 % List of citation commands.
9765 % \begin{macrocode}
9766 \if@APAC@classic@cite
9767 \def\@mb@citenamelist{%
9768 cite,fullcite,shortcite,citeNP,fullciteNP,shortciteNP,%
9769 citeA,fullciteA,shortciteA,citeauthor,fullciteauthor,shortciteauthor,%
9770 citeauthorNP,fullciteauthorNP,shortciteauthorNP,%
9771 citeyear,citeyearNP,nocite,nocitemeta,%
9772 maskcite,maskfullcite,maskshortcite,maskciteNP,maskfullciteNP,%
9773 maskshortciteNP,maskciteA,maskfullciteA,maskshortciteA,%
9774 maskciteauthor,maskfullciteauthor,maskshortciteauthor,%
9775 maskciteauthorNP,maskfullciteauthorNP,maskshortciteauthorNP,%
9776 maskciteauthorA,maskfullciteauthorA,maskshortciteauthorA,%
9777 maskciteyear,maskciteyearNP,masknocite%
9778 }
9779 \fi
9780 \if@APAC@natbib@apa
9781 \AtEndOfPackage{%
9782 % \end{macrocode}
9783 % The \pkg{natbib} commands, if they haven't been declared already.
9784 % \begin{macrocode}
9785 \@ifundefined{@mb@citenamelist}{%
9786 \def\@mb@citenamelist{%
9787 nocite,citep,citealp,citet,citealt,citeauthor,citefullauthor,%
9788 citeyearpar,citeyear,citetext,cite,shortcites,citetalias,%
9789 citepalias,Citet,Citep,Citealt,Citealp,Citeauthor,citenum}%
9790 }{}
9791 % \end{macrocode}
9792 % The commands \pkg{apacite} adds.
9793 % \begin{macrocode}
9794 \let\orig@mb@citenamelist\@mb@citenamelist
9795 \edef\@mb@citenamelist{%
9796 \orig@mb@citenamelist,%
9797 citeauthort,citeauthorp,citefullauthort,citefullauthorp,Citeauthort,%
9798 Citeauthorp,Citefullauthort,Citefullauthorp,%
9799 masknocite,maskcitep,maskcitealp,maskcitet,maskcitealt,%
9800 maskciteauthor,maskcitefullauthor,maskciteyearpar,maskciteyear,%
9801 maskcite,maskcitetalias,maskcitepalias,maskCitet,maskCitep,%
9802 maskCitealt,maskCitealp,maskCiteauthor,maskcitenum,maskciteauthort,%
9803 maskciteauthorp,maskCitefullauthor,maskCiteauthort,maskCiteauthorp,%
9804 nocitemeta%
9805 }
9806 }
9807 \fi
9808 % \end{macrocode}
9809 %
9810 %
9811 % \subsection{Language-specific macros and loading of language file}
9812 % \label{sec:language-code}
9813 %
9814 % This section initializes a number of macros that are likely to be subject
9815 % to redefinition in the language-specific files. Most of these are fairly
9816 % obvious, particularly literal text strings, but some style issues are
9817 % language-specific as well, e.g., whether or not a comma should be inserted
9818 % before the last author. After initializing these macros, \pkg{apacite} tries
9819 % to infer which language-specific (\fname{.apc}) file must be loaded, if any,
9820 % and then loads this file.
9821 %
9822 % \subsubsection{Literal text strings}
9823 %
9824 % \begin{macro}{\onemaskedcitationmsg}
9825 % \begin{macro}{\maskedcitationsmsg}
9826 % Messages that are inserted in the text if citations are masked.
9827 % Put these messages in separate commands so that they're easily
9828 % changed; e.g., for different languages. We use \cmd{\emph} instead
9829 % of \cmd{\textit}, so that this is put upright if it's executed
9830 % within an italic surrounding, and the parentheses are included
9831 % within the \cmd{\emph}, which looks better if this is included in
9832 % another pair of parentheses. But all of this is easily changed.
9833 % \begin{macrocode}
9834 \newcommand{\onemaskedcitationmsg}[1]{%
9835 \emph{(#1\ citation removed for masked review)}}
9836 \newcommand{\maskedcitationsmsg}[1]{%
9837 \emph{(#1\ citations removed for masked review)}}
9838 % \end{macrocode}
9839 % \end{macro}
9840 % \end{macro}
9841 %
9842 % \begin{macro}{\refname}
9843 % \begin{macro}{\bibname}
9844 % \begin{macro}{\authorindexname}
9845 % The section/chapter headings to be used for the reference list and the
9846 % author index. One of the first two is typically already defined by the
9847 % document class (e.g., \fname{article.cls} defines \cmd{\refname},
9848 % \fname{book.cls} defines \cmd{\bibname}. When using \pkg{babel}, these are
9849 % both redefined at each \cmd{\selectlanguage} invocation. The
9850 % language-specific (\fname{.apc}) file typically should override that, because
9851 % the strings defined by \pkg{babel} are often not the same as the strings
9852 % prescribed by the style guides for Psychology. For example, the standard
9853 % definition of \cmd{\bibname} in English is ``Bibliography'', whereas the
9854 % APA insists on ``References'' (with a few exceptions). In other languages,
9855 % the \cmd{\refname} may also be defined differently from the \pkg{babel}
9856 % definition. See the various \fname{.apc} files for how \pkg{babel} is
9857 % overridden.
9858 % \begin{macrocode}
9859 \def\refname{References}% Name of ref. list if it's a section.
9860 \def\bibname{References}% Name of ref. list if it's a chapter.
9861 \newcommand{\authorindexname}{Author Index}
9862 % \end{macrocode}
9863 % \end{macro}
9864 % \end{macro}
9865 % \end{macro}
9866 %
9867 % \begin{macro}{\APACmetaprenote}
9868 % A note used just before the references in the reference list when a
9869 % meta-analysis is reported.
9870 % \begin{macrocode}
9871 \newcommand{\APACmetaprenote}{%
9872 References marked with an asterisk indicate studies included in
9873 the meta-analysis.}
9874 % \end{macrocode}
9875 % \end{macro}
9876 %
9877 % \begin{macro}{\bibmessage}
9878 % \begin{macro}{\bibcomputerprogram}
9879 % \begin{macro}{\bibcomputerprogrammanual}
9880 % \begin{macro}{\bibcomputerprogramandmanual}
9881 % \begin{macro}{\bibcomputersoftware}
9882 % \begin{macro}{\bibcomputersoftwaremanual}
9883 % \begin{macro}{\bibcomputersoftwareandmanual}
9884 % \begin{macro}{\bibprogramminglanguage}
9885 % Commands for specific types of \entryname{@misc} entries. Besides the strings
9886 % themselves (as language-specific text), these are significant in that they
9887 % are recognized by \fname{apacite.bst} and used to modify the formatting of
9888 % the corresponding reference list entries.
9889 % \begin{macrocode}
9890 \newcommand{\bibmessage}{Msg}% Message, for internet forums and the like
9891 \newcommand{\bibcomputerprogram}{Computer program}
9892 \newcommand{\bibcomputerprogrammanual}{Computer program manual}
9893 \newcommand{\bibcomputerprogramandmanual}{Computer program and manual}
9894 \newcommand{\bibcomputersoftware}{Computer software}
9895 \newcommand{\bibcomputersoftwaremanual}{Computer software manual}
9896 \newcommand{\bibcomputersoftwareandmanual}{Computer software and manual}
9897 \newcommand{\bibprogramminglanguage}{Programming language}
9898 % \end{macrocode}
9899 % \end{macro}
9900 % \end{macro}
9901 % \end{macro}
9902 % \end{macro}
9903 % \end{macro}
9904 % \end{macro}
9905 % \end{macro}
9906 % \end{macro}
9907 %
9908 % \begin{macro}{\bibnodate}
9909 % \begin{macro}{\BIP}
9910 % Two types of ``special'' years: ``no date'' and ``in press''. These are not
9911 % only text strings unlike normal years, but also are recognized by
9912 % \fname{apacite.bst} and treated differently there. Here and in many other
9913 % macros below, the \cmd{\hbox} ensures that \TeX{} does not interpret the
9914 % final period as a sentence-ending period, and thus does not insert the extra
9915 % space associated with that.
9916 % \begin{macrocode}
9917 \newcommand{\bibnodate}{n.d.\hbox{}}% no date
9918 \newcommand{\BIP}{in press} % in press
9919 % \end{macrocode}
9920 % \end{macro}
9921 % \end{macro}
9922 %
9923 % \begin{macro}{\BOthers}
9924 % \begin{macro}{\BOthersPeriod}
9925 % ``and others''. The argument contains a period to suppress an additional one
9926 % in the reference list, i.e., it is used as |\BOthers{.}| and the period in the
9927 % argument is seen by \BibTeX{}, which does not insert an additional one, so
9928 % that we now correctly get |et al.| and not |et al..| in the reference list.
9929 % The difference between \cmd{\BOthers} and \cmd{\BOthersPeriod} is that the
9930 % latter is used in a context where there should always be a period at the
9931 % end. Given that \BibTeX{} does not insert it because of the mentioned usage
9932 % of a period in the argument, this explicit distinction is necessary here.
9933 % Hence, if an unabbreviated string is used to define these commands, their
9934 % definitions become different. For example,
9935 % \begin{verbatim}
9936 % \renewcommand{\BOthers}{and others}
9937 % \renewcommand{\BOthersPeriod}{and others.}
9938 % \end{verbatim}
9939 % This does not work perfectly if \cmd{\citeauthor} is used at the end of a
9940 % sentence. This is on the todo-list. For the moment, the user will have to
9941 % employ an explicit workaround, i.e., insert an additional period if
9942 % \cmd{\BOthers} does not contain one and omit this period if it does.
9943 % \begin{macrocode}
9944 \newcommand{\BOthers}[1]{et al.\hbox{}}% ``and others''
9945 \newcommand{\BOthersPeriod}[1]{et al.\hbox{}}% ``and others.'', with a period
9946 % \end{macrocode}
9947 % \end{macro}
9948 % \end{macro}
9949 %
9950 % \begin{macro}{\BIn}
9951 % \begin{macro}{\Bby}
9952 % Used for ``In Editor (Ed.), \emph{Booktitle}'' and
9953 % ``by Editor, Ed., \emph{Booktitle}'', respectively.
9954 % \begin{macrocode}
9955 \newcommand{\BIn}{In} % for ``In '' editor...
9956 \newcommand{\Bby}{by} % for ``by '' editor... (in reprints)
9957 % \end{macrocode}
9958 % \end{macro}
9959 % \end{macro}
9960 %
9961 % \begin{macro}{\BED}
9962 % \begin{macro}{\BEDS}
9963 % \begin{macro}{\BTRANS}
9964 % \begin{macro}{\BTRANSS}
9965 % \begin{macro}{\BTRANSL}
9966 % \begin{macro}{\BCHAIR}
9967 % \begin{macro}{\BCHAIRS}
9968 % Various types of non-author contributions.
9969 % \begin{macrocode}
9970 \newcommand{\BED}{Ed.\hbox{}} % editor
9971 \newcommand{\BEDS}{Eds.\hbox{}} % editors
9972 \newcommand{\BTRANS}{Trans.\hbox{}} % translator
9973 \newcommand{\BTRANSS}{Trans.\hbox{}} % translators
9974 \newcommand{\BTRANSL}{trans.\hbox{}} % translation, for the year field
9975 \newcommand{\BCHAIR}{Chair} % chair of symposium
9976 \newcommand{\BCHAIRS}{Chairs} % chairs
9977 % \end{macrocode}
9978 % \end{macro}
9979 % \end{macro}
9980 % \end{macro}
9981 % \end{macro}
9982 % \end{macro}
9983 % \end{macro}
9984 % \end{macro}
9985 %
9986 % \begin{macro}{\BVOL}
9987 % \begin{macro}{\BVOLS}
9988 % \begin{macro}{\BNUM}
9989 % \begin{macro}{\BNUMS}
9990 % \begin{macro}{\BEd}
9991 % \begin{macro}{\BCHAP}
9992 % \begin{macro}{\BCHAPS}
9993 % \begin{macro}{\BPG}
9994 % \begin{macro}{\BPGS}
9995 % Various strings that indicate what kind of number is given.
9996 % \begin{macrocode}
9997 \newcommand{\BVOL}{Vol.\hbox{}} % volume (of a multi-volume book)
9998 \newcommand{\BVOLS}{Vols.\hbox{}} % volumes
9999 \newcommand{\BNUM}{No.\hbox{}} % number (of a technical report)
10000 \newcommand{\BNUMS}{Nos.\hbox{}} % numbers
10001 \newcommand{\BEd}{ed.\hbox{}} % edition
10002 \newcommand{\BCHAP}{chap.\hbox{}} % chapter (for electronic documents)
10003 \newcommand{\BCHAPS}{chap.\hbox{}} % chapters
10004 \newcommand{\BPG}{p.\hbox{}} % page
10005 \newcommand{\BPGS}{pp.\hbox{}} % pages
10006 % \end{macrocode}
10007 % \end{macro}
10008 % \end{macro}
10009 % \end{macro}
10010 % \end{macro}
10011 % \end{macro}
10012 % \end{macro}
10013 % \end{macro}
10014 % \end{macro}
10015 % \end{macro}
10016 %
10017 % \begin{macro}{\BTR}
10018 % \begin{macro}{\BPhD}
10019 % \begin{macro}{\BUPhD}
10020 % \begin{macro}{\BMTh}
10021 % \begin{macro}{\BUMTh}
10022 % Various strings that indicate what kind of work is referenced.
10023 % \begin{macrocode}
10024 %% Default technical report type name.
10025 \newcommand{\BTR}{Tech.\ Rep.\hbox{}}
10026 %% Default PhD thesis type name.
10027 \newcommand{\BPhD}{Doctoral dissertation}
10028 %% Default unpublished PhD thesis type name.
10029 \newcommand{\BUPhD}{Unpublished doctoral dissertation}
10030 %% Default master's thesis type name.
10031 \newcommand{\BMTh}{Master's thesis}
10032 %% Default unpublished master's thesis type name.
10033 \newcommand{\BUMTh}{Unpublished master's thesis}
10034 % \end{macrocode}
10035 % \end{macro}
10036 % \end{macro}
10037 % \end{macro}
10038 % \end{macro}
10039 % \end{macro}
10040 %
10041 % \begin{macro}{\BAuthor}
10042 % ``Author'', the string used for the publisher if the publisher is also the
10043 % author of the work.
10044 % \begin{macrocode}
10045 \newcommand{\BAuthor}{Author}% ``Author'' if publisher = author
10046 % \end{macrocode}
10047 % \end{macro}
10048 %
10049 % \begin{macro}{\BOWP}
10050 % \begin{macro}{\BREPR}
10051 % Two strings that are used for reprints and translations.
10052 % \begin{macrocode}
10053 \newcommand{\BOWP}{Original work published}
10054 \newcommand{\BREPR}{Reprinted from}
10055 % \end{macrocode}
10056 % \end{macro}
10057 % \end{macro}
10058 %
10059 % \begin{macro}{\BAvailFrom}
10060 % \begin{macro}{\BRetrieved}
10061 % \begin{macro}{\BRetrievedFrom}
10062 % \begin{macro}{\BMsgPostedTo}
10063 % Strings that indicate where on the internet the referenced document was
10064 % obtained.
10065 % \begin{macrocode}
10066 \newcommand{\BAvailFrom}{Available from\ }% Websites; note the space.
10067 %% The argument is the date on which it was last checked.
10068 \newcommand{\BRetrieved}[1]{Retrieved {#1}, from\ }% Websites; note the space.
10069 \newcommand{\BRetrievedFrom}{Retrieved from\ }% Websites; note the space.
10070 \newcommand{\BMsgPostedTo}{Message posted to\ }% Messages; note the space.
10071 % \end{macrocode}
10072 % \end{macro}
10073 % \end{macro}
10074 % \end{macro}
10075 % \end{macro}
10076 %
10077 % \subsubsection{Punctuation}
10078 %
10079 % Most of this is more style-specific than language specific, but there are
10080 % some punctuation differences between different languages, or even
10081 % ``dialects'' (in \pkg{babel}'s terminology) of the same ``language''.
10082 % Therefore, these are all included here and redefined in the \fname{.apc}
10083 % files.
10084 %
10085 % \begin{macro}{\BBOP}
10086 % \begin{macro}{\BBCP}
10087 % Opening and closing parentheses. Used to enclose the whole citation for a
10088 % parenthetical citation (e.g., \cmd{\cite}), only the year and post-note for
10089 % in-text citations (e.g., \cmd{\citeA}), and the year (and month and day, if
10090 % present) in the reference list. If different punctuation is desired for
10091 % the reference than used in citations, these commands can be redefined
10092 % immediately before the location of the \cmd{\bibliography} command. If
10093 % different punctuation is desired for parenthetical citations than for in-text
10094 % citations (seems unlikely), the citation commands themselves have to be
10095 % redefined.
10096 % \begin{macrocode}
10097 \newcommand{\BBOP}{(} % opening parenthesis
10098 \newcommand{\BBCP}{)} % closing parenthesis
10099 % \end{macrocode}
10100 % \end{macro}
10101 % \end{macro}
10102 %
10103 % \begin{macro}{\BBOQ}
10104 % \begin{macro}{\BBCQ}
10105 % Opening and closing quotes for article-type titles in the reference list.
10106 % \begin{macrocode}
10107 \newcommand{\BBOQ}{} % opening quote for article title
10108 \newcommand{\BBCQ}{} % closing quote for article title
10109 % \end{macrocode}
10110 % \end{macro}
10111 % \end{macro}
10112 %
10113 % \begin{macro}{\BBAA}
10114 % \begin{macro}{\BBAB}
10115 % \begin{macro}{\BAnd}
10116 % Three forms of ``and''. Of course, the word ``and'' is a literal text string,
10117 % so this part could also have been allocated to the the section that handles
10118 % those.
10119 % \begin{macrocode}
10120 \newcommand{\BBAA}{\&} % between authors in parenthetical cites and ref. list
10121 \newcommand{\BBAB}{and} % between authors in in-text citation
10122 \newcommand{\BAnd}{\&} % for ``Ed. \& Trans.'' in ref. list
10123 % \end{macrocode}
10124 % \end{macro}
10125 % \end{macro}
10126 % \end{macro}
10127 %
10128 % \begin{macro}{\BPBI}
10129 % \begin{macro}{\BHBI}
10130 % Punctuation between initials. This is primarily used to reduce or eliminate
10131 % space between initials. Note that there is currently not a similar command
10132 % for the last period after the initials, so that removing the periods in these
10133 % macros will generally give undesirable results.
10134 % \begin{macrocode}
10135 \DeclareRobustCommand{\BPBI}{.~}% Period between initials
10136 \DeclareRobustCommand{\BHBI}{.-}% Hyphen between initials
10137 % \end{macrocode}
10138 % \end{macro}
10139 % \end{macro}
10140 %
10141 % \begin{macro}{\BAP}
10142 % \begin{macro}{\BBAY}
10143 % \begin{macro}{\BBYY}
10144 % \begin{macro}{\BBC}
10145 % \begin{macro}{\BBN}
10146 % \begin{macro}{\BCBT}
10147 % \begin{macro}{\BCBL}
10148 % \begin{macro}{\BDBL}
10149 % Punctuation between various parts of citations and reference list entries.
10150 % \begin{macrocode}
10151 \newcommand{\BAP}{ } % after prefix, before first citation
10152 \newcommand{\BBAY}{, } % between author(s) and year
10153 \newcommand{\BBYY}{, } % between years of multiple citations with same author
10154 \newcommand{\BBC}{; } % between cites
10155 \newcommand{\BBN}{, } % before note
10156 \newcommand{\BCBT}{,} % comma between authors in ref. list when no. of
10157 %% authors = 2
10158 \newcommand{\BCBL}{,} % comma before last author when no. of authors > 2
10159 \newcommand{\BDBL}{, \dots{} }% dots before last author when no. of authors > 7
10160 % \end{macrocode}
10161 % \end{macro}
10162 % \end{macro}
10163 % \end{macro}
10164 % \end{macro}
10165 % \end{macro}
10166 % \end{macro}
10167 % \end{macro}
10168 % \end{macro}
10169 %
10170 % \subsubsection{Date formatting}
10171 %
10172 % This consists of literal strings (names of the months), relative ordering of
10173 % year, month, and day, and punctuation between the elements.
10174 %
10175 % \begin{macro}{\APACmonth}
10176 % This takes one argument. If it is a number between 1 and 12, the name of
10177 % the corresponding month is produced (1 = January, \dots, 12 = December),
10178 % and 13--16 represent the seasons. Anything else is copied literally. In this
10179 % way, other kinds of dates can be handled as well, such as
10180 % ``August/September''. Note that this in its turn can be flexibly entered
10181 % as |\APACmonth{08}/\APACmonth{09}| in the \fname{.bib} file.
10182 % \begin{macrocode}
10183 \newcommand{\APACmonth}[1]{\ifcase #1\or January\or February\or March\or
10184 April\or May\or June\or July\or August\or September\or October\or
10185 November\or December\or Winter\or Spring\or Summer\or Fall\else
10186 {#1}\fi}
10187 % \end{macrocode}
10188 % \end{macro}
10189 %
10190 % \begin{macro}{\APACrefYearMonthDay}
10191 % Year, month, and day in the reference list. Often used for newspaper articles
10192 % and presentations at conferences. By default, this results in something like
10193 % ``(2005, July~5)''. The month and day should be seen as parenthetical
10194 % refinements of the year, so that in other languages, the year should be
10195 % named first as well, regardless of the conventions for representing dates in
10196 % such languages.
10197 % \begin{macrocode}
10198 \newcommand{\APACrefYearMonthDay}[3]{%
10199 {\BBOP}{#1}% year (+ addendum); should not be empty
10200 \ifx\@empty#2\@empty
10201 \ifx\@empty#3\@empty
10202 \else
10203 \unskip, {#3}% day
10204 \fi
10205 \else
10206 \unskip, {#2}% month
10207 \ifx\@empty#3\@empty
10208 \else
10209 \unskip~{#3}% day
10210 \fi
10211 \fi
10212 {\BBCP}% closing parenthesis
10213 }
10214 % \end{macrocode}
10215 % \end{macro}
10216 %
10217 % \begin{macro}{\APACdate}
10218 % A date in the ordinary form, like \cmd{\today}. This is needed for processing
10219 % the \fieldname{lastchecked} field. Should be able to handle dates in both
10220 % typical \LaTeX{} input format (|2005/07/05|) and ISO format
10221 % (|2005-07-05|, possibly with time after it, which will be ignored). Maybe
10222 % other formats as well; e.g., |20050705|, as in the Un*x |touch| command.
10223 % Not yet implemented.
10224 % \end{macro}
10225 %
10226 % \subsubsection{Ordinal numbers}
10227 %
10228 % Some functions, for use with the \fieldname{edition} field, which transform
10229 % a (cardinal) number (``1'', ``2'', \dots) to an ordinal number (``1st'',
10230 % ``2nd'', \dots).
10231 %
10232 % I copied the functions here literally from \fname{amsrefs.dtx} (starting
10233 % with \cmd{\PrintEdition} there) and made only one slight adaptation: removing
10234 % \cmd{\editiontext}. In the \APACversiondate{2007/09/03} version of
10235 % \pkg{apacite}, \cmd{\PrintOrdinal} and \cmd{\print@ordinal} were called
10236 % \cmd{\PrintCardinal} and \cmd{\print@cardinal}, respectively, and what is
10237 % called ``ordinal'' now was called ``cardinal''. This terminology was copied
10238 % from the documentation of \pkg{amsrefs}, but it is incorrect and has
10239 % therefore been changed in the current version. This causes a slight
10240 % incompatibility between versions of \pkg{apacite}. So in case users have
10241 % redefined one of these macros to fit their own needs, they should rename
10242 % these accordingly. Note, however, that the current version of \pkg{apacite}
10243 % redefines these macros in the language-specific files, so for most users,
10244 % this will presumably be sufficient.
10245 %
10246 % \begin{macro}{\@xp}
10247 % Abbreviation.
10248 % \begin{macrocode}
10249 \let\@xp\expandafter
10250 % \end{macrocode}
10251 % \end{macro}
10252 %
10253 % \begin{macro}{\PrintOrdinal}
10254 % \begin{macro}{\print@ordinal}
10255 % \begin{macro}{\CardinalNumeric}
10256 % \begin{macro}{\keep@last@digit}
10257 % |\PrintOrdinal{2}| gives ``2nd'', etc. If the argument is not an integer
10258 % number, it is copied literally to the output. At least, apparently, because
10259 % I do not really understand how it works. The \pkg{amsrefs} documentation
10260 % suggests that \cmd{\CardinalNumeric} already gives the ordinal number
10261 % (incorrectly called ``cardinal number'' there), and the name
10262 % \cmd{\CardinalNumeric} without `|@|' sign likewise suggests that it is a
10263 % user command, but some tests using this give garbage. Therefore,
10264 % \cmd{\PrintOrdinal} (a slight adaptation of \pkg{amsrefs}'
10265 % \cmd{\PrintEdition}) is the command that ultimately should be used.
10266 % \begin{macrocode}
10267 \newcommand{\PrintOrdinal}[1]{%
10268 \afterassignment\print@ordinal
10269 \count@ 0#1\relax\@nil
10270 }
10271 \def\print@ordinal#1#2\@nil{%
10272 \ifx\relax#1\relax
10273 \ifnum\count@>\z@
10274 \CardinalNumeric\count@
10275 \else
10276 ??th%
10277 \fi
10278 \else
10279 \ifnum \count@>\z@ \number\count@ \fi
10280 #1#2\relax
10281 \fi
10282 }
10283 \newcommand{\CardinalNumeric}[1]{%
10284 \number#1\relax
10285 \if
10286 \ifnum#1<14
10287 \ifnum#1>\thr@@ T\else F\fi
10288 \else
10289 F%
10290 \fi
10291 T%
10292 th%
10293 \else
10294 \@xp\keep@last@digit\@xp#1\number#1\relax
10295 \ifcase#1th\or st\or nd\or rd\else th\fi
10296 \fi
10297 }
10298 \def\keep@last@digit#1#2{%
10299 \ifx\relax#2%
10300 \@xp\@gobbletwo
10301 \else
10302 #1=#2\relax
10303 \fi
10304 \keep@last@digit#1%
10305 }
10306 % \end{macrocode}
10307 % \end{macro}
10308 % \end{macro}
10309 % \end{macro}
10310 % \end{macro}
10311 %
10312 % Load language dependent sections from an external file. Based on code by
10313 % Stefan Bj\"ork [2004/12/25], although heavily modified.
10314 % \begin{macrocode}
10315 \AtBeginDocument{%
10316 % \end{macrocode}
10317 % Both \pkg{babel} and \pkg{(n)german} use \cmd{\iflanguage} to check the main
10318 % language. They both also use \cmd{\languagename}, but that gives more
10319 % problems with ``dialects''. For example, if \cmd{\languagename} = |austrian|
10320 % then |\iflanguage{german}{Yes}{No}| gives Yes. This allows us to provide only
10321 % \fname{.apc} files for the language class without complicated code to check
10322 % whether a certain ``dialect'' is used.
10323 %
10324 % Check whether \cmd{\iflanguage} is defined. If not, no language support
10325 % is offered.
10326 % \begin{macrocode}
10327 \@ifundefined{iflanguage}%
10328 {\relax }%
10329 {%
10330 % \end{macrocode}
10331 % Some \TeX{} distributions automatically preload \pkg{babel} with default
10332 % language ``|nohyphenation|'', so this language should revert to doing
10333 % nothing. Strangely enough, \cmd{\iflanguage} does not work correctly, so
10334 % I'll use a trick. (Some trial and error, because \fname{babel.dtx} states
10335 % that there must be a ``\verb*+\string +'' before the ``|nohyphenation|'',
10336 % but apparently in this situation this is not the case.)
10337 % \begin{macrocode}
10338 \edef\APAC@tmp{nohyphenation}%
10339 \ifx\languagename\APAC@tmp
10340 \else
10341 % \end{macrocode}
10342 % Check whether $\langle$\cmd{\languagename}$\rangle$\fname{.apc} exists.
10343 % If so, load this file.
10344 % \begin{macrocode}
10345 \InputIfFileExists{\languagename.apc}{}{%
10346 % \end{macrocode}
10347 % Else, i.e., $\langle$\cmd{\languagename}$\rangle$\fname{.apc} does not
10348 % exist. Try whether the current language is a dialect of one of the
10349 % known languages. This is not perfect, because languages for which no
10350 % hyphenation patterns have been found revert to the default language,
10351 % so that the wrong language file may be loaded here in that case. Also,
10352 % |UKenglish| uses different hyphenation patterns from |english|. I have
10353 % to find a better way to solve this.
10354 %
10355 % \begin{macro}{\APAC@iflang}
10356 % Define a modification of \cmd{\iflanguage} that executes the ``true''
10357 % code if the language is defined and equal to the current language and
10358 % does nothing otherwise. (Just \cmd{\iflanguage} gives an error if the
10359 % language is not loaded.)
10360 % \begin{macrocode}
10361 \def\APAC@iflang##1##2{%
10362 \expandafter\ifx\csname l@##1\endcsname\relax
10363 \else
10364 \ifnum\csname l@##1\endcsname=\language
10365 {##2}%
10366 \fi
10367 \fi
10368 }%
10369 % \end{macrocode}
10370 % \end{macro}
10371 %
10372 % \begin{macro}{\APAC@apcfile}
10373 % Define the language support file. The \cmd{\def} instead of a direct
10374 % \cmd{\input} is done to provide a mechanism to check whether any
10375 % language file has been defined.
10376 % \begin{macrocode}
10377 \APAC@iflang{dutch}{\gdef\APAC@apcfile{dutch.apc}}%
10378 \APAC@iflang{finnish}{\gdef\APAC@apcfile{finnish.apc}}%
10379 \APAC@iflang{french}{\gdef\APAC@apcfile{french.apc}}%
10380 \APAC@iflang{german}{\gdef\APAC@apcfile{german.apc}}%
10381 \APAC@iflang{ngerman}{\gdef\APAC@apcfile{ngerman.apc}}%
10382 \APAC@iflang{greek}{\gdef\APAC@apcfile{greek.apc}}%
10383 \APAC@iflang{norsk}{\gdef\APAC@apcfile{norsk.apc}}%
10384 \APAC@iflang{spanish}{\gdef\APAC@apcfile{spanish.apc}}%
10385 \APAC@iflang{swedish}{\gdef\APAC@apcfile{swedish.apc}}%
10386 % \end{macrocode}
10387 % The hyphenation patterns for UK English are different from
10388 % US English, so this needs to be accommodated explicitly to avoid a
10389 % warning. Australian, New Zealand, and Canadian all use either the
10390 % British or American hyphenation patterns, so do not need to be
10391 % treated separately here.
10392 % \begin{macrocode}
10393 \APAC@iflang{UKenglish}{\gdef\APAC@apcfile{english.apc}}%
10394 % \end{macrocode}
10395 % The default English as the last one. If a language is loaded without
10396 % hyphenation patterns, the English hyphenation patterns are used by
10397 % default in \pkg{babel}. In such a case, both this particular
10398 % language and English give a hit. Having English as the last one
10399 % means that in such a case, \pkg{apacite} assigns English,
10400 % corresponding with \pkg{babel}'s default.
10401 % \begin{macrocode}
10402 \APAC@iflang{english}{\gdef\APAC@apcfile{english.apc}}%
10403 % \end{macrocode}
10404 % \end{macro}
10405 %
10406 % Give a warning if the process so far has not resulted in a target
10407 % language file, or if the target language file cannot be found.
10408 % \begin{macrocode}
10409 \@ifundefined{APAC@apcfile}{%
10410 \PackageWarningNoLine{apacite}{%
10411 No suitable language definition file (\languagename.apc) found}%
10412 }{%
10413 \InputIfFileExists{\APAC@apcfile}{}{%
10414 \PackageWarningNoLine{apacite}{%
10415 Language definition file \APAC@apcfile\space not found}%
10416 }%
10417 }%
10418 % \end{macrocode}
10419 % Clear up some macros that are no longer needed.
10420 % \begin{macrocode}
10421 \let\APAC@apcfile\@undefined
10422 }%
10423 \fi
10424 \let\APAC@tmp\@undefined
10425 }%
10426 \let\APAC@iflang\@undefined
10427 }
10428 %%
10429 %</package>
10430 % \end{macrocode}
10431 %
10432 %
10433 % \section{Documentation package (\fname{apacdoc.sty})}
10434 % The \pkg{apacdoc} package is written for generating the \pkg{apacite}
10435 % user's manual. But it also contains a few commands that are too
10436 % experimental or otherwise unsuitable to be included in \fname{apacite.sty},
10437 % but which are necessary to format some examples from the APA manual
10438 % correctly. As such, these commands may be useful for users if they
10439 % encounter similar citation problems. In such a case, it is probably
10440 % better to copy the definitions of the desired commands to the top
10441 % of your \fname{.tex} document (before \verb+\begin{document}+) or
10442 % to a tailor-made \fname{.sty} file, rather than loading the \pkg{apacdoc}
10443 % package.
10444 %
10445 % \begin{macrocode}
10446 %<*docpkg>
10447 %%
10448 %% apacdoc.sty : Style package that is used for the apacite documentation.
10449 %% Written by Erik Meijer
10450 % \end{macrocode}
10451 % \subsection{Options}
10452 % \begin{macro}{\if@APACdoc@AX}
10453 % Generate author index?
10454 % \begin{macrocode}
10455 \newif\if@APACdoc@AX
10456 \DeclareOption{makeAX}{\@APACdoc@AXtrue}%
10457 \@APACdoc@AXfalse
10458 \ProcessOptions
10459 % \end{macrocode}
10460 % \end{macro}
10461 %
10462 % \subsection{Document-specific definitions that may be useful for wider use}
10463 % \begin{macro}{\bibliteral}
10464 % \begin{macro}{\bibinitial}
10465 % Echo argument literally. Can be used to define a certain author type
10466 % (``Producer'') in a place where \BibTeX{} expects a first name.
10467 % Using this command between a pair of braces makes sure that the text
10468 % is not abbreviated into an initial.
10469 % This is the result of lots of trial and error. If I change something
10470 % in another part, I typically have to change something here as well.
10471 % The \verb+\space+ is necessary because in the current setup, an additional
10472 % space is inserted in the bibliography, and \MakeIndex{} is space-sensitive.
10473 % \begin{macrocode}
10474 %% \DeclareRobustCommand{\bibliteral}[1]{\string\bibliteral{#1}}
10475 %% \newcommand{\bibliteral}[1]{#1}
10476 %% \newcommand{\bibliteral}[1]{\string\bibliteral{#1}}
10477 \newcommand{\bibliteral}[1]{\string\bibliteral\space{#1}}
10478 \DeclareRobustCommand{\bibinitial}[1]{\string#1}
10479 %% \newcommand{\bibinitial}{\string\bibinitial\space}
10480 % \end{macrocode}
10481 % \end{macro}
10482 % \end{macro}
10483 %
10484 % \begin{macro}{\bibnodot}
10485 % If the argument is a period (`|.|'), \BibTeX{} puts no period after it.
10486 % \begin{macrocode}
10487 \newcommand{\bibnodot}[1]{}
10488 % \end{macrocode}
10489 % \end{macro}
10490 %
10491 % \begin{macro}{\SwapArgs}
10492 % Reverse order of the two arguments. Can be used for various reasons,
10493 % mostly related to sorting in the reference list.
10494 % \begin{macrocode}
10495 \newcommand{\SwapArgs}[2]{#2#1}
10496 % \end{macrocode}
10497 % \end{macro}
10498 %
10499 % \begin{macro}{\bibreftext}
10500 % \begin{macro}{\Dutchvon}
10501 % The following macro is especially useful if the \fieldname{year}
10502 % field must be different in the text and the reference list,
10503 % e.g., ``1992/1993'' in the text and ``1992'' in reference list.
10504 % Then \fieldname{year} can be defined as |\bibreftext{1992}{1992/1993}|.
10505 % The definition below displays only the second argument (``text'').
10506 % Just before the reference list, this can then be redefined to
10507 % display only the first argument (``ref'').
10508 % \begin{macrocode}
10509 \newcommand{\bibreftext}[2]{#2}
10510 % \end{macrocode}
10511 % The same command, but now intended for Dutch-style ``von'' parts,
10512 % so in order to create some flexibility in formatting items from
10513 % a \fname{.bib} file, it is useful to have a separate macro for
10514 % this application.
10515 % \begin{macrocode}
10516 \newcommand{\Dutchvon}[2]{#2}
10517 % \end{macrocode}
10518 % \end{macro}
10519 % \end{macro}
10520 %
10521 % \begin{macro}{\APACredefineOnce}
10522 % This macro takes two arguments: (1) the name of a command (without the
10523 % backslash) and (2) arbitrary \TeX{} code. It then redefines the
10524 % command (1) to the \TeX{} code (2) as a one-time change, so after the
10525 % command (1) has been invoked once, it reverts to its definition before
10526 % \cmd{\APACredefineOnce} was issued. This can be used to redefine, say,
10527 % \cmd{\BRetrievedFrom} from ``Retrieved from'' to ``Retrieved from
10528 % Poverty Alleviation website'' for a single reference but restore it
10529 % to ``Retrieved from'' immediately afterwards.
10530 % \begin{macrocode}
10531 \DeclareRobustCommand\APACredefineOnce[2]{%
10532 \global
10533 \expandafter\let
10534 \csname old#1\expandafter\endcsname
10535 \csname #1\endcsname
10536 \expandafter\gdef
10537 \csname #1\expandafter\endcsname
10538 {{#2}%
10539 \global
10540 \expandafter\let
10541 \csname #1\expandafter\endcsname
10542 \csname old#1\endcsname
10543 }%
10544 }
10545 % \end{macrocode}
10546 % \end{macro}
10547 %
10548 % \begin{macro}{\bibeditortype}
10549 % \begin{macro}{\renewbibeditortype}
10550 % The following macro changes the definitions of the macros \cmd{\BED}
10551 % and \cmd{\BEDS} to the argument of this macro and then immediately
10552 % changes the definitions back to their old definitions. So it makes a
10553 % one-time change. Can be used to use ``Producer'' instead of ``Ed.''
10554 % etc.
10555 % \begin{macrocode}
10556 \DeclareRobustCommand{\bibeditortype}[1]{\relax }%
10557 \def\renewbibeditortype{%
10558 \def\oldBED{}%
10559 \def\oldBEDS{}%
10560 \DeclareRobustCommand{\bibeditortype}[1]{%
10561 \global\let\oldBED\BED
10562 \global\let\oldBEDS\BEDS
10563 \global\def\BED{##1\global\let\BED\oldBED \global\let\BEDS\oldBEDS}%
10564 \global\def\BEDS{##1\global\let\BED\oldBED \global\let\BEDS\oldBEDS}%
10565 }%
10566 }
10567 % \end{macrocode}
10568 % \end{macro}
10569 % \end{macro}
10570 %
10571 % \begin{macro}{\bibInstring}
10572 % \begin{macro}{\BOn}
10573 % The following macro changes the definition of the macro \cmd{\BIn} to the
10574 % argument and then immediately changes the definition back to the old
10575 % definition. So it makes a one-time change. Can be used to use ``On''
10576 % instead of ``In'' for a CD-track, for which \cmd{\BOn} is supplied.
10577 % \begin{macrocode}
10578 \newcommand{\bibInstring}[1]{%
10579 \global\let\oldBIn\BIn
10580 \global\def\BIn{#1\global\let\BIn\oldBIn}%
10581 }
10582 \newcommand{\BOn}{On}
10583 % \end{macrocode}
10584 % \end{macro}
10585 % \end{macro}
10586 %
10587 % \begin{macro}{\BAbstractRetrieved}
10588 % \begin{macro}{\BmakeAbstractRetrieved}
10589 % The following macros are used to change ``Retrieved'' into
10590 % ``Abstract retrieved''. They use the same principle as
10591 % \cmd{\renewbibeditortype}.
10592 % \begin{macrocode}
10593 \global\def\BAbstractRetrieved#1{Abstract retrieved {#1}, from\ }%
10594 \DeclareRobustCommand{\BmakeAbstractRetrieved}{%
10595 \global\def\oldBRetrieved{}%
10596 \global\let\oldBRetrieved\BRetrieved
10597 \global\def\BRetrieved##1{%
10598 \BAbstractRetrieved{##1}%
10599 \global\let\BRetrieved\oldBRetrieved%
10600 }%
10601 }
10602 % \end{macrocode}
10603 % \end{macro}
10604 % \end{macro}
10605 %
10606 % \begin{macro}{\noedition}
10607 % Suppress ``ed.'' to format ``Version 4.0'' in an \fieldname{edition}
10608 % field.
10609 % \begin{macrocode}
10610 \DeclareRobustCommand{\noedition}{%
10611 \global\def\oldBEd{}%
10612 \global\let\oldBEd\BEd
10613 \global\def\BEd{%
10614 \unskip
10615 \global\let\BEd\oldBEd
10616 }%
10617 }
10618 % \end{macrocode}
10619 % \end{macro}
10620 %
10621 % \begin{macro}{\swallownext}
10622 % \begin{macro}{\swallowdot}
10623 % \begin{macro}{\bibskipbracenodot}
10624 % \begin{macro}{\indexskipbracenodot}
10625 % The \cmd{\bibskipbracenodot} macro suppresses the period after a
10626 % following closing brace. It does not work entirely well at the
10627 % moment. In particular, it works differently in an \cmd{\AX} macro
10628 % in text and an \cmd{\AX} macro in the reference list. This probably
10629 % has something to do with robust vs.\ fragile macros and/or expansion
10630 % of the macro. I have experimented a lot with many variations, but
10631 % don't seem to get it right. I don't understand these issues well yet.
10632 % \cmd{\swallownext} swallows its argument; \cmd{\swallowdot} swallows
10633 % the next character if it's a period.
10634 % \begin{macrocode}
10635 \def\swallownext#1{\relax}
10636 \def\swallowdot{%
10637 \@ifnextchar.%
10638 {\swallownext}%
10639 {\relax}%
10640 }
10641 % \end{macrocode}
10642 % When the above does not work, \cmd{\bibskipbracenodot} should reduce
10643 % to nothing. This is the current definition. Just before the
10644 % bibliography, it is redefined. \cmd{\indexskipbracenodot} has the
10645 % same purpose, but for the author index instead of the reference list.
10646 % \begin{macrocode}
10647 %% \def\bibskipbracenodot{\string\bibskipbracenodot}
10648 %% \def\bibskipbracenodot{\aftergroup\swallowdot}
10649 %% \let\bibskipbracenodot\relax
10650 \def\bibskipbracenodot{\noexpand\bibskipbracenodot}
10651 \def\indexskipbracenodot{\noexpand\indexskipbracenodot}
10652 % \end{macrocode}
10653 % \end{macro}
10654 % \end{macro}
10655 % \end{macro}
10656 % \end{macro}
10657 %
10658 % \begin{macro}{\APACmanBeforeBib}
10659 % Redefine commands that should be different in the bibliography.
10660 % \begin{macrocode}
10661 \newcommand{\APACmanBeforeBib}{%
10662 \renewcommand{\bibreftext}[2]{##1}%
10663 \renewcommand{\Dutchvon}[2]{##1}%
10664 \renewbibeditortype
10665 \global\let\oldbibskipbracenodot\bibskipbracenodot
10666 \global\def\bibskipbracenodot{\aftergroup\swallowdot}%
10667 \global\let\oldbibliteral\bibliteral
10668 \renewcommand{\bibliteral}[1]{##1}%
10669 \global\let\oldbibinitial\bibinitial
10670 \renewcommand{\bibinitial}[1]{##1}%
10671 }
10672 % \end{macrocode}
10673 % \end{macro}
10674 %
10675 % \begin{macro}{\APACbibstyle}
10676 % Dirty trick: request \fname{apacitex.bst} if \pkg{apacite} is loaded
10677 % with one of the index options, and request \fname{apacite.bst}
10678 % otherwise.
10679 % \begin{macrocode}
10680 \def\APACbibstyle{%
10681 \if@APAC@index
10682 apacitex% with index option
10683 \else
10684 apacite% without index option
10685 \fi
10686 }
10687 % \end{macrocode}
10688 % \end{macro}
10689 %
10690 % \begin{macro}{\APACmanBeforeIndex}
10691 % Redefine commands that should be different in the author index.
10692 % \begin{macrocode}
10693 \newcommand{\APACmanBeforeIndex}{%
10694 \clearpage
10695 \renewcommand{\bibeditortype}[1]{}%
10696 \renewcommand{\bibliteral}[1]{\unskip}%
10697 \global\let\indexskipbracenodot\bibskipbracenodot
10698 }
10699 % \end{macrocode}
10700 % \end{macro}
10701 %
10702 % \begin{macro}{\APACmanAfterIndex}
10703 % Revert to the old definitions of commands after the index.
10704 % \begin{macrocode}
10705 \newcommand{\APACmanAfterIndex}{%
10706 \global\let\bibskipbracenodot\oldbibskipbracenodot
10707 \global\def\indexskipbracenodot{\noexpand\indexskipbracenodot}%
10708 \APACdocindex
10709 }
10710 % \end{macrocode}
10711 % \end{macro}
10712 %
10713 % \begin{macro}{\SetupAPACdocPrologues}
10714 % Redefine some indexing-related commands from \fname{doc.sty} and
10715 % \fname{ltxdoc.cls}. Unfortunately, I couldn't get the code index
10716 % and change history working with the \pkg{index} package, so I have
10717 % to tweak everything so that the \pkg{apacite} manual does not use the
10718 % \pkg{index} package (which is loaded by apacite when an
10719 % \pkgoption{index} option is requested).
10720 % \begin{macrocode}
10721 \newcommand{\SetupAPACdocPrologues}{%
10722 \@ifundefined{IndexPrologue}{}{%
10723 \IndexPrologue{%
10724 \clearpage\section*{{Code Index}}%
10725 \addcontentsline{toc}{section}{Code Index}%
10726 \markboth{{Code Index}}{{Code Index}}%
10727 Numbers written in italic refer to the page where the corresponding
10728 entry is described; numbers underlined refer to the
10729 \ifcodeline@index
10730 code line of the
10731 \fi
10732 definition; numbers in roman refer to the
10733 \ifcodeline@index
10734 code lines
10735 \else
10736 pages
10737 \fi
10738 where the entry is used.
10739 }%
10740 }%
10741 \@ifundefined{GlossaryPrologue}{}{%
10742 \GlossaryPrologue{\section{{Change History}}%
10743 \markboth{{Change History}}{{Change History}}%
10744 }%
10745 }%
10746 }
10747 % \end{macrocode}
10748 % \end{macro}
10749 %
10750 % \begin{macro}{\APACdocindex}
10751 % From \fname{doc.dtx}.
10752 % \begin{macrocode}
10753 \def\APACdocindex{%
10754 \ifhave@multicol
10755 \renewenvironment{theindex}
10756 {\begin{multicols}\c@IndexColumns[\index@prologue][\IndexMin]%
10757 \IndexParms \let\item\@idxitem \ignorespaces}%
10758 {\end{multicols}}
10759 \else
10760 \typeout{Can't find multicol.sty -- will use normal index layout if
10761 necessary.}
10762 \def\theindex{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi
10763 \columnseprule \z@ \columnsep 35\p@
10764 \twocolumn[\index@prologue]%
10765 \IndexParms \let\item\@idxitem \ignorespaces}
10766 \def\endtheindex{\if@restonecol\onecolumn\else\clearpage\fi}
10767 \fi
10768 }
10769 % \end{macrocode}
10770 % \end{macro}
10771 %
10772 % \subsection{Citations to the Bible}
10773 % The \emph{APA manual} gives some rules how the Bible and other
10774 % classic works should be cited. These rules are not implemented
10775 % in standard \pkg{apacite}, so I provide a workaround here. This
10776 % needs to be fixed and generalized because the \emph{APA manual}
10777 % now also gives a Qur'an example.
10778 %
10779 % \begin{macro}{\bibleversion}
10780 % \begin{macro}{\@bibleversion}
10781 % To define which Bible version one has used.
10782 % \begin{macrocode}
10783 \def\bibleversion#1{\gdef\@bibleversion{#1}}
10784 \def\@bibleversion{Revised Standard Version}
10785 % \end{macrocode}
10786 % \end{macro}
10787 % \end{macro}
10788 %
10789 % \begin{macro}{\bibleciteA}
10790 % \begin{macro}{\fullbibleciteA}
10791 % \begin{macro}{\shortbibleciteA}
10792 % \begin{macro}{\biblecite}
10793 % \begin{macro}{\fullbiblecite}
10794 % \begin{macro}{\shortbiblecite}
10795 % \begin{macro}{\bibleciteNP}
10796 % \begin{macro}{\fullbibleciteNP}
10797 % \begin{macro}{\shortbibleciteNP}
10798 % The Bible citation commands follow the same names and syntax as the
10799 % ordinary citation commands, except that ``|bible|'' is inserted in
10800 % the command names.
10801 % \begin{macrocode}
10802 \def\bibleciteA#1{%
10803 {\@ifundefined{flag@bible}%
10804 {\fullbibleciteA{#1}}%
10805 {\shortbibleciteA{#1}}%
10806 }%
10807 }
10808 \def\fullbibleciteA#1{%
10809 % \end{macrocode}
10810 % Insert chapter and verse.
10811 % \begin{macrocode}
10812 {#1}%
10813 % \end{macrocode}
10814 % Add Bible version.
10815 % \begin{macrocode}
10816 { \BBOP\@bibleversion\BBCP}%
10817 % \end{macrocode}
10818 % Flag that the Bible has been cited.
10819 % \begin{macrocode}
10820 {\global\expandafter\def\csname flag@bible\endcsname{DUMMY}}%
10821 }
10822 \def\shortbibleciteA#1{%
10823 {#1}%
10824 % \end{macrocode}
10825 % Is this appropriate to flag that Bible has been cited, given that
10826 % we don't give the version here?
10827 % \begin{macrocode}
10828 {\global\expandafter\def\csname flag@bible\endcsname{DUMMY}}%
10829 }
10830 \def\biblecite#1{%
10831 {\@ifundefined{flag@bible}%
10832 {\fullbiblecite{#1}}%
10833 {\shortbiblecite{#1}}%
10834 }%
10835 }
10836 \def\fullbiblecite#1{%
10837 {\BBOP}%
10838 {#1}%
10839 {\BBAY{} \@bibleversion}%
10840 {\BBCP}%
10841 {\global\expandafter\def\csname flag@bible\endcsname{DUMMY}}%
10842 }
10843 \def\shortbiblecite#1{%
10844 {\BBOP}%
10845 {#1}%
10846 {\BBCP}%
10847 {\global\expandafter\def\csname flag@bible\endcsname{DUMMY}}%
10848 }
10849 \def\bibleciteNP#1{%
10850 {\@ifundefined{flag@bible}%
10851 {\fullbibleciteNP{#1}}%
10852 {\shortbibleciteNP{#1}}%
10853 }%
10854 }
10855 \def\fullbibleciteNP#1{%
10856 {#1}%
10857 {\BBAY{} \@bibleversion}%
10858 {\global\expandafter\def\csname flag@bible\endcsname{DUMMY}}%
10859 }
10860 \def\shortbibleciteNP#1{%
10861 {#1}%
10862 {\global\expandafter\def\csname flag@bible\endcsname{DUMMY}}%
10863 }
10864 % \end{macrocode}
10865 % \end{macro}
10866 % \end{macro}
10867 % \end{macro}
10868 % \end{macro}
10869 % \end{macro}
10870 % \end{macro}
10871 % \end{macro}
10872 % \end{macro}
10873 % \end{macro}
10874 %
10875 % \subsection{Citing songs}
10876 % The \emph{APA manual} gives some rules how songs should be cited.
10877 % These rules require some tweaking of standard \pkg{apacite}. This is
10878 % done here.
10879 %
10880 % \begin{macro}{\bibsong}
10881 % \begin{macro}{\citeAsong}
10882 % \begin{macro}{\fullciteAsong}
10883 % \begin{macro}{\shortciteAsong}
10884 % \begin{macro}{\citesong}
10885 % \begin{macro}{\fullcitesong}
10886 % \begin{macro}{\shortcitesong}
10887 % \begin{macro}{\citesongNP}
10888 % \begin{macro}{\fullcitesongNP}
10889 % \begin{macro}{\shortcitesongNP}
10890 % The names of these macros are a bit internally inconsistent and
10891 % inconsistent with the \cmd{\biblecite} and \cmd{DSMcite} suites.
10892 % Fix this in a next version.
10893 % \begin{macrocode}
10894 \newcommand{\bibsong}[4]{}
10895 \newcommand{\citeAsong}[1]{%
10896 \def\bibsong##1##2##3##4{%
10897 \APACciteatitle{##3} {\BBOP}{##1}{\BBAY}{##2}{\BBN}{##4}{\BBCP}%
10898 }%
10899 \citeauthor{#1}%
10900 \def\bibsong##1##2##3##4{}%
10901 }
10902 \newcommand{\fullciteAsong}[1]{%
10903 \def\bibsong##1##2##3##4{%
10904 \APACciteatitle{##3} {\BBOP}{##1}{\BBAY}{##2}{\BBN}{##4}{\BBCP}%
10905 }%
10906 \fullciteauthor{#1}%
10907 \def\bibsong##1##2##3##4{}%
10908 }
10909 \newcommand{\shortciteAsong}[1]{%
10910 \def\bibsong##1##2##3##4{%
10911 \APACciteatitle{##3} {\BBOP}{##1}{\BBAY}{##2}{\BBN}{##4}{\BBCP}%
10912 }%
10913 \shortciteauthor{#1}%
10914 \def\bibsong##1##2##3##4{}%
10915 }
10916 \newcommand{\citesong}[1]{%
10917 \def\bibsong##1##2##3##4{%
10918 {\BBOP}\APACciteatitle{##3},{\BAP}{##1}{\BBAY}{##2}{\BBN}{##4}%
10919 {\BBCP}%
10920 }%
10921 \citeauthor{#1}%
10922 \def\bibsong##1##2##3##4{}%
10923 }
10924 \newcommand{\fullcitesong}[1]{%
10925 \def\bibsong##1##2##3##4{%
10926 {\BBOP}\APACciteatitle{##3},{\BAP}{##1}{\BBAY}{##2}{\BBN}{##4}%
10927 {\BBCP}%
10928 }%
10929 \fullciteauthor{#1}%
10930 \def\bibsong##1##2##3##4{}%
10931 }
10932 \newcommand{\shortcitesong}[1]{%
10933 \def\bibsong##1##2##3##4{%
10934 {\BBOP}\APACciteatitle{##3},{\BAP}{##1}{\BBAY}{##2}{\BBN}{##4}%
10935 {\BBCP}%
10936 }%
10937 \shortciteauthor{#1}%
10938 \def\bibsong##1##2##3##4{}%
10939 }
10940 \newcommand{\citesongNP}[1]{%
10941 \def\bibsong##1##2##3##4{%
10942 \APACciteatitle{##3},{\BAP}{##1}{\BBAY}{##2}{\BBN}{##4}%
10943 }%
10944 \citeauthor{#1}%
10945 \def\bibsong##1##2##3##4{}%
10946 }
10947 \newcommand{\fullcitesongNP}[1]{%
10948 \def\bibsong##1##2##3##4{%
10949 \APACciteatitle{##3},{\BAP}{##1}{\BBAY}{##2}{\BBN}{##4}%
10950 }%
10951 \fullciteauthor{#1}%
10952 \def\bibsong##1##2##3##4{}%
10953 }
10954 \newcommand{\shortcitesongNP}[1]{%
10955 \def\bibsong##1##2##3##4{%
10956 \APACciteatitle{##3},{\BAP}{##1}{\BBAY}{##2}{\BBN}{##4}%
10957 }%
10958 \shortciteauthor{#1}%
10959 \def\bibsong##1##2##3##4{}%
10960 }
10961 % \end{macrocode}
10962 % \end{macro}
10963 % \end{macro}
10964 % \end{macro}
10965 % \end{macro}
10966 % \end{macro}
10967 % \end{macro}
10968 % \end{macro}
10969 % \end{macro}
10970 % \end{macro}
10971 % \end{macro}
10972 %
10973 % \subsection{Commands to cite the \emph{DSM}}
10974 % The \emph{APA manual} gives some rules how the \emph{DSM} should be
10975 % cited, which is a bit different from ordinary citations. These rules
10976 % are not implemented in standard \pkg{apacite}, so I provide a
10977 % workaround here.
10978 %
10979 % \begin{macro}{\bibDSM}
10980 % \begin{macro}{\origbibDSM}
10981 % \begin{macro}{\DSMauthor}
10982 % \begin{macro}{\DSMfulltitle}
10983 % \begin{macro}{\DSMshorttitle}
10984 % \begin{macro}{\DSMedition}
10985 % The \cmd{\bibDSM} macro has four arguments: (1) author, (2) full
10986 % title, (3) edition, (4) abbreviated title. The default definition
10987 % prints the author, so this gives something decent if an ordinary
10988 % citation command is used. The other macros extract the separate
10989 % arguments.
10990 % \begin{macrocode}
10991 \DeclareRobustCommand{\bibDSM}[4]{#1}
10992 \newcommand\origbibDSM{}
10993 \let\origbibDSM\bibDSM
10994 \newcommand{\DSMauthor}[1]{%
10995 \def\bibDSM##1##2##3##4{##1}%
10996 \citeauthor{#1}%
10997 \let\bibDSM\origbibDSM
10998 }
10999 \newcommand{\DSMfulltitle}[1]{%
11000 \def\bibDSM##1##2##3##4{##2}%
11001 \citeauthor{#1}%
11002 \let\bibDSM\origbibDSM
11003 }
11004 \newcommand{\DSMshorttitle}[1]{%
11005 \def\bibDSM##1##2##3##4{##4}%
11006 \citeauthor{#1}%
11007 \let\bibDSM\origbibDSM
11008 }
11009 \newcommand{\DSMedition}[1]{%
11010 \def\bibDSM##1##2##3##4{##3}%
11011 \citeauthor{#1}%
11012 \let\bibDSM\origbibDSM
11013 }
11014 % \end{macrocode}
11015 % \end{macro}
11016 % \end{macro}
11017 % \end{macro}
11018 % \end{macro}
11019 % \end{macro}
11020 % \end{macro}
11021 %
11022 % \begin{macro}{\DSMciteA}
11023 % \begin{macro}{\DSMfullciteA}
11024 % \begin{macro}{\DSMshortciteA}
11025 % \begin{macro}{\DSMcite}
11026 % \begin{macro}{\DSMfullcite}
11027 % \begin{macro}{\DSMshortcite}
11028 % \begin{macro}{\DSMciteNP}
11029 % \begin{macro}{\DSMfullciteNP}
11030 % \begin{macro}{\DSMshortciteNP}
11031 % The \emph{DSM} citation commands follow the same names and syntax as the
11032 % ordinary citation commands, except that ``|DSM|'' is inserted in
11033 % the command names.
11034 % \begin{macrocode}
11035 \newcommand{\DSMciteA}[1]{%
11036 \@for\@citeb:=#1\do{%
11037 \edef\@citeb{\expandafter\@firstofone\@citeb}%
11038 \@ifundefined{flag@\@citeb\APAC@extra@b@citeb}%
11039 {\DSMfullciteA{#1}}%
11040 {\DSMshortciteA{#1}}%
11041 }%
11042 }
11043 \newcommand{\DSMfullciteA}[1]{%
11044 % \end{macrocode}
11045 % \emph{Full Title} (edition; \emph{Short Title}; author, year)
11046 % \begin{macrocode}
11047 \APACcitebtitle{\DSMfulltitle{#1}}
11048 \BBOP
11049 \DSMedition{#1};
11050 \APACcitebtitle{\DSMshorttitle{#1}};
11051 \citeNP{#1}%
11052 \BBCP
11053 }
11054 \newcommand{\DSMshortciteA}[1]{%
11055 % \end{macrocode}
11056 % \emph{Short Title}
11057 % \begin{macrocode}
11058 \APACcitebtitle{\DSMshorttitle{#1}}%
11059 }
11060 \newcommand{\DSMcite}[1]{%
11061 \@for\@citeb:=#1\do{%
11062 \edef\@citeb{\expandafter\@firstofone\@citeb}%
11063 \@ifundefined{flag@\@citeb\APAC@extra@b@citeb}%
11064 {\DSMfullcite{#1}}%
11065 {\DSMshortcite{#1}}%
11066 }%
11067 }
11068 \newcommand{\DSMfullcite}[1]{%
11069 \BBOP
11070 \APACcitebtitle{\DSMfulltitle{#1}},
11071 \DSMedition{#1};
11072 \APACcitebtitle{\DSMshorttitle{#1}};
11073 \citeNP{#1}%
11074 \BBCP
11075 }
11076 \newcommand{\DSMshortcite}[1]{%
11077 \BBOP\APACcitebtitle{\DSMshorttitle{#1}}\BBCP
11078 }
11079 \newcommand{\DSMciteNP}[1]{%
11080 \@for\@citeb:=#1\do{%
11081 \edef\@citeb{\expandafter\@firstofone\@citeb}%
11082 \@ifundefined{flag@\@citeb\APAC@extra@b@citeb}%
11083 {\DSMfullciteNP{#1}}%
11084 {\DSMshortciteNP{#1}}%
11085 }%
11086 }
11087 \newcommand{\DSMfullciteNP}[1]{%
11088 \APACcitebtitle{\DSMfulltitle{#1}},
11089 \DSMedition{#1};
11090 \APACcitebtitle{\DSMshorttitle{#1}};
11091 \citeNP{#1}%
11092 }
11093 \newcommand{\DSMshortciteNP}[1]{%
11094 \APACcitebtitle{\DSMshorttitle{#1}}%
11095 }
11096 % \end{macrocode}
11097 % \end{macro}
11098 % \end{macro}
11099 % \end{macro}
11100 % \end{macro}
11101 % \end{macro}
11102 % \end{macro}
11103 % \end{macro}
11104 % \end{macro}
11105 % \end{macro}
11106 %
11107 % \subsection{Document-specific definitions}
11108 %
11109 % \begin{macro}{\SetupAPACdoc}
11110 % These are some commands that are used in the \pkg{apacite} manual,
11111 % but are presumably not especially relevant for users.
11112 %
11113 % \begin{macro}{\MiKTeX}
11114 % \begin{macro}{\BibTeX}
11115 % \begin{macro}{\MakeIndex}
11116 % \begin{macro}{\latextohtml}
11117 % \begin{macro}{\LaTeXrtf}
11118 % \begin{macro}{\TeXht}
11119 % \begin{macro}{\Perl}
11120 % Names of programs and packages.
11121 % \begin{macrocode}
11122 \newcommand{\SetupAPACdoc}{%
11123 \newcommand{\MiKTeX}{MiK\TeX}
11124 \@ifundefined{BibTeX}{%
11125 \def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
11126 T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}% from bibtex.web
11127 }{}
11128 \newcommand{\MakeIndex}{\textit{MakeIndex}}
11129 \newcommand{\latextohtml}{\textup{\LaTeX2\texttt{HTML}}}% from html.sty
11130 \newcommand{\LaTeXrtf}{\textup{\LaTeX2RTF}}%
11131 \newcommand{\TeXht}{\textup{\TeX4ht}}%
11132 \newcommand{\Perl}{\textsl{Perl}}%
11133 % \end{macrocode}
11134 % \end{macro}
11135 % \end{macro}
11136 % \end{macro}
11137 % \end{macro}
11138 % \end{macro}
11139 % \end{macro}
11140 % \end{macro}
11141 %
11142 % \begin{macro}{\EM}
11143 % My comments accompanying the examples. To be removed with better
11144 % source code documentation.
11145 % \begin{macrocode}
11146 \newcommand{\EM}{\ensuremath{\triangleright\quad}}
11147 % \end{macrocode}
11148 % \end{macro}
11149 %
11150 % \begin{macro}{\APACversiondate}
11151 % The date of a version of \pkg{apacite}. Makes it easy to search the
11152 % document for these dates. The \cmd{\relax} is a safety measure
11153 % (probably not needed), which ensures that the square brackets are
11154 % never interpreted as an optional argument.
11155 % \begin{macrocode}
11156 \newcommand{\APACversiondate}[1]{\relax [##1]}
11157 % \end{macrocode}
11158 % \end{macro}
11159 %
11160 % \begin{macro}{\LC}
11161 % \begin{macro}{\X}
11162 % \begin{macro}{\Y}
11163 % \begin{macro}{\A}
11164 % Some symbols that are used in the \pkg{apacite} manual.
11165 % \begin{macrocode}
11166 \newcommand{\LC}{\mbox{${}^{\dag}$}}% \LaTeX{} Companion
11167 \newcommand{\X}{\ensuremath{\times}}% for one table
11168 \newcommand{\Y}{\ensuremath{c}}% for one table
11169 \newcommand{\A}{\ensuremath{a}}% for one table
11170 % \end{macrocode}
11171 % \end{macro}
11172 % \end{macro}
11173 % \end{macro}
11174 % \end{macro}
11175 %
11176 % \begin{macro}{\pkg}
11177 % \begin{macro}{\fname}
11178 % \begin{macro}{\fieldname}
11179 % \begin{macro}{\entryname}
11180 % \begin{macro}{\pkgoption}
11181 % \begin{macro}{\envirname}
11182 % Formatting of package names, options, etc.
11183 % \begin{macrocode}
11184 \newcommand{\pkg}[1]{\textsf{##1}}% package name
11185 \newcommand{\fname}[1]{\texttt{##1}}% file name
11186 \newcommand{\fieldname}[1]{\texttt{##1}}% field name
11187 \newcommand{\entryname}[1]{\texttt{##1}}% entry type name
11188 \newcommand{\pkgoption}[1]{\texttt{##1}}% package option
11189 \newcommand{\envirname}[1]{\texttt{##1}}% environment name
11190 % \end{macrocode}
11191 % \end{macro}
11192 % \end{macro}
11193 % \end{macro}
11194 % \end{macro}
11195 % \end{macro}
11196 % \end{macro}
11197 %
11198 % \begin{macro}{\cmd}
11199 % \begin{macro}{\bs}
11200 % \begin{macro}{\opt}
11201 % \begin{macro}{\cmdtwo}
11202 % \begin{macro}{\cmdthree}
11203 % \begin{macro}{\cmdthreepre}
11204 % \begin{macro}{\cmdthreealt}
11205 % \begin{macro}{\cmdfour}
11206 % Formatting of macros.
11207 % \begin{macrocode}
11208 \AtBeginDocument{%
11209 \@ifundefined{cmd}{%
11210 \newcommand{\cmd}[1]{\texttt{\string##1}}% command, incl. `\'
11211 }{}%
11212 }
11213 % \end{macrocode}
11214 % Some trickery with backslashes and |@| signs.
11215 % \begin{macrocode}
11216 \newcommand{\bs}{{\ttfamily \@backslashchar}}% backslash
11217 \newcommand{\opt}[1]{$\langle${\itshape ##1}$\rangle$}% generic text
11218 % \end{macrocode}
11219 % For \cmdtwo{nocite}{keys}:
11220 % \begin{macrocode}
11221 \newcommand{\cmdtwo}[2]{{\mdseries\bs\texttt{##1\{}\opt{##2}%
11222 \texttt{\}}}}%
11223 % \end{macrocode}
11224 % For \cmdthree{cite}{post}{keys}:
11225 % \begin{macrocode}
11226 \newcommand{\cmdthree}[3]{{\mdseries\bs\texttt{##1[}\opt{##2}%
11227 \texttt{]\{}\opt{##3}%
11228 \texttt{\}}}}%
11229 % \end{macrocode}
11230 % For \cmdthreepre{cite}{pre}{keys}:
11231 % \begin{macrocode}
11232 \newcommand{\cmdthreepre}[3]{{\mdseries\bs\texttt{##1<}\opt{##2}%
11233 \texttt{>\{}\opt{##3}%
11234 \texttt{\}}}}%
11235 % \end{macrocode}
11236 % For \cmdthreealt{usepackage}{options}{apacite}:
11237 % \begin{macrocode}
11238 \newcommand{\cmdthreealt}[3]{{\mdseries\bs\texttt{##1[}\opt{##2}%
11239 \texttt{]\{##3\}}}}%
11240 % \end{macrocode}
11241 % For all \cmdfour{cite}{pre}{post}{keys} variants:
11242 % \begin{macrocode}
11243 \newcommand{\cmdfour}[4]{{\mdseries\bs\texttt{##1<}\opt{##2}%
11244 \texttt{>[}\opt{##3}%
11245 \texttt{]\{}\opt{##4}%
11246 \texttt{\}}}}%
11247 % \end{macrocode}
11248 % \end{macro}
11249 % \end{macro}
11250 % \end{macro}
11251 % \end{macro}
11252 % \end{macro}
11253 % \end{macro}
11254 % \end{macro}
11255 % \end{macro}
11256 %
11257 % \begin{macro}{\flqq}
11258 % \begin{macro}{\frqq}
11259 % \begin{macro}{\simpleguillemots}
11260 % It is not clear where and how the \cmd{\flqq} command is defined, so
11261 % provide an escape if it is not available. Use definitions from
11262 % \fname{fguill.sty} included here to avoid requiring a package that
11263 % may not be available. This can probably be improved by using
11264 % \cmd{\providecommand}.
11265 % \begin{macrocode}
11266 \AtBeginDocument{%
11267 \@ifundefined{flqq}{%
11268 \newcommand{\flqq}{%
11269 {\fontencoding{T1}\fontfamily{cmr}\selectfont\symbol{19}}}%
11270 \newcommand{\frqq}{%
11271 {\fontencoding{T1}\fontfamily{cmr}\selectfont\symbol{20}}}%
11272 }{}%
11273 }%
11274 \newcommand{\simpleguillemots}{%
11275 \renewcommand{\flqq}{\raisebox{2.5pt}{%
11276 \tiny{\ensuremath{\mathord{<\!\!<}}}}}%
11277 \renewcommand{\frqq}{\raisebox{2.5pt}{%
11278 \tiny{\ensuremath{\mathord{>\!\!>}}}}}%
11279 }%
11280 % \end{macrocode}
11281 % \end{macro}
11282 % \end{macro}
11283 % \end{macro}
11284 %
11285 % \begin{macro}{\APACdocPageLayout}
11286 % The basic page setup of the \pkg{apacite} manual.
11287 % \begin{macrocode}
11288 \newcommand{\APACdocPageLayout}{%
11289 \normalsize
11290 \let\oldhoffset\hoffset
11291 \let\oldvoffset\voffset
11292 \let\oldoddsidemargin\oddsidemargin
11293 \let\oldevensidemargin\evensidemargin
11294 \let\oldtopmargin\topmargin
11295 \let\oldheadheight\headheight
11296 \let\oldheadsep\headsep
11297 \let\oldtextheight\textheight
11298 \let\oldfootskip\footskip
11299 \let\oldtextwidth\textwidth
11300 \let\oldlinewidth\linewidth
11301 \let\oldmarginparsep\marginparsep
11302 \let\oldmarginparwidth\marginparwidth
11303 \let\oldmarginparpush\marginparpush
11304 %%
11305 %% \setlength{\hoffset}{-1in} % top-left reference point is
11306 \setlength{\voffset}{-1in} % the top-left corner of the page
11307 %% \setlength{\oddsidemargin}{1.3in}
11308 %% \setlength{\evensidemargin}{1.3in}
11309 \setlength{\topmargin}{1.35in}
11310 %% %% \setlength{\headheight}{\baselineskip}
11311 \setlength{\headheight}{0.12in}
11312 \setlength{\headsep}{0.24in}
11313 \setlength{\textheight}{7.9in}
11314 \setlength{\footskip}{30pt}
11315 %% \setlength{\textwidth}{5.9in}
11316 %% \setlength{\linewidth}{\textwidth}
11317 %% \setlength{\marginparsep}{0pt}
11318 %% \setlength{\marginparwidth}{0pt}
11319 %% \setlength{\marginparpush}{0pt}
11320 }
11321 % \end{macrocode}
11322 % \end{macro}
11323 %
11324 % \begin{macro}{\APACcodePageLayout}
11325 % The page setup of the source code documentation part of the
11326 % \pkg{apacite} manual.
11327 % \begin{macrocode}
11328 \newcommand{\APACcodePageLayout}{%
11329 \let\hoffset\oldhoffset
11330 \let\oddsidemargin\oldoddsidemargin
11331 \let\evensidemargin\oldevensidemargin
11332 \let\textwidth\oldtextwidth
11333 \let\linewidth\oldlinewidth
11334 \let\marginparsep\oldmarginparsep
11335 \let\marginparwidth\oldmarginparwidth
11336 \let\marginparpush\oldmarginparpush
11337 }
11338 }
11339 %%
11340 %</docpkg>
11341 % \end{macrocode}
11342 % \end{macro}
11343 % \end{macro}
11344 %
11345 %
11346 % \section{Language definition files}
11347 %
11348 % This section describes the code for the language-specific files
11349 % supplied with \pkg{apacite}.
11350 %
11351 % \subsection{\fname{english.apc}}
11352 %
11353 % This file redefines the language-specific elements of \pkg{apacite}
11354 % for the English language and its ``dialects'' in \pkg{babel}
11355 % terminology.
11356 %
11357 % \begin{macrocode}
11358 %<*english>
11359 %%
11360 %% english.apc - english version of apacite elements
11361 %% Written by Erik Meijer
11362 %%
11363 % \end{macrocode}
11364 % A fancy way to store and restore the category code of the |@| sign,
11365 % per Heiko Oberdiek.
11366 % \begin{macrocode}
11367 \edef\APACrestoreAtCode{%
11368 \catcode`@=\the\catcode`@\relax
11369 }%
11370 \makeatletter
11371 \renewcommand{\onemaskedcitationmsg}[1]{%
11372 \emph{(#1\ citation removed for masked review)}}%
11373 \renewcommand{\maskedcitationsmsg}[1]{%
11374 \emph{(#1\ citations removed for masked review)}}%
11375 \renewcommand{\refname}{References}% Name of ref. list if it's a section.
11376 \renewcommand{\bibname}{References}% Name of ref. list if it's a chapter.
11377 \renewcommand{\authorindexname}{Author Index}% Name of Author Index
11378 %%
11379 %% A note before the references if a meta-analysis is reported.
11380 \renewcommand{\APACmetaprenote}{%
11381 References marked with an asterisk indicate studies
11382 included in the meta-analysis.}%
11383 %%
11384 %% Commands for specific types of @misc entries.
11385 \renewcommand{\bibmessage}{Msg}%
11386 \renewcommand{\bibcomputerprogram}{Computer program}%
11387 \renewcommand{\bibcomputerprogrammanual}{Computer program manual}%
11388 \renewcommand{\bibcomputerprogramandmanual}{Computer program and manual}%
11389 \renewcommand{\bibcomputersoftware}{Computer software}%
11390 \renewcommand{\bibcomputersoftwaremanual}{Computer software manual}%
11391 \renewcommand{\bibcomputersoftwareandmanual}{Computer software and manual}%
11392 \renewcommand{\bibprogramminglanguage}{Programming language}%
11393 %%
11394 %% Other labels
11395 \renewcommand{\bibnodate}{n.d.\hbox{}}% % ``no date''
11396 \renewcommand{\BIP}{in press}% % ``in press''
11397 \renewcommand{\BOthers}[1]{et al.\hbox{}}% ``and others''
11398 \renewcommand{\BOthersPeriod}[1]{et al.\hbox{}}% ``and others'' with a period
11399 \renewcommand{\BIn}{In}% % for ``In '' editor...
11400 \renewcommand{\Bby}{by}% % for ``by '' editor... (in reprints)
11401 \renewcommand{\BED}{Ed.\hbox{}}% % editor
11402 \renewcommand{\BEDS}{Eds.\hbox{}}% % editors
11403 \renewcommand{\BTRANS}{Trans.\hbox{}}% % translator
11404 \renewcommand{\BTRANSS}{Trans.\hbox{}}% % translators
11405 \renewcommand{\BTRANSL}{trans.\hbox{}}% % translation, for the year field
11406 \renewcommand{\BCHAIR}{Chair}% % chair of symposium
11407 \renewcommand{\BCHAIRS}{Chairs}% % chairs
11408 \renewcommand{\BVOL}{Vol.\hbox{}}% % volume
11409 \renewcommand{\BVOLS}{Vols.\hbox{}}% % volumes
11410 \renewcommand{\BNUM}{No.\hbox{}}% % number
11411 \renewcommand{\BNUMS}{Nos.\hbox{}}% % numbers
11412 \renewcommand{\BEd}{ed.\hbox{}}% % edition
11413 \renewcommand{\BCHAP}{chap.\hbox{}}% % chapter
11414 \renewcommand{\BCHAPS}{chap.\hbox{}}% % chapters
11415 \renewcommand{\BPG}{p.\hbox{}}% % page
11416 \renewcommand{\BPGS}{pp.\hbox{}}% % pages
11417 %% Default technical report type name.
11418 \renewcommand{\BTR}{Tech.\ Rep.\hbox{}}
11419 %% Default PhD thesis type name.
11420 \renewcommand{\BPhD}{Doctoral dissertation}
11421 %% Default unpublished PhD thesis type name.
11422 \renewcommand{\BUPhD}{Unpublished doctoral dissertation}
11423 %% Default master's thesis type name.
11424 \renewcommand{\BMTh}{Master's thesis}
11425 %% Default unpublished master's thesis type name.
11426 \renewcommand{\BUMTh}{Unpublished master's thesis}
11427 %%
11428 \renewcommand{\BAuthor}{Author}% ``Author'' if publisher = author
11429 \renewcommand{\BOWP}{Original work published}%
11430 \renewcommand{\BREPR}{Reprinted from}%
11431 \renewcommand{\BAvailFrom}{Available from\ }% Websites; note the space.
11432 %% The argument is the date on which it was last checked.
11433 \renewcommand{\BRetrieved}[1]{Retrieved {#1}, from\ }% Websites; note the space.
11434 \renewcommand{\BRetrievedFrom}{Retrieved from\ }% Websites; note the space.
11435 \renewcommand{\BMsgPostedTo}{Message posted to\ }% Messages; note the space.
11436 %%
11437 %% Punctuation
11438 \renewcommand{\BBOP}{(}% opening parenthesis
11439 \renewcommand{\BBCP}{)}% closing parenthesis
11440 \renewcommand{\BBOQ}{}% opening quote for article title
11441 \renewcommand{\BBCQ}{}% closing quote for article title
11442 \renewcommand{\BBAA}{\&}% between authors in parenthetical cites and ref. list
11443 \renewcommand{\BBAB}{and}% between authors in in-text citation
11444 \renewcommand{\BAnd}{\&}% for ``Ed. \& Trans.'' in ref. list
11445 \DeclareRobustCommand{\BPBI}{.~}% Period between initials
11446 \DeclareRobustCommand{\BHBI}{.-}% Hyphen between initials
11447 \renewcommand{\BAP}{ }% after prefix, before first citation
11448 \renewcommand{\BBAY}{, }% between author(s) and year
11449 \renewcommand{\BBYY}{, }% between years of multiple citations with same author
11450 \renewcommand{\BBC}{; }% between cites
11451 \renewcommand{\BBN}{, }% before note
11452 \renewcommand{\BCBT}{,}% comma between authors in ref. list when no. of
11453 %% authors = 2
11454 \renewcommand{\BCBL}{,}% comma before last author when no. of authors > 2
11455 %% Remove excess space with the natbibapa option
11456 \if@APAC@natbib@apa
11457 \renewcommand{\BBAY}{,}%
11458 \renewcommand{\BBYY}{,}%
11459 \renewcommand{\BBC}{;}%
11460 \fi
11461 %%
11462 %% Date formatting
11463 \renewcommand{\APACmonth}[1]{\ifcase #1\or January\or February\or March\or
11464 April\or May\or June\or July\or August\or September\or October\or
11465 November\or December\or Winter\or Spring\or Summer\or Fall\else
11466 {#1}\fi}%
11467 \renewcommand{\APACrefYearMonthDay}[3]{%
11468 {\BBOP}{#1}% year (+ addendum); should not be empty
11469 \ifx\@empty#2\@empty
11470 \ifx\@empty#3\@empty
11471 \else
11472 \unskip, {#3}% day
11473 \fi
11474 \else
11475 \unskip, {#2}% month
11476 \ifx\@empty#3\@empty
11477 \else
11478 \unskip~{#3}% day
11479 \fi
11480 \fi
11481 {\BBCP}% closing parenthesis
11482 }%
11483 %% Some macros that transform a number (say, `2') to an ordinal one (`2nd')
11484 \renewcommand{\PrintOrdinal}[1]{%
11485 \afterassignment\print@ordinal
11486 \count@ 0#1\relax\@nil
11487 }%
11488 \def\print@ordinal#1#2\@nil{%
11489 \ifx\relax#1\relax
11490 \ifnum\count@>\z@
11491 \CardinalNumeric\count@
11492 \else
11493 ??th%
11494 \fi
11495 \else
11496 \ifnum \count@>\z@ \number\count@ \fi
11497 #1#2\relax
11498 \fi
11499 }%
11500 \renewcommand{\CardinalNumeric}[1]{%
11501 \number#1\relax
11502 \if
11503 \ifnum#1<14
11504 \ifnum#1>\thr@@ T\else F\fi
11505 \else
11506 F%
11507 \fi
11508 T%
11509 th%
11510 \else
11511 \@xp\keep@last@digit\@xp#1\number#1\relax
11512 \ifcase#1th\or st\or nd\or rd\else th\fi
11513 \fi
11514 }%
11515 % \end{macrocode}
11516 % Differences between different versions of English, in particular British
11517 % and Australian vs.\ the default American.
11518 % \begin{macrocode}
11519 \def\APAC@tempb{US}%
11520 \edef\APAC@tempa{\string UKenglish}%
11521 \ifx\languagename\APAC@tempa
11522 \def\APAC@tempb{UK}%
11523 \fi
11524 \edef\APAC@tempa{\string british}%
11525 \ifx\languagename\APAC@tempa
11526 \def\APAC@tempb{UK}%
11527 \fi
11528 \def\APAC@tempa{UK}
11529 \ifx\APAC@tempa\APAC@tempb
11530 \renewcommand{\BCBT}{}% no comma before `\&' in British
11531 \renewcommand{\BCBL}{}% no comma before `\&' in British
11532 % \end{macrocode}
11533 % According to \pkg{babel}'s \fname{english.dtx}, in UK English, the date
11534 % is of the form 1st~January, although I thought January~1st was more common.
11535 % \begin{macrocode}
11536 \renewcommand{\APACrefYearMonthDay}[3]{%
11537 {\BBOP}{#1}% year (+ addendum); should not be empty
11538 \ifx\@empty#3\@empty
11539 \ifx\@empty#2\@empty
11540 \else
11541 \unskip, {#2}% month
11542 \fi
11543 \else
11544 \unskip, {\PrintOrdinal{#3}}% day
11545 \ifx\@empty#2\@empty
11546 \else
11547 \unskip~{#2}% month
11548 \fi
11549 \fi
11550 {\BBCP}% closing parenthesis
11551 }%
11552 \fi
11553 %%
11554 \edef\APAC@tempa{\string australian}%
11555 \ifx\languagename\APAC@tempa
11556 \def\APAC@tempb{AU}%
11557 \fi
11558 % \end{macrocode}
11559 % New Zealand is equivalent to Australian for our purposes.
11560 % \begin{macrocode}
11561 \edef\APAC@tempa{\string newzealand}%
11562 \ifx\languagename\APAC@tempa
11563 \def\APAC@tempb{AU}%
11564 \fi
11565 \def\APAC@tempa{AU}
11566 \ifx\APAC@tempa\APAC@tempb
11567 \renewcommand{\BCBT}{}% no comma before `\&' in AU/NZ (?)
11568 \renewcommand{\BCBL}{}% no comma before `\&' in AU/NZ (?)
11569 % \end{macrocode}
11570 % According to \pkg{babel}'s \fname{english.dtx}, In Australian and New
11571 % Zealand, the date is of the form 1~January.
11572 % \begin{macrocode}
11573 \renewcommand{\APACrefYearMonthDay}[3]{%
11574 {\BBOP}{#1}% year (+ addendum); should not be empty
11575 \ifx\@empty#3\@empty
11576 \ifx\@empty#2\@empty
11577 \else
11578 \unskip, {#2}% month
11579 \fi
11580 \else
11581 \unskip, {#3}% day
11582 \ifx\@empty#2\@empty
11583 \else
11584 \unskip~{#2}% month
11585 \fi
11586 \fi
11587 {\BBCP}% closing parenthesis
11588 }%
11589 \fi
11590 % \end{macrocode}
11591 % Clear up some macros that are no longer needed.
11592 % \begin{macrocode}
11593 \let\APAC@tempa\@undefined
11594 \let\APAC@tempb\@undefined
11595 % \end{macrocode}
11596 % Restore category code of |@| sign.
11597 % \begin{macrocode}
11598 \APACrestoreAtCode
11599 %</english>
11600 % \end{macrocode}
11601 %
11602 %
11603 %
11604 % \subsection{\fname{dutch.apc}}
11605 %
11606 % This file redefines the language-specific elements of \pkg{apacite}
11607 % for the Dutch language. The \pkg{babel} package considers Afrikaans
11608 % as a ``dialect'' of Dutch, but my limited knowledge of Afrikaans
11609 % suggests that most words are spelt differently (though are phonetically
11610 % similar), and many other words are simply different. So I doubt whether
11611 % this file can be directly applied to Afrikaans.
11612 %
11613 % For compiling the translated elements, the following sources were
11614 % used:
11615 % \begin{enumerate}
11616 % \item Instructions for the Dutch psychology journal ``De Psycholoog''
11617 % \cite{DePsych01}; indicated below as ``DP''.
11618 % \item Instructions for the Dutch psychology journal ``Nederlands Tijdschrift
11619 % voor de Psychologie en haar Grensgebieden'' \cite{NTPG04};
11620 % indicated below as ``NTPG''.
11621 % \item Instructions from the well-known book
11622 % \APACcitebtitle{Schrijfwijzer} \cite[pp.~404--410]{Renk02};
11623 % indicated below as ``SW''.
11624 % \item The previous three all state that their rules are adapted from the
11625 % APA manual. For translations that are not explicitly mentioned in
11626 % these sources, I used the extensive reference list from \citeA{Schr04}.
11627 % \item Finally, I consulted the \emph{Van Dale} English-Dutch dictionary
11628 % \cite{VanDale89}.
11629 % \end{enumerate}
11630 %
11631 % \begin{macrocode}
11632 %<*dutch>
11633 %%
11634 %% dutch.apc - dutch translation of apacite elements
11635 %% Written by Erik Meijer
11636 %%
11637 %% DP = De Psycholoog
11638 %% NTPG = Nederlands Tijdschrift voor de Psychologie en haar Grensgebieden
11639 %% SW = Schrijfwijzer
11640 %%
11641 % \end{macrocode}
11642 % A fancy way to store and restore the category code of the |@| sign,
11643 % per Heiko Oberdiek.
11644 % \begin{macrocode}
11645 \edef\APACrestoreAtCode{%
11646 \catcode`@=\the\catcode`@\relax
11647 }%
11648 \makeatletter
11649 %%
11650 % \end{macrocode}
11651 %
11652 % Name of the reference list according to DP and NTPG.
11653 % SW gives the following general names:
11654 % \begin{itemize}
11655 % \item
11656 % ``Literatuuropgave'' [literally approx. ``Literature specification'']
11657 % \item
11658 % ``Literatuurlijst'' [literally ``Literature list'']
11659 % \end{itemize}
11660 % For more specific applications, SW gives the following names:
11661 % \begin{itemize}
11662 % \item
11663 % ``Bibliografie'' [``Bibliography'', ``a more or less complete survey
11664 % of publications in a certain area'']
11665 % \item
11666 % ``Geraadpleegde literatuur'' [``Consulted literature'']
11667 % \item
11668 % ``Aangehaalde literatuur'' [``Referenced literature'']
11669 % \end{itemize}
11670 %
11671 % \begin{macrocode}
11672 \renewcommand{\onemaskedcitationmsg}[1]{%
11673 \emph{(#1\ citation removed for masked review)}}% !!! CHANGE
11674 \renewcommand{\maskedcitationsmsg}[1]{%
11675 \emph{(#1\ citations removed for masked review)}}% !!! CHANGE
11676 \renewcommand{\refname}{Literatuur}% Name of ref. list if it's a section.
11677 \renewcommand{\bibname}{Literatuur}% Name of ref. list if it's a chapter.
11678 \renewcommand{\authorindexname}{Auteursindex}% Name of author index
11679 %%
11680 %% A note before the references if a meta-analysis is reported.
11681 %%
11682 \renewcommand{\APACmetaprenote}{%
11683 Met een asterisk gemarkeerde referenties betreffen studies die in de
11684 meta-analyse zijn gebruikt.}%
11685 %%
11686 %% Commands for specific types of @misc entries.
11687 \renewcommand{\bibmessage}{Bericht}%
11688 \renewcommand{\bibcomputerprogram}{Computerprogramma}%
11689 \renewcommand{\bibcomputerprogrammanual}{Handleiding van computerprogramma}%
11690 \renewcommand{\bibcomputerprogramandmanual}{Computerprogramma en handleiding}%
11691 \renewcommand{\bibcomputersoftware}{Computersoftware}%
11692 \renewcommand{\bibcomputersoftwaremanual}{Handleiding van computersoftware}%
11693 \renewcommand{\bibcomputersoftwareandmanual}{Computersoftware en handleiding}%
11694 \renewcommand{\bibprogramminglanguage}{Programmeertaal}%
11695 %%
11696 %% Other labels
11697 \renewcommand{\bibnodate}{z.~j.\hbox{}}% [SW] (``zonder jaartal'')
11698 \renewcommand{\BIP}{te verschijnen}% % [SW]
11699 \renewcommand{\BOthers}[1]{et al.\hbox{}}% % [DP]
11700 \renewcommand{\BOthersPeriod}[1]{et al.\hbox{}}% % [DP]
11701 %% NTPG requires the following, SW allows both variants:
11702 %% \renewcommand{\BOthers}[1]{e.~a.\hbox{}}% % [NTPG]
11703 %% \renewcommand{\BOthersPeriod}[1]{e.~a.\hbox{}}% % [NTPG]
11704 %%
11705 \renewcommand{\BIn}{In}% % for ``In '' editor...
11706 \renewcommand{\Bby}{door}% % for ``by '' editor... (in reprints)
11707 % \end{macrocode}
11708 %
11709 % ``Editor(s)'' is almost impossible to get right in Dutch, because SW
11710 % and DP require the translation of ``editor(s)'' to be dependent on
11711 % the language in which the referenced work is written:
11712 % \begin{itemize}
11713 % \item
11714 % ``Red.'' (or ``red.'') for referenced works in Dutch
11715 % \item
11716 % ``Ed.''/``Eds.'' for referenced works in English
11717 % \item
11718 % ``Hrsg.'' for referenced works in German
11719 % \item
11720 % ``edt.'' for referenced works in French
11721 % \end{itemize}
11722 % NTPG does not give an explicit rule for this, but only an example
11723 % in which an English work is referenced and ``Ed.'' is used.
11724 %
11725 % For the moment, I think it makes most sense to give the Dutch versions here:
11726 % \begin{macrocode}
11727 \renewcommand{\BED}{red.\hbox{}}% % [DP] (SW gives ``Red.'')
11728 \renewcommand{\BEDS}{red.\hbox{}}% % [DP] (SW gives ``Red.'')
11729 % \end{macrocode}
11730 %
11731 % Translators should not be mentioned according to DP.
11732 % NTPG does not explain how to format this.
11733 % SW gives a completely different format: ``Vertaald door:''
11734 % [``Translated by:''] followed by the name of the translator, or if the
11735 % translator is unknown: ``Vertaling van:'' [``Translation of:'']
11736 % followed by the original title. This is much too complicated, so I'll
11737 % choose a simple alternative.
11738 % \begin{macrocode}
11739 \renewcommand{\BTRANS}{vert.\hbox{}}% translator
11740 \renewcommand{\BTRANSS}{vert.\hbox{}}% translators
11741 \renewcommand{\BTRANSL}{vert.\hbox{}}% translation, for the year field
11742 %%
11743 \renewcommand{\BCHAIR}{voorz.\hbox{}}% chair of symposium
11744 \renewcommand{\BCHAIRS}{voorz.\hbox{}}% chairs
11745 % \end{macrocode}
11746 %
11747 % ``Volume'' according to SW. NTPG gives an example with ``Vol.'' but this is
11748 % presumably dependent on the language of the referenced work as well.
11749 % \begin{macrocode}
11750 \renewcommand{\BVOL}{Dl.\hbox{}}% volume [SW]
11751 \renewcommand{\BVOLS}{Dl.\hbox{}}% volumes [SW]
11752 \renewcommand{\BNUM}{nr.\hbox{}}% number [SW]
11753 \renewcommand{\BNUMS}{nr.\hbox{}}% numbers [SW]
11754 \renewcommand{\BEd}{dr.\hbox{}}% edition [SW]
11755 \renewcommand{\BCHAP}{hfdst.\hbox{}}% chapter
11756 \renewcommand{\BCHAPS}{hfdst.\hbox{}}% chapters
11757 \renewcommand{\BPG}{p.\hbox{}}% page
11758 \renewcommand{\BPGS}{pp.\hbox{}}% pages [SW]. DP gives ``p.'', NTPG both.
11759 % \end{macrocode}
11760 % Literally translating ``Tech.'' as ``Technisch'' does not make sense.
11761 % \begin{macrocode}
11762 %% Default technical report type name.
11763 \renewcommand{\BTR}{Rapport}%
11764 % \end{macrocode}
11765 % There is no Dutch ``DAI'' and the distinction between ``published'' and
11766 % ``unpublished'' PhD theses would generally be interpreted as ``published as
11767 % a book with an official publisher'' vs.\ ``privately published''. All PhD
11768 % theses in the Netherlands are required to be published with an ISBN number.
11769 % Therefore, in my view it is better to use the same term for ``published''
11770 % and ``unpublished''. (\citeNP{Schr04} use ``dissertatie''.)
11771 % \begin{macrocode}
11772 %% Default PhD thesis type name.
11773 \renewcommand{\BUPhD}{Academisch proefschrift}% ``published''
11774 \renewcommand{\BPhD}{Academisch proefschrift}% ``unpublished''
11775 % \end{macrocode}
11776 % There is no official forum to publish abstracts of master's theses either,
11777 % but, unlike PhD theses, they are (generally) unpublished.
11778 % The term used here refers to the Dutch educational system until ca. 2003.
11779 % Since ca. 2004, universities are gradually converting to a
11780 % bachelor--master system, so it's likely that this term will have to be
11781 % adapted in the near future.
11782 % \begin{macrocode}
11783 %% Default master's thesis type name.
11784 \renewcommand{\BMTh}{Doctoraalscriptie}% ``published''
11785 \renewcommand{\BUMTh}{Doctoraalscriptie}% ``unpublished''
11786 %%
11787 \renewcommand{\BAuthor}{Auteur}% ``Author'' if publisher = author
11788 % \end{macrocode}
11789 % From DP. They also require the original title after the
11790 % \fieldname{originalyear}. This is not implemented here.
11791 % \begin{macrocode}
11792 \renewcommand{\BOWP}{Oorspronkelijke editie}% Original work published
11793 \renewcommand{\BREPR}{Overgenomen uit}% Reprinted from
11794 %%
11795 %% THE NEXT FOUR ARE MY OWN TRANSLATIONS. CHECK!!!
11796 %% Websites and newsgroups; note the spaces.
11797 \renewcommand{\BAvailFrom}{Verkrijgbaar van\ }%
11798 %% The argument is the date on which it was last checked.
11799 \renewcommand{\BRetrieved}[1]{Op {#1} verkregen van\ }%
11800 \renewcommand{\BRetrievedFrom}{Verkregen van\ }%
11801 \renewcommand{\BMsgPostedTo}{Bericht geplaatst op\ }%
11802 %%
11803 %% Punctuation
11804 \renewcommand{\BBOP}{(}% opening parenthesis
11805 \renewcommand{\BBCP}{)}% closing parenthesis
11806 \renewcommand{\BBOQ}{}% opening quote for article title
11807 \renewcommand{\BBCQ}{}% closing quote for article title
11808 \renewcommand{\BBAA}{\&}% between authors in parenthetical cites and ref. list
11809 \renewcommand{\BBAB}{en}% between authors in in-text citation
11810 \renewcommand{\BAnd}{\&}% for ``Ed. \& Trans.'' in ref. list
11811 \DeclareRobustCommand{\BPBI}{.~}% Period between initials
11812 \DeclareRobustCommand{\BHBI}{.-}% Hyphen between initials
11813 \renewcommand{\BAP}{ }% after prefix, before first citation
11814 \renewcommand{\BBAY}{, }% between author(s) and year
11815 \renewcommand{\BBYY}{, }% between years of multiple citations with same author
11816 \renewcommand{\BBC}{; }% between cites
11817 \renewcommand{\BBN}{, }% before note
11818 %%
11819 %% No commas according to DP and SW. NTPG uses the US/APA comma.
11820 \renewcommand{\BCBT}{}% comma between authors in ref. list when no. of
11821 %% authors = 2
11822 \renewcommand{\BCBL}{}% comma before last author when no. of authors > 2
11823 %% Remove excess space with the natbibapa option
11824 \if@APAC@natbib@apa
11825 \renewcommand{\BBAY}{,}%
11826 \renewcommand{\BBYY}{,}%
11827 \renewcommand{\BBC}{;}%
11828 \fi
11829 %%
11830 %% Date formatting
11831 \renewcommand{\APACmonth}[1]{\ifcase #1\or januari\or februari\or maart\or
11832 april\or mei\or juni\or juli\or augustus\or september\or oktober\or
11833 november\or december\or winter\or lente\or zomer\or herfst\else
11834 {#1}\fi}%
11835 \renewcommand{\APACrefYearMonthDay}[3]{%
11836 {\BBOP}{#1}% year (+ addendum); should not be empty
11837 \ifx\@empty#3\@empty
11838 \ifx\@empty#2\@empty
11839 \else
11840 \unskip, {#2}% month
11841 \fi
11842 \else
11843 \unskip, {#3}% day
11844 \ifx\@empty#2\@empty
11845 \else
11846 \unskip~{#2}% month
11847 \fi
11848 \fi
11849 {\BBCP}% closing parenthesis
11850 }%
11851 %% Some macros that transform a number (say, `2') to a ordinal one (`2nd')
11852 \renewcommand{\PrintOrdinal}[1]{%
11853 \afterassignment\print@ordinal
11854 \count@ 0#1\relax\@nil
11855 }%
11856 \def\print@ordinal#1#2\@nil{%
11857 \ifx\relax#1\relax
11858 \ifnum\count@>\z@
11859 \CardinalNumeric\count@
11860 \else
11861 ??e%
11862 \fi
11863 \else
11864 \ifnum \count@>\z@ \number\count@ \fi
11865 #1#2\relax
11866 \fi
11867 }%
11868 % \end{macrocode}
11869 % Dutch ordinal numbers are always obtained by simply putting an `e' after
11870 % the number, so this (and perhaps the code above) can be significantly
11871 % simplified. However, because I have trouble understanding this code (from
11872 % the \pkg{amsrefs} package) and experimenting did not give the expected
11873 % results, I won't mess with the code too much and stay close to the
11874 % English code.
11875 % \begin{macrocode}
11876 \renewcommand{\CardinalNumeric}[1]{%
11877 \number#1\relax
11878 \if
11879 \ifnum#1<14
11880 \ifnum#1>\thr@@ T\else F\fi
11881 \else
11882 F%
11883 \fi
11884 T%
11885 e%
11886 \else
11887 \@xp\keep@last@digit\@xp#1\number#1\relax
11888 \ifcase#1e\else e\fi
11889 \fi
11890 }%
11891 % \end{macrocode}
11892 % Restore category code of |@| sign.
11893 % \begin{macrocode}
11894 \APACrestoreAtCode
11895 %</dutch>
11896 % \end{macrocode}
11897 %
11898 %
11899 %
11900 % \subsection{\fname{finnish.apc}}
11901 %
11902 % This file redefines the language-specific elements of \pkg{apacite}
11903 % for the Finnish language. Based on \citeA[Appendix~E]{KLO05}.
11904 %
11905 % \begin{macrocode}
11906 %<*finnish>
11907 %%
11908 %% finnish.apc - finnish version of apacite elements
11909 %% Written by Kari Pyykk\"o, with some minor edits by Erik Meijer.
11910 %%
11911 % \end{macrocode}
11912 % A fancy way to store and restore the category code of the |@| sign,
11913 % per Heiko Oberdiek.
11914 % \begin{macrocode}
11915 \edef\APACrestoreAtCode{%
11916 \catcode`@=\the\catcode`@\relax
11917 }%
11918 \makeatletter
11919 \renewcommand{\onemaskedcitationmsg}[1]{%
11920 \emph{(#1\ citation removed for masked review)}}% !!! CHANGE
11921 \renewcommand{\maskedcitationsmsg}[1]{%
11922 \emph{(#1\ citations removed for masked review)}}% !!! CHANGE
11923 \renewcommand{\refname}{Viitteet}% Name of ref. list if it's a section.
11924 \renewcommand{\bibname}{Viitteet}% Name of ref. list if it's a chapter.
11925 \renewcommand{\authorindexname}{Tekij\"ahakemisto}% Name of Author Index
11926 %%
11927 %% A note before the references if a meta-analysis is reported.
11928 \renewcommand{\APACmetaprenote}{%
11929 Viitteet merkitty t\"ahtimerkeill\"a osoittaen opintojen
11930 sis\"altymist\"a meta-analyysiin.}%
11931 %%
11932 %% Commands for specific types of @misc entries.
11933 %%
11934 %% Msg
11935 \renewcommand{\bibmessage}{Sanoma}%
11936 %%
11937 %% Computer program
11938 \renewcommand{\bibcomputerprogram}{Tietokoneohjelma}%
11939 %%
11940 %% Computer program manual
11941 \renewcommand{\bibcomputerprogrammanual}{Tietokoneohjelman k\"asikirja}%
11942 %%
11943 %% Computer program and manual
11944 \renewcommand{\bibcomputerprogramandmanual}{Tietokoneohjelma ja k\"asikirja}%
11945 %%
11946 %% Computer software
11947 \renewcommand{\bibcomputersoftware}{Ohjelmisto}%
11948 %%
11949 %% Computer software manual
11950 \renewcommand{\bibcomputersoftwaremanual}{Ohjelmiston k\"asikirja}%
11951 %%
11952 %% Computer software and manual
11953 \renewcommand{\bibcomputersoftwareandmanual}{Ohjelmisto ja k\"asikirja}%
11954 %%
11955 %% Programming language
11956 \renewcommand{\bibprogramminglanguage}{Ohjelmointikieli}%
11957 %%
11958 %%
11959 %% Other labels
11960 %%
11961 %% n.d.
11962 \renewcommand{\bibnodate}{s.a.\hbox{}}% ``no date'', ``sine anno''
11963 %%
11964 %% in press
11965 \renewcommand{\BIP}{painossa}% % used as year for in-press citations
11966 %%
11967 %% et al.: ``and others'', not necessarily with a period
11968 \renewcommand{\BOthers}[1]{et al.\hbox{}}%
11969 %%
11970 %% et al.: ``and others'' with a period
11971 \renewcommand{\BOthersPeriod}[1]{et al.\hbox{}}%
11972 %%
11973 %% In
11974 \renewcommand{\BIn}{Teoksessa}% ``In'' editor...
11975 %%
11976 %% by
11977 \renewcommand{\Bby}{teoksesta}% ``by'' editor... (in reprints)
11978 %%
11979 %% Ed.
11980 \renewcommand{\BED}{toim.\hbox{}}% editor
11981 %%
11982 %% Eds.
11983 \renewcommand{\BEDS}{toim.\hbox{}}% editors
11984 %%
11985 %% Trans.
11986 \renewcommand{\BTRANS}{k\"a\"ant.\hbox{}}% translator
11987 %%
11988 %% Trans.
11989 \renewcommand{\BTRANSS}{k\"a\"ant.\hbox{}}% translators
11990 %%
11991 %% trans.
11992 \renewcommand{\BTRANSL}{k\"a\"an.\hbox{}}% translation, for the year field
11993 %%
11994 %% Chair
11995 \renewcommand{\BCHAIR}{pj.\hbox{}}% chair of symposium
11996 %%
11997 %% Chairs
11998 \renewcommand{\BCHAIRS}{pj.\hbox{}}% chairs
11999 %%
12000 %% Vol.
12001 \renewcommand{\BVOL}{osa}% volume
12002 %%
12003 %% Vols.
12004 \renewcommand{\BVOLS}{osat}% volumes
12005 %%
12006 %% No.
12007 \renewcommand{\BNUM}{nro}% number
12008 %%
12009 %% Nos.
12010 \renewcommand{\BNUMS}{nro}% numbers
12011 %%
12012 %% ed.
12013 \renewcommand{\BEd}{p.\hbox{}}% edition
12014 %%
12015 %% chap.
12016 \renewcommand{\BCHAP}{luku}% chapter
12017 %%
12018 %% chap.
12019 \renewcommand{\BCHAPS}{luvut}% chapters
12020 %%
12021 %% p.
12022 \renewcommand{\BPG}{s.\hbox{}}% page
12023 %%
12024 %% pp.
12025 \renewcommand{\BPGS}{s.\hbox{}}% pages
12026 %%
12027 %% Tech.\ Rep.
12028 \renewcommand{\BTR}{Tekn.\ rap.\hbox{}}% (default) technical report type name
12029 %%
12030 %% (default) PhD thesis type name
12031 \renewcommand{\BPhD}{V\"ait\"oskirja}%
12032 %%
12033 %% (default) unpublished PhD thesis type name
12034 \renewcommand{\BUPhD}{Julkaisematon v\"ait\"oskirja}%
12035 %%
12036 %% (default) master's thesis type name
12037 \renewcommand{\BMTh}{Pro gradu -tutkielma}%
12038 %%
12039 %% (default) unpublished master's thesis type name
12040 \renewcommand{\BUMTh}{Julkaisematon pro gradu -tutkielma}%
12041 %%
12042 \renewcommand{\BAuthor}{Tekij\"a}% ``Author'' if publisher = author
12043 %%
12044 %% Original work published
12045 \renewcommand{\BOWP}{Alkuaan julk.\hbox{}}%
12046 %%
12047 %% Reprinted from
12048 \renewcommand{\BREPR}{Uudelleen julk.\hbox{}}%
12049 %%
12050 %% (websites) Available from; note the space.
12051 \renewcommand{\BAvailFrom}{Saatavilla\ }%
12052 %%
12053 %% (websites) Retrieved ... from; note the space.
12054 %% The argument is the date on which it was last checked.
12055 \renewcommand{\BRetrieved}[1]{Lainattu {#1}, saatavilla\ }%
12056 \renewcommand{\BRetrievedFrom}{Lainattu saatavilla\ }%
12057 %%
12058 %% (newsgroups \& forums) Message posted to; note the space.
12059 \renewcommand{\BMsgPostedTo}{Viesti l\"ahetetty\ }%
12060 %%
12061 %% Punctuation
12062 \renewcommand{\BBOP}{(}% opening parenthesis
12063 \renewcommand{\BBCP}{)}% closing parenthesis
12064 \renewcommand{\BBOQ}{}% opening quote for article title
12065 \renewcommand{\BBCQ}{}% closing quote for article title
12066 \renewcommand{\BBAA}{\&}% between authors in parenthetical cites and ref. list
12067 %%
12068 %% and
12069 \renewcommand{\BBAB}{ja}% between authors in text
12070 %%
12071 \renewcommand{\BAnd}{\&}% for ``Ed. \& Trans.'' in ref. list
12072 \DeclareRobustCommand{\BPBI}{.~}% Period between initials
12073 \DeclareRobustCommand{\BHBI}{.-}% Hyphen between initials
12074 \renewcommand{\BAP}{ }% after prefix, before first citation
12075 \renewcommand{\BBAY}{, }% between author(s) and year
12076 \renewcommand{\BBYY}{, }% between years of multiple citations with same author
12077 \renewcommand{\BBC}{; }% between cites
12078 \renewcommand{\BBN}{, }% before note
12079 \renewcommand{\BCBT}{,}% comma between authors in ref. list when no. of
12080 %% authors = 2
12081 \renewcommand{\BCBL}{,}% comma before last author when no. of authors > 2
12082 %% Remove excess space with the natbibapa option
12083 \if@APAC@natbib@apa
12084 \renewcommand{\BBAY}{,}%
12085 \renewcommand{\BBYY}{,}%
12086 \renewcommand{\BBC}{;}%
12087 \fi
12088 %%
12089 %% Date formatting, adapted from babel's finnish.dtx
12090 \renewcommand{\APACmonth}[1]{\ifcase #1\or
12091 tammikuuta\or helmikuuta\or maaliskuuta\or huhtikuuta\or
12092 toukokuuta\or kes\"akuuta\or hein\"akuuta\or elokuuta\or
12093 syyskuuta\or lokakuuta\or marraskuuta\or joulukuuta\or
12094 %% Winter Spring Summer Fall
12095 talvea\or kev\"att\"a\or kes\"a\"a\or syksy\"a\else
12096 {#1}\fi}%
12097 \renewcommand{\APACrefYearMonthDay}[3]{%
12098 {\BBOP}{#1}% year (+ addendum); should not be empty
12099 \ifx\@empty#3\@empty
12100 \ifx\@empty#2\@empty
12101 \else
12102 \unskip, {#2}% month
12103 \fi
12104 \else
12105 \unskip, {#3}.% day
12106 \ifx\@empty#2\@empty
12107 \else
12108 \unskip~{#2}% month
12109 \fi
12110 \fi
12111 {\BBCP}% closing parenthesis
12112 }%
12113 %%
12114 %% Some macros that transform a number (say, `2') to an ordinal one (`2nd')
12115 \renewcommand{\PrintOrdinal}[1]{%
12116 \afterassignment\print@ordinal
12117 \count@ 0#1\relax\@nil
12118 }%
12119 \def\print@ordinal#1#2\@nil{%
12120 \ifx\relax#1\relax
12121 \ifnum\count@>\z@
12122 \CardinalNumeric\count@
12123 \else
12124 ??.%
12125 \fi
12126 \else
12127 \ifnum \count@>\z@ \number\count@ \fi
12128 #1#2\relax
12129 \fi
12130 }%
12131 % \end{macrocode}
12132 % In Finnish, ordinal numbers are always obtained by simply
12133 % putting a period after the number. So I am reusing the German code here.
12134 % As mentioned in the section describing \fname{german.apc}, this (and perhaps
12135 % the code above) can then be significantly simplified, but, because I (EM)
12136 % have trouble understanding this code (from the \pkg{amsrefs} package) and
12137 % experimenting did not give the expected results, I won't mess with the code
12138 % too much and stay close to the English code.
12139 % \begin{macrocode}
12140 \renewcommand{\CardinalNumeric}[1]{%
12141 \number#1\relax
12142 \if
12143 \ifnum#1<14
12144 \ifnum#1>\thr@@ T\else F\fi
12145 \else
12146 F%
12147 \fi
12148 T%
12149 .%
12150 \else
12151 \@xp\keep@last@digit\@xp#1\number#1\relax
12152 \ifcase#1.\else .\fi
12153 \fi
12154 }%
12155 % \end{macrocode}
12156 % Restore category code of |@| sign.
12157 % \begin{macrocode}
12158 \APACrestoreAtCode
12159 %</finnish>
12160 % \end{macrocode}
12161 %
12162 %
12163 % \subsection{\fname{french.apc}}
12164 %
12165 % This file redefines the language-specific elements of \pkg{apacite}
12166 % for the French language and its ``dialects'' in \pkg{babel}
12167 % terminology.
12168 %
12169 % \begin{macrocode}
12170 %<*french>
12171 %%
12172 %% french.apc - french version of apacite elements
12173 %% Adapted from english.apc by \'Eric Raufaste
12174 %%
12175 % \end{macrocode}
12176 % A fancy way to store and restore the category code of the |@| sign,
12177 % per Heiko Oberdiek.
12178 % \begin{macrocode}
12179 \edef\APACrestoreAtCode{%
12180 \catcode`@=\the\catcode`@\relax
12181 }%
12182 \makeatletter
12183 \renewcommand{\onemaskedcitationmsg}[1]{%
12184 \emph{(#1\ citation removed for masked review)}}% !!! CHANGE
12185 \renewcommand{\maskedcitationsmsg}[1]{%
12186 \emph{(#1\ citations removed for masked review)}}% !!! CHANGE
12187 %%
12188 \renewcommand{\refname}{R\'ef\'erences}% Name of ref. list if it's a section.
12189 \renewcommand{\bibname}{R\'ef\'erences}% Name of ref. list if it's a chapter.
12190 %% The name (heading) of the Author Index
12191 \renewcommand{\authorindexname}{Index des auteurs}%
12192 %%
12193 %% A note before the references if a meta-analysis is reported.
12194 \renewcommand{\APACmetaprenote}{%
12195 Les r\'ef\'erences marqu\'ees d'un ast\'erisque indiquent des \'etudes
12196 incluses dans la m\'eta-analyse.}%
12197 %%
12198 %% Commands for specific types of @misc entries.
12199 \renewcommand{\bibmessage}{Msg}%
12200 \renewcommand{\bibcomputerprogram}{Logiciel}%
12201 \renewcommand{\bibcomputerprogrammanual}{Manuel de logiciel}%
12202 \renewcommand{\bibcomputerprogramandmanual}{Logiciel et manuel}%
12203 \renewcommand{\bibcomputersoftware}{Logiciel}%
12204 \renewcommand{\bibcomputersoftwaremanual}{Manuel de logiciel}%
12205 \renewcommand{\bibcomputersoftwareandmanual}{Logiciel et manuel}%
12206 \renewcommand{\bibprogramminglanguage}{Langage de programmation}%
12207 %%
12208 %% Other labels
12209 \renewcommand{\bibnodate}{s.~d.\hbox{}}% ``no date''
12210 \renewcommand{\BIP}{sous presse}% ``in press''
12211 \renewcommand{\BOthers}[1]{et al.\hbox{}}% ``and others''
12212 \renewcommand{\BOthersPeriod}[1]{et al.\hbox{}}% ``and others'' with a period
12213 \renewcommand{\BIn}{In}% % for ``In'' editor...
12214 \renewcommand{\Bby}{par}% % for ``by'' editor... (in reprints)
12215 \renewcommand{\BED}{Ed.\hbox{}}% % editor
12216 \renewcommand{\BEDS}{Eds.\hbox{}}% % editors
12217 \renewcommand{\BTRANS}{Trad.\hbox{}}% % translator
12218 \renewcommand{\BTRANSS}{Trad.\hbox{}}% % translators
12219 \renewcommand{\BTRANSL}{trad.\hbox{}}% % translation, for the year field
12220 \renewcommand{\BCHAIR}{Pr\'es.\hbox{}}% % chair of symposium
12221 \renewcommand{\BCHAIRS}{Pr\'es}% % chairs
12222 \renewcommand{\BVOL}{Vol.\hbox{}}% % volume
12223 \renewcommand{\BVOLS}{Vols.\hbox{}}% % volumes
12224 \renewcommand{\BNUM}{N\textsuperscript{o}}% % number
12225 \renewcommand{\BNUMS}{N\textsuperscript{os}}% numbers
12226 \renewcommand{\BEd}{\'ed.\hbox{}}% % edition
12227 \renewcommand{\BCHAP}{chap.\hbox{}}% % chapter
12228 \renewcommand{\BCHAPS}{chap.\hbox{}}% % chapters
12229 \renewcommand{\BPG}{p.\hbox{}}% % page
12230 \renewcommand{\BPGS}{pp.\hbox{}}% % pages
12231 %% Default technical report type name.
12232 \renewcommand{\BTR}{Rapport technique}%
12233 %% Default PhD thesis type name.
12234 \renewcommand{\BPhD}{Th\`ese de doctorat}%
12235 %% Default unpublished PhD thesis type name.
12236 \renewcommand{\BUPhD}{Th\`ese de doctorat non publi\'ee}%
12237 %% Default master's thesis type name.
12238 \renewcommand{\BMTh}{M\'emoire de Master}%
12239 %% Default unpublished master's thesis type name.
12240 \renewcommand{\BUMTh}{M\'emoire de Master non publi\'e}%
12241 %%
12242 \renewcommand{\BAuthor}{Auteur}%% Used if publisher = author
12243 \renewcommand{\BOWP}{\OE uvre originale publi\'ee en}%
12244 \renewcommand{\BREPR}{R\'eimprim\'e \`a partir de}%
12245 \renewcommand{\BAvailFrom}{Disponible sur\ }% Websites; note the space.
12246 %% Websites; note the space.
12247 %% The argument is the date on which it was last checked.
12248 \renewcommand{\BRetrieved}[1]{Consult\'e le {#1}, sur\ }%
12249 \renewcommand{\BRetrievedFrom}{Consult\'e sur\ }%
12250 \renewcommand{\BMsgPostedTo}{Message post\'e sur\ }% Messages; note the space.
12251 %%
12252 %% Punctuation
12253 \renewcommand{\BBOP}{(}% opening parenthesis
12254 \renewcommand{\BBCP}{)}% closing parenthesis
12255 \renewcommand{\BBOQ}{}% opening quote for article title
12256 \renewcommand{\BBCQ}{}% closing quote for article title
12257 \renewcommand{\BBAA}{\&}% between authors in parenthetical cites and ref. list
12258 \renewcommand{\BBAB}{et}% between authors in text
12259 \renewcommand{\BAnd}{\&}% for ``Ed. \& Trans.'' in ref. list
12260 \DeclareRobustCommand{\BPBI}{.~}% Period between initials
12261 \DeclareRobustCommand{\BHBI}{.-}% Hyphen between initials
12262 \renewcommand{\BAP}{ }% after prefix, before first citation
12263 \renewcommand{\BBAY}{, }% between author(s) and year
12264 \renewcommand{\BBYY}{, }% between years of multiple citations with same author
12265 \renewcommand{\BBC}{~; }% between cites
12266 \renewcommand{\BBN}{, }% before note
12267 \renewcommand{\BCBT}{,}% comma between authors in ref. list when no. of
12268 %% authors = 2
12269 \renewcommand{\BCBL}{,}% comma before last author when no. of authors > 2
12270 %% Remove excess space with the natbibapa option
12271 \if@APAC@natbib@apa
12272 \renewcommand{\BBAY}{,}%
12273 \renewcommand{\BBYY}{,}%
12274 \renewcommand{\BBC}{~;}%
12275 \fi
12276 %%
12277 %% Date formatting
12278 \renewcommand{\APACmonth}[1]{\ifcase #1\or janvier\or f\'evrier\or mars\or
12279 avril\or mai\or juin\or juillet\or ao\^ut\or septembre\or octobre\or
12280 novembre\or d\'ecembre\or hiver\or printemps\or \'et\'e\or automne\else
12281 {#1}\fi}%
12282 %% Structure taken from definition of \today in frenchb.dtx
12283 \makeatletter
12284 \renewcommand{\APACrefYearMonthDay}[3]{%
12285 {\BBOP}{#1}% year (+ addendum); should not be empty
12286 \ifx\@empty#3\@empty
12287 \ifx\@empty#2\@empty
12288 \else
12289 \unskip, {#2}% month
12290 \fi
12291 \else
12292 \unskip, {#3}% day
12293 \edef\APAC@tempa{#3}%
12294 \edef\APAC@tempb{1}%
12295 \ifx\APAC@tempa\APAC@tempb\@empty {\ier}\fi
12296 \let\APAC@tempa\@undefined
12297 \let\APAC@tempb\@undefined
12298 %%
12299 \ifx\@empty#2\@empty
12300 \else
12301 \unskip~{#2}% month
12302 \fi
12303 \fi
12304 {\BBCP}% closing parenthesis
12305 }%
12306 %%
12307 %% Some macros that transform a number (say, `2') to an ordinal one (`2nd')
12308 % \end{macrocode}
12309 % Ordinal numbers should all be number + `\textsuperscript{e}',
12310 % except if number = 1, then it is ``1\textsuperscript{er}'' or
12311 % ``1\textsuperscript{re}''. \pkg{babel} provides the
12312 % commands \cmd{\ieme}, \cmd{\ier}, and \cmd{\iere} for formatting this.
12313 % We'll use these commands.
12314 %
12315 % \begin{macro}{\APACfirst}
12316 % \begin{macro}{\PrintOrdinalMale}
12317 % \pkg{apacite} only uses the ordinal numbers for edition numbers, and
12318 % the gender of ``\'edition'' is feminine, so we use the feminine form
12319 % ``1re'' by default. However, we put it in the macro \cmd{\APACfirst}.
12320 % Then we define \cmd{\PrintOrdinalMale} to redefine \cmd{\APACfirst}
12321 % to take the masculine form, then call \cmd{\PrintOrdinal}, and then
12322 % revert again, so that users can use this function for masculine words
12323 % (if desired).
12324 % \begin{macrocode}
12325 \DeclareRobustCommand{\APACfirst}{1\iere}%
12326 \DeclareRobustCommand{\PrintOrdinalMale}[1]{%
12327 \DeclareRobustCommand{\APACfirst}{1\ier}%
12328 \PrintOrdinal{#1}%
12329 \DeclareRobustCommand{\APACfirst}{1\iere}%
12330 }%
12331 % \end{macrocode}
12332 % \end{macro}
12333 % \end{macro}
12334 % \begin{macrocode}
12335 \renewcommand{\PrintOrdinal}[1]{%
12336 \afterassignment\print@ordinal
12337 \count@ 0#1\relax\@nil
12338 }%
12339 \def\print@ordinal#1#2\@nil{%
12340 \ifx\relax#1\relax
12341 \ifnum\count@>\@ne
12342 \CardinalNumeric\count@
12343 \else
12344 \ifnum1=\count@
12345 {\APACfirst}%
12346 \else
12347 ??{\ieme}%
12348 \fi
12349 \fi
12350 \else
12351 \ifnum \count@>\z@ \number\count@ \fi
12352 #1#2\relax
12353 \fi
12354 }%
12355 \renewcommand{\CardinalNumeric}[1]{%
12356 \number#1\relax
12357 \if
12358 \ifnum#1<14
12359 \ifnum#1>\thr@@ T\else F\fi
12360 \else
12361 F%
12362 \fi
12363 T%
12364 {\ieme}%
12365 \else
12366 \@xp\keep@last@digit\@xp#1\number#1\relax
12367 \ifcase#1{\ieme}\else {\ieme}\fi
12368 \fi
12369 }%
12370 %%
12371 %% In French, there should be a space before a colon `:', so we have to
12372 %% redefine a few macros that insert a colon.
12373 \renewcommand{\APACaddressPublisher}[2]{%
12374 \ifx\@empty#1\@empty
12375 %% publisher
12376 \ifx\@empty#2\@empty
12377 \else
12378 {#2}%
12379 \fi
12380 %%
12381 \else
12382 %% address
12383 {#1}%
12384 %% publisher
12385 \ifx\@empty#2\@empty
12386 \else
12387 \unskip{} : {#2}%
12388 \fi
12389 %%
12390 \fi
12391 }%
12392 \let\APACaddressInstitution\APACaddressPublisher
12393 \renewcommand{\APACaddressPublisherEqAuth}[2]{%
12394 \ifx\@empty#1\@empty
12395 %% Publisher. This cannot be empty, because it is equal to the
12396 %% author.
12397 {\BAuthor{}}%
12398 %%
12399 \else
12400 %% Address and publisher. These are not empty.
12401 {#1\unskip{} : \BAuthor{}}%
12402 %%
12403 \fi
12404 }%
12405 \let\APACaddressInstitutionEqAuth\APACaddressPublisherEqAuth
12406 % \end{macrocode}
12407 % Restore category code of |@| sign.
12408 % \begin{macrocode}
12409 \APACrestoreAtCode
12410 %</french>
12411 % \end{macrocode}
12412 %
12413 %
12414 % \subsection{\fname{german.apc} and \fname{ngerman.apc}}
12415 %
12416 % This file redefines the language-specific elements of \pkg{apacite}
12417 % for the German language. These are based on the APA-inspired
12418 % instructions from the \citeA{DGPs07}. There is the traditional orthography
12419 % (`german') and the new orthography (`ngerman'), which are treated as
12420 % completely different languages by \pkg{babel} (unlike, e.g., the two
12421 % Norwegian languages), which presumably has technical reasons. We start
12422 % with `german'.
12423 %
12424 % \begin{macrocode}
12425 %<*german>
12426 %%
12427 %% german.apc - Deutsche Uebersetzung der Apacite-Elemente
12428 %% (German version of apacite elements)
12429 %% Written by Andreas Poege
12430 %% Some additions and adaptations by Erik Meijer.
12431 %%
12432 % \end{macrocode}
12433 % A fancy way to store and restore the category code of the |@| sign,
12434 % per Heiko Oberdiek.
12435 % \begin{macrocode}
12436 \edef\APACrestoreAtCode{%
12437 \catcode`@=\the\catcode`@\relax
12438 }%
12439 \makeatletter
12440 \renewcommand{\onemaskedcitationmsg}[1]{%
12441 \emph{(#1\ citation removed for masked review)}}% !!! CHANGE
12442 \renewcommand{\maskedcitationsmsg}[1]{%
12443 \emph{(#1\ citations removed for masked review)}}% !!! CHANGE
12444 %% Bezeichnung fuer das Literaturverzeichnis, falls Section
12445 \renewcommand{\refname}{Literatur}%
12446 %% Bezeichnung fuer das Literaturverzeichnis, falls Chapter
12447 \renewcommand{\bibname}{Literaturverzeichnis}%
12448 %% Bezeichnung (heading) des Autorenverzeichnisses
12449 \renewcommand{\authorindexname}{Autorenregister}%
12450 %%
12451 %% Bemerkung vor Literaturangaben, falls eine Metaanalyse angegeben wurde
12452 \renewcommand{\APACmetaprenote}{Literaturangaben mit Stern kennzeichnen
12453 Studien der Metaanalyse.}%
12454 %%
12455 %% Befehle fuer die speziellen @misc-Eintraege.
12456 \renewcommand{\bibmessage}{Msg.\hbox{}}% Newsgroup-, Internet-Messages
12457 \renewcommand{\bibcomputerprogram}{Computerprogramm}%
12458 \renewcommand{\bibcomputerprogrammanual}{Programm-Handbuch}%
12459 \renewcommand{\bibcomputerprogramandmanual}{Computerprogramm und Handbuch}%
12460 \renewcommand{\bibcomputersoftware}{Software}%
12461 \renewcommand{\bibcomputersoftwaremanual}{Software-Handbuch}%
12462 \renewcommand{\bibcomputersoftwareandmanual}{Software und Handbuch}%
12463 \renewcommand{\bibprogramminglanguage}{Programmiersprache}%
12464 %%
12465 %% Weitere Labels
12466 \renewcommand{\bibnodate}{o.\,J.\hbox{}}% "`ohne Jahresangabe"'
12467 \renewcommand{\BIP}{in Druck}% % Jahresangabe bei im Druck bef. Werken
12468 %%
12469 %% "`und andere"', das Argument beinhaltet einen Punkt, um einen weiteren im
12470 %% Literaturverzeichnis zu unterdruecken
12471 \renewcommand{\BOthers}[1]{et al.\hbox{}}%
12472 %% "`und andere"', das Argument beinhaltet einen Punkt, um einen weiteren im
12473 %% Literaturverzeichnis zu unterdruecken.
12474 \renewcommand{\BOthersPeriod}[1]{et al.\hbox{}}%
12475 %%
12476 \renewcommand{\BIn}{In}% % fuer "`In"' Herausgeber...
12477 \renewcommand{\Bby}{von}% % fuer "`von"' Herausgeber... (Nachdruck)
12478 \renewcommand{\BED}{Hrsg.\hbox{}}% % Herausgeber(in)
12479 \renewcommand{\BEDS}{Hrsg.\hbox{}}% % Herausgeber(innen)
12480 \renewcommand{\BTRANS}{\"Ubers.\hbox{}}%% Uebersetzer(in)
12481 \renewcommand{\BTRANSS}{\"Ubers.\hbox{}}% Uebersetzer(innen)
12482 \renewcommand{\BTRANSL}{\"Ubers.\hbox{}}% Uebersetzung (bei der Jahresangabe)
12483 \renewcommand{\BCHAIR}{Chair}% % Chair (bei Konferenzen)
12484 \renewcommand{\BCHAIRS}{Chairs}% % Chairs (bei Konferenzen)
12485 \renewcommand{\BVOL}{Bd.\hbox{}}% % Band
12486 \renewcommand{\BVOLS}{Bde.\hbox{}}% % Baende
12487 \renewcommand{\BNUM}{Nr.\hbox{}}% % Nummer
12488 \renewcommand{\BNUMS}{Nr.\hbox{}}% % Nummern
12489 \renewcommand{\BEd}{Aufl.\hbox{}}% % Auflage
12490 \renewcommand{\BCHAP}{Kap.\hbox{}}% % Kapitel
12491 \renewcommand{\BCHAPS}{Kap.\hbox{}}% % Kapitel
12492 \renewcommand{\BPG}{S.\hbox{}}% % Seite
12493 \renewcommand{\BPGS}{S.\hbox{}}% % Seiten
12494 %%
12495 %% (default) Bezeichnung fuer "`technical report"'
12496 \renewcommand{\BTR}{Bericht}%
12497 %% (default) Bezeichnung fuer Dissertation
12498 \renewcommand{\BPhD}{Dissertation}%
12499 %% (default) Bezeichnung fuer unveroeffentlichte Dissertation
12500 \renewcommand{\BUPhD}{Unver\"offentlichte Dissertation}%
12501 %% (default) Bezeichnung fuer Abschlussarbeit
12502 \renewcommand{\BMTh}{Diplomarbeit}%
12503 %% (default) Bezeichnung fuer unveroeffentlichte Abschlussarbeit
12504 \renewcommand{\BUMTh}{Unver\"offentlichte Diplomarbeit}%
12505 %%
12506 \renewcommand{\BAuthor}{Autor}% % ``Autor'' falls publisher = author
12507 \renewcommand{\BOWP}{Originalausgabe}% Originalausgabe
12508 \renewcommand{\BREPR}{Nachdruck von}% Nachdruck von
12509 %% Websites; note the spaces.
12510 \renewcommand{\BAvailFrom}{Verf\"ugbar unter\ }%
12511 %% The argument is the date on which it was last checked.
12512 \renewcommand{\BRetrieved}[1]{Zugriff am {#1} auf\ }%
12513 \renewcommand{\BRetrievedFrom}{Zugriff auf\ }%
12514 %% Note that here the English phrase is left untranslated in German.
12515 \renewcommand{\BMsgPostedTo}{Message posted to\ }%
12516 %%
12517 %% Deutsche Anpassung der Interpunktion und Formatierung
12518 \renewcommand{\BBOP}{(}% % Einleitende Klammer (default "(")
12519 \renewcommand{\BBCP}{)}% % Abschliessende Klammer (default ")")
12520 \renewcommand{\BBOQ}{}% % Einleitung v. Titel v. Artikel (default "")
12521 \renewcommand{\BBCQ}{}% % Abschluss v. Titel. von Artikel (default "")
12522 \renewcommand{\BBAA}{\&}%% Zwischen Autoren in Klammern (default "\&")
12523 \renewcommand{\BBAB}{und}% Zwischen Autoren im Text
12524 \renewcommand{\BAnd}{\&}%% Zwischen Hg. und Uebers., falls gleich (default "\&")
12525 \DeclareRobustCommand{\BPBI}{.~}% Period between initials
12526 \DeclareRobustCommand{\BHBI}{.-}% Hyphen between initials
12527 \renewcommand{\BAP}{ }% % Zeichen zw. Prefix und Zitat (default Leerzeichen)
12528 \renewcommand{\BBAY}{, }% Zwischen Autoren und Jahr(en) (default ", ")
12529 \renewcommand{\BBYY}{, }% Zwischen Jahren, wenn ein Author und mehrere Jahre
12530 \renewcommand{\BBC}{; }% Zwischen Autoren (mehrere Zitate) (default "; ")
12531 \renewcommand{\BBN}{, }% Zwischen Zitat und Postfix (default ", ")
12532 \renewcommand{\BCBT}{}% Zwischen 2 Autoren (zus. zu "&", default ",")
12533 \renewcommand{\BCBL}{}% Zwischen 3 o. mehr Autoren (zus. zu "&", default ",")
12534 %% Remove excess space with the natbibapa option
12535 \if@APAC@natbib@apa
12536 \renewcommand{\BBAY}{,}%
12537 \renewcommand{\BBYY}{,}%
12538 \renewcommand{\BBC}{;}%
12539 \fi
12540 %%
12541 %% Date formatting, adapted from babel's germanb.dtx
12542 \renewcommand{\APACmonth}[1]{\ifcase #1\or
12543 Januar\or Februar\or M\"arz\or April\or Mai\or Juni\or
12544 Juli\or August\or September\or Oktober\or November\or Dezember\or
12545 Winter\or Fr\"uhjahr\or Sommer\or Herbst\else {#1}\fi}%
12546 \renewcommand{\APACrefYearMonthDay}[3]{%
12547 {\BBOP}{#1}% year (+ addendum); should not be empty
12548 \ifx\@empty#3\@empty
12549 \ifx\@empty#2\@empty
12550 \else
12551 \unskip, {#2}% month
12552 \fi
12553 \else
12554 \unskip, {#3}.% day
12555 \ifx\@empty#2\@empty
12556 \else
12557 \unskip~{#2}% month
12558 \fi
12559 \fi
12560 {\BBCP}% closing parenthesis
12561 }%
12562 %% Some macros that transform a number (say, `2') to an ordinal one (`2nd'),
12563 %% adapted from amsrefs.dtx
12564 \renewcommand{\PrintOrdinal}[1]{%
12565 \afterassignment\print@ordinal
12566 \count@ 0#1\relax\@nil
12567 }%
12568 \def\print@ordinal#1#2\@nil{%
12569 \ifx\relax#1\relax
12570 \ifnum\count@>\z@
12571 \CardinalNumeric\count@
12572 \else
12573 ??.%
12574 \fi
12575 \else
12576 \ifnum \count@>\z@ \number\count@ \fi
12577 #1#2\relax
12578 \fi
12579 }%
12580 % \end{macrocode}
12581 % German ordinal numbers are always obtained by simply putting a period after
12582 % the number, so this (and perhaps the code above) can be significantly
12583 % simplified. However, because I (EM) have trouble understanding this code (from
12584 % the \pkg{amsrefs} package) and experimenting did not give the expected
12585 % results, I won't mess with the code too much and stay close to the
12586 % English code.
12587 % \begin{macrocode}
12588 \renewcommand{\CardinalNumeric}[1]{%
12589 \number#1\relax
12590 \if
12591 \ifnum#1<14
12592 \ifnum#1>\thr@@ T\else F\fi
12593 \else
12594 F%
12595 \fi
12596 T%
12597 .%
12598 \else
12599 \@xp\keep@last@digit\@xp#1\number#1\relax
12600 \ifcase#1.\else .\fi
12601 \fi
12602 }%
12603 % \end{macrocode}
12604 % The DGPs puts a space between the volume and the issue number,
12605 % unlike the APA. So we have to slightly adapt this command.
12606 % (|#1| = journal, |#2| = volume, |#3| = number, |#4| = formatted pages).
12607 % \begin{macrocode}
12608 \renewcommand{\APACjournalVolNumPages}[4]{%
12609 \Bem{#1}% journal
12610 \ifx\@empty#2\@empty
12611 \else
12612 \unskip, \Bem{#2}% volume
12613 \fi
12614 \ifx\@empty#3\@empty
12615 \else
12616 \unskip\ ({#3})% issue number, with the added leading space
12617 \fi
12618 \ifx\@empty#4\@empty
12619 \else
12620 \unskip, {#4}% pages
12621 \fi
12622 }%
12623 % \end{macrocode}
12624 % Presumably, for the original journal information of a reprint, a similar
12625 % space needs to be added.
12626 % Arguments: |#1| = year, |#2| = journal, |#3| = volume, |#4| = issue number,
12627 % |#5| = formatted pages, |#6| = note.
12628 % \begin{macrocode}
12629 \renewcommand{\APACorigjournalnote}[6]{%
12630 (\BREPR{} % ``(Reprinted from '' (note the space)
12631 \Bem{#2}% Journal (should not be empty)
12632 \ifx\@empty#1\@empty
12633 \else
12634 \unskip, {#1}% , year
12635 \fi
12636 \ifx\@empty#3\@empty
12637 \else
12638 \unskip, \Bem{#3}% , volume
12639 \fi
12640 \ifx\@empty#4\@empty
12641 \else
12642 \unskip\ {[#4]}% \ [issue number]
12643 \fi
12644 \ifx\@empty#5\@empty
12645 \else
12646 \unskip, {#5}% , pages
12647 \fi
12648 \ifx\@empty#6\@empty
12649 \else
12650 \unskip; {#6}% ; note
12651 \fi
12652 )% Final parenthesis
12653 }%
12654 % \end{macrocode}
12655 % Differences between Austrian and German. (Apparently only the name of
12656 % January---``J\"anner'' vs.\ ``Januar''.)
12657 % \begin{macrocode}
12658 \edef\APACaustrian{\string austrian}%
12659 \ifx\languagename\APACaustrian
12660 \renewcommand{\APACmonth}[1]{\ifcase #1\or
12661 J\"anner\or Februar\or M\"arz\or April\or Mai\or Juni\or
12662 Juli\or August\or September\or Oktober\or November\or Dezember\or
12663 Winter\or Fr\"uhjahr\or Sommer\or Herbst\else {#1}\fi}%
12664 \fi
12665 \let\APACaustrian\undefined
12666 % \end{macrocode}
12667 % Restore category code of |@| sign.
12668 % \begin{macrocode}
12669 \APACrestoreAtCode
12670 %</german>
12671 % \end{macrocode}
12672 %
12673 %
12674 % Now, the file for the new orthography. Apparently, \fname{german.apc}
12675 % can also be used for the new orthography, so this is a very brief one:
12676 %
12677 % \begin{macrocode}
12678 %<*ngerman>
12679 %%
12680 %% ngerman.apc - german translation of apacite elements (new orthography)
12681 %% Written by Erik Meijer, based on instructions of Andreas Poege.
12682 %%
12683 %% According to Andreas Poege, his file german.apc can also be used
12684 %% for the new orthography, so I'll just do this:
12685 %%
12686 \input{german.apc}%
12687 %%
12688 % \end{macrocode}
12689 % Differences between Austrian and German. (Apparently only the name of
12690 % January---``J\"anner'' vs.\ ``Januar''.) This is not picked up in
12691 % \fname{german.apc}, because that file only checks for ``austrian'',
12692 % not for ``naustrian'', so we have to copy it here.
12693 % \begin{macrocode}
12694 \edef\APACaustrian{\string naustrian}%
12695 \ifx\languagename\APACaustrian
12696 \renewcommand{\APACmonth}[1]{\ifcase #1\or
12697 J\"anner\or Februar\or M\"arz\or April\or Mai\or Juni\or
12698 Juli\or August\or September\or Oktober\or November\or Dezember\or
12699 Winter\or Fr\"uhjahr\or Sommer\or Herbst\else {#1}\fi}%
12700 \fi
12701 \let\APACaustrian\undefined
12702 %%
12703 %%
12704 %</ngerman>
12705 % \end{macrocode}
12706 %
12707 %
12708 % \subsection{\fname{greek.apc}}
12709 %
12710 % This file redefines the language-specific elements of \pkg{apacite}
12711 % for the Greek language.
12712 %
12713 % \begin{macrocode}
12714 %<*greek>
12715 %%
12716 %% greek.apc - Greek version of apacite elements
12717 %% Greek translations by Athanassios Protopapas and Ioannis Dimakos
12718 %%
12719 % \end{macrocode}
12720 % A fancy way to store and restore the category code of the |@| sign,
12721 % per Heiko Oberdiek.
12722 % \begin{macrocode}
12723 \edef\APACrestoreAtCode{%
12724 \catcode`@=\the\catcode`@\relax
12725 }%
12726 \makeatletter
12727 \renewcommand{\onemaskedcitationmsg}[1]{%
12728 \emph{(#1\ citation removed for masked review)}}% !!! CHANGE
12729 \renewcommand{\maskedcitationsmsg}[1]{%
12730 \emph{(#1\ citations removed for masked review)}}% !!! CHANGE
12731 %% Name of ref. list if it's a section.
12732 \renewcommand{\refname}{\textgreek{Bibliograf'ia}}%
12733 %% Name of ref. list if it's a chapter.
12734 \renewcommand{\bibname}{\textgreek{Bibliograf'ia}}%
12735 %% The name (heading) of the Author Index
12736 \renewcommand{\authorindexname}{\textgreek{Euret'hrio suggraf'ewn}}%
12737 %%
12738 %% A note before the references if a meta-analysis is reported.
12739 \renewcommand{\APACmetaprenote}{%
12740 \textgreek{Oi ergas'iec pou sumperilamb'anontai sth meta-an'alush
12741 shmei'wnontai me aster'isko}.}%
12742 %%
12743 %% Commands for specific types of @misc entries.
12744 \renewcommand{\bibmessage}{\textgreek{M'hnuma}}%
12745 \renewcommand{\bibcomputerprogram}{\textgreek{Logismik'o}}%
12746 \renewcommand{\bibcomputerprogrammanual}{%
12747 \textgreek{Egqeir'idio logismiko'u}}%
12748 \renewcommand{\bibcomputerprogramandmanual}{%
12749 \textgreek{Logismik'o kai egqeir'idio}}%
12750 \renewcommand{\bibcomputersoftware}{\textgreek{Logismik'o}}%
12751 \renewcommand{\bibcomputersoftwaremanual}{%
12752 \textgreek{Egqeir'idio logismiko'u}}%
12753 \renewcommand{\bibcomputersoftwareandmanual}{%
12754 \textgreek{Logismik'o kai egqeir'idio}}%
12755 \renewcommand{\bibprogramminglanguage}{%
12756 \textgreek{Gl'wssa programmatismo'u}}%
12757 %%
12758 %% Other labels
12759 \renewcommand{\bibnodate}{\textgreek{qwr'ic hmeromhn'ia}}% ``no date''
12760 \renewcommand{\BIP}{\textgreek{up'o 'ekdosh}}% % ``in press''
12761 \renewcommand{\BOthers}[1]{\textgreek{k.\ sun.\hbox{}}}% ``and others''
12762 %% ``and others'' with a period
12763 \renewcommand{\BOthersPeriod}[1]{\textgreek{k.\ sun.\hbox{}}}%
12764 \renewcommand{\BIn}{\textgreek{Sto}}%% for ``In'' editor...
12765 % \end{macrocode}
12766 % The current command \cmd{\Bby} is problematic for application in Greek.
12767 % If it is followed by 1 male editor, then it should be ``|\textgreek{toy}|'';
12768 % in the case of 1 female editor, it should be ``|\textgreek{ths}|''; with
12769 % multiple editors, ``|\textgreek{twn}|'' is the correct translation. For
12770 % the moment, let's use the latter, which is gender-neutral and perhaps the
12771 % most common one. Note that a user can apply the sort of tricks that we
12772 % used in section~\ref{sec:xmpl} (Example~69) to make a one-time change to
12773 % the definition of \cmd{\Bby}. See the command \cmd{\bibInstring} in
12774 % section~\ref{sec:apacdoc}.
12775 % \begin{macrocode}
12776 \renewcommand{\Bby}{\textgreek{twn}}% for ``by'' editor... (in reprints)
12777 \renewcommand{\BED}{\textgreek{Epim.\hbox{}}}% % editor
12778 \renewcommand{\BEDS}{\textgreek{Epim.\hbox{}}}% % editors
12779 \renewcommand{\BTRANS}{\textgreek{Mtf.\hbox{}}}% % translator
12780 \renewcommand{\BTRANSS}{\textgreek{Mtf.\hbox{}}}%% translators
12781 \renewcommand{\BTRANSL}{\textgreek{mtf.\hbox{}}}%% translation
12782 \renewcommand{\BCHAIR}{\textgreek{Pr'oedroc}}% % chair of symposium
12783 \renewcommand{\BCHAIRS}{\textgreek{Pr'oedroi}}% % chairs
12784 \renewcommand{\BVOL}{\textgreek{t.\hbox{}}}% % volume
12785 \renewcommand{\BVOLS}{\textgreek{t.\hbox{}}}% % volumes
12786 \renewcommand{\BNUM}{\textgreek{ar.\hbox{}}}% % number
12787 \renewcommand{\BNUMS}{\textgreek{ar.\hbox{}}}% % numbers
12788 \renewcommand{\BEd}{\textgreek{'ekd.\hbox{}}}% % edition
12789 \renewcommand{\BCHAP}{\textgreek{kef.\hbox{}}}% % chapter
12790 \renewcommand{\BCHAPS}{\textgreek{kef.\hbox{}}}% % chapters
12791 \renewcommand{\BPG}{\textgreek{sel.\hbox{}}}% % page
12792 \renewcommand{\BPGS}{\textgreek{sel.\hbox{}}}% % pages
12793 %% Default technical report type name.
12794 \renewcommand{\BTR}{\textgreek{Teq.\ 'ekj.\hbox{}}}%
12795 %% Default PhD thesis type name.
12796 \renewcommand{\BPhD}{\textgreek{Didaktorik'h diatrib'h}}%
12797 %% (default) unpublished PhD thesis type name
12798 \renewcommand{\BUPhD}{\textgreek{Adhmos'ieuth didaktorik'h diatrib'h}}%
12799 %% (default) master's thesis type name
12800 \renewcommand{\BMTh}{\textgreek{Metaptuqiak'h diplwmatik'h ergas'ia}}%
12801 %% (default) unpublished master's thesis type name
12802 \renewcommand{\BUMTh}{%
12803 \textgreek{Adhmos'ieuth metaptuqiak'h diplwmatik'h ergas'ia}}%
12804 %% ``Author'' if publisher = author
12805 \renewcommand{\BAuthor}{\textgreek{Auto'ekdosh}}%
12806 %% Original work published
12807 \renewcommand{\BOWP}{\textgreek{'Ekdosh prwtot'upou}}%
12808 %% Reprinted from
12809 \renewcommand{\BREPR}{\textgreek{Anat'upwsh ap'o}}%
12810 %% Websites; note the explicit spaces.
12811 \renewcommand{\BAvailFrom}{\textgreek{Diaj'esimo ap'o}\ }% Available from
12812 %% Retrieved ... from
12813 %% The argument is the date on which it was last checked.
12814 %% Correct only when ``date'' is full, not just month or year
12815 \renewcommand{\BRetrieved}[1]{%
12816 \textgreek{Anakt'hjhke stis} {#1}, \textgreek{ap'o}\ }%
12817 \renewcommand{\BRetrievedFrom}{%
12818 \textgreek{Anakt'hjhke stis} \textgreek{ap'o}\ }%
12819 % \end{macrocode}
12820 % If a URL follows without any leading words/phrase then this string
12821 % should be OK. If there is any other word before the URL then we
12822 % need to know its gender and number in order to produce the correct
12823 % translation. In the current \pkg{apacite} implementation, this is only
12824 % used with a URL immediately following, so we should be OK.
12825 % \begin{macrocode}
12826 %% Newsgroups, forums, etc.; ``Message posted to ''; note the space.
12827 \renewcommand{\BMsgPostedTo}{\textgreek{M'hnyma anarthm'eno se}\ }%
12828 %%
12829 %% Punctuation
12830 \renewcommand{\BBOP}{(}% opening parenthesis
12831 \renewcommand{\BBCP}{)}% closing parenthesis
12832 \renewcommand{\BBOQ}{}% opening quote for article title
12833 \renewcommand{\BBCQ}{}% closing quote for article title
12834 \renewcommand{\BBAA}{\&}% between authors in parenthetical cites and ref. list
12835 \renewcommand{\BBAB}{\textgreek{kai}}% between authors in text
12836 \renewcommand{\BAnd}{\&}% for ``Ed. \& Trans.'' in ref. list
12837 \DeclareRobustCommand{\BPBI}{.~}% Period between initials
12838 \DeclareRobustCommand{\BHBI}{.-}% Hyphen between initials
12839 \renewcommand{\BAP}{ }% after prefix, before first citation
12840 \renewcommand{\BBAY}{, }% between author(s) and year
12841 \renewcommand{\BBYY}{, }% between years of multiple citations with same author
12842 \renewcommand{\BBC}{; }% between cites
12843 \renewcommand{\BBN}{, }% before note
12844 \renewcommand{\BCBT}{,}% comma between authors in ref. list when no. of
12845 %% authors = 2
12846 \renewcommand{\BCBL}{,}% comma before last author when no. of authors > 2
12847 %% Remove excess space with the natbibapa option
12848 \if@APAC@natbib@apa
12849 \renewcommand{\BBAY}{,}%
12850 \renewcommand{\BBYY}{,}%
12851 \renewcommand{\BBC}{;}%
12852 \fi
12853 %%
12854 %% Date formatting. Adapted from babel's greek.dtx
12855 \renewcommand{\APACmonth}[1]{\textgreek{\ifcase #1\or
12856 Ianouar'iou\or Febrouar'iou\or Mart'iou\or April'iou\or
12857 Ma'"iou\or Ioun'iou\or Ioul'iou\or Augo'ustou\or
12858 Septembr'iou\or Oktwbr'iou\or Noembr'iou\or Dekembr'iou\or
12859 Qeim'wnas\or 'Anoixh\or Kaloka'iri\or Fjin'opwro\else
12860 {#1}\fi}}%
12861 \renewcommand{\APACrefYearMonthDay}[3]{%
12862 {\BBOP}{#1}% year (+ addendum); should not be empty
12863 \ifx\@empty#3\@empty
12864 \ifx\@empty#2\@empty
12865 \else
12866 \unskip, {#2}% month
12867 \fi
12868 \else
12869 \unskip, {#3}% day
12870 \ifx\@empty#2\@empty
12871 \else
12872 \unskip~{#2}% month
12873 \fi
12874 \fi
12875 {\BBCP}% closing parenthesis
12876 }%
12877 %%
12878 % \end{macrocode}
12879 % The ordinal numbers are used only for editions in the current version of
12880 % \pkg{apacite}. Hence, we simply tag a ``|\textgreek{h}|'' to the number.
12881 % We could provide alternative versions later on if desired (see, e.g.,
12882 % \fname{french.apc}).
12883 % \begin{macrocode}
12884 %% Some macros that transform a number (say, `2') to an ordinal one (`2h').
12885 \renewcommand{\PrintOrdinal}[1]{%
12886 \afterassignment\print@ordinal
12887 \count@ 0#1\relax\@nil
12888 }%
12889 \def\print@ordinal#1#2\@nil{%
12890 \ifx\relax#1\relax
12891 \ifnum\count@>\z@
12892 \CardinalNumeric\count@
12893 \else
12894 ??\textgreek{h}%
12895 \fi
12896 \else
12897 \ifnum \count@>\z@ \number\count@ \fi
12898 #1#2\relax
12899 \fi
12900 }%
12901 \renewcommand{\CardinalNumeric}[1]{%
12902 \number#1\relax
12903 \if
12904 \ifnum#1<14
12905 \ifnum#1>\thr@@ T\else F\fi
12906 \else
12907 F%
12908 \fi
12909 T%
12910 \textgreek{h}%
12911 \else
12912 \@xp\keep@last@digit\@xp#1\number#1\relax
12913 \ifcase#1\textgreek{h}\or \textgreek{h}\else \textgreek{h}\fi
12914 \fi
12915 }%
12916 % \end{macrocode}
12917 % Restore category code of |@| sign.
12918 % \begin{macrocode}
12919 \APACrestoreAtCode
12920 %</greek>
12921 % \end{macrocode}
12922 %
12923 %
12924 % \subsection{\fname{norsk.apc}}
12925 %
12926 % This file redefines the language-specific elements of \pkg{apacite}
12927 % for both Norwegian languages (Bokm{\aa}l and Nynorsk). In \pkg{babel}'s
12928 % setup, `norsk' is Bokm{\aa}l and `nynorsk' is a dialect of `norsk'.
12929 % This does not seem to reflect the relation between these languages
12930 % very well, but for compatibility with \pkg{babel} we use the same
12931 % file structure, i.e., \fname{norsk.apc} defines both languages.
12932 %
12933 % There are no official Norwegian translations of APA style. Some ideas
12934 % for this translation have been taken from \citeA{UIB08} and \citeA{UiO06}.
12935 %
12936 % \begin{macrocode}
12937 %<*norsk>
12938 %%
12939 %% norsk.apc - Norwegian Bokmal & Nynorsk versions of apacite elements.
12940 %% Version 1.1.
12941 %% Written by Karl Ove Hufthammer.
12942 %%
12943 % \end{macrocode}
12944 % A fancy way to store and restore the category code of the |@| sign,
12945 % per Heiko Oberdiek.
12946 % \begin{macrocode}
12947 \edef\APACrestoreAtCode{%
12948 \catcode`@=\the\catcode`@\relax
12949 }%
12950 \makeatletter
12951 \renewcommand{\onemaskedcitationmsg}[1]{%
12952 \emph{(#1\ citation removed for masked review)}}% !!! CHANGE
12953 \renewcommand{\maskedcitationsmsg}[1]{%
12954 \emph{(#1\ citations removed for masked review)}}% !!! CHANGE
12955 \renewcommand{\refname}{Referanser}% Name of ref. list if it's a section.
12956 \renewcommand{\bibname}{Referanser}% Name of ref. list if it's a chapter.
12957 %% The name (heading) of the Author Index
12958 \renewcommand{\authorindexname}{Forfatterregister}%
12959 %%
12960 %% A note before the references if a meta-analysis is reported.
12961 \renewcommand{\APACmetaprenote}{%
12962 Referanser merket med en stjerne viser til studier som er med i
12963 metaanalysen.}
12964 %%
12965 %% Commands for specific types of @misc entries.
12966 \renewcommand{\bibmessage}{innlegg}%
12967 \renewcommand{\bibcomputerprogram}{dataprogram}%
12968 \renewcommand{\bibcomputerprogrammanual}{dataprogramh\aa ndbok}%
12969 \renewcommand{\bibcomputerprogramandmanual}{dataprogram og brukerh\aa ndbok}%
12970 \renewcommand{\bibcomputersoftware}{programvare}%
12971 \renewcommand{\bibcomputersoftwaremanual}{programvareh\aa ndbok}%
12972 \renewcommand{\bibcomputersoftwareandmanual}{programvare og brukerh\aa ndbok}%
12973 \renewcommand{\bibprogramminglanguage}{programmeringsspr\aa k}%
12974 %%
12975 %% Other labels
12976 \renewcommand{\bibnodate}{u.d.\hbox{}}% ``no date''
12977 \renewcommand{\BIP}{under publisering}% ``in press''
12978 \renewcommand{\BOthers}[1]{et al.\hbox{}}% ``and others''
12979 \renewcommand{\BOthersPeriod}[1]{et al.\hbox{}}% ``and others'', with a period
12980 \renewcommand{\BIn}{I}% % for ``In'' editor...
12981 \renewcommand{\Bby}{av}% % for ``by'' editor... (in reprints)
12982 \renewcommand{\BED}{red.\hbox{}}% % editor
12983 \renewcommand{\BEDS}{red.\hbox{}}% % editors
12984 \renewcommand{\BTRANS}{oms.\hbox{}}% % translator
12985 \renewcommand{\BTRANSS}{oms.\hbox{}}% % translators
12986 \renewcommand{\BTRANSL}{oms.\hbox{}}% % translation, for the year field
12987 \renewcommand{\BCHAIR}{ordstyrer}% % chair of symposium
12988 \renewcommand{\BCHAIRS}{ordstyrere}% % chairs
12989 \renewcommand{\BVOL}{vol.\hbox{}}% % volume
12990 \renewcommand{\BVOLS}{vol.\hbox{}}% % volumes
12991 \renewcommand{\BNUM}{nr.\hbox{}}% % number
12992 \renewcommand{\BNUMS}{nr.\hbox{}}% % numbers
12993 \renewcommand{\BEd}{utg.\hbox{}}% % edition
12994 \renewcommand{\BCHAP}{kap.\hbox{}}% % chapter
12995 \renewcommand{\BCHAPS}{kap.\hbox{}}% % chapters
12996 \renewcommand{\BPG}{s.\hbox{}}% % page
12997 \renewcommand{\BPGS}{s.\hbox{}}% % pages
12998 %% Default technical report type name.
12999 \renewcommand{\BTR}{Teknisk rapport}%
13000 %% Default PhD thesis type name.
13001 \renewcommand{\BPhD}{Akademisk avhandling}%
13002 %% Default unpublished PhD thesis type name.
13003 \renewcommand{\BUPhD}{Upublisert akademisk avhandling}%
13004 %% Default master's thesis type name.
13005 \renewcommand{\BMTh}{Masteroppgave}%
13006 %% Default unpublished master's thesis type name.
13007 \renewcommand{\BUMTh}{Upublisert masteroppgave}%
13008 %%
13009 \renewcommand{\BAuthor}{Forfatter}% ``Author'' if publisher = author
13010 \renewcommand{\BOWP}{Original publisert}% Original work published
13011 \renewcommand{\BREPR}{Opptrykk fra}% Reprinted from
13012 \renewcommand{\BAvailFrom}{Tilgjengelig fra\ }% Websites; note the space.
13013 %% The argument is the date on which it was last checked.
13014 \renewcommand{\BRetrieved}[1]{Hentet {#1} fra\ }% Websites; note the space.
13015 \renewcommand{\BRetrievedFrom}{Hentet fra\ }% Websites; note the space.
13016 \renewcommand{\BMsgPostedTo}{Innlegg p\aa \ }% Messages; note the space.
13017 % \end{macrocode}
13018 % To be in line with Norwegian rules of punctuation, a comma is never
13019 % used before `\&' or ``and'', and there is no space between initials.
13020 % \begin{macrocode}
13021 %%
13022 %% Punctuation
13023 \renewcommand{\BBOP}{(}% opening parenthesis
13024 \renewcommand{\BBCP}{)}% closing parenthesis
13025 \renewcommand{\BBOQ}{}% opening quote for article title
13026 \renewcommand{\BBCQ}{}% closing quote for article title
13027 \renewcommand{\BBAA}{\&}% between authors in parenthetical cites and ref. list
13028 \renewcommand{\BBAB}{og}% between authors in text
13029 \renewcommand{\BAnd}{\&}% for ``Ed. \& Trans.'' in ref. list
13030 \DeclareRobustCommand{\BPBI}{.}% Period between initials; no space
13031 \DeclareRobustCommand{\BHBI}{.-}% Hyphen between initials
13032 \renewcommand{\BAP}{ }% after prefix, before first citation
13033 \renewcommand{\BBAY}{, }% between author(s) and year
13034 \renewcommand{\BBYY}{, }% between years of multiple citations with same author
13035 \renewcommand{\BBC}{; }% between cites
13036 \renewcommand{\BBN}{, }% before note
13037 \renewcommand{\BCBT}{}% no comma between authors in ref. list when no. of
13038 %% authors = 2
13039 \renewcommand{\BCBL}{}% no comma before last author when no. of authors > 2
13040 %% Remove excess space with the natbibapa option
13041 \if@APAC@natbib@apa
13042 \renewcommand{\BBAY}{,}%
13043 \renewcommand{\BBYY}{,}%
13044 \renewcommand{\BBC}{;}%
13045 \fi
13046 %%
13047 %% Date formatting; adapted from babel's norsk.dtx
13048 \renewcommand{\APACmonth}[1]{\ifcase #1\or
13049 januar\or februar\or mars\or april\or mai\or juni\or
13050 juli\or august\or september\or oktober\or november\or desember\or
13051 vinter\or v{\aa}r\or sommer\or h{\o}st\else
13052 {#1}\fi}%
13053 \renewcommand{\APACrefYearMonthDay}[3]{%
13054 {\BBOP}{#1}% year (+ addendum); should not be empty
13055 \ifx\@empty#3\@empty
13056 \ifx\@empty#2\@empty
13057 \else
13058 \unskip, {#2}% month
13059 \fi
13060 \else
13061 \unskip, {#3}.% day
13062 \ifx\@empty#2\@empty
13063 \else
13064 \unskip~{#2}% month
13065 \fi
13066 \fi
13067 {\BBCP}% closing parenthesis
13068 }%
13069 %% Some macros that transform a number (say, `2') to an ordinal one (`2nd')
13070 \renewcommand{\PrintOrdinal}[1]{%
13071 \afterassignment\print@ordinal
13072 \count@ 0#1\relax\@nil
13073 }%
13074 \def\print@ordinal#1#2\@nil{%
13075 \ifx\relax#1\relax
13076 \ifnum\count@>\z@
13077 \CardinalNumeric\count@
13078 \else
13079 ??.%
13080 \fi
13081 \else
13082 \ifnum \count@>\z@ \number\count@ \fi
13083 #1#2\relax
13084 \fi
13085 }%
13086 % \end{macrocode}
13087 % Norwegian ordinal numbers are always obtained by simply putting a period
13088 % after the number, so this (and perhaps the code above) can be significantly
13089 % simplified. However, because I (EM) have trouble understanding this code (from
13090 % the \pkg{amsrefs} package) and experimenting did not give the expected
13091 % results, I won't mess with the code too much and stay close to the
13092 % English code.
13093 % \begin{macrocode}
13094 \renewcommand{\CardinalNumeric}[1]{%
13095 \number#1\relax
13096 \if
13097 \ifnum#1<14
13098 \ifnum#1>\thr@@ T\else F\fi
13099 \else
13100 F%
13101 \fi
13102 T%
13103 .%
13104 \else
13105 \@xp\keep@last@digit\@xp#1\number#1\relax
13106 \ifcase#1.\else .\fi
13107 \fi
13108 }%
13109 %%
13110 %% Differences between norsk (bokmal) and nynorsk.
13111 \edef\APACnynorsk{\string nynorsk}%
13112 \ifx\languagename\APACnynorsk
13113 \renewcommand{\refname}{Referansar}% Name of ref. list if it's a section.
13114 \renewcommand{\bibname}{Referansar}% Name of ref. list if it's a chapter.
13115 \renewcommand{\authorindexname}{Forfattarregister}%
13116 \renewcommand{\APACmetaprenote}{%
13117 Referansar merkte med ei stjerne viser til studiar som er med i
13118 metaanalysen.}%
13119 \renewcommand{\bibcomputerprogrammanual}{dataprogramhandbok}%
13120 \renewcommand{\bibcomputerprogramandmanual}{dataprogram og brukarhandbok}%
13121 \renewcommand{\bibcomputersoftwaremanual}{programvarehandbok}%
13122 \renewcommand{\bibcomputersoftwareandmanual}{programvare og brukarhandbok}%
13123 \renewcommand{\BCHAIR}{ordstyrar}% % chair of symposium
13124 \renewcommand{\BCHAIRS}{ordstyrarar}% % chairs
13125 %% Default master's thesis type name.
13126 \renewcommand{\BMTh}{Masteroppg\aa ve}%
13127 %% Default unpublished master's thesis type name.
13128 \renewcommand{\BUMTh}{Upublisert masteroppg\aa ve}%
13129 \renewcommand{\BAuthor}{Forfattar}% ``Author'' if publisher = author
13130 \renewcommand{\BREPR}{Opptrykk fr\aa }% Reprinted from
13131 \renewcommand{\BAvailFrom}{Tilgjengeleg fr\aa \ }% Websites; note the space.
13132 \renewcommand{\BRetrieved}[1]{Henta {#1} fr\aa \ }% Websites; note the space.
13133 \renewcommand{\APACmonth}[1]{\ifcase #1\or
13134 januar\or februar\or mars\or april\or mai\or juni\or
13135 juli\or august\or september\or oktober\or november\or desember\or
13136 vinter\or v{\aa}r\or sommar\or haust\else
13137 {#1}\fi}%
13138 \fi
13139 \let\APACnynorsk\undefined
13140 % \end{macrocode}
13141 % Restore category code of |@| sign.
13142 % \begin{macrocode}
13143 \APACrestoreAtCode
13144 %</norsk>
13145 % \end{macrocode}
13146 %
13147 %
13148 % \subsection{\fname{spanish.apc}}
13149 %
13150 % This file redefines the language-specific elements of \pkg{apacite}
13151 % for the Spanish language. Note that \pkg{apacite}'s usage of |<| and
13152 % |>| for pre-notes, as in |\cite<e.g.,>{jones06}| (inherited from its
13153 % predecessor, \fname{theapa.sty}), conflicts with \pkg{babel}'s
13154 % \pkgoption{spanish} option, which makes |<| and |>| active characters.
13155 % Hence, either you must avoid using prenotes with \pkg{apacite}'s
13156 % construction or you must disable \pkg{babel}'s behavior by inserting
13157 % the command \cmd{\deactivatequoting} after loading \pkg{babel}.
13158 %
13159 % \begin{macrocode}
13160 %<*spanish>
13161 %%
13162 %% spanish.apc - Versi\'on espa\~nola de elementos en apacite
13163 %% Escrito por Jorge L\'opez Puga
13164 %%
13165 % \end{macrocode}
13166 % A fancy way to store and restore the category code of the |@| sign,
13167 % per Heiko Oberdiek.
13168 % \begin{macrocode}
13169 \edef\APACrestoreAtCode{%
13170 \catcode`@=\the\catcode`@\relax
13171 }%
13172 \makeatletter
13173 %% El nombre (del encabezado) de la Lista Referencias
13174 %% Nombre de la lista de ref. si es una secci\'on.
13175 \renewcommand{\refname}{Referencias}%
13176 %% Nomber de la lista de refs. si es un cap\'{\i}tulo.
13177 \renewcommand{\bibname}{Referencias}%
13178 %% El nombre (del encabezado) del \'Indice de Autores.
13179 \renewcommand{\authorindexname}{\'Indice de Autores}%
13180 %% Nota previa usada justo antes de la lista de referencias si un
13181 %% meta-an\'alisis es usado.
13182 \renewcommand{\APACmetaprenote}{%
13183 Las referencias marcadas con un asterisco indican estudios incluidos en
13184 el meta-an\'alisis.}%
13185 %% Comandos para tipos espec\'{\i}ficos de entradas @misc.
13186 \renewcommand{\bibmessage}{Msj}%
13187 \renewcommand{\bibcomputerprogram}{Programa inform\'atico}%
13188 \renewcommand{\bibcomputerprogrammanual}{Manual de programa inform\'atico}%
13189 \renewcommand{\bibcomputerprogramandmanual}{Programa inform\'atico y manual}%
13190 \renewcommand{\bibcomputersoftware}{Software inform\'atico}%
13191 \renewcommand{\bibcomputersoftwaremanual}{Manual de software inform\'atico}%
13192 \renewcommand{\bibcomputersoftwareandmanual}{Manual y software inform\'atico}%
13193 \renewcommand{\bibprogramminglanguage}{Lenguaje de programaci\'on}%
13194 %%
13195 %% Otras etiquetas
13196 \renewcommand{\bibnodate}{s.f.\hbox{}}% ``sin fecha''
13197 \renewcommand{\BIP}{en prensa}% Usado como a\~no para citas ``en prensa''
13198 %%
13199 %% El argumento contiene un punto, por tanto, evita poner uno adicional en
13200 %% la lista de referencias. No obstante algunas revistas aceptan ``et al.''
13201 %% que es lo que aparece por defecto.
13202 \renewcommand{\BOthers}[1]{y cols.\hbox{}}% ``y colaboradores''
13203 \renewcommand{\BOthersPeriod}[1]{y cols.\hbox{}}% ``y colaboradores''
13204 %%
13205 \renewcommand{\BIn}{En}% Para ``En'' editor...
13206 \renewcommand{\Bby}{por}% ``by'' editor (in reprints)
13207 \renewcommand{\BED}{Ed.\hbox{}}% editor
13208 \renewcommand{\BEDS}{Eds.\hbox{}}% editors
13209 \renewcommand{\BTRANS}{Traduc.\hbox{}}% traductor
13210 \renewcommand{\BTRANSS}{Traducs.\hbox{}}% traductores
13211 \renewcommand{\BTRANSL}{traduc.\hbox{}}% traducci\'on, para el campo a\~no
13212 \renewcommand{\BCHAIR}{Presidente}% Presidente/a de congreso
13213 \renewcommand{\BCHAIRS}{Presidencia}% Presidencia
13214 \renewcommand{\BVOL}{Vol.\hbox{}}% volume
13215 \renewcommand{\BVOLS}{Vols.\hbox{}}% volumes
13216 \renewcommand{\BNUM}{n\sptext{o}}% number
13217 \renewcommand{\BNUMS}{n\sptext{os}}% numbers
13218 \renewcommand{\BEd}{ed.\hbox{}}% edition
13219 \renewcommand{\BCHAP}{cap.\hbox{}}% cap\'{\i}tulo
13220 \renewcommand{\BCHAPS}{caps.\hbox{}}% cap\'{\i}tulos
13221 \renewcommand{\BPG}{p.\hbox{}}% page
13222 \renewcommand{\BPGS}{pp.\hbox{}}% pages
13223 %% Default technical report type name. --- Informe T\'ecnico
13224 \renewcommand{\BTR}{Inf.\ T\'ec.\hbox{}}%
13225 %% (por defecto) PhD thesis type name --- Tesis Doctoral
13226 \renewcommand{\BPhD}{Tesis Doctoral}%
13227 %% (por defecto) unpublished PhD thesis type name
13228 %% --- Tesis Doctoral no publicada
13229 \renewcommand{\BUPhD}{Tesis Doctoral no publicada}%
13230 %% (por defecto) master's thesis type name --- Tesis de Master
13231 \renewcommand{\BMTh}{Tesis de Master}%
13232 %% (por defecto) unpublished master's thesis type name
13233 %% --- Tesis de Master no publicada
13234 \renewcommand{\BUMTh}{Tesis de Master no publicada}%
13235 %%
13236 \renewcommand{\BAuthor}{Autor}% ``Author'' if publisher = author
13237 \renewcommand{\BOWP}{Trabajo original publicado en}% Original work published
13238 \renewcommand{\BREPR}{Reimpresi\'on de}% Reprinted from
13239 %%
13240 %% Websites and messages to newsgroups, forums, etc.; note the spaces.
13241 \renewcommand{\BAvailFrom}{Disponible en\ }% Available from
13242 %% The argument is the date on which it was last checked.
13243 \renewcommand{\BRetrieved}[1]{Descargado {#1}, de\ }% Retrieved ... from
13244 \renewcommand{\BRetrievedFrom}{Descargado de\ }% Retrieved from
13245 \renewcommand{\BMsgPostedTo}{Mensaje colgado en\ }% Message posted to
13246 %%
13247 %% Punctuation
13248 \renewcommand{\BBOP}{(}% opening parenthesis
13249 \renewcommand{\BBCP}{)}% closing parenthesis
13250 \renewcommand{\BBOQ}{}% opening quote for article title
13251 \renewcommand{\BBCQ}{}% closing quote for article title
13252
13253 \renewcommand{\BBAA}{y}% Letra que va entre los autores en las referencias
13254 \renewcommand{\BBAB}{y}% Entre autores en el texto
13255 \renewcommand{\BAnd}{y}% for ``Ed. \& Trans.'' in ref. list
13256 \DeclareRobustCommand{\BPBI}{.~}% Period between initials
13257 \DeclareRobustCommand{\BHBI}{.-}% Hyphen between initials
13258 \renewcommand{\BAP}{ }% after prefix, before first citation
13259 \renewcommand{\BBAY}{, }% between author(s) and year
13260 \renewcommand{\BBYY}{, }% between years of multiple citations with same author
13261 \renewcommand{\BBC}{; }% between cites
13262 \renewcommand{\BBN}{, }% before note
13263 \renewcommand{\BCBT}{,}% comma between authors in ref. list when no. of
13264 %% authors = 2
13265 \renewcommand{\BCBL}{,}% comma before last author when no. of authors > 2
13266 %% Remove excess space with the natbibapa option
13267 \if@APAC@natbib@apa
13268 \renewcommand{\BBAY}{,}%
13269 \renewcommand{\BBYY}{,}%
13270 \renewcommand{\BBC}{;}%
13271 \fi
13272 %%
13273 %% Date formatting; adapted from babel's spanish.dtx
13274 \renewcommand{\APACmonth}[1]{\ifcase #1\or enero\or febrero\or
13275 marzo\or abril\or mayo\or junio\or julio\or agosto\or
13276 septiembre\or octubre\or noviembre\or diciembre\or
13277 invierno\or primavera\or verano\or oto\~no\else
13278 {#1}\fi}%
13279 \renewcommand{\APACrefYearMonthDay}[3]{%
13280 {\BBOP}{#1}% year (+ addendum); should not be empty
13281 \ifx\@empty#3\@empty
13282 \ifx\@empty#2\@empty
13283 \else
13284 \unskip, {#2}% month --- mes
13285 \fi
13286 \else
13287 \unskip, {#3}% day --- d\'ia
13288 \ifx\@empty#2\@empty
13289 \else
13290 \unskip~de {#2}% month --- mes
13291 \fi
13292 \fi
13293 {\BBCP}% closing parenthesis
13294 }%
13295 %% Some macros that transform a number (say, `2') to an ordinal one (`2nd')
13296 \renewcommand{\PrintOrdinal}[1]{%
13297 \afterassignment\print@ordinal
13298 \count@ 0#1\relax\@nil
13299 }%
13300 \def\print@ordinal#1#2\@nil{%
13301 \ifx\relax#1\relax
13302 \ifnum\count@>\z@
13303 \CardinalNumeric\count@
13304 \else
13305 ??\sptext{a}%
13306 \fi
13307 \else
13308 \ifnum \count@>\z@ \number\count@ \fi
13309 #1#2\relax
13310 \fi
13311 }%
13312 % \end{macrocode}
13313 % Spanish ordinal numbers are always obtained by putting
13314 % ``.\textsuperscript{a}'' after the number, at least for editions.
13315 % Therefore, the code here can be significantly simplified. However,
13316 % because I have trouble understanding this code (from the \pkg{amsrefs}
13317 % package) and experimenting did not give the expected results, I won't
13318 % mess with the code too much and stay close to the English code.
13319 % We use the \cmd{\sptext} command from \pkg{babel}'s \fname{spanish.dtx},
13320 % which formats the ``.\textsuperscript{a}'' slightly differently.
13321 % \begin{macrocode}
13322 \renewcommand{\CardinalNumeric}[1]{%
13323 \number#1\relax
13324 \if
13325 \ifnum#1<14
13326 \ifnum#1>\thr@@ T\else F\fi
13327 \else
13328 F%
13329 \fi
13330 T%
13331 \sptext{a}%
13332 \else
13333 \@xp\keep@last@digit\@xp#1\number#1\relax
13334 \ifcase#1\sptext{a}\else \sptext{a}\fi
13335 \fi
13336 }%
13337 % \end{macrocode}
13338 % Some code for using `e' instead of `y' in Spanish if the following
13339 % name starts with `I'.
13340 % \begin{macrocode}
13341 \def\usespanishe#1{%
13342 \@bsphack
13343 \@for\@citeb:=#1\do{%
13344 \edef\@citeb{\expandafter\@firstofone\@citeb}%
13345 \@ifundefined{spanishe@\@citeb\APAC@extra@b@citeb}%
13346 {\global\expandafter
13347 \def\csname spanishe@\@citeb\APAC@extra@b@citeb\endcsname{DUMMY}%
13348 }%
13349 {}%
13350 }%
13351 \@esphack
13352 }
13353 \def\APACinsertmetastar#1{%
13354 \@for\@citeb:=#1\do{%
13355 \edef\@citeb{\expandafter\@firstofone\@citeb}%
13356 \@ifundefined{flagmeta@\@citeb\APAC@extra@b@citeb}%
13357 {}% skip
13358 {{\APACmetastar}}%
13359 \@ifundefined{spanishe@\@citeb\APAC@extra@b@citeb}%
13360 {}% skip
13361 {{% Use `e' instead of `y' in Spanish
13362 \global\let\oldBBA\BBA
13363 \global\def\BBA{e\global\let\BBA\oldBBA}%
13364 }}%
13365 }%
13366 }%
13367 \def\@ifauthorsunequalc@de#1{%
13368 \if@F@cite
13369 \@F@citefalse
13370 \else
13371 \if@Y@cite
13372 {\@BAY}%
13373 \fi
13374 {\@BBC}%
13375 \fi
13376 \edef\@cite@undefined{?}%
13377 \def\BBA{\@BBA}%
13378 \@ifundefined{spanishe@\@citeb\APAC@extra@b@citeb}%
13379 {}% skip
13380 {{% Use `e' instead of `y' in Spanish
13381 \global\let\oldBBA\BBA
13382 \global\def\BBA{e\global\let\BBA\oldBBA}%
13383 }}%
13384 \if@A@cite
13385 \hyper@natlinkstart{#1}%
13386 {\csname b@\@citeb\APAC@extra@b@citeb\endcsname}%
13387 \hyper@natlinkend
13388 \if@Y@cite
13389 {\@BBAY}%
13390 \fi
13391 \fi
13392 \if@Y@cite
13393 \hyper@natlinkstart{#1}%
13394 {\csname Y@\@citeb\APAC@extra@b@citeb\endcsname}%
13395 \hyper@natlinkend
13396 \fi
13397 \let\BBA\relax
13398 }%
13399 % \end{macrocode}
13400 % Restore category code of |@| sign.
13401 % \begin{macrocode}
13402 \APACrestoreAtCode
13403 %</spanish>
13404 % \end{macrocode}
13405 %
13406 %
13407 % \subsection{\fname{swedish.apc}}
13408 %
13409 % This file redefines the language-specific elements of \pkg{apacite}
13410 % for the Swedish language. Translation of APA elements into Swedish
13411 % is not obvious. Ideas of which terms to use have been taken from
13412 % \citeA{Erik01}, \citeA{Johnsson}, and \citeA{GU94}.
13413 %
13414 % \begin{macrocode}
13415 %<*swedish>
13416 %%
13417 %% swedish.apc - swedish translation of apacite elements
13418 %% Written by Stefan Bjork.
13419 %% Small adaptations by Erik Meijer
13420 %%
13421 % \end{macrocode}
13422 % A fancy way to store and restore the category code of the |@| sign,
13423 % per Heiko Oberdiek.
13424 % \begin{macrocode}
13425 \edef\APACrestoreAtCode{%
13426 \catcode`@=\the\catcode`@\relax
13427 }%
13428 \makeatletter
13429 \renewcommand{\onemaskedcitationmsg}[1]{%
13430 \emph{(#1\ citation removed for masked review)}}% !!! CHANGE
13431 \renewcommand{\maskedcitationsmsg}[1]{%
13432 \emph{(#1\ citations removed for masked review)}}% !!! CHANGE
13433 %%
13434 %% Name of ref. list if it's a section.
13435 \renewcommand{\refname}{Referenser}%
13436 %% Name of ref. list if it's a chapter.
13437 \renewcommand{\bibname}{Litteraturf\"orteckning}%
13438 %% Author Index
13439 \renewcommand{\authorindexname}{F\"orfattarindex}%
13440 %%
13441 %% A note before the references if a meta-analysis is reported.
13442 \renewcommand{\APACmetaprenote}{%
13443 Referenser markerade med stj\"arna avser studier inkluderade i
13444 metaanalys.}%
13445 %%
13446 %% Commands for specific types of @misc entries.
13447 \renewcommand{\bibmessage}{meddelande}%
13448 \renewcommand{\bibcomputerprogram}{datorprogram}%
13449 \renewcommand{\bibcomputerprogrammanual}{handbok till datorprogram}%
13450 \renewcommand{\bibcomputerprogramandmanual}{datorprogram och handbok}%
13451 \renewcommand{\bibcomputersoftware}{mjukvara}%
13452 \renewcommand{\bibcomputersoftwaremanual}{handbok till mjukvara}%
13453 \renewcommand{\bibcomputersoftwareandmanual}{mjukvara och handbok}%
13454 \renewcommand{\bibprogramminglanguage}{programmeringsspr{\aa}k}%
13455 %%
13456 %% Other labels
13457 \renewcommand{\bibnodate}{u.~\aa{}.\hbox{}}% ``no date''
13458 \renewcommand{\BIP}{i tryck}% ``in press''
13459 \renewcommand{\BOthers}[1]{m.~fl.\hbox{}}% ``and others''
13460 \renewcommand{\BOthersPeriod}[1]{m.~fl.\hbox{}}% ``and others'', with a period
13461 \renewcommand{\BIn}{I}% for ``In'' editor...
13462 \renewcommand{\Bby}{av}% for ``by'' editor... (in reprints)
13463 \renewcommand{\BED}{red.\hbox{}}% editor
13464 \renewcommand{\BEDS}{red.\hbox{}}% editors
13465 \renewcommand{\BTRANS}{\"overs.\hbox{}}% translator
13466 \renewcommand{\BTRANSS}{\"overs.\hbox{}}% translators
13467 \renewcommand{\BTRANSL}{\"overs.\hbox{}}% translation, for the year field
13468 \renewcommand{\BCHAIR}{ordf\"orande}% chair of symposium
13469 \renewcommand{\BCHAIRS}{ordf\"oranden}% chairs
13470 \renewcommand{\BVOL}{vol.\hbox{}}% volume
13471 \renewcommand{\BVOLS}{vol.\hbox{}}% volumes
13472 \renewcommand{\BNUM}{nr.\hbox{}}% number
13473 \renewcommand{\BNUMS}{nr.\hbox{}}% numbers
13474 \renewcommand{\BEd}{utg{\aa}van}% edition
13475 \renewcommand{\BCHAP}{kap.\hbox{}}% chapter
13476 \renewcommand{\BCHAPS}{kap.\hbox{}}% chapters
13477 \renewcommand{\BPG}{s.\hbox{}}% page
13478 \renewcommand{\BPGS}{s.\hbox{}}% pages
13479 %% Default technical report type name.
13480 \renewcommand{\BTR}{forskningsrapport}%
13481 %% Default PhD thesis type name.
13482 \renewcommand{\BPhD}{doktorsavhandling}%
13483 %% Default unpublished PhD thesis type name.
13484 \renewcommand{\BUPhD}{opublicerad doktorsavhandling}%
13485 %% Default master's thesis type name.
13486 \renewcommand{\BMTh}{examensuppsats}%
13487 %% Default unpublished master's thesis type name.
13488 \renewcommand{\BUMTh}{opublicerad examensuppsats}%
13489 %%
13490 \renewcommand{\BAuthor}{F\"orfattare}% ``Author'' if publisher = author
13491 \renewcommand{\BOWP}{Original publicerat}% Original work published
13492 \renewcommand{\BREPR}{{\AA}terutgivning fr{\aa}n}% Reprinted from
13493 \renewcommand{\BAvailFrom}{Tillg\"anglig fr{\aa}n\ }% Websites; note the space.
13494 %% The argument is the date on which it was last checked.
13495 \renewcommand{\BRetrieved}[1]{H\"amtad {#1}, fr{\aa}n\ }% Websites; note the space.
13496 \renewcommand{\BRetrievedFrom}{H\"amtad fr{\aa}n\ }% Websites; note the space.
13497 \renewcommand{\BMsgPostedTo}{Meddelande postat till\ }% Messages; note the space.
13498 %%
13499 %% Punctuation
13500 \renewcommand{\BBOP}{(}% opening parenthesis
13501 \renewcommand{\BBCP}{)}% closing parenthesis
13502 \renewcommand{\BBOQ}{}% opening quote for article title
13503 \renewcommand{\BBCQ}{}% closing quote for article title
13504 \renewcommand{\BBAA}{\&}% between authors in parenthetical cites and ref. list
13505 \renewcommand{\BBAB}{och}% between authors in text
13506 \renewcommand{\BAnd}{\&}% for ``Ed. \& Trans.'' in ref. list
13507 \DeclareRobustCommand{\BPBI}{. }% Period between initials
13508 \DeclareRobustCommand{\BHBI}{.-}% Hyphen between initials
13509 \renewcommand{\BAP}{ }% after prefix, before first citation
13510 \renewcommand{\BBAY}{, }% between author(s) and year
13511 \renewcommand{\BBYY}{, }% between years of multiple citations with same author
13512 \renewcommand{\BBC}{; }% between cites
13513 \renewcommand{\BBN}{, }% before note
13514 \renewcommand{\BCBT}{}% no comma between authors in ref. list when no. of
13515 %% authors = 2
13516 \renewcommand{\BCBL}{}% no comma before last author when no. of authors > 2
13517 %% Remove excess space with the natbibapa option
13518 \if@APAC@natbib@apa
13519 \renewcommand{\BBAY}{,}%
13520 \renewcommand{\BBYY}{,}%
13521 \renewcommand{\BBC}{;}%
13522 \fi
13523 %%
13524 %% Date formatting; adapted from babel's swedish.dtx
13525 \renewcommand{\APACmonth}[1]{\ifcase #1\or
13526 januari\or februari\or mars\or april\or maj\or juni\or
13527 juli\or augusti\or september\or oktober\or november\or
13528 december\or
13529 vinter\or v{\aa}r\or sommar\or h\"ost\else
13530 {#1}\fi}%
13531 %% Numbered version, which is preferred in the form ``(2008, 21/2)''.
13532 \def\APACswedishnumberedmonth#1{\ifcase #1\or
13533 1\or 2\or 3\or 4\or 5\or 6\or
13534 7\or 8\or 9\or 10\or 11\or 12\or
13535 vinter\or v{\aa}r\or sommar\or h\"ost\else
13536 {#1}\fi}%
13537 \renewcommand{\APACrefYearMonthDay}[3]{%
13538 {\BBOP}{#1}% year (+ addendum); should not be empty
13539 \ifx\@empty#3\@empty
13540 \ifx\@empty#2\@empty
13541 \else
13542 %% Use full month if there is no day.
13543 \unskip, {#2}% month
13544 \fi
13545 \else
13546 \unskip, {#3}% day
13547 \ifx\@empty#2\@empty
13548 \else
13549 %% Use numbered month if there is a day as well.
13550 \let\APACorigmonth\APACmonth
13551 \let\APACmonth\APACswedishnumberedmonth
13552 \unskip{}/{#2}% month
13553 \let\APACmonth\APACorigmonth
13554 \let\APACorigmonth\@undefined
13555 \fi
13556 \fi
13557 {\BBCP}% closing parenthesis
13558 }%
13559 %% Some macros that transform a number (say, `2') to an ordinal one (`2nd')
13560 \renewcommand{\PrintOrdinal}[1]{%
13561 \afterassignment\print@ordinal
13562 \count@ 0#1\relax\@nil
13563 }%
13564 \def\print@ordinal#1#2\@nil{%
13565 \ifx\relax#1\relax
13566 \ifnum\count@>\z@
13567 \CardinalNumeric\count@
13568 \else
13569 ??:e%
13570 \fi
13571 \else
13572 \ifnum \count@>\z@ \number\count@ \fi
13573 #1#2\relax
13574 \fi
13575 }%
13576 % \end{macrocode}
13577 % In swedish, ``1st'' = ``1:a'', ``2nd'' = ``2:a'', everything else =
13578 % ``:e''. From 20 onwards, if the last digit is 1 or 2, ``:a'' should
13579 % be used, and otherwise ``:e''.
13580 % \begin{macrocode}
13581 \renewcommand{\CardinalNumeric}[1]{%
13582 \number#1\relax
13583 \if
13584 \ifnum#1<14
13585 \ifnum#1>\thr@@ T\else F\fi
13586 \else
13587 F%
13588 \fi
13589 T%
13590 :e%
13591 \else
13592 \@xp\keep@last@digit\@xp#1\number#1\relax
13593 \ifcase#1:e\or :a\or :a\or :e\or :e\or :e\or :e\or :e\or :e\or
13594 :e\else :e\fi
13595 \fi
13596 }%
13597 % \end{macrocode}
13598 % Restore category code of |@| sign.
13599 % \begin{macrocode}
13600 \APACrestoreAtCode
13601 %</swedish>
13602 % \end{macrocode}
13603 %
13604 % \section{Bibliography database (\fname{apa5ex.bib})}
13605 %
13606 % This file includes the reference entries of all examples in the
13607 % APA manual, which are all formatted in the \pkg{apacite} reference
13608 % manual. As such, it shows how ordinary and (especially) difficult
13609 % items can be formatted.
13610 %
13611 % \subsection{References from the 5th edition of the Publication Manual}
13612 %
13613 % This includes some additional references that test some rules that are
13614 % mentioned in the text.
13615 % \begin{macrocode}
13616 %<*bibdb>
13617 %%
13618 %% apa5ex.bib: References from the 5th edition of the Publication Manual
13619 %% of the APA, plus a few additional references
13620 %% Written by Erik Meijer
13621
13622 %% Entry labels are section number of the APA manual (5th ed.)
13623 %% plus a sequence number within the section.
13624
13625 @misc{3.94-1,
13626 author = {Walker},
13627 year = {2000},
13628 type = {Unknown},
13629 }
13630
13631 @misc{3.95-1,
13632 author = {Wasserstein and Zappulla and Rosen and Gerstman and Rock},
13633 year = {1994},
13634 type = {Unknown},
13635 }
13636
13637 @misc{3.95-2,
13638 author = {Bradley and Ramirez and Soo},
13639 year = {1994},
13640 type = {Unknown},
13641 }
13642
13643 @misc{3.95-3,
13644 author = {Bradley and Soo and Ramirez and Brown},
13645 year = {1994},
13646 type = {Unknown},
13647 }
13648
13649 @misc{3.95-4,
13650 author = {Kosslyn and Koenig and Barrett and Cave and Tang and Gabrieli},
13651 year = {1996},
13652 type = {Unknown},
13653 }
13654
13655 @misc{3.95-5,
13656 author = {Kosslyn and Koenig and Gabrieli and Tang and Marsolek and Daly},
13657 year = {1996},
13658 type = {Unknown},
13659 }
13660
13661 @misc{3.95-6,
13662 author = {Nightlinger and Littlewood},
13663 year = {1993},
13664 type = {Unknown},
13665 }
13666
13667 @book{3.95-7,
13668 author = {J{\"{o}}reskog, K[arl] G. and S{\"{o}}rbom, D[ag]},
13669 year = {1989},
13670 title = {{LISREL} 7: {A} Guide to the Program and Applications},
13671 edition = {2},
13672 address = {Chicago},
13673 publisher = {SPSS},
13674 }
13675
13676 @misc{3.96-1,
13677 author = {{\bibcorporate{National Institute of Mental Health}}},
13678 firstkey = {{National Institute of Mental Health [NIMH]}},
13679 key = {{NIMH}},
13680 year = {1999},
13681 type = {Unknown},
13682 }
13683
13684 @misc{3.96-2,
13685 author = {{\bibcorporate{University of Pittsburgh}}},
13686 year = {1993},
13687 type = {Unknown},
13688 }
13689
13690 @book{3.96-3,
13691 author = {{\bibcorporate{Koninklijke Nederlandse Schaakbond}}},
13692 firstkey = {{Koninklijke Nederlandse Schaakbond [KNSB]}},
13693 key = {{KNSB}},
13694 year = {2003},
13695 title = {Jaarverslag 2002},
13696 englishtitle = {Annual Report 2002},
13697 address = {Amsterdam},
13698 publisher = {{\bibcorporate{Koninklijke Nederlandse Schaakbond}}},
13699 note = {Fake entry to study sorting and citing of references with
13700 same key, but with different firstkey.},
13701 }
13702
13703 @book{3.96-4,
13704 author = {{\bibcorporate{Koninklijke Nederlandse Schaakbond}}},
13705 firstkey = {{Koninklijke Nederlandse Schaakbond [KNSB]}},
13706 key = {{KNSB}},
13707 year = {2004},
13708 title = {Jaarverslag 2003},
13709 englishtitle = {Annual Report 2003},
13710 address = {Amsterdam},
13711 publisher = {{\bibcorporate{Koninklijke Nederlandse Schaakbond}}},
13712 note = {Fake entry to study sorting and citing of references with
13713 same key, but with different firstkey.},
13714 }
13715
13716 @book{3.96-5,
13717 author = {{\bibcorporate{Koninklijke Nederlandse Schaatsbond}}},
13718 firstkey = {{Koninklijke Nederlandse Schaatsbond [KNSB]}},
13719 key = {{KNSB}},
13720 year = {2003},
13721 title = {Jaarverslag 2002},
13722 englishtitle = {Annual Report 2002},
13723 address = {Amsterdam},
13724 publisher = {{\bibcorporate{Koninklijke Nederlandse Schaatsbond}}},
13725 note = {Fake entry to study sorting and citing of references with
13726 same key, but with different firstkey.},
13727 }
13728
13729 @book{3.96-6,
13730 author = {{\bibcorporate{Koninklijke Nederlandse Schaatsbond}}},
13731 firstkey = {{Koninklijke Nederlandse Schaatsbond [KNSB]}},
13732 key = {{KNSB}},
13733 year = {2004},
13734 title = {Jaarverslag 2003},
13735 englishtitle = {Annual Report 2003},
13736 address = {Amsterdam},
13737 publisher = {{\bibcorporate{Koninklijke Nederlandse Schaatsbond}}},
13738 note = {Fake entry to study sorting and citing of references with
13739 same key, but with different firstkey.},
13740 }
13741
13742 @magazine{3.97-1,
13743 key = {{\APACciteatitle{Study Finds}}},
13744 year = {1982},
13745 month = apr,
13746 title = {Study Finds Free Care Used More},
13747 journal = {{APA} Monitor},
13748 pages = {14},
13749 }
13750
13751 @book{3.97-2,
13752 year = {1979},
13753 title = {College Bound Seniors},
13754 address = {Princeton, NJ},
13755 publisher = {College Board Publications},
13756 }
13757
13758 @misc{3.97-3,
13759 author = {Anonymous},
13760 year = {1998},
13761 type = {Unknown},
13762 }
13763
13764 @newspaper{3.97-4,
13765 year = {2002},
13766 month = mar,
13767 day = {3},
13768 title = {Editorial},
13769 journal = {The Edited Newspaper},
13770 pages = {2},
13771 note = {Fake entry to study sorting and citing of references without
13772 author, but with the same title.},
13773 }
13774
13775 @newspaper{3.97-5,
13776 year = {2003},
13777 month = feb,
13778 day = {12},
13779 title = {Editorial},
13780 journal = {The Edited Newspaper},
13781 pages = {2},
13782 note = {Fake entry to study sorting and citing of references without
13783 author, but with the same title.},
13784 }
13785
13786 @newspaper{3.97-6,
13787 year = {2003},
13788 month = jan,
13789 day = {24},
13790 title = {Editorial},
13791 journal = {The Edited Newspaper},
13792 pages = {2},
13793 note = {Fake entry to study sorting and citing of references without
13794 author, but with the same title.},
13795 }
13796
13797 @book{3.98-1,
13798 author = {Luce, R. Duncan},
13799 year = {1959},
13800 title = {Individual Choice Behavior},
13801 address = {New York},
13802 publisher = {Wiley},
13803 }
13804
13805 @misc{3.98-2,
13806 author = {Luce, P. A.},
13807 year = {1986},
13808 type = {Unknown},
13809 }
13810
13811 @misc{3.98-3,
13812 author = {Goldberg, J. M. and Neff},
13813 year = {1961},
13814 type = {Unknown},
13815 }
13816
13817 @misc{3.98-4,
13818 author = {Goldberg, M. E. and Wurtz},
13819 year = {1972},
13820 type = {Unknown},
13821 }
13822
13823 @misc{3.99-1,
13824 author = {Edeline and Weinberger},
13825 year = {1991},
13826 type = {Unknown},
13827 }
13828
13829 @misc{3.99-2,
13830 author = {Edeline and Weinberger},
13831 year = {1993},
13832 type = {Unknown},
13833 }
13834
13835 @misc{3.99-3,
13836 author = {Gogel},
13837 year = {1984},
13838 type = {Unknown},
13839 }
13840
13841 @misc{3.99-4,
13842 author = {Gogel},
13843 year = {1990},
13844 type = {Unknown},
13845 }
13846
13847 @misc{3.99-5,
13848 author = {Gogel},
13849 year = {\BIP},
13850 type = {Unknown},
13851 }
13852
13853 @misc{3.99-6,
13854 author = {Johnson},
13855 year = {1991},
13856 title = {Aaa},
13857 }
13858
13859 @misc{3.99-7,
13860 author = {Johnson},
13861 year = {1991},
13862 title = {Bbb},
13863 }
13864
13865 @misc{3.99-8,
13866 author = {Johnson},
13867 year = {1991},
13868 title = {Ccc},
13869 }
13870
13871 @misc{3.99-9,
13872 author = {Singh},
13873 year = {1983},
13874 type = {Unknown},
13875 }
13876
13877 @misc{3.99-10,
13878 author = {Singh},
13879 year = {\BIP},
13880 title = {Aaa},
13881 }
13882
13883 @misc{3.99-11,
13884 author = {Singh},
13885 year = {\BIP},
13886 title = {Bbb},
13887 }
13888
13889 @misc{3.99-12,
13890 author = {Balda},
13891 year = {1980},
13892 type = {Unknown},
13893 }
13894
13895 @misc{3.99-13,
13896 author = {Kamil},
13897 year = {1988},
13898 type = {Unknown},
13899 }
13900
13901 @misc{3.99-14,
13902 author = {Pepperberg and Funk},
13903 year = {1990},
13904 type = {Unknown},
13905 }
13906
13907 @misc{3.99-15,
13908 author = {Minor},
13909 year = {2001},
13910 type = {Unknown},
13911 }
13912
13913 @misc{3.99-16,
13914 author = {Adams},
13915 year = {1999},
13916 type = {Unknown},
13917 }
13918
13919 @misc{3.99-17,
13920 author = {Storandt},
13921 year = {1997},
13922 type = {Unknown},
13923 }
13924
13925 @misc{3.100-1,
13926 author = {Author},
13927 year = {\bibnodate},
13928 type = {Unknown},
13929 note = {no example, but rule given in text},
13930 }
13931
13932 @misc{3.100-1b,
13933 author = {Author},
13934 year = {2003 version},
13935 type = {Unknown},
13936 note = {no example, but rule given in text},
13937 }
13938
13939 @book{3.100-2,
13940 author = {Aristotle},
13941 year = {1931},
13942 title = {Unknown},
13943 translator = {Someone},
13944 originalyear = {\bibnodate},
13945 }
13946
13947 @book{3.100-3,
13948 author = {James},
13949 year = {1983},
13950 title = {Unknown},
13951 originalyear = {1890},
13952 }
13953
13954 @misc{3.101-1,
13955 author = {Cheek and Buss},
13956 year = {1981},
13957 type = {Unknown},
13958 }
13959
13960 @misc{3.101-2,
13961 author = {Shimamura},
13962 year = {1989},
13963 type = {Unknown},
13964 }
13965
13966 @misc{3.101-3,
13967 author = {Myers},
13968 year = {2000},
13969 type = {Unknown},
13970 }
13971
13972 @misc{3.101-4,
13973 author = {Beutler},
13974 year = {2000},
13975 type = {Unknown},
13976 }
13977
13978 @misc{3.103-1,
13979 author = {Hashtroudi and Chrosniak and Schwartz},
13980 year = {1991},
13981 type = {Unknown},
13982 }
13983
13984 @misc{4.04-t1,
13985 author = {Brown, J. R.},
13986 year = {\bibnodate},
13987 type = {Unknown},
13988 }
13989
13990 @misc{4.04-t2,
13991 author = {Browning, A. R.},
13992 year = {\bibnodate},
13993 type = {Unknown},
13994 }
13995
13996 @misc{4.04-t3,
13997 author = {MacArthur},
13998 year = {\bibnodate},
13999 type = {Unknown},
14000 }
14001
14002 @misc{4.04-t4,
14003 author = {McAllister},
14004 year = {\bibnodate},
14005 type = {Unknown},
14006 }
14007
14008 @misc{4.04-t5,
14009 author = {MacNeil},
14010 year = {\bibnodate},
14011 type = {Unknown},
14012 }
14013
14014 @misc{4.04-t6,
14015 author = {M'Carthy},
14016 year = {\bibnodate},
14017 type = {Unknown},
14018 }
14019
14020 @misc{4.04-t7,
14021 author = {DeBase},
14022 year = {\bibnodate},
14023 type = {Unknown},
14024 }
14025
14026 @misc{4.04-t8,
14027 author = {De Vries, J.},
14028 year = {\bibnodate},
14029 type = {Unknown},
14030 }
14031
14032 @misc{4.04-t9,
14033 author = {von Helmholtz, H. L. F.},
14034 year = {\bibnodate},
14035 type = {Unknown},
14036 }
14037
14038 @article{4.04-t10,
14039 year = {2003},
14040 title = {{\APACSortNoop{Two-Thousand and Three}}2003 Hottest Summer Ever},
14041 journal = {Journal of Meteorology},
14042 note = {This is a fake entry, used for didactical purposes.},
14043 }
14044
14045 @misc{4.04-1,
14046 author = {Hewlett, L. S.},
14047 year = {1996},
14048 type = {Unknown},
14049 }
14050
14051 @misc{4.04-2,
14052 author = {Hewlett, L. S.},
14053 year = {1999},
14054 type = {Unknown},
14055 }
14056
14057 @misc{4.04-3,
14058 author = {Alleyne, R. L.},
14059 year = {2001},
14060 type = {Unknown},
14061 }
14062
14063 @misc{4.04-4,
14064 author = {Alleyne, R. L. and Evans, A. J.},
14065 year = {1999},
14066 type = {Unknown},
14067 }
14068
14069 @misc{4.04-5,
14070 author = {Gosling, J. R. and Jerald, K. and Belfar, S. F.},
14071 year = {2000},
14072 type = {Unknown},
14073 }
14074
14075 @misc{4.04-6,
14076 author = {Gosling, J. R. and Tevlin, D. F.},
14077 year = {1996},
14078 type = {Unknown},
14079 }
14080
14081 @misc{4.04-7,
14082 author = {Hayward, D. and Firsching, A. and Brown, J.},
14083 year = {1999},
14084 type = {Unknown},
14085 }
14086
14087 @misc{4.04-8,
14088 author = {Hayward, D. and Firsching, A. and Smigel, J.},
14089 year = {1999},
14090 type = {Unknown},
14091 }
14092
14093 @misc{4.04-9,
14094 author = {Cabading, J. R. and Wright, K.},
14095 year = {2000},
14096 type = {Unknown},
14097 }
14098
14099 @misc{4.04-10,
14100 author = {Cabading, J. R. and Wright, K.},
14101 year = {2001},
14102 type = {Unknown},
14103 }
14104
14105 @article{4.04-11,
14106 author = {Baheti, J. R.},
14107 year = {2001},
14108 title = {Control {\ldots}},
14109 }
14110
14111 @article{4.04-12,
14112 author = {Baheti, J. R.},
14113 year = {2001},
14114 title = {Roles of {\ldots}},
14115 }
14116
14117 @misc{4.04-13,
14118 author = {Mathur, A. L. and Wallston, J.},
14119 year = {1999},
14120 type = {Unknown},
14121 }
14122
14123 @misc{4.04-14,
14124 author = {Mathur, S. E. and Ahlers, R. J.},
14125 year = {1998},
14126 type = {Unknown},
14127 }
14128
14129 @book{4.05-1,
14130 author = {Bandura, A. J.},
14131 year = {1977},
14132 title = {Social Learning Theory},
14133 address = {Englewood Cliffs, NJ},
14134 publisher = {Prentice Hall},
14135 }
14136
14137 @article{4.05-2,
14138 author = {Bretschneider, J. G. and McCoy, N. L.},
14139 year = {1968},
14140 title = {Sexual Interest and Behavior in Healthy
14141 80- to 102-Year-Olds},
14142 journal = {Archives of Sexual Behavior},
14143 volume = {14},
14144 pages = {343--350},
14145 }
14146
14147 @article{4.08-1,
14148 author = {Kernis, M. H. and Cornell, D. P. and Sun, C.-R.
14149 and Berry, A. and Harlow, T.},
14150 year = {1993},
14151 title = {There's More to Self-Esteem than Whether it is High
14152 or Low: The Importance of Stability of Self-Esteem},
14153 journal = {Journal of Personality and Social Psychology},
14154 volume = {65},
14155 pages = {1190--1204},
14156 }
14157
14158 @book{4.08-2,
14159 editor = {Robinson, D. N.},
14160 year = {1992},
14161 title = {Social Discourse and Moral Judgment},
14162 address = {San Diego, CA},
14163 publisher = {Academic Press},
14164 }
14165
14166 @misc{4.08-3,
14167 author = {Bulatao, E. {\protect\bibliteral{(with
14168 Winford, C.~A.)}\protect\indexskipbracenodot}},
14169 year = {\bibnodate},
14170 type = {Unknown},
14171 }
14172
14173 @article{4.09-1,
14174 author = {Fowers, B. J. and Olson, D. H.},
14175 year = {1993},
14176 title = {{ENRICH} {Marital} {Satisfaction} {Scale}:
14177 A Brief Research and Clinical Tool},
14178 journal = {Journal of Family Psychology},
14179 volume = {7},
14180 pages = {176--185},
14181 }
14182
14183 @article{4.10-1,
14184 author = {Deutsch, F. M. and Lussier, J. B. and Servis, L. J.},
14185 year = {1993},
14186 title = {Husbands At Home: Predictors of Paternal Participation
14187 in Childcare and Housework},
14188 journal = {Journal of Personality and Social Psychology},
14189 volume = {65},
14190 pages = {1154--1166},
14191 }
14192
14193 @incollection{4.10-2,
14194 author = {O'Neil, J. M. and Egan, J.},
14195 year = {1992},
14196 title = {Men's and Women's Gender Role Journeys:
14197 Metaphor for Healing, Transition, and Transformation},
14198 editor = {Wainrib, B. R.},
14199 booktitle = {Gender Issues Across the Life Cycle},
14200 pages = {107--123},
14201 address = {New York},
14202 publisher = {Springer},
14203 }
14204
14205 @article{4.11-1,
14206 author = {Buss, D. M. and Schmitt, D. P.},
14207 year = {1993},
14208 title = {Sexual Strategies Theory: An Evolutionary Perspective
14209 on Human Mating},
14210 journal = {Psychological Review},
14211 volume = {100},
14212 pages = {204--232},
14213 }
14214
14215 @magazine{4.11-2,
14216 author = {Henry, III, W. A.},
14217 year = {1990},
14218 month = apr,
14219 day = {9},
14220 title = {Beyond the Melting Pot},
14221 journal = {Time},
14222 volume = {135},
14223 pages = {28--31},
14224 }
14225
14226 @book{4.12-1,
14227 author = {Saxe, G. B.},
14228 year = {1991},
14229 title = {Cultural and Cognitive Development: Studies in
14230 Mathematical Understanding},
14231 address = {Hillsdale, NJ},
14232 publisher = {Erlbaum},
14233 }
14234
14235 @incollection{4.13-1,
14236 author = {Baker, F. M. and Lightfoot, O. B.},
14237 year = {1993},
14238 title = {Psychiatric Care of Ethnic Elders},
14239 editor = {Gaw, A. C.},
14240 booktitle = {Culture, Ethnicity, and Mental Illness},
14241 pages = {517--552},
14242 address = {Washington, DC},
14243 publisher = {American Psychiatric Press},
14244 }
14245
14246 @incollection{4.13-2,
14247 author = {Merikle, Philip M.},
14248 year = {2000},
14249 title = {Subliminal Perception},
14250 editor = {Kazdin, Alan E. and Blanchard, Edward B. and
14251 Bootzin, Richard R. and Bower, Gordon and
14252 Close Conoley, Jane and Deaux, Kay and Fox, Ronald E. and
14253 Harmon, Lenore W. and Howell, William C. and
14254 Marsella, Anthony J. and Price, Richard H. and
14255 Roediger, III, Henry L. and Rosenthal, Robert and
14256 Schmitt, Neal W. and Singer, Jerome L. and Squire, Larry R. and
14257 Zahn-Waxler, Carolyn},
14258 booktitle = {Encyclopedia of Psychology},
14259 volume = {7},
14260 pages = {497--499},
14261 address = {New York},
14262 publisher = {Oxford University Press},
14263 }
14264
14265 @misc{4.15-1,
14266 key = {{\APACcitebtitle{Electronic Reference Formats}}},
14267 title = {Electronic Reference Formats Recommended by the
14268 {American} {Psychological} {Association}},
14269 year = {2000},
14270 month = oct,
14271 day = {12},
14272 lastchecked = {October 23, 2000},
14273 URL = {http://www.apa.org/journals/webref.html},
14274 }
14275
14276 @article{4.15-2,
14277 author = {Eid, M. and Langeheine, R.},
14278 year = {1999},
14279 title = {The Measurement of Consistency and Occasion Specificity
14280 with Latent Class Models: A New Model and its
14281 Application to the Measurement of Affect},
14282 journal = {Psychological Methods},
14283 volume = {4},
14284 pages = {100--116},
14285 howpublished = {Retrieved November 19, 2000, from the PsycARTICLES database},
14286 }
14287
14288 %
14289 % The rest is from section 4.16. Section number is omitted,
14290 % but A-I are used instead. For the numbered examples, these
14291 % letters are also omitted in favor of ``ex''.
14292 %
14293
14294 @article{A-1,
14295 author = {Herman, L. M. and Kuczaj, III, S. A. and Holder, M. D.},
14296 year = {1993},
14297 title = {Responses to Anomalous Gestural Sequences by a
14298 Language-Trained Dolphin: {E}vidence for Processing
14299 of Semantic Relations and Syntactic Information},
14300 journal = {Journal of Experimental Psychology: General},
14301 volume = {122},
14302 pages = {184--194},
14303 }
14304
14305 @article{ex1,
14306 author = {Mellers, B. A.},
14307 year = {2000},
14308 title = {Choice and the Relative Pleasure of Consequences},
14309 journal = {Psychological Bulletin},
14310 volume = {126},
14311 pages = {910--924},
14312 }
14313
14314 @article{ex2,
14315 author = {Klimoski, R. and Palmer, S.},
14316 year = {1993},
14317 title = {The {ADA} and the Hiring Process in Organizations},
14318 journal = {Consulting Psychology Journal: Practice and Research},
14319 volume = {45},
14320 number = {2},
14321 pages = {10--36},
14322 }
14323
14324 @article{ex3,
14325 author = {Saywitz, K. J. and Mannarino, A. P. and Berliner, L.
14326 and Cohen, J. A.},
14327 year = {2000},
14328 title = {Treatment for Sexually Abused Children and Adolescents},
14329 journal = {American Psychologist},
14330 volume = {55},
14331 pages = {1040--1049},
14332 }
14333
14334 @article{ex4,
14335 author = {Wolchik, S. A. and West, S. G. and Sandler, I. N. and
14336 Tein, J. and Coatsworth, D. and Lengua, L. and others},
14337 year = {2000},
14338 title = {An Experimental Evaluation of Theory-Based Mother and
14339 Mother-Child Programs for Children of Divorce},
14340 journal = {Journal of Consulting and Clinical Psychology},
14341 volume = {68},
14342 pages = {843--856},
14343 }
14344
14345 @article{ex4-2,
14346 author = {Swait, Joffre and Adamowicz, Wiktor and Hanemann, Michael
14347 and Diederich, Adele and Krosnick, Jon and Layton, David
14348 and Provencher, William and Schkade, David and Tourangeau, Roger},
14349 year = {2002},
14350 title = {Context Dependence and Aggregation
14351 in Disaggregate Choice Analysis},
14352 journal = {Marketing Letters},
14353 volume = {13},
14354 pages = {195--205},
14355 }
14356
14357 @article{ex5,
14358 author = {Zuckerman, M. and Kieffer, S. C.},
14359 year = {\BIP},
14360 title = {Race Differences in Face-ism: {D}oes Facial Prominence
14361 Imply Dominance?},
14362 journal = {Journal of Personality and Social Psychology},
14363 }
14364
14365 @magazine{ex6,
14366 author = {Kandel, E. R. and Squire, L. R.},
14367 year = {2000},
14368 month = nov,
14369 day = {10},
14370 title = {Neuroscience: {B}reaking Down Scientific Barriers to the
14371 Study of Brain and Mind},
14372 journal = {Science},
14373 volume = {290},
14374 pages = {1113--1120},
14375 }
14376
14377 @article{ex7,
14378 author = {Brown, L. S.},
14379 year = {1993},
14380 month = spring,
14381 title = {Antidomination Training as a Central Component of
14382 Diversity in Clinical Psychology Education},
14383 journal = {The Clinical Psychologist},
14384 volume = {46},
14385 pages = {83--87},
14386 }
14387
14388 @article{ex8,
14389 year = {1993},
14390 month = aug # "/" # sep,
14391 title = {The New Health-Care Lexicon},
14392 journal = {Copy Editor},
14393 volume = {4},
14394 pages = {1--2},
14395 }
14396
14397 @newspaper{ex9,
14398 key = {{\APACciteatitle{New Drug}}},
14399 year = {1993},
14400 month = jul,
14401 day = {15},
14402 title = {New Drug Appears to Sharply Cut Risk of Death from
14403 Heart Failure},
14404 journal = {The Washington Post},
14405 pages = {A12},
14406 }
14407
14408 @newspaper{ex10,
14409 author = {Schwartz, J.},
14410 year = {1993},
14411 month = sep,
14412 day = {30},
14413 title = {Obesity Affects Economic, Social Status},
14414 journal = {The Washington Post},
14415 pages = {A1, A4},
14416 }
14417
14418 @newspaper{ex11,
14419 author = {Berkowitz, A. D.},
14420 year = {2000},
14421 month = nov,
14422 day = {24},
14423 title = {How to Tackle the Problem of Student Drinking},
14424 type = {Letter to the editor},
14425 journal = {The Chronicle of Higher Education},
14426 pages = {B20},
14427 }
14428
14429 @article{ex12,
14430 editor = {Barlow, D. H.},
14431 year = {1991},
14432 title = {Diagnoses, Dimensions, and \emph{DSM-IV}:
14433 The Science of Classification},
14434 type = {Special issue},
14435 journal = {Journal of Abnormal Psychology},
14436 volume = {100},
14437 number = {3},
14438 }
14439
14440 @article{ex13,
14441 author = {Harris, P. L. and Kavanaugh, R. D.},
14442 year = {1993},
14443 title = {Young Children's Understanding of Pretense},
14444 journal = {Monographs of the Society for Research in Child Development},
14445 volume = {58},
14446 number = {1, Serial No.~231},
14447 }
14448
14449 @article{ex14,
14450 author = {Battig, W. F. and Montague, W. E.},
14451 year = {1969},
14452 title = {Category Norms for Verbal Items in 56 Categories:
14453 A Replication and Extension of the {Connecticut}
14454 Category Norms},
14455 journal = {Journal of Experimental Psychology Monographs},
14456 volume = {80},
14457 number = {3, Pt.~2},
14458 }
14459
14460 @article{ex15,
14461 author = {Ganster, D. C. and Schaubroeck, J. and Sime, W. E.
14462 and Mayes, B. T.},
14463 year = {1991},
14464 title = {The Nomological Validity of the {Type}~{A} Personality
14465 Among Employed Adults},
14466 type = {Monograph},
14467 journal = {Journal of Applied Psychology},
14468 volume = {76},
14469 pages = {143--168},
14470 }
14471
14472 @article{ex16,
14473 author = {Woolf, N. J. and Young, S. L. and Fanselow, M. S. and
14474 Butcher, L. L.},
14475 year = {1991},
14476 title = {{MAP}-2 Expression in Cholinoceptive Pyramidal Cells
14477 of Rodent Cortex and Hippocampus is Altered by
14478 {Pavlovian} Conditioning},
14479 type = {Abstract},
14480 journal = {Society for Neuroscience Abstracts},
14481 volume = {17},
14482 pages = {480},
14483 }
14484
14485 @article{ex17,
14486 author = {Nakazato, K. and Shimonaka, Y. and Homma, A.},
14487 year = {{\protect\bibreftext{1992}{1992/1993}}},
14488 title = {Cognitive Functions of Centenarians: The {Tokyo}
14489 {Metropolitan} {Centenarian} {Study}},
14490 journal = {Japanese Journal of Developmental Psychology},
14491 volume = {3},
14492 pages = {9--16},
14493 howpublished = {Abstract obtained from
14494 {\APACcitebtitle{PsycSCAN: Neuropsychology}},
14495 1993, \emph{2}, Abstract No.~604},
14496 }
14497
14498 @article{ex18,
14499 author = {Regier, A. A. and Narrow, W. E. and Rae, D. S.},
14500 year = {1990},
14501 title = {The Epidemiology of Anxiety Disorders: The Epidemiologic
14502 Catchment Area ({ECA}) Experience},
14503 journal = {Journal of Psychiatric Research},
14504 volume = {24},
14505 number = {Suppl.~2},
14506 pages = {3--14},
14507 }
14508
14509 @article{ex19,
14510 author = {Fiske, S. T.},
14511 year = {1993},
14512 title = {Social Cognition and Social Perception},
14513 journal = {Annual Review of Psychology},
14514 volume = {44},
14515 pages = {155--194},
14516 }
14517
14518 @article{ex20,
14519 author = {Ising, M.},
14520 year = {2000},
14521 title = {Intensit{\"{a}}tsabh{\"{a}}ngigkeit evozierter {Potenzial} im
14522 {EEG}: Sind impulsive {Personen} {Augmenter} oder
14523 {Reducer}?},
14524 englishtitle = {Intensity Dependence in Event-Related {EEG} Potentials:
14525 Are Impulsive Individuals Augmenters or Reducers?},
14526 journal = {Zeitschrift f{\"{u}}r Differentielle und Diagnostische
14527 Psychologie},
14528 volume = {21},
14529 pages = {208--217},
14530 }
14531
14532 @article{ex21,
14533 author = {Stutte, H.},
14534 year = {1972},
14535 title = {Transcultural Child Psychiatry},
14536 journal = {Acta Paedopsychiatrica},
14537 volume = {38},
14538 number = {9},
14539 pages = {229--231},
14540 }
14541
14542 @article{ex22,
14543 author = {Coltheart, M. and Curtis, B. and Atkins, P. and Haller, M.},
14544 year = {1993},
14545 title = {Models of Reading Aloud: Dual-Route and
14546 Parallel-Distributed-Processing Approaches},
14547 journal = {Psychological Review},
14548 volume = {100},
14549 pages = {589--608},
14550 }
14551
14552 @book{B-1,
14553 author = {Beck, C. A. J. and Sales, B. D.},
14554 year = {2001},
14555 title = {Family Mediation: Facts, Myths, and Future Prospects},
14556 address = {Washington, DC},
14557 publisher = {American Psychological Association},
14558 }
14559
14560 @book{ex23,
14561 author = {Mitchell, T. R. and Larson, Jr.\hbox{}, J. R.},
14562 year = {1987},
14563 title = {People in Organizations: An Introduction to
14564 Organizational Behavior},
14565 edition = {3},
14566 address = {New York},
14567 publisher = {McGraw-Hill},
14568 }
14569
14570 @book{ex24,
14571 author = {{\bibcorporate{Australian Bureau of Statistics}}},
14572 year = {1991},
14573 title = {Estimated Resident Population by Age and Sex in
14574 Statistical Local Areas, {New} {South} {Wales},
14575 {June} 1990},
14576 number = {3209.1},
14577 address = {Canberra, Australian Capital Territory},
14578 publisher = {{\bibcorporate{Australian Bureau of Statistics}}},
14579 }
14580
14581 @book{ex25,
14582 editor = {Gibbs, J. T. and Huang, L. N.},
14583 year = {1991},
14584 title = {Children of Color: Psychological Interventions with
14585 Minority Youth},
14586 address = {San Francisco},
14587 publisher = {Jossey-Bass},
14588 }
14589
14590 @book{ex25-t1,
14591 author = {Vygotsky, L. S.},
14592 year = {1978},
14593 title = {Mind in Society: {T}he Development of Higher Mental
14594 Processes},
14595 editor = {Rice, Edgar},
14596 translator = {Rice, Edgar},
14597 address = {Cambridge, MA},
14598 publisher = {Harvard University Press},
14599 originalyear = {1930, 1933, 1935},
14600 }
14601
14602 @book{ex25-t2,
14603 author = {J{\"{o}}reskog, Karl G. and S{\"{o}}rbom, Dag},
14604 year = {1979},
14605 title = {Advances in Factor Analysis
14606 and Structural Equation Models},
14607 editor = {Magidson, Jay},
14608 address = {Cambridge, MA},
14609 publisher = {Abt Books},
14610 }
14611
14612 @book{ex26,
14613 year = {1993},
14614 title = {Merriam-{Webster}'s Collegiate Dictionary},
14615 edition = {10},
14616 address = {Springfield, MA},
14617 publisher = {Merriam-Webster},
14618 }
14619
14620 @book{ex27,
14621 author = {Rosenthal, R.},
14622 year = {1987},
14623 title = {Meta-Analytic Procedures for Social Research},
14624 edition = {Rev.\hbox{}},
14625 address = {Newbury Park, CA},
14626 publisher = {Sage},
14627 }
14628
14629 @book{ex28,
14630 editor = {Koch, S.},
14631 year = {1959--1963},
14632 title = {Psychology: {A} Study of Science},
14633 volume = {1--6},
14634 address = {New York},
14635 publisher = {McGraw-Hill},
14636 }
14637
14638 @book{ex29,
14639 key = {{\bibDSM{American Psychiatric
14640 Association}{Diagnostic and Statistical Manual
14641 of Mental Disorders}{4th ed.\hbox{}}{DSM-IV}}},
14642 author = {{\bibcorporate{American Psychiatric Association}}},
14643 year = {1994},
14644 title = {Diagnostic and Statistical Manual of Mental Disorders},
14645 edition = {4},
14646 address = {Washington, DC},
14647 publisher = {{\bibcorporate{American Psychiatric Association}}},
14648 }
14649
14650 @book{ex30,
14651 editor = {Sadie, S.},
14652 year = {1980},
14653 title = {The New {G}rove Dictionary of Music and Musicians},
14654 edition = {6},
14655 volume = {1--20},
14656 address = {London},
14657 publisher = {Macmillan},
14658 }
14659
14660 @book{ex30-2,
14661 editor = {Kazdin, Alan E. and Blanchard, Edward B. and
14662 Bootzin, Richard R. and Bower, Gordon and
14663 Close Conoley, Jane and Deaux, Kay and Fox, Ronald E. and
14664 Harmon, Lenore W. and Howell, William C. and
14665 Marsella, Anthony J. and Price, Richard H. and
14666 Roediger, III, Henry L. and Rosenthal, Robert and
14667 Schmitt, Neal W. and Singer, Jerome L. and Squire, Larry R. and
14668 Zahn-Waxler, Carolyn},
14669 year = {2000},
14670 title = {Encyclopedia of Psychology},
14671 address = {New York},
14672 publisher = {Oxford University Press},
14673 }
14674
14675 @book{ex31,
14676 author = {Piaget, J. and Inhelder, B.},
14677 year = {1951},
14678 title = {La Gen{\`{e}}se de l'Id{\'{e}}e de Hasard chez l'Enfant},
14679 englishtitle = {The Origin of the Idea of Chance in the Child},
14680 address = {Paris},
14681 publisher = {Presses Universitaires de France},
14682 }
14683
14684 @book{ex32,
14685 author = {Laplace, P.-S.},
14686 year = {1951},
14687 title = {A Philosophical Essay on Probabilities},
14688 translator = {Truscott, F. W. and Emory, F. L.},
14689 address = {New York},
14690 publisher = {Dover},
14691 originalyear = {1814},
14692 }
14693
14694 @book{ex33,
14695 author = {{\bibcorporate{Research and Training Center on
14696 Independent Living}}},
14697 firstkey = {{Research and Training Center on Independent Living [RTCIL]}},
14698 key = {RTCIL},
14699 year = {1993},
14700 title = {Guidelines for Reporting and Writing About People
14701 with Disabilities},
14702 edition = {4},
14703 type = {Brochure},
14704 address = {Lawrence, KS},
14705 publisher = {{\bibcorporate{Research and Training Center on
14706 Independent Living}}},
14707 }
14708
14709 @incollection{B-2,
14710 author = {Massaro, D.},
14711 year = {1992},
14712 title = {Broadening the Domain of the Fuzzy Logical Model of Perception},
14713 editor = {Pick, Jr.\hbox{}, H. L. and van den Broek, P. and Knill, D. C.},
14714 booktitle = {Cognition: Conceptual and Methodological Issues},
14715 pages = {51--84},
14716 address = {Washington, DC},
14717 publisher = {American Psychological Association},
14718 }
14719
14720 @incollection{ex34,
14721 author = {Bjork, R. A.},
14722 year = {1989},
14723 title = {Retrieval Inhibition as an Adaptive Mechanism in Human Memory},
14724 editor = {Roediger, III, H. L. and Craik, F. I. M.},
14725 booktitle = {Varieties of Memory \& Consciousness},
14726 pages = {309--330},
14727 address = {Hillsdale, NJ},
14728 publisher = {Erlbaum},
14729 }
14730
14731 @incollection{ex35,
14732 author = {Auerbach, J. S.},
14733 year = {\BIP},
14734 title = {The Origins of Narcissism and Narcissistic Personality
14735 Disorder: A Theoretical and Empirical Reformulation},
14736 editor = {Masling, J. M. and Bornstein, R. F.},
14737 booktitle = {Empirical Studies of Psychoanalytic Theories:
14738 {Vol}.~4. {Psychoanalytic} Perspectives on Psychopathology},
14739 address = {Washington, DC},
14740 publisher = {American Psychological Association},
14741 }
14742
14743 @incollection{ex36,
14744 author = {Maccoby, E. E. and Martin, J.},
14745 year = {1983},
14746 title = {Socialization in the Context of the Family:
14747 Parent-Child Interaction},
14748 editor = {Mussen (Series Ed.\hbox{}), P. H. and
14749 Hetherington{\bibeditortype{Vol.\ Ed.\hbox{}}}, E. M.},
14750 booktitle = {Handbook of Child Psychology:
14751 {Vol}.~4. {Socialization}, Personality, and Social Development},
14752 edition = {4},
14753 pages = {1--101},
14754 address = {New York},
14755 publisher = {Wiley},
14756 }
14757
14758 @incollection{ex37,
14759 author = {Davydov, V. V.},
14760 year = {1972},
14761 title = {De Introductie van het Begrip Grootheid in de Eerste
14762 Klas van de Basisschool: Een Experimenteel Onderzoek},
14763 englishtitle = {The Introduction of the Concept of Quantity in the
14764 First Grade of the Primary School: An Experimental Study},
14765 editor = {Van Parreren, C. F. and Carpay, J. A. M.},
14766 booktitle = {Sovjetpsychologen aan het Woord},
14767 pages = {227--289},
14768 address = {Groningen, The Netherlands},
14769 publisher = {Wolters-Noordhoff},
14770 }
14771
14772 @incollection{ex38,
14773 author = {Bergmann, P. G.},
14774 year = {1993},
14775 title = {Relativity},
14776 booktitle = {The New Encyclopaedia {Britannica}},
14777 volume = {26},
14778 pages = {501--508},
14779 address = {Chicago},
14780 publisher = {Encyclopaedia Britannica},
14781 }
14782
14783 @incollection{ex39,
14784 author = {Freud, Sigmund},
14785 year = {1961},
14786 title = {The Ego and the Id},
14787 editor = {Strachey, J.},
14788 translator = {Strachey, J.},
14789 booktitle = {The Standard Edition of the Complete Psychological
14790 Works of {Sigmund} {Freud}},
14791 volume = {19},
14792 pages = {3--66},
14793 address = {London},
14794 publisher = {Hogarth Press},
14795 originalyear = {1923},
14796 }
14797
14798 @incollection{ex40,
14799 author = {Piaget, J.},
14800 year = {1988},
14801 title = {Extracts from {Piaget}'s Theory},
14802 translator = {Gellerier, G. and Langer, J.},
14803 editor = {Richardson, K. and Sheldon, S.},
14804 booktitle = {Cognitive Development to Adolescence: A Reader},
14805 pages = {3--18},
14806 address = {Hillsdale, NJ},
14807 publisher = {Erlbaum},
14808 originalbooktitle = {Manual of Child Psychology},
14809 originalpages = {703--732},
14810 originaleditor = {Mussen, P. H.},
14811 originalyear = {1970},
14812 originaladdress = {New York},
14813 originalpublisher = {Wiley},
14814 }
14815
14816 @incollection{ex40-t1,
14817 author = {Browne, M[ichael] W.},
14818 year = {1977},
14819 title = {Generalized Least Squares Estimators in the Analysis
14820 of Covariance Structures},
14821 editor = {Aigner, D[ennis] J. and Goldberger, A[rthur] S.},
14822 booktitle = {Latent Variables in Socio-Economic Models},
14823 pages = {205--226},
14824 address = {Amsterdam},
14825 publisher = {North Holland},
14826 originalyear = {1974},
14827 originaljournal = {South African Statistical Journal},
14828 originalvolume = {8},
14829 originalpages = {1--24},
14830 }
14831
14832
14833 @techreport{C-1,
14834 author = {Mazzeo, J. and Druesne, B. and Raffeld, P. C.
14835 and Checketts, K. T. and Muhlstein, A.},
14836 year = {1991},
14837 title = {Comparability of Computer and Paper-and-Pencil Scores
14838 for Two {CLEP} General Examinations},
14839 type = {College Board Rep.},
14840 number = {91-5},
14841 address = {Princeton, NJ},
14842 institution = {Educational Testing Service},
14843 }
14844
14845 @techreport{ex41,
14846 author = {{\bibcorporate{National Institute of Mental Health}}},
14847 firstkey = {{National Institute of Mental Health [NIMH]}},
14848 key = {{NIMH}},
14849 year = {1990},
14850 title = {Clinical Training in Serious Mental Illness},
14851 type = {{DHHS} Publication},
14852 number = {ADM 90-1679},
14853 address = {Washington, DC},
14854 institution = {U.S. Government Printing Office},
14855 }
14856
14857 @techreport{ex42,
14858 author = {Osgood, D. W. and Wilson, J. K.},
14859 year = {1990},
14860 title = {Covariation of Adolescent Health Problems},
14861 type = {\bibnotype},
14862 address = {Lincoln},
14863 institution = {University of Nebraska},
14864 note = {NTIS No.\hbox{} PB~91-154~377/AS},
14865 }
14866
14867 @techreport{ex43,
14868 author = {Mead, J. V.},
14869 year = {1992},
14870 title = {Looking at Old Photographs: Investigating the Teacher
14871 Tales that Novice Teachers Bring with Them},
14872 type = {Report},
14873 number = {NCRTL-RR-92-4},
14874 address = {East Lansing, MI},
14875 institution = {National Center for Research on Teacher Learning},
14876 note = {ERIC Document Reproduction Service No.\hbox{} ED346082},
14877 }
14878
14879 @techreport{ex44,
14880 author = {{\bibcorporate{U.S. Department of Health and
14881 Human Services}}},
14882 firstkey = {{U.S. Department of Health and Human Services [DHHS]}},
14883 key = {{DHHS}},
14884 year = {1992},
14885 title = {Pressure Ulcers in Adults: Prediction and Prevention},
14886 type = {AHCPR Publication},
14887 number = {92-0047},
14888 address = {Rockville, MD},
14889 institution = {{\bibcorporate{U.S. Department of Health and
14890 Human Services}}},
14891 }
14892
14893 @intechreport{ex45,
14894 author = {Matthews, K. A.},
14895 year = {1985},
14896 title = {Assessment of {Type}~{A} Behavior, Anger, and Hostility
14897 in Epidemiologic Studies of Cardiovascular Disease},
14898 editor = {Ostfield, A. M. and Eaker, E. D.},
14899 booktitle = {Measuring Psychological Variables in Epidemiologic Studies
14900 of Cardiovascular Disease},
14901 type = {NIH Publication},
14902 number = {85-2270},
14903 pages = {153--183},
14904 address = {Washington, DC},
14905 institution = {U.S. Department of Health and Human Services},
14906 }
14907
14908 @techreport{ex46,
14909 author = {Broadhurst, R. G. and Maller, R. A.},
14910 year = {1991},
14911 title = {Sex Offending and Recidivism},
14912 number = {3},
14913 address = {Nedlands},
14914 institution = {University of Western Australia, Crime Research Centre},
14915 }
14916
14917 @techreport{ex47,
14918 editor = {Shuker, R. and Openshaw, R. and Soler, J.},
14919 year = {1990},
14920 title = {Youth, Media, and Moral Panic in {New} {Zealand}:
14921 From Hooligans to Video Nasties},
14922 type = {Delta Research Monograph},
14923 number = {11},
14924 address = {Palmerston North, New Zealand},
14925 institution = {Massey University, Department of Education},
14926 }
14927
14928 @techreport{ex48,
14929 author = {{\bibcorporate{Employee Benefit Research Institute}}},
14930 firstkey = {{Employee Benefit Research Institute [EBRI]}},
14931 key = {{EBRI}},
14932 year = {1992},
14933 month = feb,
14934 title = {Sources of Health Insurance and Characteristics of the
14935 Uninsured},
14936 type = {Issue Brief},
14937 number = {123},
14938 address = {Washington, DC},
14939 institution = {{\bibcorporate{Employee Benefit Research Institute}}},
14940 }
14941
14942 @incollection{ex49,
14943 author = {Deci, E. L. and Ryan, R. M.},
14944 year = {1991},
14945 title = {A Motivational Approach to Self:
14946 Integration in Personality},
14947 editor = {Dienstbier, R.},
14948 booktitle = {Nebraska {Symposium} on {Motivation}: Vol.~38.
14949 {Perspectives} on Motivation},
14950 pages = {237--288},
14951 address = {Lincoln},
14952 publisher = {University of Nebraska Press},
14953 }
14954
14955 @article{ex50,
14956 author = {Cynx, J. and Williams, H. and Nottebohm, F.},
14957 year = {1992},
14958 title = {Hemispheric Differences in Avian Song Discrimination},
14959 journal = {Proceedings of the National Academy of Sciences, USA},
14960 volume = {89},
14961 pages = {1372--1375},
14962 }
14963
14964 @lecture{ex51,
14965 author = {Lichstein, K. L. and Johnson, R. S. and Womack, T. D.
14966 and Dean, J. E. and Childers, C. K.},
14967 year = {1990},
14968 month = jun,
14969 title = {Relaxation Therapy for Polypharmacy Use in Elderly
14970 Insomniacs and Noninsomniacs},
14971 chair = {Rosenthal, T. L.},
14972 symposium = {Reducing Medication in Geriatric Populations},
14973 howpublished = {Symposium conducted at the meeting of the First
14974 International Congress of Behavioral Medicine},
14975 address = {Uppsala, Sweden},
14976 }
14977
14978 @lecture{ex52,
14979 author = {Lanktree, C. and Briere, J.},
14980 year = {1991},
14981 month = jan,
14982 title = {Early Data on the {Trauma} {Symptom} {Checklist}
14983 for {Children} ({TSC-C})},
14984 howpublished = {Paper presented at the meeting of the American
14985 Professional Society on the Abuse of Children},
14986 address = {San Diego, CA},
14987 }
14988
14989 @lecture{ex53,
14990 author = {Ruby, J. and Fulton, C.},
14991 year = {1993},
14992 month = jun,
14993 title = {Beyond Redlining: Editing Software that Works},
14994 howpublished = {Poster session presented at the annual meeting of the
14995 Society for Scholarly Publishing},
14996 address = {Washington, DC},
14997 }
14998
14999 @phdthesis{ex54,
15000 author = {Bower, D. L.},
15001 year = {1993},
15002 title = {Employee Assistant Programs Supervisory Referrals:
15003 Characteristics of Referring and Nonreferring
15004 Supervisors},
15005 journal = {Dissertation Abstracts International},
15006 volume = {54},
15007 number = {01},
15008 pages = {534B},
15009 note = {UMI No.~9315947},
15010 }
15011
15012 @phdthesis{ex55,
15013 author = {Ross, D. F.},
15014 year = {1990},
15015 title = {Unconscious Transference and Mistaken Identity: When
15016 a Witness Misidentifies a Familiar but Innocent Person
15017 from a Lineup},
15018 school = {Cornell University},
15019 originalyear = {1990},
15020 journal = {Dissertation Abstracts International},
15021 volume = {51},
15022 pages = {417},
15023 }
15024
15025 @phdthesis{ex56,
15026 author = {Wilfley, D. E.},
15027 year = {1989},
15028 title = {Interpersonal Analyses of Bulimia: Normalweight
15029 and Obese},
15030 school = {University of Missouri},
15031 address = {Columbia},
15032 }
15033
15034 @mastersthesis{ex57,
15035 author = {Almeida, D. M.},
15036 year = {1990},
15037 title = {Fathers' Participation in Family Work: Consequences
15038 for Fathers' Stress and Father--Child Relations},
15039 school = {University of Victoria},
15040 address = {Victoria, British Columbia, Canada},
15041 }
15042
15043 @unpublished{ex58,
15044 author = {Stinson, C. and Milbrath, C. and Reidbord, S. and Bucci, W.},
15045 year = {1992},
15046 title = {Thematic Segmentation of Psychotherapy Transcripts for
15047 Convergent Analyses},
15048 howpublished = {Unpublished manuscript},
15049 }
15050
15051 @unpublished{ex59,
15052 author = {D{\'{e}}pret, E. F. and Fiske, S. T.},
15053 year = {1993},
15054 title = {Perceiving the Powerful: Intriguing Individuals Versus
15055 Threatening Groups},
15056 howpublished = {Unpublished manuscript},
15057 organization = {University of Massachusetts at Amherst},
15058 }
15059
15060 @unpublished{ex60,
15061 author = {McIntosh, D. N.},
15062 year = {1993},
15063 title = {Religion as Schema, with Implications for the Relation
15064 Between Religion and Coping},
15065 howpublished = {Manuscript submitted for publication},
15066 }
15067
15068 @unpublished{ex61,
15069 author = {Bordi, F. and LeDoux, J. E.},
15070 year = {1993},
15071 type = {Auditory response latencies in rat auditory cortex},
15072 howpublished = {Unpublished raw data},
15073 }
15074
15075 @misc{ex62,
15076 editor = {Klombers, N.},
15077 year = {1993},
15078 month = spring,
15079 title = {{ADAA} {Reporter}},
15080 note = {Available from the Anxiety Disorders Association of
15081 America, 6000 Executive Boulevard, Suite 513,
15082 Rockville, MD 20852},
15083 }
15084
15085 @article{G-1,
15086 author = {Mroczek, D. K.},
15087 year = {2000},
15088 title = {The Emerging Study of Midlife},
15089 type = {Review of the book {\APACcitebtitle{Life in the middle:
15090 Psychological and social development in middle age}}},
15091 journal = {Contemporary Psychology: APA Review of Books},
15092 volume = {45},
15093 pages = {482--485},
15094 }
15095
15096 @article{ex63,
15097 author = {Schatz, B. R.},
15098 year = {2000},
15099 title = {Learning by Text or Context?},
15100 type = {Review of the book
15101 {\APACcitebtitle{The social life of information}}},
15102 journal = {Science},
15103 volume = {290},
15104 pages = {1304},
15105 }
15106
15107 @article{ex64,
15108 author = {Kraus, S. J.},
15109 year = {1992},
15110 title = {Visions of Psychology: A Videotext of Classic Studies},
15111 type = {Review of the motion picture
15112 {\APACcitebtitle{Discovering Psychology}}},
15113 journal = {Contemporary Psychology},
15114 volume = {37},
15115 pages = {1146--1147},
15116 }
15117
15118 @misc{ex65-1,
15119 author = {Scorsese, M. {\protect\bibliteral{(Producer)}\protect\bibskipbracenodot}
15120 and Lonergan, K.
15121 {\protect\bibliteral{(Writer/Director)}\protect\indexskipbracenodot}},
15122 year = {2000},
15123 title = {You Can Count On Me},
15124 type = {Motion picture},
15125 address = {United States},
15126 publisher = {Paramount Pictures},
15127 }
15128
15129 @misc{ex65-2,
15130 author = {Harrison, J. {\protect\bibliteral{(Producer)}\protect\bibskipbracenodot}
15131 and Schmiechen, R.
15132 {\protect\bibliteral{(Director)}\protect\indexskipbracenodot}},
15133 year = {1992},
15134 title = {Changing Our Minds: The Story of {Evelyn} {Hooker}},
15135 type = {Motion picture},
15136 note = {Available from Changing Our Minds, Inc., 170 West End
15137 Avenue, Suite 25R, New York, NY 10023},
15138 }
15139
15140 @misc{ex65-3,
15141 author = {{\bibcorporate{American Psychological Association (Producer)}}},
15142 firstkey = {{American Psychological Association [APA]}},
15143 key = {{APA}},
15144 year = {2000},
15145 title = {Responding Therapeutically to Patient Expressions of
15146 Sexual Attraction: A Stimulus Training Tape},
15147 type = {Motion picture},
15148 note = {Available from the American Psychological Association,
15149 750 First Street, NE, Washington, DC 20002-4242},
15150 }
15151
15152 @misc{ex66,
15153 author = {Crystal, L. {\protect\bibliteral{(Executive
15154 Producer)}\protect\indexskipbracenodot}},
15155 year = {1993},
15156 month = oct,
15157 day = {11},
15158 title = {The {MacNeil}/{Lehrer} News Hour},
15159 type = {Television broadcast},
15160 address = {New York and Washington, DC},
15161 publisher = {Public Broadcasting Service},
15162 }
15163
15164 @misc{ex67,
15165 editor = {Miller, {\bibinitial{R\bibeditortype{Producer}}}},
15166 year = {1989},
15167 title = {The Mind},
15168 type = {Television series},
15169 address = {New York},
15170 publisher = {WNET},
15171 }
15172
15173 @incollection{ex68,
15174 author = {Hall, B. {\protect\bibliteral{(Writer)}\protect\bibskipbracenodot}
15175 and Bender, J.
15176 {\protect\bibliteral{(Director)}\protect\indexskipbracenodot}},
15177 year = {1991},
15178 title = {The Rules of the Game},
15179 type = {Television series episode},
15180 editor = {Sander{\bibeditortype{Producer}}, J.},
15181 booktitle = {I'll Fly Away},
15182 address = {New York},
15183 publisher = {New York Broadcasting Company},
15184 }
15185
15186 @incollection{ex69-1,
15187 key = {{\protect\bibsong{Shocked}{1992}{Over the
15188 Waterfall}{track~5}}},
15189 author = {Shocked, Michelle},
15190 year = {1992},
15191 title = {Over the Waterfall{\bibInstring{\BOn}}},
15192 booktitle = {Arkansas Traveler {\upshape[\uppercase{CD}]}},
15193 address = {New York},
15194 publisher = {PolyGram Music},
15195 }
15196
15197 @incollection{ex69-2,
15198 key = {{\protect\bibsong{Goodenough}{1982}{Tails
15199 and Trotters}{track~5}}},
15200 author = {Goodenough, J. B.},
15201 year = {1982},
15202 title = {Tails and Trotters{\bibInstring{\BOn}}},
15203 type = {Recorded by G. Bok, A. Mayo, \& E. Trickett},
15204 booktitle = {And So Will We Yet {\upshape[\uppercase{CD}]}},
15205 address = {Sharon, CT},
15206 publisher = {Folk-Legacy Records},
15207 note = {1990},
15208 }
15209
15210 @misc{ex70,
15211 author = {Costa, Jr.\hbox{} {\protect\bibliteral{(Speaker)}}, P. T.},
15212 year = {1988},
15213 title = {Personality, Continuity, and Changes of Adult Life},
15214 type = {Cassette Recording},
15215 number = {207-433-88A-B},
15216 address = {Washington, DC},
15217 publisher = {American Psychological Association},
15218 }
15219
15220 @article{ex71-1,
15221 author = {VandenBos, G. and Knapp, S. and Doe, J.},
15222 year = {2001},
15223 title = {Role of Reference Elements in the Selection of Resources
15224 by Psychology Undergraduates},
15225 type = {Electronic version},
15226 journal = {Journal of Bibliographic Research},
15227 volume = {5},
15228 pages = {117--123},
15229 }
15230
15231 @article{ex71-2,
15232 author = {VandenBos, G. and Knapp, S. and Doe, J.},
15233 year = {2001},
15234 title = {Role of Reference Elements in the Selection of Resources
15235 by Psychology Undergraduates},
15236 journal = {Journal of Bibliographic Research},
15237 volume = {5},
15238 pages = {117--123},
15239 lastchecked = {October 13, 2001},
15240 url = {http://jbr.org/articles.html},
15241 }
15242
15243 @article{ex72,
15244 author = {Fredrickson, B. L.},
15245 year = {2000},
15246 month = mar,
15247 day = {7},
15248 title = {Cultivating Positive Emotions to Optimize Health
15249 and Well-Being},
15250 journal = {Prevention \& Treatment},
15251 volume = {3},
15252 pages = {Article 0001a},
15253 lastchecked = {November 20, 2000},
15254 url = {http://journals.apa.org/prevention/volume3/pre0030001a.html},
15255 }
15256
15257 @article{ex73,
15258 author = {Crow, T. J.},
15259 year = {2000},
15260 title = {Did \emph{Homo} {\emph{Sapiens}} Speciate on the
15261 {\emph{Y}} Chromosome?},
15262 journal = {Psycoloquy},
15263 volume = {11},
15264 lastchecked = {March 25, 2001},
15265 url = {ftp://ftp.princeton.edu/harnad/Psycoloquy/
15266 2000.volume.11/psyc.00.11.001.
15267 language-sex-chromosomes.1.crow},
15268 }
15269
15270 @article{ex74,
15271 author = {Glueckauf, R. L. and Whitton, J. and Baxter, J. and Kain, J.
15272 and Vogelgesang, S. and Hudson, M. and others},
15273 year = {1998},
15274 month = jul,
15275 title = {Videocounseling for Families of Rural Teens with
15276 Epilepsy---{P}roject Update},
15277 journal = {Telehealth News},
15278 volume = {2},
15279 number = {2},
15280 lastchecked = {June 6, 2000},
15281 url = {http://www.telehealth.net/subscribe/newslettr_4a.html#1},
15282 }
15283
15284 @misc{ex75,
15285 author = {{\bibcorporate{Greater New Milford (Ct) Area Healthy
15286 Community 2000,
15287 Task Force on Teen and Adolescent Issues}}},
15288 firstkey = {{Greater New Milford (Ct) Area Healthy Community 2000,
15289 Task Force on Teen and Adolescent Issues [TFTAI]}},
15290 key = {{TFTAI}},
15291 year = {\bibnodate},
15292 title = {Who Has Time for a Family Meal? {You} Do!},
15293 lastchecked = {October 5, 2000},
15294 url = {http://www.familymealtime.org},
15295 }
15296
15297 @incollection{ex76,
15298 author = {{\bibcorporate{Benton Foundation}}},
15299 year = {1998},
15300 month = jul,
15301 day = {7},
15302 title = {Barriers to Closing the Gap},
15303 booktitle = {Losing Ground Bit by Bit: Low-Income Communities in the
15304 Information Age},
15305 chapter = {2},
15306 lastchecked = {August 18, 2001},
15307 url = {http://www.benton.org/Library/Low-Income/two.html},
15308 }
15309
15310 @misc{ex77,
15311 year = {\bibnodate},
15312 title = {{GVU}'s 8th {WWW} User Survey},
15313 lastchecked = {August 8, 2000},
15314 url = {http://www.cc.gatech.edu/gvu/user_surveys/survey-1997-10/},
15315 }
15316
15317 @misc{ex78,
15318 author = {Chou, L. and McClintock, R. and Moretti, F. and Nix, D. H.},
15319 year = {1993},
15320 title = {Technology and Education: New Wine in New Bottles:
15321 Choosing Pasts and Imagining Educational Futures},
15322 howpublished = {Retrieved August 24, 2000, from Columbia University,
15323 Institute for Learning Technologies Web site:
15324 \url{http://www.ilt.columbia.edu/
15325 publications/papers/newwine1.html}\bibnodot{.}},
15326 }
15327
15328 @misc{ex79,
15329 author = {{\bibcorporate{University of California, San Francisco,
15330 Institute for Health and Aging}}},
15331 firstkey = {{University of California, San Francisco, Institute for
15332 Health and Aging [UCSF-IHA]}},
15333 key = {{UCSF-IHA}},
15334 year = {1996},
15335 month = nov,
15336 title = {Chronic Care in {A}merica: {A} 21st Century Challenge},
15337 howpublished = {Retrieved September 9, 2000, from the Robert Wood Johnson
15338 Foundation Web site:
15339 \url{http://www.rwjf.org/library/chrcare/}\bibnodot{.}},
15340 }
15341
15342 @misc{ex80,
15343 author = {{\bibcorporate{United States Sentencing Commission}}},
15344 firstkey = {{United States Sentencing Commission [USSC]}},
15345 key = {{USSC}},
15346 year = {\bibnodate},
15347 title = {{\APACSortNoop{Nineteen Ninety-Seven}}1997 Sourcebook of
15348 Federal Sentencing Statistics},
15349 lastchecked = {December 8, 1999},
15350 url = {http://www.ussc.gov/annrpt/1997/sbtoc97.htm},
15351 }
15352
15353 @misc{ex81,
15354 author = {{\bibcorporate{Canarie, Inc.}}},
15355 year = {1997},
15356 month = sep,
15357 day = {27},
15358 title = {Towards a {Canadian} Health {IWAY}: Vision, Opportunities
15359 and Future Steps},
15360 lastchecked = {November 8, 2000},
15361 url = {http://www.canarie.ca/press/publications/pdf/
15362 health/healthvision.doc},
15363 }
15364
15365 @techreport{ex82,
15366 author = {Kruschke, J. K. and Bradley, A. L.},
15367 year = {1995},
15368 title = {Extensions to the Delta Rule of Associative Learning},
15369 type = {Indiana University Cognitive Science Research Report},
15370 number = {14\BmakeAbstractRetrieved},
15371 lastchecked = {October 21, 2000},
15372 url = {http://www.indiana.edu/~kruschke/deltarule_abstract.html},
15373 }
15374
15375 @lecture{ex83,
15376 author = {Cutler, L. D. and Fr{\"{o}}lich, B. and Hanrahan, P.},
15377 year = {1997},
15378 month = jan,
15379 day = {16},
15380 title = {Two-Handed Direct Manipulation on the Responsive
15381 Workbench},
15382 howpublished = {Paper presented at the 1997 Symposium on Interactive 3D
15383 Graphics\BmakeAbstractRetrieved},
15384 lastchecked = {June 12, 2000},
15385 url = {http://www.graphics.stanford.edu/papers/twohanded/},
15386 }
15387
15388 @lecture{ex84,
15389 author = {Tan, G. and Lewandowsky, S.},
15390 year = {1996},
15391 title = {A Comparison of Operator Trust in Humans Versus Machines},
15392 howpublished = {Paper presented at the CybErg 96 virtual conference},
15393 lastchecked = {May 16, 2000},
15394 url = {http://www.curtin.edu.au/conference/cyberg/
15395 centre/outline.cgi/frame?dir=tan},
15396 }
15397
15398 @misc{ex85,
15399 author = {Chalmers, D.},
15400 year = {2000},
15401 month = nov,
15402 day = {17},
15403 title = {Seeing with Sound},
15404 type = {\bibmessage},
15405 number = {1},
15406 url = {news://sci.psychology.consciousness}
15407 }
15408
15409 @misc{ex86,
15410 author = {Simons, D. J.},
15411 year = {2000},
15412 month = jul,
15413 day = {14},
15414 title = {News Resources for Visual Cognition},
15415 type = {\bibmessage},
15416 number = {31},
15417 url = {http://groups.yahoo.com/group/visualcognition/message/31},
15418 }
15419
15420 @misc{ex87,
15421 author = {Hammond, T.},
15422 year = {2000},
15423 month = nov,
15424 day = {20},
15425 title = {{YAHC}: {Handle} {Parameters}, {DOI} {Genres}, etc.},
15426 type = {\bibmessage},
15427 howpublished = {Message posted to Ref-Links electronic mailing list,
15428 archived at \url{http://www.doi.org/mail-archive/
15429 ref-link/msg00088.html}\bibnodot{.}},
15430 }
15431
15432 @article{ex88,
15433 author = {Borman, W. C. and Hanson, M. A. and Oppler, S. H. and
15434 Pulakos, E. D. and White, L. A.},
15435 year = {1993},
15436 title = {Role of Early Supervisory Experience in Supervisor Performance},
15437 journal = {Journal of Applied Psychology},
15438 volume = {78},
15439 pages = {443--449},
15440 howpublished = {Retrieved October 23, 2000, from the PsycARTICLES database},
15441 }
15442
15443 @newspaper{ex89,
15444 author = {Hilts, P. J.},
15445 year = {1999},
15446 month = feb,
15447 day = {16},
15448 title = {In Forecasting Their Emotions, Most People Flunk Out},
15449 journal = {New York Times},
15450 lastchecked = {November 21, 2000},
15451 url = {http://www.nytimes.com},
15452 }
15453
15454 @article{ex90,
15455 author = {Fournier, M. and {\lowercase{D}}e Ridder, D. and Bensing, J.},
15456 year = {1999},
15457 title = {Optimism and Adaptation to Multiple Sclerosis: What Does
15458 Optimism Mean?},
15459 journal = {Journal of Behavioral Medicine},
15460 volume = {22},
15461 pages = {303--326},
15462 howpublished = {Abstract retrieved October 23, 2000, from PsycINFO database},
15463 }
15464
15465 @techreport{ex91,
15466 author = {{\bibcorporate{U.S. General Accounting Office}}},
15467 year = {1997},
15468 month = feb,
15469 title = {Telemedicine: Federal Strategy is Needed to Guide Investments},
15470 type = {Publication},
15471 number = {GAO/NSAID/HEHS-97-67},
15472 howpublished = {Retrieved September 15, 2000, from General Accounting Office
15473 Reports Online via GPO Access:
15474 \url{http://www.access.gpo.gov/su_docs/aces/
15475 aces160.shtml?/gao/index.html}\bibnodot{.}},
15476 }
15477
15478 @misc{ex92,
15479 author = {Miller, M. E.},
15480 year = {1993},
15481 title = {The {Interactive} {Tester}},
15482 edition = {Version~4.0\noedition\ignorespaces},
15483 type = {\bibcomputersoftware},
15484 address = {Westminster, CA},
15485 publisher = {Psytek Services},
15486 }
15487
15488 @misc{ex93,
15489 author = {Schwarzer, R.},
15490 year = {1989},
15491 title = {Statistics Software for Meta-Analysis},
15492 type = {\bibcomputersoftwareandmanual},
15493 lastchecked = {March 23, 2001},
15494 url = {http://www.yorku.ca/faculty/academic/schwarze/meta_e.htm},
15495 }
15496
15497 @manual{ex93-t1,
15498 author = {{\bibcorporate{R Development Core Team}}},
15499 year = {2004},
15500 title = {R: A Language and Environment for Statistical Computing},
15501 address = {Vienna, Austria},
15502 publisher = {R Foundation for Statistical Computing},
15503 url = {http://www.r-project.org},
15504 }
15505
15506 @misc{ex94,
15507 key = {{\APACcitebtitle{National Health Interview Survey}}},
15508 title = {National {Health} {Interview} {Survey}---{Current} Health
15509 Topics: 1991---{Longitudinal} Study of Aging},
15510 edition = {Version~4\noedition\ignorespaces},
15511 type = {Data file},
15512 year = {\bibnodate},
15513 address = {Hyattsville, MD},
15514 publisher = {National Center for Health Statistics},
15515 }
15516
15517 @misc{ex95,
15518 author = {{\bibcorporate{Department of Health and Human Services,
15519 National Center for Health Statistics}}},
15520 firstkey = {{Department of Health and Human Services,
15521 National Center for Health Statistics [DHHS-NCHS]}},
15522 key = {{DHHS-NCHS}},
15523 year = {1991},
15524 title = {National {Health} {Provider} {Inventory}: Home Health
15525 Agencies and Hospices, 1991},
15526 type = {Data file},
15527 howpublished = {Available from National Technical Information Service
15528 Web site, \url{http://www.ntis.gov}\bibnodot{.}},
15529 }
15530 %</bibdb>
15531 % \end{macrocode}
15532 %
15533 % \subsection{The examples \LaTeX{} file (\fname{apacxmpl.tex})}
15534 %
15535 % The file \fname{apacxmpl.tex} contains the \LaTeX{} code for formatting
15536 % the examples from the APA manual. It can be studied to see how certain
15537 % nonstandard references can be formatted according to the APA rules,
15538 % to test \pkg{apacite}, and in particular to test compatibility with
15539 % other packages. We start with a standard head.
15540 % \begin{macrocode}
15541 %<*xmpl>
15542 \documentclass{article}
15543 \usepackage{url}
15544 \usepackage{apacite}
15545 \usepackage{apacdoc}
15546
15547 \title{Testing \textsf{apacite}: Examples from the APA manual}
15548 \author{Erik Meijer\\
15549 \textsf{apacite at gmail.com}
15550 }
15551 \date{2013/07/21}
15552
15553 \begin{document}
15554 \maketitle
15555 \begin{abstract}
15556 This document tests \textsf{apacite} [2013/07/21 v6.03]. See the
15557 \textsf{apacite} documentation for more information.
15558 \end{abstract}
15559
15560 %</xmpl>
15561 % \end{macrocode}
15562 %
15563 % \subsection{References from the 6th edition of the Publication Manual}
15564 %
15565 % These examples are from chapter~7 of the 6th edition of the APA manual.
15566 % \begin{macrocode}
15567 %<*xmpl>
15568 \section{Examples from chapter~7}
15569
15570 \begin{enumerate}
15571 \item
15572 \cite{apa6:ch7-ex1} \\
15573 \cite{apa6:ch7-ex1} \\
15574 \fullciteA{apa6:ch7-ex1} \\
15575 \citeA{apa6:ch7-ex1}
15576
15577 \item
15578 \cite{apa6:ch7-ex2} \\
15579 \cite{apa6:ch7-ex2} \\
15580 \fullciteA{apa6:ch7-ex2} \\
15581 \citeA{apa6:ch7-ex2}
15582 %</xmpl>
15583 %<*bibdb>
15584 @article{apa6:ch7-ex1,
15585 author = {Herbst-Damm, Kathryn L. and Kulik, James A.},
15586 year = {2005},
15587 title = {Volunteer Support, Marital Status, and the Survival Times of
15588 Terminally Ill Patients},
15589 journal = {Health Psychology},
15590 volume = {24},
15591 pages = {225--229},
15592 doi = {10.1037/0278-6133.24.2.225},
15593 }
15594
15595 @article{apa6:ch7-ex2,
15596 author = {Gilbert, David G. and McClernon, F. Joseph and
15597 Rabinovich, Norka E. and Sugai, Chihiro and
15598 Plath, Louisette C. and Asgaard, Greg and Zuo, Yantao and
15599 Huggenvik, Jodi and Botros, Nazeih},
15600 year = {2004},
15601 title = {Effects of Quitting Smoking on {EEG} Activation and Attention
15602 Last for More than 31 Days and are More Severe with Stress,
15603 Dependence, {DRD2~A1} Allele, and Depressive Traits},
15604 journal = {Nicotine \& Tobacco Research},
15605 volume = {6},
15606 pages = {249--267},
15607 doi = {10.1080/14622200410001676305},
15608 }
15609 %</bibdb>
15610 % \end{macrocode}
15611 % Note that the page heading of the article itself gives the journal name with
15612 % an ampersand (`\&': \emph{Nicotine \& Tobacco Research}) and not with ``and''
15613 % as in the APA manual.
15614 % \begin{macrocode}
15615 %<*xmpl>
15616 \item
15617 \cite{apa6:ch7-ex3-1} \\
15618 \cite{apa6:ch7-ex3-1} \\
15619 \fullciteA{apa6:ch7-ex3-1} \\
15620 \citeA{apa6:ch7-ex3-1}\\
15621 \mbox{}\\
15622 \cite{apa6:ch7-ex3-2} \\
15623 \cite{apa6:ch7-ex3-2} \\
15624 \fullciteA{apa6:ch7-ex3-2} \\
15625 \citeA{apa6:ch7-ex3-2}
15626 %</xmpl>
15627 %<*bibdb>
15628 @article{apa6:ch7-ex3-1,
15629 author = {Sillick, Tamra J. and Schutte, Nicola S.},
15630 year = {2006},
15631 title = {Emotional Intelligence and Self-Esteem Mediate Between Perceived
15632 Early Parental Love and Adult Happiness},
15633 journal = {E-Journal of Applied Psychology: Emotional Intelligence},
15634 volume = {2},
15635 number = {2},
15636 pages = {38--48},
15637 url = {http://ojs.lib.swin.edu.au/index.php/ejab},
15638 }
15639
15640 @article{apa6:ch7-ex3-2,
15641 author = {Light, Matthew A. and Light, Ivan H.},
15642 year = {2008},
15643 title = {The Geographic Expansion of {Mexican} Immigration in the
15644 {United} {States} and its Implications for Local Law
15645 Enforcement},
15646 journal = {Law Enforcement Executive Forum},
15647 volume = {8},
15648 number = {1},
15649 pages = {73--82},
15650 }
15651 %</bibdb>
15652 % \end{macrocode}
15653 % This journal appears to prefer the name \emph{Law Enforcement Executive
15654 % Forum} over \emph{Law Enforcement Executive Forum Journal} (see
15655 % \url{http://www.iletsbei.com/lee_forum/}).
15656 % \begin{macrocode}
15657 %<*xmpl>
15658 \item
15659 \cite{apa6:ch7-ex4} \\
15660 \cite{apa6:ch7-ex4} \\
15661 \fullciteA{apa6:ch7-ex4} \\
15662 \citeA{apa6:ch7-ex4}
15663
15664 \item
15665 \cite{apa6:ch7-ex5} \\
15666 \cite{apa6:ch7-ex5} \\
15667 \fullciteA{apa6:ch7-ex5} \\
15668 \citeA{apa6:ch7-ex5}
15669 %</xmpl>
15670 %<*bibdb>
15671 @article{apa6:ch7-ex4,
15672 author = {Guimard, Philippe and Florin, Agn\`es},
15673 year = {2007},
15674 title = {Les \'Evaluations des Enseignants en Grande Section de
15675 Maternelle Sont-Elles Pr\'edictives des Difficult\'es de
15676 Lecture au Cours Pr\'eparatoire?},
15677 englishtitle = {Are Teacher Ratings in Kindergarten Predictive of
15678 Reading Difficulties in First Grade?},
15679 journal = {Approche Neuropsychologique des Apprentissages chez l'Enfant},
15680 volume = {19},
15681 pages = {5--17},
15682 }
15683
15684 @article{apa6:ch7-ex5,
15685 author = {Von Ledebur, Sidonia C.},
15686 year = {2007},
15687 title = {Optimizing Knowledge Transfer by New Employees in Companies},
15688 journal = {Knowledge Management Research \& Practice},
15689 howpublished = {Advance online publication},
15690 doi = {10.1057/palgrave.kmrp.8500141},
15691 }
15692 %</bibdb>
15693 % \end{macrocode}
15694 % Here again the page heading of the article itself gives the journal name with
15695 % an ampersand (`\&') and not with ``and''. Note that the APA explicitly
15696 % changes ``von'' to ``Von'' to satisfy U.S. conventions of names. In
15697 % other languages, ``von'' would be retained. See elsewhere in this manual
15698 % for a discussion of how to treat von-parts.
15699 % \begin{macrocode}
15700 %<*xmpl>
15701 \item
15702 \cite{apa6:ch7-ex6} \\
15703 \cite{apa6:ch7-ex6} \\
15704 \fullciteA{apa6:ch7-ex6} \\
15705 \citeA{apa6:ch7-ex6}
15706
15707 \item
15708 \cite{apa6:ch7-ex7} \\
15709 \cite{apa6:ch7-ex7} \\
15710 \fullciteA{apa6:ch7-ex7} \\
15711 \citeA{apa6:ch7-ex7}
15712 %</xmpl>
15713 %<*bibdb>
15714 @article{apa6:ch7-ex6,
15715 author = {Briscoe, Robert},
15716 year = {\BIP},
15717 title = {Egocentric Spatial Representation in Action and Perception},
15718 journal = {Philosophy and Phenomenological Research},
15719 url = {http://cogprints.org/5780/1/ECSRAP.F07.pdf},
15720 }
15721
15722 @magazine{apa6:ch7-ex7,
15723 author = {Chamberlin, J. and Novotney, A. and Packard, E.
15724 and Price, M.},
15725 year = {2008},
15726 month = may,
15727 title = {Enhancing Worker Well-Being: Occupational Health
15728 Psychologists Convene to Share Their Research on Work,
15729 Stress, and Health},
15730 journal = {Monitor on Psychology},
15731 volume = {39},
15732 number = {5},
15733 pages = {26--29},
15734 }
15735 %</bibdb>
15736 % \end{macrocode}
15737 % The online version (\url{http://www.apa.org/monitor/2008/05/workstress.aspx})
15738 % does not have a comma in the title before the ``and''.
15739 % \begin{macrocode}
15740 %<*xmpl>
15741 \item
15742 \cite{apa6:ch7-ex8} \\
15743 \cite{apa6:ch7-ex8} \\
15744 \fullciteA{apa6:ch7-ex8} \\
15745 \citeA{apa6:ch7-ex8}
15746 %</xmpl>
15747 %<*bibdb>
15748 @magazine{apa6:ch7-ex8,
15749 author = {Clay, Rebecca},
15750 year = {2008},
15751 month = jun,
15752 title = {Science vs.\ Ideology: Psychologists Fight Back Against
15753 the Misuse of Research},
15754 journal = {Monitor on Psychology},
15755 volume = {39},
15756 number = {6},
15757 url = {http://www.apa.org/monitor/},
15758 }
15759 %</bibdb>
15760 % \end{macrocode}
15761 % The APA manual incorrectly says ``about'' instead of ``against''.
15762 % \begin{macrocode}
15763 %<*xmpl>
15764 \item
15765 \cite{apa6:ch7-ex9} \\
15766 \cite{apa6:ch7-ex9} \\
15767 \fullciteA{apa6:ch7-ex9} \\
15768 \citeA{apa6:ch7-ex9}
15769
15770 \item
15771 \cite{apa6:ch7-ex10} \\
15772 \cite{apa6:ch7-ex10} \\
15773 \fullciteA{apa6:ch7-ex10} \\
15774 \citeA{apa6:ch7-ex10}
15775
15776 \item
15777 \cite{apa6:ch7-ex11} \\
15778 \cite{apa6:ch7-ex11} \\
15779 \fullciteA{apa6:ch7-ex11} \\
15780 \citeA{apa6:ch7-ex11}
15781
15782 \item
15783 \cite{apa6:ch7-ex12-1} \\
15784 \cite{apa6:ch7-ex12-1} \\
15785 \fullciteA{apa6:ch7-ex12-1} \\
15786 \citeA{apa6:ch7-ex12-1}\\
15787 \mbox{}\\
15788 \cite{apa6:ch7-ex12-2} \\
15789 \cite{apa6:ch7-ex12-2} \\
15790 \fullciteA{apa6:ch7-ex12-2} \\
15791 \citeA{apa6:ch7-ex12-2}\\
15792 %</xmpl>
15793 %<*bibdb>
15794 @article{apa6:ch7-ex9,
15795 key = {{\APACciteatitle{Six Sites Meet}}},
15796 title = {Six Sites Meet for Comprehensive Anti-Gang
15797 Initiative Conference},
15798 year = {2006},
15799 month = nov # "/" # dec,
15800 journal = {OJJDP News @ a Glance},
15801 url =
15802 {http://www.ncjrs.gov/html/ojjdp/news_at_glance/216684/topstory.html},
15803 }
15804
15805 @newspaper{apa6:ch7-ex10,
15806 author = {Schwartz, John},
15807 year = {1993},
15808 month = sep,
15809 day = {30},
15810 title = {Obesity Affects Economic, Social Status},
15811 journal = {The Washington Post},
15812 pages = {A1, A4},
15813 }
15814
15815 @newspaper{apa6:ch7-ex11,
15816 author = {Brody, Jane E.},
15817 year = {2007},
15818 month = dec,
15819 day = {11},
15820 title = {Mental Reserves Keep Brain Agile},
15821 journal = {The New York Times},
15822 url = {http://www.nytimes.com},
15823 }
15824
15825 @article{apa6:ch7-ex12-1,
15826 editor = {Haney, Craig and Wiener, Richard L.},
15827 year = {2004},
15828 title = {Capital Punishment in the {United} {States}},
15829 type = {Special issue},
15830 journal = {Psychology, Public Policy, and Law},
15831 volume = {10},
15832 number = {4},
15833 }
15834
15835 @article{apa6:ch7-ex12-2,
15836 editor = {Yan, Zheng and Greenfield, Patricia},
15837 year = {2006},
15838 title = {Children, Adolescents, and the {Internet}},
15839 type = {Special section},
15840 journal = {Developmental Psychology},
15841 volume = {42},
15842 pages = {391--458},
15843 }
15844 %</bibdb>
15845 % \end{macrocode}
15846 % The journal lists the editors as Yan and Greenfield (in this order),
15847 % although the first article (editorial introduction/overview) has
15848 % Greenfield and Yan.
15849 %
15850 % The following is an implementation of the second bullet point: a special
15851 % issue with no editors.
15852 % \begin{macrocode}
15853 %<*xmpl>
15854 \mbox{}\\
15855 \cite{apa6:ch7-ex12-3} \\
15856 \cite{apa6:ch7-ex12-3} \\
15857 \fullciteA{apa6:ch7-ex12-3} \\
15858 \citeA{apa6:ch7-ex12-3}
15859
15860 \item
15861 \cite{apa6:ch7-ex13-1} \\
15862 \cite{apa6:ch7-ex13-1} \\
15863 \fullciteA{apa6:ch7-ex13-1} \\
15864 \citeA{apa6:ch7-ex13-1}\\
15865 %</xmpl>
15866 %<*bibdb>
15867 @article{apa6:ch7-ex12-3,
15868 key = {{\APACciteatitle{Capital Punishment}}},
15869 title = {Capital Punishment in the {United} {States}},
15870 year = {2004},
15871 type = {Special issue},
15872 journal = {Psychology, Public Policy, and Law},
15873 volume = {10},
15874 number = {4},
15875 }
15876
15877 @article{apa6:ch7-ex13-1,
15878 author = {Ganster, Daniel C. and Schaubroeck, John and
15879 Sime, Wesley E. and Mayes, Bronston T.},
15880 year = {1991},
15881 title = {The Nomological Validity of the {Type~A} Personality Among
15882 Employed Adults},
15883 type = {Monograph},
15884 journal = {Journal of Applied Psychology},
15885 volume = {76},
15886 pages = {143--168},
15887 doi = {10.1037/0021-9010.76.1.143},
15888 }
15889 %</bibdb>
15890 % \end{macrocode}
15891 % The bullet points given here were explicit examples in the 5th edition.
15892 % We have to be liberal with what goes in the \fieldname{number} field
15893 % for these:
15894 % \begin{macrocode}
15895 %<*xmpl>
15896 \mbox{}\\
15897 \cite{apa6:ch7-ex13-2} \\
15898 \cite{apa6:ch7-ex13-2} \\
15899 \fullciteA{apa6:ch7-ex13-2} \\
15900 \citeA{apa6:ch7-ex13-2}\\
15901 \mbox{}\\
15902 \cite{apa6:ch7-ex13-3} \\
15903 \cite{apa6:ch7-ex13-3} \\
15904 \fullciteA{apa6:ch7-ex13-3} \\
15905 \citeA{apa6:ch7-ex13-3}
15906 %</xmpl>
15907 %<*bibdb>
15908 @article{apa6:ch7-ex13-2,
15909 author = {Harris, Paul L. and Kavanaugh, Robert D.},
15910 year = {1993},
15911 title = {Young Children's Understanding of Pretense},
15912 journal = {Monographs of the Society for Research in Child Development},
15913 volume = {58},
15914 number = {1, Serial No.~231},
15915 }
15916
15917 @article{apa6:ch7-ex13-3,
15918 author = {Battig, William F. and Montague, William E.},
15919 year = {1969},
15920 title = {Category Norms for Verbal Items in 56 Categories:
15921 A Replication and Extension of the {Connecticut}
15922 Category Norms},
15923 journal = {Journal of Experimental Psychology Monographs},
15924 volume = {80},
15925 number = {3, Pt.~2},
15926 }
15927 %</bibdb>
15928 % \end{macrocode}
15929 % The 5th edition gives the journal as ``Journal of Experimental
15930 % Psychology Monographs'' and its front cover says ``Journal of Experimental
15931 % Psychology Monograph'', but the volume and issue number and online
15932 % categorization (on JSTOR) suggests that this is just a special issue
15933 % of \emph{Journal of Experimental Psychology}, which would argue in
15934 % favor of dropping the ``Monographs''.
15935 % \begin{macrocode}
15936 %<*xmpl>
15937 \item
15938 \cite{apa6:ch7-ex14} \\
15939 \cite{apa6:ch7-ex14} \\
15940 \fullciteA{apa6:ch7-ex14} \\
15941 \citeA{apa6:ch7-ex14}
15942 %</xmpl>
15943 %<*bibdb>
15944 @article{apa6:ch7-ex14,
15945 key = {{\APACciteatitle{Editorial}}},
15946 title = {Editorial: ``{What} Is a Disaster'' and Why Does This
15947 Question Matter?},
15948 year = {2006},
15949 type = {Editorial},
15950 journal = {Journal of Contingencies and Crisis Management},
15951 volume = {14},
15952 pages = {1--2},
15953 }
15954 %</bibdb>
15955 % \end{macrocode}
15956 % The doi is \doi{10.1111/j.1468-5973.2006.00475.x}; normally this would
15957 % be added.
15958 % \begin{macrocode}
15959 %<*xmpl>
15960 \item
15961 \cite{apa6:ch7-ex15} \\
15962 \cite{apa6:ch7-ex15} \\
15963 \fullciteA{apa6:ch7-ex15} \\
15964 \citeA{apa6:ch7-ex15}
15965 %</xmpl>
15966 %<*bibdb>
15967 @article{apa6:ch7-ex15,
15968 author = {Marshall-Pescini, Sarah and Whiten, Andrew},
15969 year = {2008},
15970 title = {Social Learning of Nut-Cracking Behavior in {East} {African}
15971 Sanctuary-Living Chimpanzees (\emph{Pan troglodytes
15972 schweinfurthii})},
15973 type = {Supplemental material},
15974 journal = {Journal of Comparative Psychology},
15975 volume = {122},
15976 pages = {186--194},
15977 doi = {10.1037/0735-7036.122.2.186.supp},
15978 }
15979 %</bibdb>
15980 % \end{macrocode}
15981 % Enclosing ``\verb+Pan troglodytes schweinfurthii+'' in exactly one pair of
15982 % braces (which happen to also be the delimiters for the \cmd{\emph} command)
15983 % ensures that the correct capitalization is output.
15984 % \begin{macrocode}
15985 %<*xmpl>
15986 \item
15987 \cite{apa6:ch7-ex16-1} \\
15988 \cite{apa6:ch7-ex16-1} \\
15989 \fullciteA{apa6:ch7-ex16-1} \\
15990 \citeA{apa6:ch7-ex16-1} \\
15991 \mbox{}\\
15992 \cite{apa6:ch7-ex16-2} \\
15993 \cite{apa6:ch7-ex16-2} \\
15994 \fullciteA{apa6:ch7-ex16-2} \\
15995 \citeA{apa6:ch7-ex16-2}
15996 %</xmpl>
15997 %<*bibdb>
15998 @article{apa6:ch7-ex16-1,
15999 author = {Woolf, Nancy J. and Young, Stacey L. and Fanselow, Michael S.
16000 and Butcher, Larry L.},
16001 year = {1991},
16002 title = {{MAP-2} Expression in Cholinoceptive Pyramidal Cells of
16003 Rodent Cortex and Hippocampus is Altered by {Pavlovian}
16004 Conditioning},
16005 type = {Abstract},
16006 journal = {Society for Neuroscience Abstracts},
16007 volume = {17},
16008 pages = {480},
16009 }
16010
16011 @article{apa6:ch7-ex16-2,
16012 author = {Lassen, Stephen R. and Steele, Michael M. and Sailor, Wayne},
16013 year = {2006},
16014 title = {The Relationship of School-Wide {Positive} {Behavior}
16015 {Support} to Academic Achievement in an Urban Middle School},
16016 journal = {Psychology in the Schools},
16017 volume = {43},
16018 pages = {701--712},
16019 url = {http://www.interscience.wiley.com},
16020 }
16021 %</bibdb>
16022 % \end{macrocode}
16023 % The doi is \doi{10.1002/pits.20177}; normally this would be added. In
16024 % the title and the abstract, ``Positive Behavior Support'' is capitalized,
16025 % so presumably this is the proper name of an experimental program.
16026 % Therefore I have enclosed it in braces here as well, so that this
16027 % capitalization is preserved.
16028 % \begin{macrocode}
16029 %<*xmpl>
16030 \item
16031 \cite{apa6:ch7-ex17} \\
16032 \cite{apa6:ch7-ex17} \\
16033 \fullciteA{apa6:ch7-ex17} \\
16034 \citeA{apa6:ch7-ex17}
16035 %</xmpl>
16036 %<*bibdb>
16037 @article{apa6:ch7-ex17,
16038 author = {Hare, Linda R. and O'Neill, Kevin},
16039 year = {2000},
16040 title = {Effectiveness and Efficiency in Small Academic Peer Groups:
16041 A Case Study},
16042 journal = {Small Group Research},
16043 volume = {31},
16044 pages = {24--53},
16045 howpublished = {Abstract retrieved from {Sociological} {Abstracts}
16046 database},
16047 note = {(Accession No.\ 200010185)},
16048 }
16049 %</bibdb>
16050 % \end{macrocode}
16051 % The construction using the \fieldname{howpublished} and \fieldname{note}
16052 % fields does the job, but is not very elegant.
16053 % The doi (of the whole article) is \doi{10.1177/104649640003100102}, which
16054 % presumably normally would be added. The abstract is also freely available
16055 % on the Sage website (\url{http://sgr.sagepub.com/content/31/1/24} on
16056 % July 10, 2010), which is a lot more accessible than this database.
16057 % Note that the APA manual omits the subtitle. It is remarkable how
16058 % many such small errors there are in the APA manual.
16059 % \begin{macrocode}
16060 %<*xmpl>
16061 \item
16062 \cite{apa6:ch7-ex18} \\
16063 \cite{apa6:ch7-ex18} \\
16064 \fullciteA{apa6:ch7-ex18} \\
16065 \citeA{apa6:ch7-ex18}
16066 %</xmpl>
16067 %<*bibdb>
16068 @book{apa6:ch7-ex18,
16069 author = {Shotton, Margaret A.},
16070 year = {1989},
16071 title = {Computer Addiction? {A} Study of Computer Dependency},
16072 address = {London, England},
16073 publisher = {Taylor \& Francis},
16074 }
16075 %</bibdb>
16076 % \end{macrocode}
16077 % I am puzzled by ``England''; ``UK'' seems more appropriate to me and that's
16078 % what I'm always using.
16079 % \begin{macrocode}
16080 %<*xmpl>
16081 \item
16082 \cite{apa6:ch7-ex19-1} \\
16083 \cite{apa6:ch7-ex19-1} \\
16084 \fullciteA{apa6:ch7-ex19-1} \\
16085 \citeA{apa6:ch7-ex19-1} \\
16086 \mbox{}\\
16087 \cite{apa6:ch7-ex19-2} \\
16088 \cite{apa6:ch7-ex19-2} \\
16089 \fullciteA{apa6:ch7-ex19-2} \\
16090 \citeA{apa6:ch7-ex19-2}
16091 %</xmpl>
16092 %<*bibdb>
16093 @book{apa6:ch7-ex19-1,
16094 author = {Shotton, Margaret A.},
16095 year = {1989},
16096 title = {Computer Addiction? {A} Study of Computer Dependency},
16097 type = {DX Reader version},
16098 url = {http://www.ebookstore.tandf.co.uk/html/index.asp},
16099 }
16100
16101 @book{apa6:ch7-ex19-2,
16102 author = {Schiraldi, Glenn R.},
16103 year = {2000},
16104 title = {The Post-Traumatic Stress Disorder Sourcebook:
16105 A Guide to Healing, Recovery, and Growth},
16106 type = {Adobe Digital Editions version},
16107 doi = {10.1036/0071393722},
16108 }
16109 %</bibdb>
16110 % \end{macrocode}
16111 % The website that this doi refers to gives the publication date as 2000,
16112 % so that's what I'm using here. (The APA uses 2001.) This is supposed to
16113 % be a ``free eBook'', but even after installing the Adobe software, the
16114 % link to the actual content gives a ``page not found'' error for me.
16115 % \begin{macrocode}
16116 %<*xmpl>
16117 \item
16118 \cite{apa6:ch7-ex20} \\
16119 \cite{apa6:ch7-ex20} \\
16120 \fullciteA{apa6:ch7-ex20} \\
16121 \citeA{apa6:ch7-ex20}
16122 %</xmpl>
16123 %<*bibdb>
16124 @book{apa6:ch7-ex20,
16125 author = {O'Keeffe, Elton},
16126 year = {\bibnodate},
16127 title = {Egoism \& the Crisis in {Western} Values},
16128 url = {http://www.onlineoriginals.com/showitem.asp?itemID=135},
16129 }
16130 %</bibdb>
16131 % \end{macrocode}
16132 % Note the typo in the last name of the author in the APA manual.
16133 % \begin{macrocode}
16134 %<*xmpl>
16135 \item
16136 \cite{apa6:ch7-ex21} \\
16137 \cite{apa6:ch7-ex21} \\
16138 \fullciteA{apa6:ch7-ex21} \\
16139 \citeA{apa6:ch7-ex21}
16140 %</xmpl>
16141 %<*bibdb>
16142 @incollection{apa6:ch7-ex21,
16143 author = {Freud, Sigmund},
16144 year = {1953},
16145 title = {The Method of Interpreting Dreams:
16146 An Analysis of a Specimen Dream},
16147 editor = {Strachey, James},
16148 translator = {Strachey, James},
16149 booktitle = {The Standard Edition of the Complete Psychological
16150 Works of {Sigmund} {Freud}},
16151 volume = {4},
16152 pages = {96--121},
16153 originalyear = {1900},
16154 url = {http://books.google.com/books},
16155 }
16156 %</bibdb>
16157 % \end{macrocode}
16158 % This url did not bring me very far. It took me quite some time and different
16159 % search strings to find the volume referred to. Search for author =
16160 % ``Strachey'', year = 1953, and then select ``The interpretation of dreams,
16161 % first part (1900)''; this leads in my case to
16162 % \url{http://books.google.com/books?id=moN_OQAACAAJ&
16163 % dq=inauthor:%22James+Strachey%22&hl=en&ei=9E1FTOyVOsHflgems_DrAw&
16164 % sa=X&oi=book_result&ct=result&resnum=8&ved=0CEcQ6AEwBw}, but there is
16165 % no preview available, and there is no useful information other than the
16166 % title and the author, so exactly what is ``retrieved'' is not clear to
16167 % me. After some internet searching, I did find
16168 % \url{http://www.pep-web.org/static.php?page=standardedition}, which has
16169 % a clickable table of contents, and presumably if you have a registered
16170 % IP address, the actual content. Apparently, my IP address is not registered,
16171 % so I had no access to the actual content.
16172 % \begin{macrocode}
16173 %<*xmpl>
16174 \item
16175 \cite{apa6:ch7-ex22} \\
16176 \cite{apa6:ch7-ex22} \\
16177 \fullciteA{apa6:ch7-ex22} \\
16178 \citeA{apa6:ch7-ex22}
16179 %</xmpl>
16180 %<*bibdb>
16181 @book{apa6:ch7-ex22,
16182 editor = {Thomas, Noreen},
16183 year = {2002},
16184 title = {Perspectives on the Community College: A Journey of Discovery},
16185 type = {Monograph},
16186 url = {http://eric.ed.gov},
16187 }
16188 %</bibdb>
16189 % \end{macrocode}
16190 % The ERIC document number is ED\,463\,808.
16191 % \begin{macrocode}
16192 %<*xmpl>
16193 \item
16194 \cite{apa6:ch7-ex23} \\
16195 \cite{apa6:ch7-ex23} \\
16196 \fullciteA{apa6:ch7-ex23} \\
16197 \citeA{apa6:ch7-ex23}
16198 %</xmpl>
16199 %<*bibdb>
16200 @book{apa6:ch7-ex23,
16201 editor = {Koch, Sigmund},
16202 year = {1959--1963},
16203 title = {Psychology: A Study of a Science},
16204 volume = {1--6},
16205 address = {New York, NY},
16206 publisher = {McGraw-Hill},
16207 }
16208 %</bibdb>
16209 % \end{macrocode}
16210 % Note that the correct title has ``a'' before ``science''.
16211 % \begin{macrocode}
16212 %<*xmpl>
16213 \item
16214 \cite{apa6:ch7-ex24} \\
16215 \cite{apa6:ch7-ex24} \\
16216 \fullciteA{apa6:ch7-ex24} \\
16217 \citeA{apa6:ch7-ex24}
16218 %</xmpl>
16219 %<*bibdb>
16220 @incollection{apa6:ch7-ex24,
16221 author = {Strong, Edward K., Jr. and Uhrbrock, Richard S.},
16222 year = {1923},
16223 title = {Bibliography on Job Analysis},
16224 editor = {Outhwaite{\bibeditortype{Series Ed.\hbox{}}}, Leonard},
16225 booktitle = {Personnel {Research} {Series}: Vol.~1. {Job} Analysis and the
16226 Curriculum},
16227 pages = {140--146},
16228 doi = {10.1037/10762-000},
16229 }
16230 %</bibdb>
16231 % \end{macrocode}
16232 % There are several notable things with this reference: (1) The whole book is
16233 % written by the same authors, so I'd think we'd normally list the book title
16234 % in the \fieldname{title} field and in the text refer to the specific chapter
16235 % or pages, rather than single out the chapter in the reference list. (2)
16236 % The doi of the chapter is \doi{10.1037/10762-006}; the doi given here
16237 % is the one for the whole book. (3) It is unclear why we would mention the
16238 % series in which the book appears or the series editor. My impression from
16239 % earlier versions of the \emph{APA manual} is that this is only done if the
16240 % ``series'' is to be considered a joint work (like an encyclopedia) where
16241 % different volumes have different editors and there is a series editor. It is
16242 % my impression that the current work is just a book in a series of books, like
16243 % every publisher has its various series with their series editors. (Note that
16244 % the series title has to be capitalized.) So in summary, I would normally
16245 % format this example as
16246 % \begin{verbatim}
16247 % @book{apa6:ch7-ex24,
16248 % author = {Strong, Edward K., Jr. and Uhrbrock, Richard S.},
16249 % year = {1923},
16250 % title = {Job Analysis and the Curriculum},
16251 % doi = {10.1037/10762-000},
16252 % }
16253 % \end{verbatim}
16254 % where I'm using the url for the whole book, because I refer to the whole book.
16255 % \begin{macrocode}
16256 %<*xmpl>
16257 \item
16258 \cite{apa6:ch7-ex25} \\
16259 \cite{apa6:ch7-ex25} \\
16260 \fullciteA{apa6:ch7-ex25} \\
16261 \citeA{apa6:ch7-ex25}
16262 %</xmpl>
16263 %<*bibdb>
16264 @incollection{apa6:ch7-ex25,
16265 author = {Haybron, Daniel M.},
16266 year = {2008},
16267 title = {Philosophy and the Science of Subjective Well-Being},
16268 editor = {Eid, Michael and Larsen, Randy J.},
16269 booktitle = {The Science of Subjective Well-Being},
16270 pages = {17--43},
16271 address = {New York, NY},
16272 publisher = {Guilford Press},
16273 }
16274 %</bibdb>
16275 % \end{macrocode}
16276 % In previous versions of the \emph{APA manual} (e.g., 5th ed., p.~217), the
16277 % states or countries of a list of cities ``well known for publishing'',
16278 % including New York, were not given, but this has been abandoned in the 6th
16279 % ed.
16280 % \begin{macrocode}
16281 %<*xmpl>
16282 \item
16283 \cite{apa6:ch7-ex26} \\
16284 \cite{apa6:ch7-ex26} \\
16285 \fullciteA{apa6:ch7-ex26} \\
16286 \citeA{apa6:ch7-ex26}
16287 %</xmpl>
16288 %<*bibdb>
16289 @incollection{apa6:ch7-ex26,
16290 author = {Piaget, Jean},
16291 year = {1988},
16292 title = {Extracts from {Piaget}'s Theory},
16293 translator = {Gellerier, Guy and Langer, Jonas},
16294 editor = {Richardson, Ken and Sheldon, Sue},
16295 booktitle = {Cognitive Development to Adolescence: A Reader},
16296 pages = {3--18},
16297 address = {Hillsdale, NJ},
16298 publisher = {Erlbaum},
16299 originalbooktitle = {Manual of Child Psychology},
16300 originalpages = {703--732},
16301 originaleditor = {Mussen, Paul H.},
16302 originalyear = {1970},
16303 originaladdress = {New York, NY},
16304 originalpublisher = {Wiley},
16305 }
16306 %</bibdb>
16307 % \end{macrocode}
16308 % It looks like the title of the Mussen book should be
16309 % \emph{Carmichael's Manual of Child Psychology} and it's the third edition.
16310 % \begin{macrocode}
16311 %<*xmpl>
16312 \item
16313 \cite{apa6:ch7-ex27} \\
16314 \cite{apa6:ch7-ex27} \\
16315 \fullciteA{apa6:ch7-ex27} \\
16316 \citeA{apa6:ch7-ex27}
16317 %</xmpl>
16318 %<*bibdb>
16319 @book{apa6:ch7-ex27,
16320 editor = {VandenBos, Gary R.},
16321 year = {2007},
16322 title = {{APA} Dictionary of Psychology},
16323 address = {Washington, DC},
16324 publisher = {American Psychological Association},
16325 }
16326 %</bibdb>
16327 %<*xmpl>
16328 \item
16329 \cite{apa6:ch7-ex28} \\
16330 \cite{apa6:ch7-ex28} \\
16331 \fullciteA{apa6:ch7-ex28} \\
16332 \citeA{apa6:ch7-ex28}
16333 %</xmpl>
16334 %<*bibdb>
16335 @book{apa6:ch7-ex28,
16336 author = {{\bibcorporate{Real Academia Espa\~{n}ola}}},
16337 year = {2001},
16338 title = {Diccionario de la Lengua Espa\~{n}ola},
16339 englishtitle = {Dictionary of the {Spanish} Language},
16340 edition = {22},
16341 address = {Madrid, Spain},
16342 publisher = {{\bibcorporate{Real Academia Espa\~{n}ola}}},
16343 }
16344 %</bibdb>
16345 %<*xmpl>
16346 \item
16347 \cite{apa6:ch7-ex29} \\
16348 \cite{apa6:ch7-ex29} \\
16349 \fullciteA{apa6:ch7-ex29} \\
16350 \citeA{apa6:ch7-ex29}
16351 %</xmpl>
16352 %<*bibdb>
16353 @incollection{apa6:ch7-ex29,
16354 author = {Graham, George},
16355 year = {2007},
16356 title = {Behaviorism},
16357 editor = {Zalta, Edward N.},
16358 booktitle = {The {Stanford} Encyclopedia of Philosophy},
16359 edition = {Fall 2007},
16360 url = {http://plato.stanford.edu/entries/behaviorism/},
16361 }
16362 %</bibdb>
16363 % \end{macrocode}
16364 % At the time of this writing (June 2011), this url contains the Fall 2010
16365 % version. The Fall 2007 version can be found at
16366 % \url{http://plato.stanford.edu/archives/fall2007/entries/behaviorism/}.
16367 % This is what the website itself says about citation:
16368 % \begin{quote}
16369 % Please note that you are being asked to cite a URL that is in a fixed,
16370 % archived edition of the encyclopedia. The reason for this is that the
16371 % Stanford Encyclopedia of Philosophy recommends that readers use a stable
16372 % citation for scholarly purposes. You should not cite the dynamic portion
16373 % of the encyclopedia.
16374 % \end{quote}
16375 % Furthermore,
16376 % \begin{quote}
16377 % There are over 50 \BibTeX{} styles and no standard format that is
16378 % guaranteed to work for all 50. So, we suggest you use our string as a
16379 % `useful suggestion' that might need to be adapted for your particular
16380 % \BibTeX{} file.
16381 % \end{quote}
16382 % \begin{verbatim}
16383 % @InCollection{sep-behaviorism,
16384 % author = {Graham, George},
16385 % title = {Behaviorism},
16386 % booktitle = {The Stanford Encyclopedia of Philosophy},
16387 % editor = {Edward N. Zalta},
16388 % howpublished = {\url{http://plato.stanford.edu/archives/fall2007/entries/behaviorism/}},
16389 % year = {2007},
16390 % edition = {Fall 2007},
16391 % }
16392 % \end{verbatim}
16393 % which is pretty similar to what I did above. The only big difference is that
16394 % that they put the url in the \fieldname{howpublished} field, which should
16395 % work fine with \pkg{apacite}, except that the APA wants the ``Retrieved from''
16396 % string, which is generated by \pkg{apacite} if you put the url in the
16397 % \fieldname{url} field but not if you put it in the \fieldname{howpublished}
16398 % field, so you'll have to insert it yourself in the \fieldname{howpublished}
16399 % field if you want to use that.
16400 % \begin{macrocode}
16401 %<*xmpl>
16402 \item
16403 \cite{apa6:ch7-ex30} \\
16404 \cite{apa6:ch7-ex30} \\
16405 \fullciteA{apa6:ch7-ex30} \\
16406 \citeA{apa6:ch7-ex30}
16407 %</xmpl>
16408 %<*bibdb>
16409 @incollection{apa6:ch7-ex30,
16410 title = {Heuristic},
16411 booktitle = {Merriam-{Webster}'s Online Dictionary},
16412 edition = {11},
16413 url = {http://www.m-w.com/dictionary/heuristic},
16414 }
16415 %</bibdb>
16416 % \end{macrocode}
16417 % One could argue that if the online edition refers to the 11th edition of
16418 % the print version, the year should also be the year of the print version,
16419 % instead of ``n.d.''.
16420 % \begin{macrocode}
16421 %<*xmpl>
16422 \item
16423 \cite{apa6:ch7-ex31} \\
16424 \cite{apa6:ch7-ex31} \\
16425 \fullciteA{apa6:ch7-ex31} \\
16426 \citeA{apa6:ch7-ex31}
16427 %</xmpl>
16428 %<*bibdb>
16429 @techreport{apa6:ch7-ex31,
16430 author = {{\bibcorporate{U.S. Department of Health and Human
16431 Services, National Institutes of Health, National Heart,
16432 Lung, and Blood Institute}}},
16433 firstkey = {{U.S. Department of Health and Human
16434 Services, National Institutes of Health, National Heart,
16435 Lung, and Blood Institute [NHLBI]}},
16436 key = {{NHLBI}},
16437 year = {2003},
16438 title = {Managing Asthma: A Guide for Schools},
16439 type = {NIH Publication},
16440 number = {02-2650},
16441 url = {http://www.nhlbi.nih.gov/health/prof/lung/asthma/asth_sch.pdf},
16442 }
16443 %</bibdb>
16444 % \end{macrocode}
16445 % This is an awfully long author name. In the 5th edition,
16446 % section~3.96, example~1, only ``National Institute of Mental Health''
16447 % was used, without all the higher levels in the hierarchy.
16448 % \begin{macrocode}
16449 %<*xmpl>
16450 \item
16451 \cite{apa6:ch7-ex32} \\
16452 \cite{apa6:ch7-ex32} \\
16453 \fullciteA{apa6:ch7-ex32} \\
16454 \citeA{apa6:ch7-ex32}
16455 %</xmpl>
16456 %<*bibdb>
16457 @techreport{apa6:ch7-ex32,
16458 author = {{\bibcorporate{American Psychological Association, Task
16459 Force on the Sexualization of Girls}}},
16460 firstkey = {{American Psychological Association, Task
16461 Force on the Sexualization of Girls [APA]}},
16462 key = {{APA}},
16463 year = {2007},
16464 title = {Report of the {APA} {Task} {Force} on the {Sexualization}
16465 of {Girls}},
16466 type = {\bibnotype},
16467 url = {http://www.apa.org/pi/wpo/sexualization.html},
16468 }
16469 %</bibdb>
16470 % \end{macrocode}
16471 % \begin{macrocode}
16472 %<*xmpl>
16473 \item
16474 \cite{apa6:ch7-ex33} \\
16475 \cite{apa6:ch7-ex33} \\
16476 \fullciteA{apa6:ch7-ex33} \\
16477 \citeA{apa6:ch7-ex33}
16478 %</xmpl>
16479 %<*bibdb>
16480 @techreport{apa6:ch7-ex33,
16481 author = {Kessy, Severine S. A. and Urio, Fratern M.},
16482 year = {2006},
16483 title = {The Contribution of Microfinance Institutions to
16484 Poverty Reduction in {Tanzania}},
16485 type = {Research Report\APACredefineOnce{BRetrievedFrom}
16486 {Retrieved from Research on Poverty Alleviation
16487 website:\ }},
16488 number = {06.3},
16489 url = {http://www.repoa.or.tz/documents_storage/Publications/Reports/06.3_Kessy_and_Urio.pdf},
16490 }
16491 %</bibdb>
16492 % \end{macrocode}
16493 % Note the use of \cmd{\APACredefineOnce} from the \pkg{apacdoc}
16494 % package to make a one-time change of the \cmd{\BRetrievedFrom}
16495 % command to accommodate the ``Research on Poverty Alleviation
16496 % website''.
16497 % \begin{macrocode}
16498 %<*xmpl>
16499 \item
16500 \cite{apa6:ch7-ex34} \\
16501 \cite{apa6:ch7-ex34} \\
16502 \fullciteA{apa6:ch7-ex34} \\
16503 \citeA{apa6:ch7-ex34}
16504 %</xmpl>
16505 %<*bibdb>
16506 @techreport{apa6:ch7-ex34,
16507 author = {McDaniel, Julie E. and Miskel, Cecil G.},
16508 year = {2002},
16509 title = {The Effect of Groups and Individuals on National
16510 Decisionmaking: Influence and Domination in the
16511 Reading Policymaking Environment},
16512 type = {CIERA Report\APACredefineOnce{BRetrievedFrom}
16513 {Retrieved from University of Michigan, Center for
16514 Improvement of Early Reading Achievement website:\ }},
16515 number = {3-025},
16516 url = {http://www.ciera.org/library/reports/inquiry-3/3-025/3-025.pdf},
16517 }
16518 %</bibdb>
16519 % \end{macrocode}
16520 % The APA manual does not have a ``No.'' after ``CIERA Report'',
16521 % which seems like an error in the manual to me.
16522 % \begin{macrocode}
16523 %<*xmpl>
16524 \item
16525 \cite{apa6:ch7-ex35} \\
16526 \cite{apa6:ch7-ex35} \\
16527 \fullciteA{apa6:ch7-ex35} \\
16528 \citeA{apa6:ch7-ex35}
16529 %</xmpl>
16530 %<*bibdb>
16531 @techreport{apa6:ch7-ex35,
16532 author = {{\bibcorporate{Employee Benefit Research Institute}}},
16533 firstkey = {{Employee Benefit Research Institute [EBRI]}},
16534 key = {{EBRI}},
16535 year = {1992},
16536 month = feb,
16537 title = {Sources of Health Insurance and Characteristics of the
16538 Uninsured, Analysis of the {March} 1991 {Current}
16539 {Population} {Survey}},
16540 type = {Issue Brief},
16541 number = {123},
16542 address = {Washington, DC},
16543 institution = {{\bibcorporate{Employee Benefit Research Institute}}},
16544 }
16545 %</bibdb>
16546 % \end{macrocode}
16547 % The APA manual does not include a url, perhaps for the sake of
16548 % an example that shows address and publisher, but I was able to
16549 % retrieve it from \url{http://www.ebri.org/publications/ib/}
16550 % Also, the APA manual does not list the full title.
16551 % \begin{macrocode}
16552 %<*xmpl>
16553 \item
16554 \cite{apa6:ch7-ex36} \\
16555 \cite{apa6:ch7-ex36} \\
16556 \fullciteA{apa6:ch7-ex36} \\
16557 \citeA{apa6:ch7-ex36}
16558 %</xmpl>
16559 %<*bibdb>
16560 @lecture{apa6:ch7-ex36,
16561 author = {Muellbauer, John},
16562 year = {2007},
16563 month = sep,
16564 title = {Housing, Credit and Consumer Expenditure},
16565 chair = {Ludvigson, Sydney C.},
16566 symposium = {Housing and Consumer Behavior},
16567 howpublished = {Symposium conducted at the meeting of the {Federal}
16568 {Reserve} {Bank} of {Kansas} {City}},
16569 address = {Jackson Hole, WY},
16570 }
16571 %</bibdb>
16572 % \end{macrocode}
16573 % There are several things not right about this entry. A minor point is
16574 % that the title does not have a comma after ``Credit''. More
16575 % importantly, the entry seems to misrepresent the symposium. On the
16576 % website
16577 % \url{http://www.kc.frb.org/publications/research/escp/escp-2007.cfm},
16578 % the symposium is listed as ``Housing, Housing Finance, \& Monetary
16579 % Policy, a symposium sponsored by the Federal Reserve Bank of Kansas
16580 % City''. So the title of the symposium is different and it is not a
16581 % ``meeting of'' but a ``symposium sponsored by''. ``Housing and
16582 % Consumer Behavior'' is the title of the session, in which
16583 % Muellbauer's paper is the only paper, so it appears this was simply
16584 % a provisional title of the paper. Ludvigson is the discussant, which
16585 % is not generally the same as the chair, and in fact Martin Feldstein
16586 % is listed as the chair of the general discussion, who also gives the
16587 % ``Overview and concluding remarks'' at the end of the symposium. The
16588 % Kansas City Fed's website posts two versions of the paper (neither of
16589 % which is listed in the APA manual): one downloadable from the website
16590 % mentioned above, which is nicely typeset and starts at page 267, and
16591 % thus looks like an edited published version, and one at
16592 % \url{http://www.kc.frb.org/publicat/sympos/2007/pdf/2007.09.17.muellbauer.pdf},
16593 % which looks like the accepted version from the author. The former
16594 % lists the middle initial ``N.'' of the author, whereas the latter
16595 % does not. Normally, one would cite the published version, but for the
16596 % sake of this example, we cite the paper presented. Nevertheless, the
16597 % description in the APA manual seems grossly inaccurate.
16598 % \begin{macrocode}
16599 %<*xmpl>
16600 \item
16601 \cite{apa6:ch7-ex37} \\
16602 \cite{apa6:ch7-ex37} \\
16603 \fullciteA{apa6:ch7-ex37} \\
16604 \citeA{apa6:ch7-ex37}
16605 %</xmpl>
16606 %<*bibdb>
16607 @lecture{apa6:ch7-ex37,
16608 author = {Liu, Shuhua},
16609 year = {2005},
16610 month = may,
16611 title = {Defending Against Business Crises with the Help of
16612 Intelligent Agent Based Early Warning Solutions},
16613 howpublished = {Paper presented at the Seventh International
16614 Conference on Enterprise Information Systems},
16615 address = {Miami, FL\APACredefineOnce{BRetrievedFrom}{Abstract
16616 retrieved from\ }},
16617 url = {http://www.iceis.org/iceis2005/abstracts_2005.htm},
16618 }
16619 %</bibdb>
16620 % \end{macrocode}
16621 % The website itself uses ``7th'' instead of ``Seventh''.
16622 % \begin{macrocode}
16623 %<*xmpl>
16624 \item
16625 \cite{apa6:ch7-ex38} \\
16626 \cite{apa6:ch7-ex38} \\
16627 \fullciteA{apa6:ch7-ex38} \\
16628 \citeA{apa6:ch7-ex38}
16629 %</xmpl>
16630 %<*bibdb>
16631 @article{apa6:ch7-ex38,
16632 author = {Herculano-Houzel, Suzana and Collins, Christine E.
16633 and Wong, Peiyan and Kaas, Jon H. and Lent, Roberto},
16634 year = {2008},
16635 title = {The Basic Nonuniformity of the Cerebral Cortex},
16636 journal = {Proceedings of the National Academy of Sciences, USA},
16637 volume = {105},
16638 pages = {12593--12598},
16639 doi = {10.1073/pnas.0805417105},
16640 }
16641 %</bibdb>
16642 % \end{macrocode}
16643 % Despite the name ``Proceedings'', this is an ordinary journal and
16644 % thus there is nothing special about this reference. It is
16645 % noteworthy, though, that in the first printing of the 6th edition
16646 % of the APA manual, ``, USA,'' was missing, and this addition is
16647 % listed as a correction in the errata on the APA website. Still this
16648 % is an interesting case where the APA departs from its policy of not
16649 % abbreviating journal titles: PNAS's website lists the name of the
16650 % journal as ``Proceedings of the National Academy of Sciences of the
16651 % United States of America'', and abbreviates it to PNAS.
16652 % \begin{macrocode}
16653 %<*xmpl>
16654 \item
16655 \cite{apa6:ch7-ex39} \\
16656 \cite{apa6:ch7-ex39} \\
16657 \fullciteA{apa6:ch7-ex39} \\
16658 \citeA{apa6:ch7-ex39}
16659 %</xmpl>
16660 %<*bibdb>
16661 @incollection{apa6:ch7-ex39,
16662 author = {Katz, Itai and Gabayan, Kevin and Aghajan, Hamid},
16663 year = {2007},
16664 title = {A Multi-touch Surface Using Multiple Cameras},
16665 editor = {Blanc-Talon, Jacques and Philips, Wilfried
16666 and Popescu, Dan and Scheunders, Paul},
16667 booktitle = {{Lecture} {Notes} in {Computer} {Science}: Vol.~4678.
16668 {Advanced} Concepts for Intelligent Vision Systems},
16669 pages = {97--108},
16670 doi = {10.1007/978-3-540-74607-2_9},
16671 }
16672 %</bibdb>
16673 % \end{macrocode}
16674 % For references with a doi or url, the general rule in the 6th edition
16675 % is to omit the publisher and its address, so this is what I did, and
16676 % the example in the APA manual seems incorrect. Also, the
16677 % capitalization of the book title seems incorrect (cf.\ example~24).
16678 % From previous versions of the APA manual, I got the impression that
16679 % ``series'' in APA speak was the title of a coherent multivolume work
16680 % with possibly different volume editors, and not the name of a book
16681 % series with unrelated works. Because the \fieldname{series} field in
16682 % \BibTeX{} is intended for the latter, which would not normally be
16683 % included in a reference in psychology, \pkg{apacite} has ignored it
16684 % thus far. This example, however, falls in the latter category, and
16685 % thus I may need to reconsider how \pkg{apacite} deals with this,
16686 % especially because it seems more natural then to split what is now
16687 % in the \fieldname{booktitle} field into \fieldname{series},
16688 % \fieldname{volume}, and \fieldname{booktitle}. Note that the example
16689 % does not mention the series editors, unlike series examples in
16690 % previous editions of the APA manual.
16691 % \begin{macrocode}
16692 %<*xmpl>
16693 \item
16694 \cite{apa6:ch7-ex40} \\
16695 \cite{apa6:ch7-ex40} \\
16696 \fullciteA{apa6:ch7-ex40} \\
16697 \citeA{apa6:ch7-ex40} \\
16698 %</xmpl>
16699 %<*bibdb>
16700 @mastersthesis{apa6:ch7-ex40,
16701 author = {McNiel, Donita S.},
16702 year = {2006},
16703 title = {Meaning Through Narrative: A Personal Narrative
16704 Discussing Growing Up with an Alcoholic Mother},
16705 howpublished = {Available from ProQuest Dissertations and Theses
16706 database},
16707 note = {UMI No.\ 1434728},
16708 }
16709 %</bibdb>
16710 % \end{macrocode}
16711 % The APA manual gives rules for unpublished theses, but provides no
16712 % explicit examples. So let's reuse two examples from the 5th edition
16713 % here. Note, however, that I obtained this information and the
16714 % abstracts, though not the full text, from ProQuest, and it says that
16715 % these are abstracted in \emph{DAI} (Series~B, Vol.~50, No.~11,
16716 % p.~5303, 1990) and \emph{MAI} (Vol.~30, No.~3, p.~906, 1992),
16717 % respectively. This also lists the title of the first one and the year
16718 % of the second one differently from the 5th edition of the APA manual.
16719 % I used the ProQuest information.
16720 % \begin{macrocode}
16721 %<*xmpl>
16722 \mbox{}\\
16723 \cite{apa6:ch7-ex40-2} \\
16724 \cite{apa6:ch7-ex40-2} \\
16725 \fullciteA{apa6:ch7-ex40-2} \\
16726 \citeA{apa6:ch7-ex40-2} \\
16727 \mbox{}\\
16728 \cite{apa6:ch7-ex40-3} \\
16729 \cite{apa6:ch7-ex40-3} \\
16730 \fullciteA{apa6:ch7-ex40-3} \\
16731 \citeA{apa6:ch7-ex40-3}
16732 %</xmpl>
16733 %<*bibdb>
16734 @phdthesis{apa6:ch7-ex40-2,
16735 author = {Wilfley, Denise E.},
16736 year = {1989},
16737 title = {An Analysis of Psychological Distress, Self-concept,
16738 and Patterns of Family Interactions in Two Subgroups
16739 of Bulimia--Normal Weight and Obese},
16740 school = {University of Missouri},
16741 address = {Columbia},
16742 }
16743 @mastersthesis{apa6:ch7-ex40-3,
16744 author = {Almeida, David M.},
16745 year = {1989},
16746 title = {Fathers' Participation in Family Work: Consequences
16747 for Fathers' Stress and Father-Child Relations},
16748 school = {University of Victoria},
16749 address = {Victoria, British Columbia, Canada},
16750 }
16751 %</bibdb>
16752 %<*xmpl>
16753 \item
16754 \cite{apa6:ch7-ex41} \\
16755 \cite{apa6:ch7-ex41} \\
16756 \fullciteA{apa6:ch7-ex41} \\
16757 \citeA{apa6:ch7-ex41}
16758 %</xmpl>
16759 %<*bibdb>
16760 @phdthesis{apa6:ch7-ex41,
16761 author = {Adams, Ronald Jerry},
16762 year = {1973},
16763 title = {Building a Foundation for Evaluation of Instruction in
16764 Higher Education and Continuing Education},
16765 url = {http://www.ohiolink.edu/etd/},
16766 }
16767 %</bibdb>
16768 % \end{macrocode}
16769 % \begin{macrocode}
16770 %<*xmpl>
16771 \item
16772 \cite{apa6:ch7-ex42} \\
16773 \cite{apa6:ch7-ex42} \\
16774 \fullciteA{apa6:ch7-ex42} \\
16775 \citeA{apa6:ch7-ex42}
16776 %</xmpl>
16777 %<*bibdb>
16778 @phdthesis{apa6:ch7-ex42,
16779 author = {Bruckman, Amy},
16780 year = {1997},
16781 title = {{MOOSE} Crossing: Construction, Community, and
16782 Learning in a Networked Virtual World for Kids},
16783 school = {Massachusetts Institute of Technology},
16784 url = {http://www-static.cc.gatech.edu/~asb/thesis/},
16785 }
16786 %</bibdb>
16787 % \end{macrocode}
16788 % On the thesis, the author's given names are listed as ``Amy Susan'',
16789 % but the APA manual only lists the first initial and the author cites
16790 % only her first given name in her reference list as well. The format
16791 % with MIT listed in parentheses fits neither rule on p.~207 of the
16792 % APA manual. Presumably, this was done because of a combination of
16793 % factors: thesis obtained from the web, but not a stable database,
16794 % and from the author's website at her current affiliation, not the
16795 % university where the degree was obtained.
16796 % \begin{macrocode}
16797 %<*xmpl>
16798 \item
16799 \cite{apa6:ch7-ex43} \\
16800 \cite{apa6:ch7-ex43} \\
16801 \fullciteA{apa6:ch7-ex43} \\
16802 \citeA{apa6:ch7-ex43}
16803 %</xmpl>
16804 %<*bibdb>
16805 @phdthesis{apa6:ch7-ex43,
16806 author = {Appelbaum, Lawrence G.},
16807 year = {2005},
16808 title = {Three Studies of Human Information Processing:
16809 Texture Amplification, Motion Representation, and
16810 Figure-Ground Segregation},
16811 journal = {Dissertation Abstracts International: Section B.
16812 Sciences and Engineering},
16813 volume = {65},
16814 number = {10},
16815 pages = {5428},
16816 }
16817 %</bibdb>
16818 % \end{macrocode}
16819 % Unlike previous versions of the APA manual, where DAI abstracts had a
16820 % parenthetical part like ``(Doctoral dissertation, University of
16821 % California, Irvine, 2004)'', this is now formatted purely as a
16822 % journal article, so I could have simply used the \entryname{@article}
16823 % entry type. The \fieldname{school} and in particular
16824 % \fieldname{originalyear} fields should now be omitted.
16825 % \begin{macrocode}
16826 %<*xmpl>
16827 \item
16828 \cite{apa6:ch7-ex44} \\
16829 \cite{apa6:ch7-ex44} \\
16830 \fullciteA{apa6:ch7-ex44} \\
16831 \citeA{apa6:ch7-ex44}
16832 %</xmpl>
16833 %<*bibdb>
16834 @phdthesis{apa6:ch7-ex44,
16835 author = {Carlbom, Pelle},
16836 year = {2000},
16837 title = {Carbody and Passengers in Rail Vehicle Dynamics},
16838 type = {Doctoral thesis},
16839 school = {Royal Institute of Technology},
16840 address = {Stockholm, Sweden},
16841 url = {http://urn.kb.se/resolve?urn=urn:nbn:se:kth:diva-3029},
16842 }
16843 %</bibdb>
16844 % \end{macrocode}
16845 % This follows the same pattern as example~42. ``Doctoral thesis'' is
16846 % presumably an error; it should be ``Doctoral dissertation''.
16847 % \begin{macrocode}
16848 %<*xmpl>
16849 \end{enumerate}
16850 \bibliographystyle{apacite}
16851 \bibliography{apa5ex}
16852 \end{document}
16853 %</xmpl>
16854 % \end{macrocode}
16855 %
16856 % \subsection{Additional references}
16857 %
16858 % \begin{macrocode}
16859 %<*bibdb>
16860 @book{APAManual3,
16861 author = {{\bibcorporate{American Psychological Association}}},
16862 firstkey = {{American Psychological Association [APA]}},
16863 key = {{APA}},
16864 year = {1984},
16865 title = {Publication Manual of the {American} {Psychological}
16866 {Association}},
16867 edition = {3},
16868 address = {Washington, DC},
16869 publisher = {{\bibcorporate{American Psychological Association}}},
16870 note = {with revisions},
16871 }
16872
16873 @book{APAManual5,
16874 author = {{\bibcorporate{American Psychological Association}}},
16875 firstkey = {{American Psychological Association [APA]}},
16876 key = {{APA}},
16877 year = {2001},
16878 title = {Publication Manual of the {American} {Psychological}
16879 {Association}},
16880 edition = {5},
16881 address = {Washington, DC},
16882 publisher = {{\bibcorporate{American Psychological Association}}},
16883 }
16884
16885 @book{APAManual6,
16886 author = {{\bibcorporate{American Psychological Association}}},
16887 firstkey = {{American Psychological Association [APA]}},
16888 key = {{APA}},
16889 year = {2009},
16890 title = {Publication Manual of the {American} {Psychological}
16891 {Association}},
16892 edition = {6},
16893 address = {Washington, DC},
16894 publisher = {{\bibcorporate{American Psychological Association}}},
16895 }
16896
16897 @book{chicago,
16898 title = {The {Chicago} Manual of Style},
16899 edition = {15},
16900 year = {2003},
16901 address = {Chicago},
16902 publisher = {The University of Chicago Press},
16903 }
16904
16905 @misc{Pata88,
16906 author = {Patashnik, Oren},
16907 year = {1988},
16908 title = {{\BibTeX ing}},
16909 url = {http://www.ctan.org/tex-archive/biblio/
16910 bibtex/distribs/doc/btxdoc.tex},
16911 lastchecked = {October 4, 2008},
16912 }
16913
16914 @book{LaTeXbook,
16915 author = {Lamport, Leslie},
16916 year = {1994},
16917 title = {{\APACSortNoop{LaTeX}}{\LaTeX}: A Document Preparation System.
16918 {User}'s Guide and Reference Manual},
16919 edition = {2},
16920 address = {Reading, MA},
16921 publisher = {Addison-Wesley},
16922 }
16923
16924 @book{KoDa04,
16925 author = {Kopka, Helmut and Daly, Patrick W.},
16926 year = {2004},
16927 title = {Guide To {\APACSortNoop{LaTeX}}{\LaTeX}},
16928 edition = {4},
16929 address = {Boston, MA},
16930 publisher = {Addison-Wesley},
16931 }
16932
16933 @book{TLC2,
16934 author = {Mittelbach, Frank and Goossens, Michel},
16935 year = {2004},
16936 title = {The {\APACSortNoop{LaTeX}}{\LaTeX} Companion},
16937 edition = {2},
16938 address = {Boston, MA},
16939 publisher = {Addison-Wesley},
16940 }
16941
16942 @book{dLMe08a,
16943 editor = {De Leeuw, Jan and Meijer, Erik},
16944 year = {2008},
16945 title = {Handbook of Multilevel Analysis},
16946 address = {New York, NY},
16947 publisher = {Springer},
16948 }
16949
16950 @book{meijer1998,
16951 author = {Meijer, Erik},
16952 year = {1998},
16953 title = {Structural Equation Models for Nonnormal Data},
16954 address = {Leiden, Netherlands},
16955 publisher = {DSWO Press},
16956 }
16957
16958 @article{meijer07,
16959 author = {Meijer, Erik},
16960 year = {2007},
16961 title = {Citations, Reference List, and Author Index with
16962 \textsf{apacite}},
16963 journal = {Eutypon},
16964 volume = {16--19},
16965 pages = {1--31},
16966 url = {http://www.eutypon.gr/eutypon/e-cont-16-19.html},
16967 }
16968
16969 @book{WaMe00,
16970 author = {Wansbeek, Tom and Meijer, Erik},
16971 year = {2000},
16972 title = {Measurement Error and Latent Variables in Econometrics},
16973 address = {Amsterdam, Netherlands},
16974 publisher = {North-Holland},
16975 }
16976
16977 @unpublished{APA-3rd-ed-ex53,
16978 author = {Gottfredson, G. D.},
16979 year = {1978},
16980 title = {Why Don't Vocational Interests Predict Job
16981 Satisfaction Better Than They Do?},
16982 howpublished = {Unpublished manuscript},
16983 organization = {Johns Hopkins University, Center for Social
16984 Organization of Schools},
16985 address = {Baltimore},
16986 }
16987
16988 @misc{DePsych01,
16989 key = {{\APACciteatitle{Uitgebreide Richtlijnen}}},
16990 title = {Uitgebreide Richtlijnen voor het Aanleveren van Kopij},
16991 englishtitle = {Detailed Guidelines for the Submission of Manuscripts},
16992 year = {2001},
16993 lastchecked = {January~3, 2005},
16994 url = {http://upload.lectric.nl/data/nip7/Richtlijnen%20voor%20auteurs.pdf},
16995 }
16996
16997 @article{NTPG04,
16998 title = {Aanwijzingen voor Auteurs},
16999 englishtitle = {Instructions for Authors},
17000 year = {2004},
17001 journal = {Nederlands Tijdschrift voor de Psychologie en haar
17002 Grensgebieden},
17003 volume = {59},
17004 pages = {inside back cover},
17005 }
17006
17007 @book{Renk02,
17008 author = {Renkema, J.},
17009 year = {2002},
17010 title = {Schrijfwijzer},
17011 englishtitle = {Writing Indicator},
17012 edition = {4},
17013 address = {Den Haag, The Netherlands},
17014 publisher = {Sdu},
17015 }
17016
17017 @article{Schr04,
17018 author = {Schrooten, M. G. S. and Smulders, F. T. Y.},
17019 year = {2004},
17020 title = {Een Experimentele Kijk op Angst: Aandacht en Automatisme
17021 in de Verwerking van Bedreigende Stimuli},
17022 englishtitle = {Anxiety from an Experimental Point of View: Attention and
17023 Automaticity in the Processing of Threatening Stimuli},
17024 journal = {Nederlands Tijdschrift voor de Psychologie en haar
17025 Grensgebieden},
17026 volume = {59},
17027 pages = {135--149},
17028 }
17029
17030 @book{VanDale89,
17031 key = {{\APACcitebtitle{van Dale}}},
17032 title = {van {Dale} Groot Woordenboek {Engels}-{Nederlands}},
17033 englishtitle = {van {Dale}'s Large Dictionary {English}-{Dutch}},
17034 edition = {2},
17035 year = {1989},
17036 address = {Utrecht, The Netherlands},
17037 publisher = {Van Dale},
17038 }
17039
17040 @book{KLO05,
17041 author = {Haapam\"aki, Tuula and Hedman, Arne
17042 and H\"am\"al\"ainen, Esa and Kurvinen, Birgitta
17043 and Lager, Lassi and Lindegren, Yrj\"o
17044 and Murtomaa, Eeva and Vainikka, Eila},
17045 year = {2005},
17046 title = {Monografioiden kuvailu},
17047 englishtitle = {Description for Monographic Publications},
17048 address = {Helsinki, Finland},
17049 publisher = {Helsingin yliopiston kirjasto},
17050 url = {http://www.kansalliskirjasto.fi/kirjastoala/
17051 luettelointisaannot/Files/liitetiedosto2/
17052 monografioiden_kuvailu.pdf},
17053 lastchecked = {January 19, 2009},
17054 }
17055
17056 @book{DGPs07,
17057 firstkey = {Deutsche Gesellschaft f\"ur Psychologie [DGPs]},
17058 key = {DGPs},
17059 author = {\bibcorporate{Deutsche Gesellschaft f\"ur Psychologie}},
17060 year = {2007},
17061 title = {Richtlinien zur {Manuskriptgestaltung}},
17062 englishtitle = {Guidelines for Manuscript Preparation},
17063 edition = {3},
17064 address = {G\"ottingen, Germany},
17065 publisher = {Hogrefe-Verlag},
17066 }
17067
17068 @misc{UIB08,
17069 author = {{\bibcorporate{University of Bergen}}},
17070 year = {2008},
17071 title = {American {Psychological} {Association} ({APA})},
17072 url = {http://www.sokogskriv.no/norsk/basis/sitering-etikk/APA.pdf},
17073 lastchecked = {October 12, 2008},
17074 address = {Bergen, Norway},
17075 publisher = {University of Bergen, University Library},
17076 }
17077 %% Referenced from
17078 %% \url{http://www.sokogskriv.no/norsk/basis/sitering-etikk/4-stiler.html}
17079 %%
17080 %% Original version:
17081 %% \url{http://www.ub.uib.no/felles/IK/APA.pdf}
17082 %% but this page does not exist anymore on 2008/10/12.
17083 %%
17084 %% Norwegian name:
17085 %% Universitetsbiblioteket, Universitetet I Bergen, 2008
17086
17087 @misc{UiO06,
17088 author = {{\bibcorporate{University of Oslo}}},
17089 year = {2006},
17090 title = {Normer for skriftlig arbeid},
17091 englishtitle = {Standards for Written Works},
17092 url = {http://www.uio.no/studier/emner/medisin/isv/SYKVIT4400/v07/
17093 REV_normer_skriftl_arb.pdf},
17094 lastchecked = {October 12, 2008},
17095 address = {Oslo, Norway},
17096 publisher = {University of Oslo, Institute of Nursing and Health Sciences},
17097 }
17098 %% Referenced from
17099 %% \url{http://www.uio.no/studier/emner/medisin/isv/SYKVIT4400/v07/}
17100 %%
17101 %% Norwegian name:
17102 %% Universitetet i Oslo, Sykepleievitenskap, 28.06.06
17103
17104
17105 @misc{Erik01,
17106 author = {Erikson, Martin G.},
17107 year = {2001},
17108 title = {Att Skriva Litteraturreferenser Enligt {Harvard}-Systemet},
17109 englishtitle = {Citations According to the {Harvard} System},
17110 url = {http://www.his.se/upload/10631/referenser.pdf},
17111 lastchecked = {October 18, 2008},
17112 Eriksremark = {Originally downloaded December 9, 2004, from
17113 \url{http://www.ida.his.se/ida/kurser/exjobb/kursmaterial/referenser.pdf},
17114 but this site does not exist anymore.},
17115 }
17116
17117 @misc{Johnsson,
17118 author = {Johnsson, Mattias},
17119 title = {Lathund for Referensskrivning},
17120 englishtitle = {Cheat Sheet for Formatting of References},
17121 url = {http://www.ped.gu.se/users/berner/htmarkiv/referens.html},
17122 lastchecked = {October 18, 2008},
17123 Eriksremark = {Originally downloaded December 9, 2004},
17124 }
17125
17126 @misc{GU94,
17127 title = {Referensskrivning},
17128 englishtitle = {Formatting of References},
17129 year = {1994},
17130 url = {http://www.ped.gu.se/forskarutbildning/Referens_skrivning.htm},
17131 lastchecked = {October 18, 2008},
17132 Eriksremark = {Originally downloaded December 9, 2004.
17133 Site is Gothenburg University Web site, but reference seems
17134 specific enough. Authors may be (?)
17135 Informatorn/Dahlgren/Ottosson, but I don't know first
17136 names.},
17137 }
17138
17139 %%
17140 %</bibdb>
17141 % \end{macrocode}
17142 %
17143 % \section{\BibTeX\ style (\fname{apacite.bst} and its siblings)}
17144 % The program in \BibTeX's language that formats the reference list.
17145 % Currently, this supplies four files: \fname{apacite.bst}, \fname{apacitex.bst}
17146 % \fname{apacann.bst}, and \fname{apacannx.bst}.
17147 % These files are almost identical, but \fname{apacitex.bst} and
17148 % \fname{apacannx.bst} generate information that can be used to generate an
17149 % author index, and \fname{apacann.bst} and \fname{apacannx.bst} use annotation
17150 % when available for annotated bibliographies.
17151 %
17152 % We start with file headers and a function that prints the version number in
17153 % the \fname{.blg} file.
17154 % \begin{macrocode}
17155 %<*!annotated>
17156 %<bibstyle>%% apacite.bst : reference list according to APA manual
17157 %<xbibstyle>%% apacitex.bst : reference list according to APA manual
17158 %<xbibstyle>%% with author indexing information
17159 %</!annotated>
17160 %<*annotated>
17161 %<bibstyle>%% apacann.bst : reference list according to APA manual
17162 %<bibstyle>%% with annotations
17163 %<xbibstyle>%% apacannx.bst : reference list according to APA manual
17164 %<xbibstyle>%% with annotations and author indexing information
17165 %</annotated>
17166 %<*bibstyle|xbibstyle>
17167 %% Written by Erik Meijer
17168
17169 FUNCTION {identify.apacite.version}
17170 { % Put identifying string in the .blg file
17171 %</bibstyle|xbibstyle>
17172 %<*!annotated>
17173 %<bibstyle> "apacite.bst"
17174 %<xbibstyle> "apacitex.bst"
17175 %<bibstyle> " [2013/07/21 v6.03 APA bibliography style]"
17176 %<xbibstyle> " [2013/07/21 v6.03 APA bibl. style with author index info]"
17177 %</!annotated>
17178 %<*annotated>
17179 %<bibstyle> "apacann.bst"
17180 %<xbibstyle> "apacannx.bst"
17181 %<bibstyle> " [2013/07/21 v6.03 APA annotated bibliography style]"
17182 %<*xbibstyle>
17183 " [2013/07/21 v6.03 APA annotated bibl. style with author index info]"
17184 %</xbibstyle>
17185 %</annotated>
17186 %<*bibstyle|xbibstyle>
17187 * top$
17188 }
17189 % \end{macrocode}
17190 % Declaration of fields, integers, and strings for each entry.
17191 % \begin{macrocode}
17192 ENTRY
17193 { address
17194 annote
17195 annotate
17196 author
17197 booktitle
17198 chair
17199 chapter
17200 day
17201 doi
17202 edition
17203 editor
17204 englishtitle
17205 firstkey
17206 howpublished
17207 institution
17208 journal
17209 key
17210 lastchecked
17211 month
17212 nihms
17213 note
17214 number
17215 organization
17216 originaladdress
17217 originalbooktitle
17218 originaledition
17219 originaleditor
17220 originaljournal
17221 originalnumber
17222 originalpages
17223 originalpublisher
17224 originalvolume
17225 originalyear
17226 pages
17227 pmcid
17228 publisher
17229 school
17230 series
17231 symposium
17232 text
17233 title
17234 translator
17235 type
17236 url
17237 urldate
17238 volume
17239 year
17240 }
17241 { cite.order %% order of first citation
17242 title.number %% for sorting titles
17243 cite.initials %% dummy (0-1) indicating whether or not
17244 %% initials of the 1st author must
17245 %% be used for citing
17246 cite.num.names.full %% number of names to be cited for full and
17247 cite.num.names.short %% short cite
17248 add.to.year %% For a, b, c, etc. after year
17249 %% in multiple citations with same author-year
17250 }
17251 { year.label %% For sorting entries by year
17252 author.year.sort.label %% For sorting entries and checking whether
17253 %% initials should be added, how many authors
17254 %% should be cited and whether a, b, etc.
17255 %% after year is necessary
17256 title.sort.label %% for sorting titles
17257 citeorder.sort.label %% for sorting by citation order
17258 type.2 %% Replacement for type with misc entries and
17259 %% entries that revert to misc.
17260 }
17261 % \end{macrocode}
17262 % Declaration of global integers and strings.
17263 % \begin{macrocode}
17264 INTEGERS { len pos name.max old.number numnames numnames.old
17265 nameptr lastname format.num.names cite.initials.old
17266 cite.num.names.old add.to.year.old forward
17267 multiresult dot brace.level
17268 }
17269
17270 STRINGS { s t u old.label field
17271 aut1f aut1s aut1f.old aut1s.old
17272 aut2 aut2.old
17273 aut3 aut3.old
17274 aut4 aut4.old
17275 aut5 aut5.old
17276 aut6 aut6.old
17277 year.label.old
17278 }
17279 % \end{macrocode}
17280 % Two functions that can be used for testing purposes.
17281 % \begin{macrocode}
17282 FUNCTION {test} { #0 }
17283 FUNCTION {dump.stack}
17284 { "---- STACK {" cite$ * "} ----" * top$
17285 stack$
17286 "---- END STACK {" cite$ * "} ----" * top$
17287 }
17288 % \end{macrocode}
17289 % A small function that indicates whether index entries must be generated.
17290 % This is the only line that is different between \fname{apacite.bst} and
17291 % \fname{apacitex.bst} (and between \fname{apacann.bst} and
17292 % \fname{apacannx.bst}).
17293 % \begin{macrocode}
17294 %</bibstyle|xbibstyle>
17295 %<bibstyle>FUNCTION {make.index} { #0 }
17296 %<xbibstyle>FUNCTION {make.index} { #1 }
17297 %<*bibstyle|xbibstyle>
17298 % \end{macrocode}
17299 % A small function that indicates whether the reference list must be
17300 % sorted.
17301 % \begin{macrocode}
17302 FUNCTION {unsorted} { #0 }
17303 % \end{macrocode}
17304 % Month macros. We use numbers, along with a \LaTeX{} function, which
17305 % translates them into words. This allows language-specific deviations.
17306 % \begin{macrocode}
17307 MACRO {jan} {"{\APACmonth{01}}"}
17308 MACRO {feb} {"{\APACmonth{02}}"}
17309 MACRO {mar} {"{\APACmonth{03}}"}
17310 MACRO {apr} {"{\APACmonth{04}}"}
17311 MACRO {may} {"{\APACmonth{05}}"}
17312 MACRO {jun} {"{\APACmonth{06}}"}
17313 MACRO {jul} {"{\APACmonth{07}}"}
17314 MACRO {aug} {"{\APACmonth{08}}"}
17315 MACRO {sep} {"{\APACmonth{09}}"}
17316 MACRO {oct} {"{\APACmonth{10}}"}
17317 MACRO {nov} {"{\APACmonth{11}}"}
17318 MACRO {dec} {"{\APACmonth{12}}"}
17319 MACRO {winter} {"{\APACmonth{13}}"}
17320 MACRO {spring} {"{\APACmonth{14}}"}
17321 MACRO {summer} {"{\APACmonth{15}}"}
17322 MACRO {fall} {"{\APACmonth{16}}"}
17323 % \end{macrocode}
17324 % Logical ``not'': If the top element on the stack is $A$ then this function
17325 % does the following:
17326 % \begin{verbatim}
17327 % push { #0 }
17328 % push { #1 }
17329 % \end{verbatim}
17330 % So now the first three elements of the stack are
17331 % \verb+{ #1 }+ \verb+{ #0 }+ $A$.
17332 % These are popped and subjected to ``if'':
17333 % If $A > 0$ then \verb+{ #0 }+ is executed, else \verb+{ #1 }+ is executed:
17334 % \begin{verbatim}
17335 % if A > 0
17336 % then 0
17337 % else 1
17338 % \end{verbatim}
17339 % So consider integers as logicals, where 1 = true and 0 = false,
17340 % then this does
17341 % \begin{verbatim}
17342 % (if A then false else true)
17343 % \end{verbatim}
17344 % which is a logical ``not''.
17345 % \begin{macrocode}
17346 FUNCTION {not}
17347 { { #0 }
17348 { #1 }
17349 if$
17350 }
17351
17352 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17353 % Logical 'and':
17354 % If the first 2 elements on the stack are A B
17355 % then this function does the following:
17356 % push 'skip$
17357 % push { pop$ #0 }
17358 % So now first 4 elements are
17359 % { pop$ #0 } 'skip$ A B
17360 % The first 3 are popped and subjected to 'if' (B is on top of
17361 % the stack):
17362 % If A > 0 then 'skip$ is executed, else { pop$ #0 } is executed:
17363 % if A > 0
17364 % then (B stays on top of stack)
17365 % else (B is popped and #0 is pushed)
17366 % So consider integers as logicals, where 1 = true and 0 = false,
17367 % then this does
17368 % (if A then B else false)
17369 % which is a logical 'and'.
17370
17371 FUNCTION {and}
17372 { 'skip$
17373 { pop$ #0 }
17374 if$
17375 }
17376
17377 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17378 % Logical 'or':
17379 % If the first 2 elements on the stack are A B
17380 % then this function does the following:
17381 % push { pop$ #1 }
17382 % push 'skip$
17383 % So now first 4 elements are
17384 % 'skip$ { pop$ #1 } A B
17385 % The first 3 are popped and subjected to 'if' (B is on top of
17386 % the stack):
17387 % If A > 0 then { pop$ #1 } is executed, else 'skip$ is executed:
17388 % if A > 0
17389 % then (B is popped and #1 is pushed)
17390 % else (B stays on top of stack)
17391 % So consider integers as logicals, where 1 = true and 0 = false,
17392 % then this does
17393 % (if A then true else B)
17394 % which is a logical 'or'.
17395
17396 FUNCTION {or}
17397 { { pop$ #1 }
17398 'skip$
17399 if$
17400 }
17401
17402
17403 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17404 % GENERAL PURPOSE FUNCTIONS FOR FORMATTING %
17405 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17406
17407 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17408 % issues warning if field is empty
17409 % call with
17410 % "field" field warning.if.empty
17411 % Note that the first field must be between quotes
17412 % because it is the fieldname for use in the warning message.
17413 %
17414 FUNCTION {warning.if.empty}
17415 { empty$
17416 { "No " swap$ * " in " * cite$ * warning$ }
17417 { pop$ }
17418 if$
17419 }
17420
17421
17422
17423
17424 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17425 %
17426 % issues warning if title, type, and howpublished are empty
17427 %
17428 FUNCTION {check.relevant.fields}
17429 { title empty$
17430 type empty$ and
17431 howpublished empty$ and
17432 { "No title, type, and howpublished in " cite$ * warning$ }
17433 'skip$
17434 if$
17435 }
17436
17437
17438
17439
17440 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17441 %
17442 % delivers 1 if (both editor and translator
17443 % not empty and not equal to each other)
17444 % 0 if (editor or translator empty) or
17445 % (editor = translator)
17446 %
17447 FUNCTION {editor.ne.trans}
17448 { translator empty$
17449 { #0 }
17450 { editor empty$
17451 { #0 }
17452 { translator editor =
17453 { #0 }
17454 { #1 }
17455 if$
17456 }
17457 if$
17458 }
17459 if$
17460 }
17461
17462 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17463 % Convert integer to string, assume that integer < 100,000
17464
17465 FUNCTION {conv.int.to.str}
17466 { duplicate$ #10 <
17467 { "0000" swap$ int.to.str$ * }
17468 { duplicate$ #100 <
17469 { "000" swap$ int.to.str$ * }
17470 { duplicate$ #1000 <
17471 { "00" swap$ int.to.str$ * }
17472 { duplicate$ #10000 <
17473 { "0" swap$ int.to.str$ * }
17474 { int.to.str$ }
17475 if$
17476 }
17477 if$
17478 }
17479 if$
17480 }
17481 if$
17482 }
17483
17484
17485 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17486 % Delivers 1 if possibly editor in author position
17487 % 2 if editor not in author position
17488 % 3 if not applicable: use key
17489 % 0 if unknown type
17490
17491 FUNCTION {ref.type}
17492 { type$ "article" =
17493 type$ "magazine" =
17494 type$ "newspaper" =
17495 type$ "book" =
17496 type$ "techreport" =
17497 type$ "unpublished" =
17498 type$ "misc" =
17499 type$ "booklet" =
17500 type$ "manual" =
17501 type$ "proceedings" =
17502 or
17503 or
17504 or
17505 or
17506 or
17507 or
17508 or
17509 or
17510 or
17511 { #1 }
17512 { type$ "incollection" =
17513 type$ "phdthesis" =
17514 type$ "mastersthesis" =
17515 type$ "lecture" =
17516 type$ "inbook" =
17517 type$ "inproceedings" =
17518 type$ "conference" =
17519 type$ "intechreport" =
17520 or
17521 or
17522 or
17523 or
17524 or
17525 or
17526 or
17527 { #2 }
17528 { type$ "literal" =
17529 { #3 }
17530 { #0 }
17531 if$
17532 }
17533 if$
17534 }
17535 if$
17536 }
17537
17538 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17539 % Delivers 1 if title is formatted as an "article"-type,
17540 % 0 otherwise
17541
17542 FUNCTION {is.atype}
17543 { type$ "article" =
17544 type$ "magazine" =
17545 type$ "newspaper" =
17546 type$ "incollection" =
17547 type$ "inbook" =
17548 type$ "inproceedings" =
17549 type$ "conference" =
17550 type$ "intechreport" =
17551 type$ "manual" =
17552 or
17553 or
17554 or
17555 or
17556 or
17557 or
17558 or
17559 or
17560 { #1 }
17561 { journal empty$ not
17562 %
17563 type$ "phdthesis" =
17564 type$ "mastersthesis" =
17565 or
17566 %
17567 and
17568 { #1 }
17569 { type$ "misc" =
17570 type empty$ not and
17571 { type "\bibmessage" =
17572 type "\bibcomputerprogram" =
17573 type "\bibcomputerprogrammanual" =
17574 type "\bibcomputerprogramandmanual" =
17575 type "\bibcomputersoftware" =
17576 type "\bibcomputersoftwaremanual" =
17577 type "\bibcomputersoftwareandmanual" =
17578 type "\bibprogramminglanguage" =
17579 or
17580 or
17581 or
17582 or
17583 or
17584 or
17585 or
17586 { #1 }
17587 { #0 }
17588 if$
17589 }
17590 { #0 }
17591 if$
17592 }
17593 if$
17594 }
17595 if$
17596 }
17597
17598 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17599 %
17600 % connects two strings with connect string
17601 % if one of them empty, then connect string
17602 % is left out
17603 %
17604 % call with S1 S2 connectstring connect.check
17605 %
17606 FUNCTION {connect.check}
17607 { 'u :=
17608 %
17609 % if S2 = ""
17610 %
17611 duplicate$ empty$
17612 %
17613 % then remove S2
17614 %
17615 { pop$
17616 %
17617 % S1 is on top of stack.
17618 % if it is empty, it is replaced by the empty string ""
17619 %
17620 duplicate$ empty$
17621 { pop$ "" }
17622 'skip$
17623 if$
17624 }
17625 %
17626 % else swap S1 and S2 so that S1 can be checked
17627 %
17628 { swap$
17629 %
17630 % if S1 is empty, remove S1 so that S2 is left on the
17631 % stack and is the result is given
17632 %
17633 duplicate$ empty$
17634 { pop$ }
17635 %
17636 % now the real work starts:
17637 % push the connect string "C"
17638 % so that top of stack is "C" "S1" "S2"
17639 % concatenate, so that top of stack is
17640 % "S1+C" "S2"
17641 %
17642 { u *
17643 %
17644 % swap and concatenate
17645 %
17646 swap$ *
17647 }
17648 if$
17649 }
17650 if$
17651 }
17652
17653
17654
17655
17656 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17657 %
17658 % connects two strings with space ("\ ")
17659 % if length of second is 4 or larger,
17660 % connects them with non-breaking space ("tie", "~")
17661 % if length of second smaller than 4
17662 %
17663 % call with S1 S2 tie.or.space.connect
17664 % result: "S1\ S2" or "S1~S2"
17665 %
17666 FUNCTION {tie.or.space.connect}
17667 { duplicate$ text.length$ #4 <
17668 { "~" }
17669 { "\ " }
17670 if$
17671 swap$ * *
17672 }
17673
17674 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17675 %
17676 % connects two strings with comma (", ")
17677 % if one of them is empty, the comma is left out
17678 %
17679 % call with S1 S2 connect.with.comma.check
17680 % result: "S1, S2"
17681 %
17682 FUNCTION {connect.with.comma.check}
17683 { ", " connect.check }
17684
17685 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17686 %
17687 % connects two strings with semicolon ("; ")
17688 % if one of them is empty, semicolon is left out
17689 %
17690 % call with S1 S2 connect.with.semicolon.check
17691 % result: "S1; S2"
17692 %
17693 FUNCTION {connect.with.semicolon.check}
17694 { "; " connect.check }
17695
17696 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17697 %
17698 % connects two strings with colon (": ")
17699 % if one of them is empty, colon is left out
17700 %
17701 % call with S1 S2 connect.with.colon.check
17702 % result: "S1: S2"
17703 %
17704 FUNCTION {connect.with.colon.check}
17705 { ": " connect.check }
17706
17707
17708 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17709 %
17710 % connects two strings with space ("\ ")
17711 %
17712 % call with S1 S2 connect.with.space.check
17713 % result: "S1\ S2"
17714 %
17715 FUNCTION {connect.with.space.check}
17716 { "\ " connect.check }
17717
17718
17719
17720 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17721 %
17722 % encloses string in pre- and postfix string
17723 % call with
17724 % prefix postfix S enclose.check
17725 % delivers empty string if S empty
17726 %
17727 FUNCTION {enclose.check}
17728 { duplicate$ empty$
17729 { pop$ pop$ pop$
17730 ""
17731 }
17732 { swap$ * * }
17733 if$
17734 }
17735
17736 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17737 %
17738 % emphasizes top of stack
17739 % call with
17740 % "string" emphasize.check
17741 %
17742 FUNCTION {emphasize.check}
17743 { "\Bem{" swap$
17744 "}" swap$
17745 enclose.check
17746 }
17747
17748
17749 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17750 %
17751 % brackets top of stack
17752 % call with
17753 % "string" bracket
17754 %
17755 FUNCTION {bracket.check}
17756 { "[" swap$
17757 "]" swap$
17758 enclose.check
17759 }
17760
17761 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17762 %
17763 % parenthesizes top of stack
17764 % call with
17765 % "string" parenthesize
17766 %
17767 FUNCTION {parenthesize.check}
17768 { "(" swap$
17769 ")" swap$
17770 enclose.check
17771 }
17772
17773 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17774 %
17775 % checks whether argument is "multiresult":
17776 % whether it contains '-', '+', or ',' characters
17777 % used with pages to check whether pp. or p. must be used
17778 %
17779 FUNCTION {multi.result.check}
17780 { 't :=
17781 #0 'multiresult :=
17782 %
17783 % while (not multiresult) and (length(t) > 1) do
17784 %
17785 { multiresult not
17786 t text.length$ #1 >
17787 and
17788 }
17789 %
17790 % if t(1-2) = "--" or t(1) = "+" or ","
17791 % then multiresult = 1
17792 % else t = t(2-last)
17793 %
17794 { t #1 #2 substring$ 's :=
17795 "--" s =
17796 { #1 'multiresult := }
17797 { t #1 #1 substring$ 's :=
17798 "+" s =
17799 "," s =
17800 or
17801 { #1 'multiresult := }
17802 { t #2 global.max$ substring$ 't := }
17803 if$
17804 }
17805 if$
17806 }
17807 while$
17808 multiresult
17809 }
17810
17811 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17812 %
17813 % Checks whether an author is a corporate author, i.e.,
17814 % whether the field starts with "{\bibcorporate".
17815 % Call with
17816 % field is.bibcorporate
17817 %
17818 FUNCTION {is.bibcorporate}
17819 { #1 #14 substring$ "{\bibcorporate" = }
17820
17821 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17822 % GENERAL PURPOSE FUNCTIONS FOR SORTING %
17823 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17824
17825 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17826 % Remove non-alphanumeric characters
17827 % and change to lower case .
17828
17829 FUNCTION {sortify}
17830 { purify$
17831 "l" change.case$
17832 }
17833
17834 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17835 % Remove spaces from a string. Used for sorting.
17836 %
17837 % Call with
17838 % string remove.spaces
17839 %
17840 % E.g.,
17841 % "fine old day" remove.spaces
17842 % gives "fineoldday" .
17843
17844 FUNCTION {remove.spaces}
17845 { % Remove spaces from string.
17846 % Works best if string only contains alphanumeric characters and spaces.
17847 's := % The original string
17848 s text.length$ 'len := % Its length (no. of characters)
17849 "" 't := % Initialize the transformed string
17850 #0 'pos :=
17851 %
17852 % while (pos < len) do
17853 %
17854 { pos len < }
17855 { pos #1 + 'pos :=
17856 s pos #1 substring$ 'u :=
17857 %
17858 % u is the pos-th character in s
17859 % If it is a space, move to next character,
17860 % else copy character to output.
17861 %
17862 u " " =
17863 'skip$
17864 { t u * 't := }
17865 if$
17866 }
17867 while$
17868 %
17869 % Now push the result back on the stack
17870 t
17871 }
17872
17873 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17874 % BASIC OUTPUT FUNCTIONS %
17875 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17876
17877
17878 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17879 %
17880 % end block by writing what's left on the stack and
17881 % starting a new line
17882 %
17883 FUNCTION {output.end.block}
17884 { write$
17885 newline$
17886 }
17887
17888 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17889 %
17890 % end block by adding a period and writing what's left
17891 % on the stack and starting a new line
17892 %
17893 FUNCTION {output.dot.end.block}
17894 { add.period$
17895 output.end.block
17896 }
17897
17898 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17899 %
17900 % starting new block by writing what's left on the stack,
17901 % starting a new line and adding some extra space or
17902 % whatever is more defined in \newblock
17903 %
17904 FUNCTION {output.new.block}
17905 { output.end.block
17906 "\newblock" write$ newline$
17907 }
17908
17909
17910 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17911 %
17912 % starting new block by writing what's left on the stack,
17913 % starting a new line and adding some extra space or
17914 % whatever is more defined in \newblock
17915 %
17916 FUNCTION {output.dot.new.block}
17917 { add.period$
17918 output.new.block
17919 }
17920
17921 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17922 % Starting new block assuming that stack is empty.
17923 % Starting a new line and adding some extra space or
17924 % whatever is more defined in \newblock
17925
17926 FUNCTION {start.new.block}
17927 { "\unskip\ " write$ newline$
17928 "\newblock " write$ newline$
17929 }
17930 % \end{macrocode}
17931 %
17932 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17933 % \subsection{Functions for sorting by author (or substitute),
17934 % year, title}
17935 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17936 % The ``classic'' versions are the ones with the von part
17937 % treated a in ``Beethoven, L. van'', whereas the nonclassic ones
17938 % have the new approach with the von part always before the last
17939 % name. The ``classic'' versions are not used in this version,
17940 % but I keep them defined so it's easy to switch, and perhaps
17941 % define an option in the future.
17942 % \begin{macrocode}
17943
17944 FUNCTION {sort.name.format.classic} { "{ll{}}{ f{}}{ vv{}}{ jj{}}" }
17945
17946 FUNCTION {cite.name.format.classic} { "{ll}" }
17947
17948 FUNCTION {author.name.format.classic} { "{ll}{, f{\BPBI }.}{ vv}{, jj}" }
17949
17950 FUNCTION {index.name.format.classic} { "{ll}{, f{\BPBI }.}{ vv}{, jj}" }
17951
17952 FUNCTION {sort.name.format} { "{vv{}}{ll{}}{ f{}}{ jj{}}" }
17953
17954 FUNCTION {cite.name.format} { "{vv }{ll}" }
17955
17956 FUNCTION {cite.initials.name.format} { "{f{\BPBI }.~~}{vv }{ll}{ jj}" }
17957
17958 FUNCTION {author.name.format} { "{vv }{ll}{, f{\BPBI }.}{, jj}" }
17959
17960 FUNCTION {editor.name.format} { "{f{\BPBI }.~~}{vv }{ll}{ jj}" }
17961
17962 FUNCTION {index.name.format} { "{vv }{ll}{, f{\BPBI }.}{, jj}" }
17963
17964
17965 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17966 % Check whether initials must be added (1).
17967 % Initialization.
17968
17969 FUNCTION {init.initials}
17970 { "yyyyy" 'aut1f.old :=
17971 "yyyyy" 'aut1s.old :=
17972 #0 'cite.initials.old :=
17973 }
17974
17975 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17976 % Check whether initials must be added (2).
17977 % Update when author, editor, and key fields are not used.
17978 %
17979 % Call with
17980 % field update.no.initials
17981
17982 FUNCTION {update.no.initials}
17983 { 'field :=
17984 field 'aut1f.old :=
17985 field 'aut1s.old :=
17986 #0 'cite.initials.old :=
17987 }
17988
17989 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17990 % Check whether initials must be added (3).
17991
17992 FUNCTION {check.add.initials.aut}
17993 { %
17994 % If last name is equal to previous last name
17995 % but initials are different, then initials should
17996 % be cited. If initials are also the same, initials
17997 % should be cited if that is the case for the previous
17998 % author .
17999 %
18000 aut1s aut1s.old =
18001 { aut1f aut1f.old =
18002 { cite.initials.old 'cite.initials := }
18003 { #1 'cite.initials :=
18004 aut1f 'aut1f.old :=
18005 aut1s 'aut1s.old :=
18006 cite.initials 'cite.initials.old :=
18007 }
18008 if$
18009 }
18010 { %
18011 % Different last name.
18012 aut1f 'aut1f.old :=
18013 aut1s 'aut1s.old :=
18014 cite.initials 'cite.initials.old :=
18015 }
18016 if$
18017 }
18018
18019 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
18020 % Check whether initials must be added (4).
18021 % Call with
18022 % field check.add.initials.field
18023
18024 FUNCTION {check.add.initials.field}
18025 { 'field :=
18026 field #1 cite.initials.name.format format.name$ 'aut1f :=
18027 field #1 cite.name.format format.name$ 'aut1s :=
18028 %
18029 % Now do the actual work
18030 %
18031 check.add.initials.aut
18032 }
18033
18034 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
18035 % Check whether initials must be added (4).
18036
18037 FUNCTION {check.add.initials}
18038 { %
18039 % Check whether author or editor or other field acts as author.
18040 % Initials are only relevant with author or editor.
18041 %
18042 firstkey empty$ not
18043 { key empty$ not
18044 { %
18045 % Both key and firstkey are nonempty.
18046 % Then, key is treated as last name of first author,
18047 % and firstkey is treated as last name + initials of
18048 % first author .
18049 %
18050 firstkey sortify remove.spaces 'aut1f :=
18051 key sortify remove.spaces 'aut1s :=
18052 check.add.initials.aut
18053 }
18054 { firstkey sortify remove.spaces update.no.initials }
18055 if$
18056 }
18057 { key empty$ not
18058 { key sortify remove.spaces update.no.initials }
18059 { %
18060 % No key or firstkey, so find out which field
18061 % to use as author.
18062 %
18063 % Check reference type:
18064 % if result is 1 then possibly editor acts as author
18065 % 2 then editor does not act as author
18066 % 3 then key should have been used
18067 % 0 then unknown reference type
18068 ref.type #2 =
18069 { %
18070 % Format first author with and without initials
18071 author empty$
18072 { title.sort.label update.no.initials }
18073 { author check.add.initials.field }
18074 if$
18075 }
18076 { %
18077 % Format first author with and without initials
18078 author empty$
18079 { editor empty$
18080 { title.sort.label update.no.initials }
18081 { editor check.add.initials.field }
18082 if$
18083 }
18084 { author check.add.initials.field }
18085 if$
18086 }
18087 if$
18088 }
18089 if$
18090 }
18091 if$
18092 }
18093
18094 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
18095 % Compute tentative number of names that must be cited (1).
18096 % Call with
18097 % field tentative.cite.num.names.field
18098
18099 FUNCTION {tentative.cite.num.names.field}
18100 { 'field :=
18101 field num.names$ 'numnames :=
18102 numnames #3 <
18103 { %
18104 % 1 or 2 names: always cite all of them.
18105 numnames 'cite.num.names.full :=
18106 numnames 'cite.num.names.short :=
18107 }
18108 { numnames #6 <
18109 { %
18110 % 3-5 names: cite all of them the first time,
18111 % only the first name later times
18112 numnames 'cite.num.names.full :=
18113 #1 'cite.num.names.short :=
18114 }
18115 { %
18116 % 6 or more names: cite only the first name
18117 #1 'cite.num.names.full :=
18118 #1 'cite.num.names.short :=
18119 }
18120 if$
18121 }
18122 if$
18123 }
18124
18125 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
18126 % Compute tentative number of names that must be cited (2).
18127
18128 FUNCTION {tentative.cite.num.names}
18129 { %
18130 % Check whether author or editor or other field acts as author.
18131 % Number of names is only relevant with author or editor.
18132 %
18133 firstkey empty$ not
18134 {
18135 #1 'cite.num.names.full :=
18136 #1 'cite.num.names.short :=
18137 }
18138 { key empty$ not
18139 {
18140 #1 'cite.num.names.full :=
18141 #1 'cite.num.names.short :=
18142 }
18143 { %
18144 % No key or firstkey, so find out which field
18145 % to use as author.
18146 %
18147 % Check reference type:
18148 % if result is 1 then possibly editor acts as author
18149 % 2 then editor does not act as author
18150 % 3 then key should have been used
18151 % 0 then unknown reference type
18152 ref.type #2 =
18153 { %
18154 % Format first author with and without initials
18155 author empty$
18156 {
18157 #1 'cite.num.names.full :=
18158 #1 'cite.num.names.short :=
18159 }
18160 { author tentative.cite.num.names.field }
18161 if$
18162 }
18163 { %
18164 % Format first author with and without initials
18165 author empty$
18166 { editor empty$
18167 {
18168 #1 'cite.num.names.full :=
18169 #1 'cite.num.names.short :=
18170 }
18171 { editor tentative.cite.num.names.field }
18172 if$
18173 }
18174 { author tentative.cite.num.names.field }
18175 if$
18176 }
18177 if$
18178 }
18179 if$
18180 }
18181 if$
18182 }
18183
18184 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
18185 % Initialize "number of names to be cited" before
18186 % looping over entries.
18187
18188 FUNCTION {init.cite.num.names}
18189 { #0 'cite.num.names.old :=
18190 #0 'numnames.old :=
18191 "yyyy" 'year.label.old :=
18192 #0 'add.to.year.old :=
18193 "" 'aut1f.old :=
18194 "" 'aut2.old :=
18195 "" 'aut3.old :=
18196 "" 'aut4.old :=
18197 "" 'aut5.old :=
18198 "" 'aut6.old :=
18199 }
18200
18201 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
18202 % Update "number of names to be cited" .
18203
18204 FUNCTION {update.cite.num.names}
18205 { cite.num.names.short 'cite.num.names.old :=
18206 numnames 'numnames.old :=
18207 year.label 'year.label.old :=
18208 add.to.year 'add.to.year.old :=
18209 aut1f 'aut1f.old :=
18210 aut2 'aut2.old :=
18211 aut3 'aut3.old :=
18212 aut4 'aut4.old :=
18213 aut5 'aut5.old :=
18214 aut6 'aut6.old :=
18215 }
18216
18217 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
18218 % Format (maximally) 6 authors for comparison issues
18219 % to determine number of authors that must be cited.
18220 % It is assumed that the 'field' and 'numnames' variables
18221 % have already been defined.
18222
18223 FUNCTION {format.6.authors}
18224 { %
18225 % First author: with initials.
18226 %
18227 field #1 cite.initials.name.format format.name$ 'aut1f :=
18228 %
18229 % Second and later authors: without initials.
18230 %
18231 numnames #1 >
18232 name.max #1 >
18233 and
18234 { %
18235 % 2nd author
18236 field #2 cite.name.format format.name$ 'aut2 :=
18237 %
18238 numnames #2 >
18239 name.max #2 >
18240 and
18241 { %
18242 % 3nd author
18243 field #3 cite.name.format format.name$ 'aut3 :=
18244 %
18245 numnames #3 >
18246 name.max #3 >
18247 and
18248 { %
18249 % 4th author
18250 field #4 cite.name.format format.name$ 'aut4 :=
18251 %
18252 numnames #4 >
18253 name.max #4 >
18254 and
18255 { %
18256 % 5th author
18257 field #5 cite.name.format format.name$ 'aut5 :=
18258 %
18259 numnames #5 >
18260 name.max #5 >
18261 and
18262 { %
18263 % 6th author
18264 field #6 cite.name.format format.name$ 'aut6 :=
18265 }
18266 { %
18267 % 5 authors: 6 is empty
18268 %
18269 "" 'aut6 :=
18270 }
18271 if$
18272 }
18273 { %
18274 % 4 authors: 5-6 are empty
18275 %
18276 "" 'aut5 :=
18277 "" 'aut6 :=
18278 }
18279 if$
18280 }
18281 { %
18282 % 3 authors: 4-6 are empty
18283 %
18284 "" 'aut4 :=
18285 "" 'aut5 :=
18286 "" 'aut6 :=
18287 }
18288 if$
18289 }
18290 { %
18291 % 2 authors: 3-6 are empty
18292 %
18293 "" 'aut3 :=
18294 "" 'aut4 :=
18295 "" 'aut5 :=
18296 "" 'aut6 :=
18297 }
18298 if$
18299 }
18300 { %
18301 % Only 1 author: 2-6 are empty
18302 %
18303 "" 'aut2 :=
18304 "" 'aut3 :=
18305 "" 'aut4 :=
18306 "" 'aut5 :=
18307 "" 'aut6 :=
18308 }
18309 if$
18310 }
18311
18312 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
18313 % Compute definitive number of names that must be cited
18314 % and whether a's or b's must be added to year (1).
18315 % a's or b's are necessary: update add.to.year variable
18316
18317 FUNCTION {change.add.to.year}
18318 {
18319 forward #1 =
18320 { %
18321 % Moving forward: this add.to.year number must be 1 higher than
18322 % previous.
18323 %
18324 add.to.year.old #0 >
18325 { add.to.year.old #1 + 'add.to.year := }
18326 { #2 'add.to.year := }
18327 if$
18328 }
18329 { %
18330 % Moving backward: this add.to.year number must be 1 lower than
18331 % previous.
18332 %
18333 add.to.year.old #1 - 'add.to.year :=
18334 }
18335 if$
18336 }
18337
18338 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
18339 % Compute definitive number of names that must be cited
18340 % and whether a's or b's must be added to year (1).
18341 % Current and/or previous entry has 1 or 2 authors
18342 % or editors acting as authors and they are published in the
18343 % same year. The number of authors does not need to be changed
18344 % in this case, but a's or b's may be necessary.
18345
18346 FUNCTION {definitive.cite.num.names.1.or.2}
18347 { %
18348 numnames numnames.old =
18349 { %
18350 % Same number of names: ambiguity could arise. Check whether current
18351 % and previous have the same author(s).
18352 %
18353 aut1f aut1f.old =
18354 { %
18355 % Same first author: if the second author is also the same or if
18356 % there is only one author, a's and b's should be added.
18357 %
18358 aut2 aut2.old =
18359 numnames #2 =
18360 and
18361 %
18362 numnames #1 =
18363 or
18364 { %
18365 % Same author(s): add to year.
18366 %
18367 change.add.to.year
18368 }
18369 { %
18370 % Different second author: no ambiguity possible.
18371 %
18372 skip$
18373 }
18374 if$
18375 }
18376 { %
18377 % Different first author: no ambiguity possible.
18378 %
18379 skip$
18380 }
18381 if$
18382 }
18383 { %
18384 % Different number of names: no ambiguity possible.
18385 %
18386 skip$
18387 }
18388 if$
18389 }
18390
18391
18392 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
18393 % Compute definitive number of names that must be cited
18394 % and whether a's or b's must be added to year (2).
18395 % Both current and previous entries have 3 or more authors
18396 % or editors acting as authors and they are published in the
18397 % same year.
18398
18399 FUNCTION {definitive.cite.num.names.3.or.more}
18400 { %
18401 % Check whether current and previous have the same first author.
18402 %
18403 aut1f aut1f.old =
18404 { %
18405 % Same first author: check second author
18406 %
18407 aut2 aut2.old =
18408 { %
18409 % Same 1st & 2nd author: check 3rd.
18410 %
18411 aut3 aut3.old =
18412 { %
18413 % Same 1st-3rd authors: check 4th.
18414 %
18415 numnames.old #3 =
18416 { numnames #3 =
18417 { %
18418 % Both current and previous have 3 authors, which are
18419 % the same, so both have identical author-year
18420 % combinations, so ambiguity should be resolved by
18421 % a's and b's. Check whether more authors were
18422 % necessary for previous one.
18423 %
18424 change.add.to.year
18425 cite.num.names.short cite.num.names.old <
18426 { cite.num.names.old
18427 'cite.num.names.short :=
18428 }
18429 'skip$
18430 if$
18431 }
18432 { %
18433 % Previous has 3 authors, current has more, with same
18434 % first 3, so at least 4 must be used for current to
18435 % make a difference.
18436 %
18437 cite.num.names.short #4 <
18438 { #4 'cite.num.names.short := }
18439 'skip$
18440 if$
18441 }
18442 if$
18443 }
18444 { numnames #3 =
18445 { %
18446 % Current has 3 authors, previous has more, with same
18447 % first 3, so all 3 of current must be used.
18448 %
18449 numnames 'cite.num.names.short :=
18450 }
18451 { %
18452 % Same 1st-3rd author and both current and previous
18453 % have at least 4 authors: check 4th.
18454 %
18455 aut4 aut4.old =
18456 { %
18457 % Same 1st-4th authors: check 5th.
18458 %
18459 numnames.old #4 =
18460 { numnames #4 =
18461 { %
18462 % Both current and previous have 4 authors,
18463 % which are the same, so both have
18464 % identical author-year combinations, so
18465 % ambiguity should be resolved by a's and
18466 % b's. Check whether more authors were
18467 % necessary for previous one.
18468 %
18469 change.add.to.year
18470 cite.num.names.short cite.num.names.old <
18471 { cite.num.names.old
18472 'cite.num.names.short :=
18473 }
18474 'skip$
18475 if$
18476 }
18477 { %
18478 % Previous has 4 authors, current has more,
18479 % with same first 4, so at least 5 must be
18480 % used for current to make a difference.
18481 %
18482 cite.num.names.short #5 <
18483 { #5 'cite.num.names.short := }
18484 'skip$
18485 if$
18486 }
18487 if$
18488 }
18489 { numnames #4 =
18490 { %
18491 % Current has 4 authors, previous has more,
18492 % with same first 4, so all 4 of current
18493 % must be used.
18494 %
18495 numnames 'cite.num.names.short :=
18496 }
18497 { %
18498 % Same 1st-4th author and both current and
18499 % previous have at least 5 authors: check
18500 % 5th.
18501 %
18502 aut5 aut5.old =
18503 { %
18504 % Same 1st-5th authors: check 6th.
18505 %
18506 numnames.old #5 =
18507 { numnames #5 =
18508 { %
18509 % Both current and previous
18510 % have 5 authors, which are the
18511 % same, so both have identical
18512 % author-year combinations, so
18513 % ambiguity should be resolved
18514 % by a's and b's. Check whether
18515 % more authors were necessary
18516 % for previous one.
18517 %
18518 change.add.to.year
18519 cite.num.names.short
18520 cite.num.names.old <
18521 { cite.num.names.old
18522 'cite.num.names.short :=
18523 }
18524 'skip$
18525 if$
18526 }
18527 { %
18528 % Previous has 5 authors,
18529 % current has more, with same
18530 % first 5, so at least 6 must
18531 % be used for current to make
18532 % a difference.
18533 %
18534 cite.num.names.short #6 <
18535 { #6 'cite.num.names.short := }
18536 'skip$
18537 if$
18538 }
18539 if$
18540 }
18541 { numnames #5 =
18542 { %
18543 % Current has 5 authors,
18544 % previous has more, with same
18545 % first 5, so all 5 of current
18546 % must be used.
18547 %
18548 numnames 'cite.num.names.short :=
18549 }
18550 { %
18551 % Same 1st-5th author and both
18552 % current and previous have at
18553 % least 6 authors. If one has
18554 % 6 authors and the other has
18555 % more or the 6th is different,
18556 % 6 should be used (which is
18557 % the maximum).
18558 %
18559 numnames #6 >
18560 numnames.old #6 =
18561 and
18562 %
18563 numnames #6 =
18564 numnames.old #6 >
18565 and
18566 %
18567 or
18568 %
18569 aut6 aut6.old =
18570 not
18571 %
18572 or
18573 { #6 cite.num.names.short <
18574 { #6
18575 'cite.num.names.short
18576 :=
18577 }
18578 'skip$
18579 if$
18580 }
18581 { %
18582 % The first 6 authors are
18583 % the same and either both
18584 % have 6 or both have more.
18585 % So for all practical
18586 % purposes they have
18587 % identical author-year
18588 % combination, so ambiguity
18589 % should be resolved by a's
18590 % and b's. Check whether
18591 % more authors were
18592 % necessary for previous
18593 % one.
18594 %
18595 change.add.to.year
18596 cite.num.names.short
18597 cite.num.names.old
18598 <
18599 { cite.num.names.old
18600 'cite.num.names.short
18601 :=
18602 }
18603 'skip$
18604 if$
18605 }
18606 if$
18607 }
18608 if$
18609 }
18610 if$
18611 }
18612 { %
18613 % Different 5th author: citing 5 authors is
18614 % sufficient for this comparison.
18615 %
18616 cite.num.names.short #5 <
18617 { #5 'cite.num.names.short := }
18618 'skip$
18619 if$
18620 }
18621 if$
18622 }
18623 if$
18624 }
18625 if$
18626 }
18627 { %
18628 % Different 4th author: citing 4 authors is
18629 % sufficient for this comparison.
18630 %
18631 cite.num.names.short #4 <
18632 { #4 'cite.num.names.short := }
18633 'skip$
18634 if$
18635 }
18636 if$
18637 }
18638 if$
18639 }
18640 if$
18641 }
18642 { %
18643 % Different 3rd author: citing 3 authors is sufficient for this
18644 % comparison.
18645 %
18646 cite.num.names.short #3 <
18647 { #3 'cite.num.names.short := }
18648 'skip$
18649 if$
18650 }
18651 if$
18652 }
18653 { %
18654 % Different 2nd author: citing 2 authors is sufficient for this
18655 % comparison.
18656 %
18657 cite.num.names.short #2 <
18658 { #2 'cite.num.names.short := }
18659 'skip$
18660 if$
18661 }
18662 if$
18663 }
18664 { %
18665 % Different first author: no ambiguity, move to next entry.
18666 %
18667 skip$
18668 }
18669 if$
18670 }
18671
18672
18673 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
18674 % Compute definitive number of names that must be cited
18675 % and whether a's or b's must be added to year (3).
18676 % Current entry has an author or editor acting as author.
18677 %
18678 % Call with
18679 % field definitive.cite.num.names.field
18680 %
18681 % What should we do with explicit "others"? Is now ignored.
18682 % If this causes ambiguity that could be resolved, the user
18683 % should have added additional author names.
18684
18685 FUNCTION {definitive.cite.num.names.field}
18686 { 'field :=
18687 field num.names$ 'numnames :=
18688 %
18689 % Format authors
18690 %
18691 format.6.authors
18692 %
18693 % Now compare authors with authors of previous entry.
18694 %
18695 cite.num.names.short numnames.old >
18696 { %
18697 % The previous entry has less authors than already defined
18698 % necessary to be cited. No ambiguity is possible and we're ready.
18699 %
18700 skip$
18701 }
18702 { %
18703 % Both previous and current entry have at least one author .
18704 %
18705 year.label year.label.old =
18706 { %
18707 % Same year label: possibly ambiguous citation.
18708 %
18709 % First check: current and/or previous have 1 or
18710 % 2 authors.
18711 %
18712 numnames #3 <
18713 numnames.old #3 <
18714 or
18715 %
18716 { definitive.cite.num.names.1.or.2 }
18717 { definitive.cite.num.names.3.or.more }
18718 if$
18719 }
18720 { %
18721 % Different year label: everything's fine,
18722 % move to next entry.
18723 %
18724 skip$
18725 }
18726 if$
18727 }
18728 if$
18729 %
18730 % If during the previous process the name maximum is exceeded
18731 % (which was not checked), correct this. NOTE: If the name
18732 % maximum is smaller than 6, this could lead to ambiguous
18733 % citations if, e.g., the year and the first 5 authors are
18734 % the same, but the 6th author is different.
18735 %
18736 cite.num.names.short name.max >
18737 { name.max 'cite.num.names.short := }
18738 'skip$
18739 if$
18740 %
18741 % For a "full" cite, the number of names should always be at least
18742 % as large as for a "short" cite.
18743 %
18744 cite.num.names.full cite.num.names.short <
18745 { cite.num.names.short 'cite.num.names.full := }
18746 'skip$
18747 if$
18748 %
18749 % Update "old" variables for next entry.
18750 %
18751 update.cite.num.names
18752 }
18753
18754
18755 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
18756 % Compute definitive number of names that must be cited (4)
18757 % and especially whether a's and b's should be added.
18758 % This function is for the situation when author or editor
18759 % are not used and firstkey, key, or something else is
18760 % used to cite the referenced work.
18761 %
18762 % Call with
18763 % formatted.field definitive.cite.no.names
18764
18765 FUNCTION {definitive.cite.no.names}
18766 { %
18767 % The formatted field that acts as author is on top
18768 % of the stack.
18769 'aut1f :=
18770 "" 'aut2 :=
18771 "" 'aut3 :=
18772 "" 'aut4 :=
18773 "" 'aut5 :=
18774 "" 'aut6 :=
18775 #1 'numnames :=
18776 %
18777 year.label year.label.old =
18778 { %
18779 % Same year label: possibly ambiguous citation.
18780 %
18781 definitive.cite.num.names.1.or.2
18782 }
18783 { %
18784 % Different year label: everything's fine,
18785 % move to next entry.
18786 %
18787 skip$
18788 }
18789 if$
18790 %
18791 % Update "old" variables for next entry.
18792 %
18793 update.cite.num.names
18794 }
18795
18796 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
18797 % Compute definitive number of names that must be cited (5).
18798
18799 FUNCTION {definitive.cite.num.names}
18800 { %
18801 % Check whether author or editor or other field acts as author.
18802 % Number of names is only relevant with author or editor.
18803 %
18804 firstkey empty$ not
18805 { firstkey sortify remove.spaces definitive.cite.no.names }
18806 { key empty$ not
18807 { key sortify remove.spaces definitive.cite.no.names }
18808 { %
18809 % No key or firstkey, so find out which field
18810 % to use as author.
18811 %
18812 % Check reference type:
18813 % if result is 1 then possibly editor acts as author
18814 % 2 then editor does not act as author
18815 % 3 then key should have been used
18816 % 0 then unknown reference type
18817 ref.type #2 =
18818 { %
18819 % Format first author with and without initials
18820 author empty$
18821 { title.sort.label definitive.cite.no.names }
18822 { author definitive.cite.num.names.field }
18823 if$
18824 }
18825 { %
18826 % Format first author with and without initials
18827 author empty$
18828 { editor empty$
18829 { title.sort.label definitive.cite.no.names }
18830 { editor definitive.cite.num.names.field }
18831 if$
18832 }
18833 { author definitive.cite.num.names.field }
18834 if$
18835 }
18836 if$
18837 }
18838 if$
18839 }
18840 if$
18841 }
18842
18843 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
18844 % Make a tentative year sorting label (without `a' and `b').
18845
18846 FUNCTION {make.tentative.year.sort.label}
18847 { %
18848 % Implicit or explicit ``no date'' is put at the front
18849 % (the year zero; years B.C. will imply complications)
18850 % because these are possibly old works.
18851 % ``In press'' is put at the end.
18852 %
18853 year empty$
18854 { "0000" 'year.label := }
18855 { year "\bibnodate" =
18856 year "l" change.case$ "no date" = or
18857 year "l" change.case$ "n.d." = or
18858 { "0000" 'year.label := }
18859 { year "\BIP" =
18860 year "l" change.case$ "in press" = or
18861 year "l" change.case$ "forthcoming" = or
18862 { "9999" 'year.label := }
18863 { % It is not checked whether the year field
18864 % makes sense.
18865 year sortify remove.spaces 'year.label :=
18866 }
18867 if$
18868 }
18869 if$
18870 }
18871 if$
18872 %
18873 % Push year sort label on the stack
18874 year.label
18875 }
18876
18877 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
18878 % Give month and day when available.
18879
18880 FUNCTION {month.number.day}
18881 { month empty$
18882 { "" }
18883 { month sortify remove.spaces
18884 %
18885 % Add the day when available.
18886 day empty$
18887 'skip$
18888 { "/" *
18889 day sortify remove.spaces *
18890 }
18891 if$
18892 }
18893 if$
18894 }
18895
18896 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
18897 % Make tentative sort label with names in field on top of
18898 % the stack.
18899 %
18900 % Call with
18901 % field make.name.sort.label
18902 % where 'field' is the field that takes the author-role.
18903
18904 FUNCTION {make.name.sort.label}
18905 { %
18906 % Author or editor-acting-as-author available.
18907 % => Make tentative "short cite with initials" author
18908 % label (L1) of one of the forms
18909 % "Last1 F1"
18910 % "Last1 F1 Last2"
18911 % "Last1 F1 zzzz" ("zzzz" representing et al.)
18912 % => If more than 2 'authors': make label (L2) for 2nd-6th authors
18913 % of one of the forms
18914 % "Last2 Last3"
18915 % "Last2 Last3 Last4"
18916 % "Last2 Last3 Last4 Last5"
18917 % "Last2 Last3 Last4 Last5 Last6"
18918 % "Last2 Last3 Last4 Last5 Last6 zzzz"
18919 %
18920 % Then format year label (L3) of one of the forms:
18921 % "0000" (missing year or explicit 'no date')
18922 % "9999" ('in press')
18923 % year (otherwise; don't use originalyear here yet)
18924 %
18925 % From earlier sorting of titles, we have title number. Convert
18926 % to string, which gives title label (L4) .
18927 %
18928 % Then tentative sorting label (author.year.sort.label) is a
18929 % concatenation of
18930 % L1
18931 % " "
18932 % L3
18933 % " "
18934 % L2
18935 % " "
18936 % L4
18937 %
18938 % The name field is on top of the stack.
18939 'field :=
18940 %
18941 % numnames is the total number of names contained in field
18942 field num.names$ 'numnames :=
18943 %
18944 % Format first author
18945 field #1 sort.name.format format.name$
18946 %
18947 % Format the second author if there are two, or else "zzzz" = et al.
18948 numnames #1 =
18949 'skip$
18950 { numnames #2 =
18951 { %
18952 % Two authors: format second author
18953 field #2 "{ll{}}" format.name$ 's :=
18954 s "others" =
18955 { " zzzz" * } % Add "et al."-substitute
18956 { " " * s * } % Add second author
18957 if$
18958 }
18959 { " zzzz" * } % 3 or more authors: add "et al."-substitute
18960 if$
18961 }
18962 if$
18963 " " * % Add spaces
18964 make.tentative.year.sort.label * % Add year (L3).
18965 " " * % Add spaces
18966 %
18967 % Now build up L2 if applicable
18968 numnames #3 <
18969 'skip$
18970 { %
18971 % Treat last author slightly differently
18972 numnames name.max >
18973 { name.max 'lastname :=
18974 " zzzz" % Push "et al."-substitute on stack
18975 }
18976 { numnames 'lastname :=
18977 "" % Push empty string on stack
18978 }
18979 if$
18980 %
18981 % Names 2 to "last" - 1
18982 "" % Push empty string on stack
18983 #2 'nameptr :=
18984 { nameptr lastname < }
18985 { % Add name no. nameptr
18986 field nameptr "{ll{}}" format.name$ *
18987 " " *
18988 nameptr #1 + 'nameptr :=
18989 }
18990 while$
18991 %
18992 % "Last" author
18993 field lastname "{ll{}}" format.name$ 's :=
18994 s "others" =
18995 { "zzzz" * } % Add "et al."-substitute
18996 { s * } % Add last author
18997 if$
18998 %
18999 swap$ * % Add the previously formatted empty string or
19000 % "et al."-substitute if there are many authors.
19001 * % Add L2 to the earlier labels.
19002 }
19003 if$
19004 %
19005 " " * % Add spaces
19006 title.number conv.int.to.str * % Add sorted title number (L4).
19007 sortify % Clean up and convert to lowercase
19008 " " * % Add spaces
19009 month.number.day * % Add month and day when available
19010 'author.year.sort.label := % Assign result to sort label.
19011 }
19012
19013
19014 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19015 % Called by make.tentative.sort.label to make tentative
19016 % sort label if key or firstkey is available or author and
19017 % editor are empty or unusable.
19018 %
19019 % Call with
19020 % field make.field.year.sort.label
19021 % where 'field' is the field that takes the author-role,
19022 % perhaps already subjected to removing articles from the
19023 % beginning.
19024
19025 FUNCTION {make.field.year.sort.label}
19026 { %
19027 % 'field' acts as first author (L1), subsequent authors
19028 % are empty (L2).
19029 %
19030 % Then format year label (L3) of one of the forms:
19031 % "0000" (missing year or explicit 'no date')
19032 % "9999" ('in press')
19033 % year (otherwise; don't use originalyear here yet)
19034 %
19035 % From earlier sorting of titles, we have title number. Convert
19036 % to string, which gives title label (L4) .
19037 %
19038 % Then tentative sorting label (author.year.sort.label) is a
19039 % concatenation of
19040 % L1
19041 % " "
19042 % L3
19043 % " "
19044 % L2
19045 % " "
19046 % L4
19047 %
19048 % 'field' is on top of the stack. It is already supposed to be cleaned
19049 % (i.e., sortified and space-removed), so this is already L1.
19050 " " * % Add spaces to L1
19051 make.tentative.year.sort.label * % Add year (L3).
19052 " " * % Add spaces
19053 " " * % L2 is empty, add spaces
19054 title.number conv.int.to.str * % Add sorted title number (L4).
19055 sortify % Clean up and convert to lowercase
19056 " " * % Add spaces
19057 month.number.day * % Add month and day when available
19058 'author.year.sort.label := % Assign result to sort label.
19059 }
19060
19061
19062 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19063 % Called by make.tentative.sort.label to make tentative
19064 % sort label if key or firstkey are not available and
19065 % author or editor may be used
19066
19067 FUNCTION {make.author.editor.sort.label}
19068 { author empty$
19069 { editor empty$
19070 { %
19071 % Use what has previously been stored in title.sort.label
19072 % as author substitute .
19073 title.sort.label make.field.year.sort.label
19074 }
19075 { editor make.name.sort.label }
19076 if$
19077 }
19078 { author make.name.sort.label }
19079 if$
19080 }
19081
19082 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19083 % Called by make.tentative.sort.label to make tentative
19084 % sort label if key or firstkey are not available and
19085 % author (but not editor) may be used
19086
19087 FUNCTION {make.author.sort.label}
19088 { author empty$
19089 { %
19090 % Use what has previously been stored in title.sort.label
19091 % as author substitute .
19092 title.sort.label make.field.year.sort.label
19093 }
19094 { author make.name.sort.label }
19095 if$
19096 }
19097
19098
19099 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19100 % Make tentative label for citing and sorting and do some
19101 % preprocessing.
19102
19103 FUNCTION {make.tentative.sort.label}
19104 { %
19105 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19106 % General strategy:
19107 %
19108 % Ordinary situation: author or editor-acting-as-author
19109 % available.
19110 % => Make tentative "short cite with initials" author
19111 % label (L1) of one of the forms
19112 % "Last1 F1"
19113 % "Last1 F1 Last2"
19114 % "Last1 F1 zzzz" ("zzzz" representing et al.)
19115 % => If more than 2 'authors': make label (L2) for 2nd-6th authors
19116 % of one of the forms
19117 % "Last2 Last3"
19118 % "Last2 Last3 Last4"
19119 % "Last2 Last3 Last4 Last5"
19120 % "Last2 Last3 Last4 Last5 Last6"
19121 % "Last2 Last3 Last4 Last5 Last6 zzzz"
19122 % When key is available (overrules author and editor fields):
19123 % => L1 = key, L2 = ""
19124 % No author, editor, and key: define title or substitute as key
19125 % and format as key.
19126 %
19127 % Then format year label (L3) of one of the forms:
19128 % "0000" (missing year or explicit 'no date')
19129 % "9999" ('in press')
19130 % year (otherwise; don't use originalyear here yet)
19131 %
19132 % From earlier sorting of titles, we have title number. Convert
19133 % to string, which gives title label (L4) .
19134 %
19135 % Then tentative sorting label (author.year.sort.label) is a
19136 % concatenation of
19137 % L1
19138 % " "
19139 % L3
19140 % " "
19141 % L2
19142 % " "
19143 % L4
19144 %
19145 % This can then be sorted, from which it can be derived
19146 % whether initials are necessary, how many names must
19147 % be used for short and full citations, and whether "a"'s and
19148 % "b"'s etc. are necessary behind the year labels.
19149 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19150 %
19151 % key and firstkey overrule author information
19152 %
19153 firstkey empty$ not
19154 { key empty$ not
19155 { %
19156 % Both key and firstkey available:
19157 % for sorting and checking initials, treat key as last
19158 % name and firstkey as initials.
19159 %
19160 key sortify remove.spaces
19161 " " *
19162 firstkey sortify remove.spaces *
19163 make.field.year.sort.label
19164 }
19165 { firstkey sortify remove.spaces make.field.year.sort.label }
19166 if$
19167 }
19168 { key empty$ not
19169 { key sortify remove.spaces make.field.year.sort.label }
19170 { %
19171 % No key or firstkey, so find out which field
19172 % to use as author.
19173 %
19174 % Check reference type:
19175 % if result is 1 then possibly editor acts as author
19176 % 2 then editor does not act as author
19177 % 3 then key should have been used
19178 % 0 then unknown reference type
19179 ref.type
19180 duplicate$ #1 =
19181 { pop$
19182 make.author.editor.sort.label
19183 }
19184 { duplicate$ #2 =
19185 { pop$
19186 make.author.sort.label
19187 }
19188 { #3 =
19189 { "no key in " cite$ * warning$
19190 make.author.editor.sort.label
19191 }
19192 { make.author.editor.sort.label }
19193 if$
19194 }
19195 if$
19196 }
19197 if$
19198 }
19199 if$
19200 }
19201 if$
19202 %
19203 author.year.sort.label 'sort.key$ :=
19204 }
19205
19206
19207 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19208 % Make final sort label with names in field on top of
19209 % the stack.
19210 %
19211 % Call with
19212 % field make.definitive.name.sort.label
19213 %
19214 % where 'field' is the field that takes the author-role.
19215
19216 FUNCTION {make.definitive.name.sort.label}
19217 { %
19218 % Author or editor-acting-as-author available.
19219 % => Make author-with-initials label (L1) of one of the forms
19220 % "Last1 F1 Last2 F2 ... LastN FN"
19221 % "Last1 F1 Last2 F2 ... Last6 F6 zzzz"
19222 % (where N <= 6 is the total number of authors, and
19223 % "zzzz" represents et al. if there are more than 6 authors)
19224 % No author, editor, and key: define title or substitute as sort key.
19225 %
19226 % The name field is on top of the stack.
19227 'field :=
19228 %
19229 % numnames is the total number of names contained in field
19230 field num.names$ 'numnames :=
19231 %
19232 % If there are more than 6 authors, only 6 are mentioned.
19233 numnames name.max >
19234 { name.max 'format.num.names := }
19235 { numnames 'format.num.names := }
19236 if$
19237 % Initialize stack with empty string
19238 ""
19239 %
19240 % Cycle over authors.
19241 #1 'nameptr :=
19242 { nameptr format.num.names < }
19243 { % Format author and add spaces
19244 field nameptr sort.name.format format.name$ *
19245 " " *
19246 nameptr #1 + 'nameptr :=
19247 }
19248 while$
19249 % Format last author that must be formatted
19250 field nameptr sort.name.format format.name$ *
19251 % Add et al. if necessary
19252 nameptr numnames <
19253 { " zzzz" * }
19254 'skip$
19255 if$
19256 sortify % Clean up and change case
19257 " " * % Add spaces
19258 year.label * % Add year
19259 " " * % Add spaces
19260 title.number conv.int.to.str * % Add sorted title number
19261 " " * % Add spaces
19262 month.number.day * % Add month and day when available
19263 'author.year.sort.label := % Assign result to sort label.
19264 }
19265
19266
19267 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19268 % Called to make definitive sort label if author and
19269 % editor are empty or unusable.
19270 %
19271 % Call with
19272 % field make.definitive.field.year.sort.label
19273 % where 'field' is the field that takes the author-role,
19274 % perhaps already subjected to removing articles from the
19275 % beginning.
19276
19277 FUNCTION {make.definitive.field.year.sort.label}
19278 { %
19279 % 'field' acts as author (L1).
19280 %
19281 % Then format year label (L2) of one of the forms:
19282 % "0000" (missing year or explicit `no date')
19283 % "9999" (`in press')
19284 % year (otherwise; don't use originalyear here yet)
19285 %
19286 % From earlier sorting of titles, we have title number. Convert
19287 % to string, which gives title label (L3) .
19288 %
19289 % Then tentative sorting label (author.year.sort.label) is a
19290 % concatenation of
19291 % L1
19292 % " "
19293 % L2
19294 % " "
19295 % L3
19296 %
19297 % 'field' is on top of the stack. It is already supposed to be cleaned
19298 % (i.e., sortified and space-removed), so this is already L1.
19299 " " * % Add spaces
19300 year.label * % Add year
19301 " " * % Add spaces
19302 title.number conv.int.to.str * % Add sorted title number
19303 " " * % Add spaces
19304 month.number.day * % Add month and day when available
19305 'author.year.sort.label := % Assign result to sort label.
19306 }
19307
19308
19309 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19310 % Called by make.final.sort.key if author or editor
19311 % may be used.
19312
19313 FUNCTION {make.definitive.author.editor.sort.label}
19314 { author empty$
19315 { editor empty$
19316 { %
19317 % Use what has previously been stored in title.sort.label
19318 % as author substitute .
19319 title.sort.label make.definitive.field.year.sort.label
19320 }
19321 { editor make.definitive.name.sort.label }
19322 if$
19323 }
19324 { author make.definitive.name.sort.label }
19325 if$
19326 }
19327
19328 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19329 % Called by make.final.sort.key if author but not editor
19330 % may be used.
19331
19332 FUNCTION {make.definitive.author.sort.label}
19333 { author empty$
19334 { %
19335 % Use what has previously been stored in title.sort.label
19336 % as author substitute .
19337 title.sort.label make.definitive.field.year.sort.label
19338 }
19339 { author make.definitive.name.sort.label }
19340 if$
19341 }
19342 % \end{macrocode}
19343 % Make the final sort key. The general strategy is the following. The
19344 % ordinary situation is that an author or editor-acting-as-author
19345 % is available. In this case, make an author-with-initials label (L1)
19346 % of one of the forms
19347 % \begin{verbatim}
19348 % "Last1 F1 Last2 F2 ... LastN FN"
19349 % "Last1 F1 Last2 F2 ... Last6 F6 zzzz"
19350 % \end{verbatim}
19351 % where $N \leq 6$ is the total number of authors, and ``|zzzz|''
19352 % represents et al.\ if there are more than 6 authors. If there is
19353 % no author, editor, and key, define the title or its substitute as a
19354 % sort key. Note that there are two spaces between last name and first
19355 % name and three spaces between authors.
19356 %
19357 % Next format a year label (L2) that is equal to the \fieldname{year}
19358 % field, unless that is missing or an explicit ``no date'', in which
19359 % case it is |0000| (and thus comes first) or if it is an explicit
19360 % in press (|\BIP|), in which case the year label is |9999| (and thus
19361 % it comes last). We don't use the \fieldname{originalyear} field here
19362 % yet. We add |/|\fieldname{month}|/|\fieldname{day} to the year label
19363 % when available.
19364 %
19365 % From earlier sorting of titles, we have the sorted title number. This
19366 % is converted to a string, which gives title label (L3).
19367 %
19368 % Then the final sorting label (|author.year.sort.label|) is a
19369 % concatenation of L1, L2, and L3, with four spaces between them. This
19370 % can then be sorted.
19371 %
19372 % If the reference type is 1, then possibly the editor acts as author;
19373 % if it is 2, then editor does not act as author; if it is 3, then the
19374 % \fieldname{key} field should have been used; if it is 0, this is an
19375 % unknown reference type.
19376 % \begin{macrocode}
19377 FUNCTION {make.final.sort.key}
19378 { ref.type #2 =
19379 { make.definitive.author.sort.label }
19380 { make.definitive.author.editor.sort.label }
19381 if$
19382 % \end{macrocode}
19383 % With the \pkgoption{unsorted} option, the reference listed is sorted
19384 % in the order in which \BibTeX{} reads the references, that is, in
19385 % order of first citation.
19386 % \begin{macrocode}
19387 unsorted
19388 { citeorder.sort.label 'sort.key$ := }
19389 { author.year.sort.label 'sort.key$ := }
19390 if$
19391 }
19392
19393
19394 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19395 % FUNCTIONS THAT ALLOW SORTING BY TITLE %
19396 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19397
19398 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19399 % Remove first N characters of string if they are equal to
19400 % teststring .
19401 %
19402 % Call with
19403 % teststring N string chop.word
19404 %
19405 % E.g.,
19406 % "A " #2 "A fine old day" chop.word
19407 % gives "fine old day"
19408 % and
19409 % "A " #2 "The fine old day" chop.word
19410 % gives "The fine old day".
19411
19412 FUNCTION {chop.word}
19413 { 's :=
19414 'len :=
19415 s #1 len substring$ =
19416 { s len #1 + global.max$ substring$ }
19417 { s }
19418 if$
19419 }
19420
19421 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19422 % Remove "a ", "an ", and "the " from beginning of string.
19423 %
19424 % Call with
19425 % string chop.articles
19426
19427 FUNCTION {chop.articles}
19428 { 's :=
19429 "a " #2
19430 "an " #3
19431 "the " #4
19432 s
19433 chop.word
19434 chop.word
19435 chop.word
19436 }
19437
19438 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19439 % Format title and other non-name/date entries for sort key.
19440 %
19441 % Call with
19442 % field format.sort.title
19443 %
19444 % Make sure that field is not empty, this is not checked here!
19445
19446 FUNCTION {format.sort.title}
19447 { %
19448 % Remove non-alphanumeric characters and change to lower case .
19449 sortify
19450 %
19451 % Remove "a ", "an ", and "the " from the front .
19452 chop.articles #1 entry.max$ substring$
19453 }
19454
19455 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19456 % Make title sorting label or substitute.
19457
19458 FUNCTION {make.sort.title}
19459 { title empty$
19460 { text empty$
19461 { type empty$
19462 { howpublished empty$
19463 { note empty$
19464 { url empty$
19465 { " " }
19466 { url format.sort.title }
19467 if$
19468 }
19469 { note format.sort.title }
19470 if$
19471 }
19472 { howpublished format.sort.title }
19473 if$
19474 }
19475 { type format.sort.title }
19476 if$
19477 }
19478 { text format.sort.title }
19479 if$
19480 }
19481 { title format.sort.title }
19482 if$
19483 remove.spaces
19484 'title.sort.label :=
19485 title.sort.label 'sort.key$ :=
19486 }
19487 % \end{macrocode}
19488 % Make title number: rank number of sorted title.
19489 % \begin{macrocode}
19490 FUNCTION {make.title.number}
19491 { title.sort.label old.label =
19492 {
19493 % \end{macrocode}
19494 % A tie: old and new label are the same.
19495 % \begin{macrocode}
19496 old.number 'title.number :=
19497 }
19498 {
19499 % \end{macrocode}
19500 % The usual situation: titles are different.
19501 % \begin{macrocode}
19502 old.number #1 + 'title.number :=
19503 title.number 'old.number :=
19504 title.sort.label 'old.label :=
19505 }
19506 if$
19507 }
19508 % \end{macrocode}
19509 % Order in which reference was first cited (integer and conversion to string).
19510 % \begin{macrocode}
19511 FUNCTION {make.citeorder.number}
19512 { old.number #1 + 'cite.order :=
19513 cite.order 'old.number :=
19514 cite.order conv.int.to.str 'citeorder.sort.label :=
19515 }
19516 % \end{macrocode}
19517 %
19518 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19519 % \subsection{Name formatting}
19520 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19521 % In order to support removal of spaces between the initials,
19522 % we have to split the formatting of the constituent parts,
19523 % because something like |"{ll}{, f{\BPBI }.}{ vv}{, jj}"| removes
19524 % the hyphens between initials as well. The ``classic'' versions
19525 % treat the von part differently. They were used in pervious versions
19526 % of \pkg{apacite}.
19527 %
19528 % \begin{macrocode}
19529
19530 FUNCTION {last.part.name.format.classic} { "{ll}" }
19531
19532 FUNCTION {von.junior.name.format.classic} { "{ vv}{, jj}" }
19533
19534 FUNCTION {last.part.name.format} { "{vv }{ll}" }
19535
19536 FUNCTION {initials.with.space.name.format} { "{f.}" }
19537
19538 FUNCTION {von.last.junior.name.format} { "{vv }{ll}{ jj}" }
19539
19540 FUNCTION {von.junior.name.format} { "{, jj}" }
19541
19542 FUNCTION {one.complete.name.format} { "{vv }{ll}{, jj}{, ff}" }
19543
19544 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19545 % text.length$ views "special characters" as 1, whereas
19546 % substring$ looks at the number of actual characters.
19547 % So
19548 % "{\TeX}" text.length$ = 1
19549 % "{TeX}" text.length$ = 3
19550 % but
19551 % "{\TeX}" #4 #2 substring$ = "eX"
19552 % "{TeX}" #4 #2 substring$ = "X}"
19553 % Therefore, it is convenient to have a string length function
19554 % that uses the same numbering as substring$:
19555 % "{\TeX}" string.length = 6
19556 % "{TeX}" string.length = 5
19557
19558 FUNCTION {string.length}
19559 { #0 'pos :=
19560 % If the next character exists, i.e., is not empty,
19561 % add 1 to the string length.
19562 % We cannot use empty$ because " " empty$ is true.
19563 { duplicate$ pos #1 + #1 substring$ "" = not }
19564 { pos #1 + 'pos := }
19565 while$
19566 pop$ pos
19567 }
19568
19569 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19570 % Replace ". " and ".~" with "\BPBI " (period between initials)
19571 % and ".-" with "\BHBI " (hyphen between initials)
19572 % but only at brace level 0.
19573
19574 FUNCTION {transform.spaces.and.hyphens}
19575 { 's := % The original string
19576 s string.length 'len := % Its length (no. of characters)
19577 "" 't := % Initialize the transformed string
19578 #1 'pos :=
19579 #0 'brace.level :=
19580 %
19581 % while (pos < len) do
19582 %
19583 { pos len < }
19584 { % First, check whether we are at brace level 0
19585 brace.level #0 =
19586 {
19587 % At least two characters left: check for ". ", ".~", and ".-".
19588 % If so, replace and shift two positions.
19589 s pos #2 substring$ ". " =
19590 s pos #2 substring$ ".~" = or
19591 { t "\BPBI " * 't :=
19592 pos #2 + 'pos :=
19593 }
19594 { s pos #2 substring$ ".-" =
19595 { t "\BHBI " * 't :=
19596 pos #2 + 'pos :=
19597 }
19598 { % neither is true, copy one character and shift one position
19599 t s pos #1 substring$ * 't :=
19600 % Check whether we need to increase brace level.
19601 % Note that this is not sophisticated: it does not capture
19602 % \{, \verb+}+, etc.
19603 % Note also that unbalanced braces cause problems.
19604 s pos #1 substring$ "{" =
19605 { brace.level #1 + 'brace.level := }
19606 'skip$
19607 if$
19608 pos #1 + 'pos :=
19609 }
19610 if$
19611 }
19612 if$
19613 }
19614 { % Not at brace level 0: copy result literally
19615 t s pos #1 substring$ * 't :=
19616 % Check whether we need to increase or decrease brace level.
19617 % Note that this is not sophisticated: it does not capture
19618 % \{, \verb+}+, etc.
19619 s pos #1 substring$ "{" =
19620 { brace.level #1 + 'brace.level := }
19621 { s pos #1 substring$ "}" =
19622 { brace.level #1 - 'brace.level := }
19623 'skip$
19624 if$
19625 }
19626 if$
19627 pos #1 + 'pos :=
19628 }
19629 if$
19630 }
19631 while$
19632 %
19633 pos len =
19634 { % Last character, copy
19635 t s pos #1 substring$ * 't :=
19636 }
19637 { % pos = len + 1, so s ends with ". " or ".-"
19638 % This should not have happened, but make the best out of it.
19639 % Push last two characters of s on the stack, i.e., ". " or ".-".
19640 s len #1 - #2 substring$
19641 % Remove "\BPBI " or "\BHBI " from t
19642 t text.length$ 'len := % Length of t (no. of characters)
19643 t #1 len #6 - substring$
19644 % Concatenate and assign to t
19645 swap$ * 't :=
19646 }
19647 if$
19648 %
19649 % Now push the result back on the stack
19650 t
19651 }
19652
19653 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19654 % Format only the initials of a name, retaining hyphens, but
19655 % removing spaces between first names. So "Jean Pierre" becomes "J.P."
19656 % and "Jean-Pierre" becomes "J.-P.".
19657
19658 FUNCTION {format.initials.with.hyphen}
19659 { % Format initials.
19660 % Call with
19661 % field authornumber format.initials.with.hyphen
19662 % e.g.
19663 % author #1 format.initials.with.hyphen
19664 % Instead of field, a string may also be used.
19665 %
19666 % First, format initials in the default way, retaining spaces
19667 % and hyphens.
19668 initials.with.space.name.format format.name$
19669 transform.spaces.and.hyphens
19670 }
19671
19672 FUNCTION {format.last.part.name}
19673 { % Format a name with last.part.name.format,
19674 % as part of more complicated things.
19675 % Call with
19676 % field authornumber format.last.part.name
19677 % e.g.
19678 % author #1 format.last.part.name
19679 % Instead of field, a string may also be used.
19680 last.part.name.format format.name$
19681 }
19682
19683 FUNCTION {format.von.last.junior.name}
19684 { % Format a name with von.last.junior.name.format,
19685 % for citing or as part of more complicated things.
19686 % Call with
19687 % field authornumber format.von.last.junior.name
19688 % e.g.
19689 % author #1 format.von.last.junior.name
19690 % Instead of field, a string may also be used.
19691 von.last.junior.name.format format.name$
19692 }
19693
19694 FUNCTION {format.von.junior.name}
19695 { % Format a name with von.last.junior.name.format,
19696 % for citing or as part of more complicated things.
19697 % Call with
19698 % field authornumber format.von.junior.name
19699 % e.g.
19700 % author #1 format.von.junior.name
19701 % Instead of field, a string may also be used.
19702 von.junior.name.format format.name$
19703 }
19704
19705 FUNCTION {format.cite.initials.name}
19706 { % Format a name for citing with initials.
19707 % Call with
19708 % field authornumber format.cite.initials.name
19709 % e.g.
19710 % author #1 format.cite.initials.name
19711 % Instead of field, a string may also be used.
19712 %
19713 % First, extract the complete name, format it in the canonical form,
19714 % and push on the stack.
19715 one.complete.name.format format.name$
19716 %
19717 % Format the initials and push on the stack.
19718 duplicate$ #1 format.initials.with.hyphen
19719 %
19720 % Format the von-last-junior part and push on the stack.
19721 swap$ #1 format.von.last.junior.name
19722 %
19723 % Connect with "~" hyphen (if they're both non-empty).
19724 "~" connect.check
19725 }
19726
19727 FUNCTION {format.author.name}
19728 { % Format an author name for the reference list.
19729 % Call with
19730 % field authornumber format.author.name
19731 % e.g.
19732 % author #1 format.author.name
19733 % Instead of field, a string may also be used.
19734 %
19735 % First, extract the complete name, format it in the canonical form,
19736 % and push on the stack.
19737 one.complete.name.format format.name$
19738 %
19739 % Make two copies of the name, format the last name and push on the stack.
19740 duplicate$ duplicate$ #1 format.last.part.name
19741 %
19742 % Format the initials and push on the stack.
19743 swap$ #1 format.initials.with.hyphen
19744 %
19745 % Connect with last name.
19746 connect.with.comma.check
19747 %
19748 % Format the von-junior part and connect with initials.
19749 swap$ #1 format.von.junior.name "" connect.check
19750 }
19751
19752 FUNCTION {format.editor.name}
19753 { % Format a name for the reference list as an editor.
19754 % Call with
19755 % field authornumber format.editor.name
19756 % e.g.
19757 % author #1 format.editor.name
19758 % Instead of field, a string may also be used.
19759 %
19760 format.cite.initials.name
19761 }
19762
19763 FUNCTION {format.index.name}
19764 { % Format an author name for the index.
19765 % Call with
19766 % field authornumber format.index.name
19767 % e.g.
19768 % author #1 format.index.name
19769 % Instead of field, a string may also be used.
19770 %
19771 format.author.name
19772 }
19773
19774 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19775 % CITATION LABELS %
19776 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19777 % \end{macrocode}
19778 %
19779 % \begin{macro}{comma.between.two}
19780 % \begin{macro}{comma.between.names}
19781 % \begin{macro}{comma.before.last}
19782 % \begin{macro}{dots.before.last}
19783 % \begin{macro}{and.before.last}
19784 % \begin{macro}{et.al.string.cite}
19785 % \begin{macro}{et.al.string}
19786 % \begin{macro}{et.al.string.period}
19787 % Some macro strings about commas etc.\ between authors.
19788 % \begin{macrocode}
19789 FUNCTION {comma.between.two} { "\BCBT {}" }
19790
19791 FUNCTION {comma.between.names} { ", " }
19792
19793 FUNCTION {comma.before.last} { "\BCBL {}" }
19794
19795 FUNCTION {dots.before.last} { "\BDBL {}" }
19796
19797 FUNCTION {and.before.last} { "\ \BBA {} " }
19798
19799 FUNCTION {et.al.string.cite} { "\ \protect \BOthers {.}" }
19800
19801 FUNCTION {et.al.string} { "\ \BOthers {.}" }
19802
19803 FUNCTION {et.al.string.period} { "\ \BOthersPeriod {.}" }
19804
19805 % \end{macrocode}
19806 % \end{macro}
19807 % \end{macro}
19808 % \end{macro}
19809 % \end{macro}
19810 % \end{macro}
19811 % \end{macro}
19812 % \end{macro}
19813 % \end{macro}
19814 %
19815 % \begin{macrocode}
19816 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19817 % Add author index entry when desired.
19818 % "field" must have been defined before and must contain the
19819 % contents of the relevant author field.
19820 % "nameptr" must also have been defined before. It is the
19821 % number of the author that must be formatted. (So if it is
19822 % #2, then the 2nd author must be formatted.)
19823 % What's on top of the stack (the formatted author) is written
19824 % to the .bbl file.
19825
19826 FUNCTION {add.name.index}
19827 { %
19828 %
19829 make.index
19830 { "%" * write$ newline$
19831 % Check for corporate author
19832 field is.bibcorporate
19833 { "\corporateAX{" }
19834 { "\AX{" }
19835 if$
19836 write$
19837 field nameptr sort.name.format format.name$ sortify write$ newline$
19838 "@" write$
19839 field nameptr format.index.name
19840 "}%" * write$ newline$
19841 }
19842 { "%" * write$ newline$ }
19843 if$
19844 }
19845
19846 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19847 % Citation labels when author or editor may be used.
19848 % Field is on top of the stack.
19849 %
19850 % Call with
19851 % format.num.names field make.name.cite.label
19852
19853 FUNCTION {make.name.cite.label}
19854 { 'field :=
19855 'format.num.names :=
19856 %
19857 field num.names$ 'numnames := % numnames is the total number of names
19858 % contained in field
19859 %
19860 % It is implicit in the APA manual that if "et al." would refer
19861 % to exactly one author, then this author should be named
19862 % instead of "et al."
19863 %
19864 format.num.names numnames #1 - =
19865 { numnames 'format.num.names := }
19866 'skip$
19867 if$
19868 %
19869 % Format first author: with or without initials
19870 %
19871 #1 'nameptr :=
19872 cite.initials #1 =
19873 { field nameptr format.cite.initials.name }
19874 { field nameptr cite.name.format format.name$ }
19875 if$
19876 add.name.index % Add index entry when desired.
19877 %
19878 numnames #1 =
19879 'skip$
19880 { format.num.names #1 =
19881 { %
19882 % First author et al.
19883 %
19884 et.al.string.cite write$
19885 }
19886 { numnames #2 =
19887 { %
19888 % Given that format.num.names > 1, it is 2.
19889 % Format second author.
19890 %
19891 #2 'nameptr :=
19892 field nameptr cite.name.format format.name$ 's :=
19893 %
19894 % Check if 2nd author is explicit "others".
19895 % If so, insert "et al." string.
19896 %
19897 s "others" =
19898 { et.al.string.cite write$ } % First et al.
19899 { %
19900 % First \& Second
19901 %
19902 and.before.last write$
19903 s
19904 add.name.index % Add index entry when desired.
19905 }
19906 if$
19907 }
19908 { %
19909 % 3 or more names, 2 or more must be cited
19910 %
19911 % for nameptr := 2 to format.num.names - 1 do
19912 %
19913 #2 'nameptr :=
19914 { nameptr format.num.names < }
19915 { %
19916 % Put comma between consecutive authors
19917 %
19918 comma.between.names write$
19919 %
19920 % Format and add next author
19921 %
19922 field nameptr cite.name.format format.name$
19923 add.name.index % Add index entry when desired.
19924 %
19925 % Move to next author
19926 %
19927 nameptr #1 + 'nameptr :=
19928 }
19929 while$
19930 %
19931 % nameptr = format.num.names
19932 % Format this author.
19933 %
19934 field nameptr cite.name.format format.name$ 's :=
19935 %
19936 format.num.names numnames =
19937 { %
19938 % This is also the last author. Add (optional) comma.
19939 %
19940 comma.before.last write$
19941 %
19942 % Check if this author is explicit "others".
19943 % If so, insert "et al." string.
19944 %
19945 s "others" =
19946 { et.al.string.cite write$ }
19947 { and.before.last write$
19948 s
19949 add.name.index % Add index entry when desired.
19950 }
19951 if$
19952 }
19953 { %
19954 % This is not the last author.
19955 % Add comma, author name, and "et al."
19956 %
19957 comma.between.names write$
19958 s
19959 add.name.index % Add index entry when desired.
19960 %
19961 comma.before.last et.al.string.cite * write$
19962 }
19963 if$
19964 }
19965 if$
19966 }
19967 if$
19968 }
19969 if$
19970 }
19971
19972 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19973 % Citation labels when no author, editor, firstkey or key
19974 % is available.
19975
19976 FUNCTION {make.title.cite.label}
19977 { %
19978 % Formatting: check if formatted as article title or
19979 % as book title, and insert this formatting.
19980 %
19981 is.atype
19982 { "\APACciteatitle {" }
19983 { "\APACcitebtitle {" }
19984 if$
19985 %
19986 title empty$
19987 { text empty$
19988 { type empty$
19989 { howpublished empty$
19990 { note empty$
19991 { url empty$
19992 { cite$ }
19993 { url }
19994 if$
19995 }
19996 { note }
19997 if$
19998 }
19999 { howpublished }
20000 if$
20001 }
20002 { type }
20003 if$
20004 }
20005 { text }
20006 if$
20007 }
20008 { title }
20009 if$
20010 %
20011 % Connect with formatting.
20012 %
20013 * "}" *
20014 %
20015 % Write to output
20016 %
20017 write$
20018 }
20019
20020 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20021 % Citation labels when author or editor may be used.
20022
20023 FUNCTION {make.author.editor.cite.label}
20024 { author empty$
20025 { editor empty$
20026 { %
20027 % No author or editor:
20028 % Use title or other description as citation label.
20029 %
20030 make.title.cite.label
20031 "}{%" write$ newline$
20032 make.title.cite.label
20033 }
20034 { cite.num.names.full editor make.name.cite.label
20035 "}{%" write$ newline$
20036 cite.num.names.short editor make.name.cite.label
20037 }
20038 if$
20039 }
20040 { cite.num.names.full author make.name.cite.label
20041 "}{%" write$ newline$
20042 cite.num.names.short author make.name.cite.label
20043 }
20044 if$
20045 }
20046
20047 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20048 % Citation labels when author (but not editor) may be used.
20049
20050 FUNCTION {make.author.cite.label}
20051 { author empty$
20052 { %
20053 % No author:
20054 % Use title or other description as citation label.
20055 %
20056 make.title.cite.label
20057 "}{%" write$ newline$
20058 make.title.cite.label
20059 }
20060 { cite.num.names.full author make.name.cite.label
20061 "}{%" write$ newline$
20062 cite.num.names.short author make.name.cite.label
20063 }
20064 if$
20065 }
20066
20067
20068 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20069 % Make "a" or "b" supplement to year label when necessary.
20070
20071 FUNCTION {make.definitive.year.supplement}
20072 { %
20073 % Add "a", "b", etc. when necessary.
20074 %
20075 add.to.year #0 =
20076 { "" }
20077 { "{\protect "
20078 year empty$
20079 { "\BCntND " * }
20080 { year "\bibnodate" =
20081 year "l" change.case$ "no date" = or
20082 year "l" change.case$ "n.d." = or
20083 { "\BCntND " * }
20084 { year "\BIP" =
20085 year "l" change.case$ "in press" = or
20086 year "l" change.case$ "forthcoming" = or
20087 { "\BCntIP " * }
20088 { "\BCnt " * }
20089 if$
20090 }
20091 if$
20092 }
20093 if$
20094 "{" * add.to.year int.to.str$ * "}}" *
20095 }
20096 if$
20097 }
20098
20099 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20100 % Add \protect if year is \BIP or \bibnodate.
20101
20102 FUNCTION {protect.year}
20103 { year empty$
20104 { "{\protect \bibnodate {}}" }
20105 { year "\bibnodate" =
20106 year "l" change.case$ "no date" = or
20107 year "l" change.case$ "n.d." = or
20108 { "{\protect \bibnodate {}}" }
20109 { year "\BIP" =
20110 year "l" change.case$ "in press" = or
20111 year "l" change.case$ "forthcoming" = or
20112 { "{\protect \BIP {}}" }
20113 { year }
20114 if$
20115 }
20116 if$
20117 }
20118 if$
20119 }
20120
20121 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20122 % Make year label that is used for citations in text.
20123
20124 FUNCTION {make.definitive.year.label}
20125 { "{\protect \APACyear {"
20126 originalyear empty$
20127 { protect.year }
20128 { originalyear "\bibnodate" = % date of original publication unknown
20129 originalyear "l" change.case$ "no date" = or
20130 originalyear "l" change.case$ "n.d." = or
20131 { translator empty$
20132 { protect.year }
20133 { "{\protect \BTRANSL {}}~" protect.year * }
20134 if$
20135 }
20136 { year empty$
20137 { originalyear "/{\protect \bibnodate {}}" * } % 1923/n.d.
20138 { originalyear year =
20139 { protect.year }
20140 { originalyear "/" * protect.year * } % 1923/1961
20141 if$
20142 }
20143 if$
20144 }
20145 if$
20146 }
20147 if$
20148 * "}}%" * write$ newline$
20149 %
20150 % Add "a", "b", etc. when necessary.
20151 %
20152 "{\protect \APACexlab {" "}}"
20153 make.definitive.year.supplement enclose.check
20154 }
20155
20156
20157
20158 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20159 % Make citation labels:
20160 % - Full formatted author list (or substitute if no author
20161 % available) for first citation;
20162 % - Short formatted author list (ditto) for subsequent
20163 % citations;
20164 % - Year, with originalyear when applicable, and "a" or "b"
20165 % etc. addendum when necessary.
20166
20167 FUNCTION {make.cite.labels}
20168 { newline$
20169 %
20170 % Write a few lines for testing purposes.
20171 %
20172 test
20173 { "\bibitem [] {} \fullciteA {" cite$ * "}" * write$ newline$
20174 "\bibitem [] {} \citeA {" cite$ * "}" * write$ newline$
20175 }
20176 'skip$
20177 if$
20178 %
20179 "\bibitem [\protect \citeauthoryear {%" write$ newline$
20180 %
20181 % When key or firstkey is available, this takes precedence.
20182 %
20183 firstkey empty$ not
20184 { %
20185 % Full cite: firstkey.
20186 %
20187 firstkey write$
20188 "}{%" write$ newline$
20189 %
20190 % Short cite: if key is not empty and cite.initials is 0,
20191 % then key, else firstkey.
20192 %
20193 cite.initials #0 =
20194 key empty$ not
20195 and
20196 { key }
20197 { firstkey }
20198 if$
20199 write$
20200 }
20201 { key empty$ not
20202 { %
20203 % No firstkey, but key available:
20204 % Both full and short labels are key.
20205 %
20206 key write$
20207 "}{%" write$ newline$
20208 key write$
20209 }
20210 { % No key or firstkey, so find out which field
20211 % to use as author.
20212 %
20213 % Check reference type:
20214 % if result is 1 then possibly editor acts as author
20215 % 2 then editor does not act as author
20216 % 3 then key should have been used
20217 % 0 then unknown reference type
20218 ref.type #2 =
20219 { make.author.cite.label }
20220 { make.author.editor.cite.label }
20221 if$
20222 }
20223 if$
20224 }
20225 if$
20226 "}{%" write$ newline$
20227 %
20228 % Make year label that's used for citations
20229 %
20230 make.definitive.year.label write$
20231 "}]{%" write$ newline$
20232 cite$ write$
20233 "} " write$ newline$
20234 % author.year.sort.label write$ newline$ % for testing purposes
20235 % year.label write$ newline$ % for testing purposes
20236 %
20237 % If the item is used in a meta-analysis, indicate this with
20238 % a star.
20239 %
20240 "\APACinsertmetastar {%" write$ newline$
20241 cite$ write$
20242 "}%" write$ newline$
20243 }
20244
20245
20246 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20247 % FORMATTING OF REFERENCE LIST %
20248 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20249
20250 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20251 % "(Ed.)" or "(Eds.)" postfix.
20252 % editor must not be empty
20253
20254 FUNCTION {editor.postfix}
20255 { editor num.names$ #1 >
20256 { "(\BEDS)" }
20257 { "(\BED)" }
20258 if$
20259 }
20260
20261 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20262 % "(Ed. \& Trans.)" postfix
20263 % editor must not be empty
20264
20265 FUNCTION {editor.trans.postfix}
20266 { editor num.names$ #1 >
20267 { "(\BEDS{} \BAnd{} \BTRANSS)" }
20268 { "(\BED{} \BAnd{} \BTRANS)" }
20269 if$
20270 }
20271
20272 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20273 %
20274 % "(Trans.)" postfix
20275 % translator must not be empty
20276 %
20277 FUNCTION {trans.postfix}
20278 { translator num.names$ #1 >
20279 { "(\BTRANSS)" }
20280 { "(\BTRANS)" }
20281 if$
20282 }
20283
20284 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20285 % Format authors (or editors acting as authors) for the
20286 % reference list, according to APA 5th ed. rules.
20287 %
20288 % Call with
20289 % dot field authors.editors.reflist.apa5
20290 % where field is the field (string) that contains the authors
20291 % (or editors acting as authors) that must be formatted and
20292 % dot is 1 or 0 indicating whether or not a period must end
20293 % the formatting.
20294
20295 FUNCTION {authors.editors.reflist.apa5}
20296 { 'field :=
20297 'dot :=
20298 %
20299 field num.names$ 'numnames := % numnames is the total number of names
20300 % contained in field
20301 numnames 'format.num.names := % Format all authors
20302 format.num.names name.max > % Unless this exceeds the maximum of 6.
20303 { dot
20304 { name.max 'format.num.names := } % Format 6 authors
20305 { cite.num.names.full 'format.num.names := } % Format 1 editor
20306 if$
20307 }
20308 'skip$
20309 if$
20310 %
20311 % Enclose authors in APACrefauthors environment to allow crude style
20312 % options in \LaTeX.
20313 "\begin{APACrefauthors}%"
20314 write$ newline$
20315 %
20316 % It is kind of explicit in the APA manual that if "et al." would
20317 % refer to exactly one author (the 7th), then this author should
20318 % still be replaced by "et al.", unlike with citations.
20319 % So format.num.names is not adapted.
20320 %
20321 % Format first author
20322 %
20323 #1 'nameptr :=
20324 field nameptr format.author.name
20325 %
20326 % Add period if required and if this is the only author.
20327 %
20328 numnames #1 =
20329 dot
20330 and
20331 { add.period$ }
20332 'skip$
20333 if$
20334 add.name.index % Add index entry when desired.
20335 %
20336 numnames #1 =
20337 'skip$
20338 { format.num.names #1 =
20339 { %
20340 % First author et al.
20341 %
20342 comma.between.two
20343 %
20344 % Add period if required.
20345 %
20346 dot
20347 { et.al.string.period * }
20348 { et.al.string * }
20349 if$
20350 write$
20351 }
20352 { numnames #2 =
20353 { %
20354 % Given that format.num.names > 1, it is 2.
20355 %
20356 comma.between.two write$
20357 %
20358 % Format second author.
20359 %
20360 #2 'nameptr :=
20361 field nameptr format.author.name 's :=
20362 %
20363 % Check if 2nd author is explicit "others".
20364 % If so, insert "et al." string.
20365 %
20366 s "others" =
20367 { %
20368 % First et al.
20369 % Add period if required.
20370 %
20371 dot
20372 { et.al.string.period }
20373 { et.al.string }
20374 if$
20375 write$
20376 }
20377 { %
20378 % First \& Second
20379 %
20380 and.before.last write$
20381 %
20382 % Add period if required.
20383 %
20384 dot
20385 { s add.period$ }
20386 { s }
20387 if$
20388 add.name.index % Add index entry when desired.
20389 }
20390 if$
20391 }
20392 { %
20393 % 3 or more names, 2 or more must be cited
20394 %
20395 % for nameptr := 2 to format.num.names - 1 do
20396 %
20397 #2 'nameptr :=
20398 { nameptr format.num.names < }
20399 { %
20400 % Put comma between consecutive authors
20401 %
20402 comma.between.names write$
20403 %
20404 % Format and add next author
20405 %
20406 field nameptr format.author.name
20407 add.name.index % Add index entry when desired.
20408 %
20409 % Move to next author
20410 %
20411 nameptr #1 + 'nameptr :=
20412 }
20413 while$
20414 %
20415 % nameptr = format.num.names
20416 % Format this author.
20417 %
20418 field nameptr format.author.name 's :=
20419 %
20420 format.num.names numnames =
20421 { %
20422 % This is also the last author. Add (optional) comma.
20423 %
20424 comma.before.last write$
20425 %
20426 % Check if this author is explicit "others".
20427 % If so, insert "et al." string.
20428 %
20429 s "others" =
20430 { %
20431 % Add period if required.
20432 %
20433 dot
20434 { et.al.string.period }
20435 { et.al.string }
20436 if$
20437 write$
20438 }
20439 { and.before.last write$
20440 %
20441 % Add period if required.
20442 %
20443 dot
20444 { s add.period$ }
20445 { s }
20446 if$
20447 add.name.index % Add index entry when desired.
20448 }
20449 if$
20450 }
20451 { %
20452 % This is not the last author.
20453 % Add comma, author name, and "et al."
20454 %
20455 comma.between.names write$
20456 s
20457 add.name.index % Add index entry when desired.
20458 %
20459 comma.before.last
20460 %
20461 % Add period if required.
20462 %
20463 dot
20464 { et.al.string.period * }
20465 { et.al.string * }
20466 if$
20467 write$
20468 }
20469 if$
20470 }
20471 if$
20472 }
20473 if$
20474 }
20475 if$
20476 %
20477 % End APACrefauthors environment.
20478 "\end{APACrefauthors}%"
20479 write$ newline$
20480 }
20481
20482 %
20483 % \begin{macro}{authors.reflist.apa6}
20484 % Format authors for the reference list according to the rules of the
20485 % 6th edition of the \emph{APA Manual}, i.e., if there are more than 7
20486 % authors, list the first 6, then dots, and then the last.
20487 % Call with
20488 % \begin{verbatim}
20489 % dot field authors.reflist.apa6
20490 % \end{verbatim}
20491 % where \texttt{field} is the field (string) that contains the authors
20492 % (or editors acting as authors) that must be formatted and \texttt{dot}
20493 % is 1 or 0 indicating whether or not a period must end the formatting.
20494 % \begin{macrocode}
20495 FUNCTION {authors.reflist.apa6}
20496 { 'field :=
20497 'dot :=
20498 % \end{macrocode}
20499 % \texttt{numnames} is the total number of names in the \texttt{field}.
20500 % \texttt{format.num.names} is the number of names to be formatted,
20501 % which is \texttt{numnames} or 7, whichever is smaller
20502 % \begin{macrocode}
20503 field num.names$ 'numnames :=
20504 numnames #7 >
20505 { #7 'format.num.names := }
20506 { numnames 'format.num.names := }
20507 if$
20508 % \end{macrocode}
20509 % Enclose authors in \envirname{APACrefauthors} environment to allow crude
20510 % style options in \LaTeX.
20511 % \begin{macrocode}
20512 "\begin{APACrefauthors}%"
20513 write$ newline$
20514 % \end{macrocode}
20515 % Format first author.
20516 % \begin{macrocode}
20517 #1 'nameptr :=
20518 field nameptr format.author.name
20519 numnames #1 =
20520 % \end{macrocode}
20521 % Add period if required and if this is the only author, and add index
20522 % entry when desired.
20523 % \begin{macrocode}
20524 { dot
20525 { add.period$ }
20526 'skip$
20527 if$
20528 add.name.index
20529 }
20530 { add.name.index
20531 numnames #2 =
20532 % \end{macrocode}
20533 % Optional comma between two authors; format second author and store in
20534 % \texttt{s}.
20535 % \begin{macrocode}
20536 { comma.between.two write$
20537 #2 'nameptr :=
20538 field nameptr format.author.name 's :=
20539 s "others" =
20540 % \end{macrocode}
20541 % Second author is explicit ``|others|''. Therefore, insert
20542 % ``et al.'' string. Note that this does not correspond with the
20543 % 6th edition of the \emph{APA manual}, so give a warning here,
20544 % but after that format the authors as in the 5th edition:
20545 % ``First, et al.''. Add a period if required.
20546 % \begin{macrocode}
20547 { "`others' not consistent with 6th ed. of the APA Manual"
20548 warning$
20549 dot
20550 { et.al.string.period }
20551 { et.al.string }
20552 if$
20553 write$ newline$
20554 }
20555 % \end{macrocode}
20556 % There really are two authors: ``First, \& Second'', with a period
20557 % after the latter if required.
20558 % \begin{macrocode}
20559 { and.before.last write$
20560 dot
20561 { s add.period$ }
20562 { s }
20563 if$
20564 add.name.index
20565 }
20566 if$
20567 }
20568 % \end{macrocode}
20569 % Three or more authors, Format all the ones that need to be formatted,
20570 % except the last one, which needs special treatment.
20571 % \begin{macrocode}
20572 { %% for nameptr := 2 to format.num.names - 1 do
20573 #2 'nameptr :=
20574 { nameptr format.num.names < }
20575 % \end{macrocode}
20576 % Put comma between consecutive authors and format and add the next
20577 % author and the optional index entry, and increase the loop variable.
20578 % \begin{macrocode}
20579 { comma.between.names write$
20580 field nameptr format.author.name
20581 add.name.index
20582 nameptr #1 + 'nameptr :=
20583 }
20584 while$
20585 % \end{macrocode}
20586 % Format the last author. If all authors are formatted, add an
20587 % ampersand; otherwise, add dots (new in 6th ed.).
20588 % \begin{macrocode}
20589 field numnames format.author.name 's :=
20590 format.num.names numnames =
20591 { comma.before.last write$
20592 % \end{macrocode}
20593 % Check if this author is an explicit ``|others|''. If so, insert
20594 % ``et al.'' string. Note that this does not correspond with the
20595 % 6th edition of the \emph{APA manual}, so give a warning here. Add
20596 % a period if required.
20597 % \begin{macrocode}
20598 s "others" =
20599 { "`others' not consistent with 6th ed. of the APA "
20600 "Manual" *
20601 warning$
20602 dot
20603 { et.al.string.period }
20604 { et.al.string }
20605 if$
20606 write$
20607 }
20608 { and.before.last write$
20609 dot
20610 { s add.period$ }
20611 { s }
20612 if$
20613 add.name.index
20614 }
20615 if$
20616 }
20617 % \end{macrocode}
20618 % We skipped some authors. Indicate by dots.
20619 % \begin{macrocode}
20620 { dots.before.last write$
20621 s
20622 add.name.index
20623 }
20624 if$
20625 }
20626 if$
20627 }
20628 if$
20629 % \end{macrocode}
20630 % End \envirname{APACrefauthors} environment.
20631 % \begin{macrocode}
20632 "\end{APACrefauthors}%"
20633 write$ newline$
20634 }
20635
20636 % \end{macrocode}
20637 % \end{macro}
20638 %
20639 % \begin{macro}{format.author.names}
20640 % Format authors (or editors acting as authors) for the reference list.
20641 % Call with
20642 % \begin{verbatim}
20643 % dot field format.author.names
20644 % \end{verbatim}
20645 % where \texttt{field} is the field (string) that contains the authors
20646 % (or editors acting as authors) that must be formatted and \texttt{dot}
20647 % is 1 or 0 indicating whether or not a period must end the formatting.
20648 % \begin{macrocode}
20649 FUNCTION {format.author.names}
20650 { 'field :=
20651 'dot :=
20652 % \end{macrocode}
20653 % This is a temporary trick, which needs to be cleaned up. We
20654 % now check whether |dot| is 1, which indicates it's an author
20655 % field. If it's not, it's an editor field. In the former case,
20656 % if there are more than 7 authors, the first 6 plus dots plus
20657 % the last author must be given, whereas in the latter case,
20658 % only the first and ``et al.'' needs to be given. The latter
20659 % is the same behavior as in the 5th edition, so we use that
20660 % function, whereas we use an adapted function for authors in
20661 % the 6th edition.
20662 % \begin{macrocode}
20663 dot
20664 { dot field authors.reflist.apa6 }
20665 { dot field authors.editors.reflist.apa5 }
20666 if$
20667 }
20668 % \end{macrocode}
20669 % \end{macro}
20670 %
20671 % \begin{macrocode}
20672 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20673 % Format authors in reference list, where it is given that
20674 % the author field is not empty.
20675
20676 FUNCTION {format.authors}
20677 { #1 author format.author.names }
20678
20679 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20680 % Format editors in reference list in case editors act as
20681 % authors (such as reference to entire edited book)
20682 %
20683 % Letheridge, S., \& Cannon, C. R. (Eds.).
20684 % or
20685 % Letheridge, S. (Ed.). (if only 1 editor)
20686 %
20687 % editor must not be empty
20688
20689 FUNCTION {format.editors.as.authors}
20690 { #0 editor format.author.names
20691 "\ " editor.postfix * add.period$ write$ newline$
20692 }
20693
20694 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20695 %
20696 % Format editors in reference list in case editors are also
20697 % translators and act as authors (such as reference to entire
20698 % edited book of translated articles)
20699 %
20700 % Letheridge, S., \& Cannon, C. R. (Eds. and Trans.).
20701 % or
20702 % Letheridge, S. (Ed. and Trans.). (if only 1 editor)
20703 %
20704 % editor must not be empty
20705
20706 FUNCTION {format.ed.trans.as.authors}
20707 { #0 editor format.author.names
20708 "\ " editor.trans.postfix * add.period$ write$ newline$
20709 }
20710
20711 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20712 % Format a list of names with the initials before the
20713 % last names (i.e., names in the editor position),
20714 % commas between names (not between 2),
20715 % and ampersand (\&) before last name.
20716 % These names are not put in the author index.
20717 %
20718 % Call with
20719 % field format.editor.names
20720
20721 FUNCTION {format.editor.names}
20722 { 'field :=
20723 %
20724 field num.names$ 'numnames := % numnames is the total number of names
20725 % contained in field
20726 numnames 'format.num.names := % Format all authors
20727 format.num.names name.max > % Unless this exceeds the maximum of 6.
20728 { #1 'format.num.names := } % Then it becomes 1 (First et al.)
20729 'skip$
20730 if$
20731 %
20732 % Format first editor
20733 %
20734 field #1 format.editor.name
20735 %
20736 numnames #1 =
20737 'skip$
20738 { format.num.names #1 =
20739 { et.al.string * } % First editor et al., no comma.
20740 { numnames #2 =
20741 { %
20742 % Given that format.num.names > 1, it is 2.
20743 % No comma. Format second editor.
20744 %
20745 field #2 format.editor.name 's :=
20746 %
20747 % Check if 2nd editor is explicit "others".
20748 % If so, insert "et al." string.
20749 %
20750 s "others" =
20751 { et.al.string * } % First et al.
20752 { and.before.last * s * } % First \& Second
20753 if$
20754 }
20755 { %
20756 % 3 or more names, 2 or more must be cited
20757 %
20758 % for nameptr := 2 to format.num.names - 1 do
20759 %
20760 #2 'nameptr :=
20761 { nameptr format.num.names < }
20762 { %
20763 % Put comma between consecutive editors
20764 %
20765 comma.between.names *
20766 %
20767 % Format and add next editor
20768 %
20769 field nameptr format.editor.name *
20770 %
20771 % Move to next editor
20772 %
20773 nameptr #1 + 'nameptr :=
20774 }
20775 while$
20776 %
20777 % nameptr = format.num.names
20778 % Format this editor.
20779 %
20780 field nameptr format.editor.name 's :=
20781 %
20782 format.num.names numnames =
20783 { %
20784 % This is also the last editor. Add (optional) comma.
20785 %
20786 comma.before.last *
20787 %
20788 % Check if this editor is explicit "others".
20789 % If so, insert "et al." string.
20790 %
20791 s "others" =
20792 { et.al.string * }
20793 { and.before.last * s * }
20794 if$
20795 }
20796 { %
20797 % This is not the last editor.
20798 % Add comma, editor name, and "et al."
20799 %
20800 comma.between.names * s *
20801 comma.before.last * et.al.string *
20802 }
20803 if$
20804 }
20805 if$
20806 }
20807 if$
20808 }
20809 if$
20810 }
20811
20812
20813 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20814 %
20815 % format editors in case editors do not act as authors
20816 % (such as reference to chapter in edited book)
20817 %
20818 % L. W. Poon (Ed.) (1 editor)
20819 % or
20820 % A. S. Gurman \& D. P. Kniskern (Eds.) (2 editors)
20821 % or
20822 % L. Poon, A. Jones, \& D. P. Smith (Eds.) (>2 editors)
20823 %
20824 % editor must not be empty
20825 %
20826 FUNCTION {format.editors.in.line}
20827 { editor format.editor.names
20828 editor.postfix connect.with.space.check
20829 }
20830
20831
20832 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20833 %
20834 % format editors in case editors are also translators
20835 % and do not act as authors
20836 % (such as reference to chapter in edited book
20837 % of translated articles)
20838 %
20839 % L. W. Poon (Ed. and Trans.) (1 editor)
20840 % or
20841 % A. S. Gurman \& D. P. Kniskern (Eds. and Trans.) (2 editors)
20842 % or
20843 % L. Poon, A. Jones, \& D. P. Smith (Eds. and Trans.) (>2 editors)
20844 %
20845 % editor must not be empty
20846 %
20847 FUNCTION {format.editors.trans.in.line}
20848 { editor format.editor.names
20849 editor.trans.postfix connect.with.space.check
20850 }
20851
20852
20853 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20854 %
20855 % format translators in case translators act as editors
20856 % (such as reference to chapter in translated book)
20857 %
20858 % L. W. Poon (Trans.) (1 translator)
20859 % or
20860 % A. S. Gurman \& D. P. Kniskern (Trans.) (2 translators)
20861 % or
20862 % L. Poon, A. Jones, \& D. P. Smith (Trans.) (>2 translators)
20863 %
20864 % translator must not be empty
20865 %
20866 FUNCTION {format.translators.in.line}
20867 { translator format.editor.names
20868 trans.postfix connect.with.space.check
20869 }
20870
20871
20872 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20873 %
20874 % format translators in case translator does not act as editor
20875 % (such as reference to translated book)
20876 %
20877 % L. Solotaroff, Trans.
20878 %
20879 FUNCTION {format.translators.in.paren.check}
20880 { translator empty$
20881 { "" }
20882 { translator format.editor.names
20883 translator num.names$ #1 >
20884 { ", \BTRANSS{}" * }
20885 { ", \BTRANS{}" * }
20886 if$
20887 }
20888 if$
20889 }
20890
20891 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20892 %
20893 % format editors and translators in case neither act as editor
20894 % (such as reference to edited or translated book with a
20895 % a single author)
20896 %
20897 % L. Solotaroff, Ed.
20898 % L. Solotaroff, Ed. \& Trans.
20899 % L. Solotaroff, Trans.
20900 % L. Solotaroff, Ed. \& S. Prokofieff, Trans.
20901 %
20902 FUNCTION {format.editors.translators.in.paren.check}
20903 { editor empty$
20904 { translator empty$
20905 { "" }
20906 { translator format.editor.names
20907 translator num.names$ #1 >
20908 { ", \BTRANSS{}" * }
20909 { ", \BTRANS{}" * }
20910 if$
20911 }
20912 if$
20913 }
20914 { editor format.editor.names
20915 editor num.names$ #1 >
20916 { ", \BEDS{}" * }
20917 { ", \BED{}" * }
20918 if$
20919 translator empty$
20920 'skip$
20921 { editor translator =
20922 { editor num.names$ #1 >
20923 { " \BAnd{} \BTRANSS" * }
20924 { " \BAnd{} \BTRANS" * }
20925 if$
20926 }
20927 { " \BAnd{} " *
20928 translator format.editor.names *
20929 translator num.names$ #1 >
20930 { ", \BTRANSS{}" * }
20931 { ", \BTRANS{}" * }
20932 if$
20933 }
20934 if$
20935 }
20936 if$
20937 }
20938 if$
20939 }
20940
20941 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20942 %
20943 % translator of article
20944 %
20945 FUNCTION {format.atrans.check}
20946 { format.translators.in.paren.check parenthesize.check }
20947
20948
20949
20950
20951 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20952 %
20953 % format "In editor (Ed.), "
20954 %
20955 FUNCTION {format.in.editors}
20956 { "\BIn{} "
20957 editor empty$
20958 'skip$
20959 { format.editors.in.line * ", " * }
20960 if$
20961 }
20962
20963
20964 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20965 %
20966 % format "In translator (Trans.),"
20967 %
20968 FUNCTION {format.in.trans}
20969 { "\BIn{} "
20970 translator empty$
20971 'skip$
20972 { format.translators.in.line * ", " * }
20973 if$
20974 }
20975
20976
20977
20978 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20979 %
20980 % format "In editor (Ed. and Trans.)"
20981 % or "In editor (Ed.)" if editor not equal to translator
20982 %
20983 FUNCTION {format.in.editors.trans}
20984 { "\BIn{} "
20985 editor empty$
20986 { translator empty$
20987 'skip$
20988 { format.translators.in.line * ", " * }
20989 if$
20990 }
20991 { translator empty$
20992 { format.editors.in.line * }
20993 { editor translator =
20994 { format.editors.trans.in.line * }
20995 { format.editors.in.line * }
20996 if$
20997 }
20998 if$
20999 ", " *
21000 }
21001 if$
21002 }
21003
21004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21005 % DATE %
21006 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21007
21008
21009 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21010 % Formats year (+ extra label) between parentheses (which
21011 % may be redefined by \BBOP and \BBCP).
21012 % Extra label can be used for
21013 % Bentler, P. M. (1983a) <article 1>
21014 % Bentler, P. M. (1983b) <article 2>
21015
21016 FUNCTION {format.year.check}
21017 { "\APACrefYear{"
21018 protect.year *
21019 %
21020 % Add "a", "b", etc. when necessary.
21021 %
21022 make.definitive.year.supplement *
21023 "}" *
21024 }
21025
21026
21027
21028 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21029 % Formats year (+ extra label) + month + day between
21030 % parentheses (which may be redefined by \BBOP and \BBCP).
21031 % Extra label can be used for
21032 % Bentler, P. M. (1983a, June 7) <article 1>
21033 % Bentler, P. M. (1983b, April 4) <article 2>
21034
21035 FUNCTION {format.year.month.day.check}
21036 { "\APACrefYearMonthDay{"
21037 protect.year *
21038 %
21039 % Add "a", "b", etc. when necessary.
21040 %
21041 make.definitive.year.supplement *
21042 "}{" *
21043 %
21044 % Add month and day when present.
21045 %
21046 month empty$
21047 'skip$
21048 { month * }
21049 if$
21050 "}{" *
21051 day empty$
21052 'skip$
21053 { day * }
21054 if$
21055 "}" *
21056 }
21057
21058 % \end{macrocode}
21059 %
21060 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21061 % \subsection{Title formatting}
21062 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21063 % \begin{macro}{format.atitle.no.dot}
21064 % Title of article in journal or book, without finishing period.
21065 % The field must be on top of stack (so \fieldname{englishtitle} can
21066 % be handled as well).
21067 % \begin{macrocode}
21068 FUNCTION {format.atitle.no.dot}
21069 { "{\BBOQ}" swap$
21070 "{\BBCQ}" swap$
21071 duplicate$ empty$
21072 'skip$
21073 { duplicate$
21074 % Two arguments: Title twice: (1) don't change case; (2) change case
21075 "\APACrefatitle {" swap$ * "} {" * swap$
21076 "t" change.case$
21077 * "}" *
21078 }
21079 if$
21080 enclose.check
21081 }
21082
21083 % \end{macrocode}
21084 % \end{macro}
21085 %
21086 % \begin{macro}{format.atitle.dot}
21087 % Title of article in journal or book, with finishing period.
21088 % The field must be on top of stack (so \fieldname{englishtitle} can
21089 % be handled as well).
21090 % \begin{macrocode}
21091 FUNCTION {format.atitle.dot}
21092 { "{\BBOQ}" swap$
21093 "{\BBCQ}" swap$
21094 duplicate$ empty$
21095 'skip$
21096 { duplicate$
21097 % Two arguments: Title twice: (1) don't change case; (2) change case
21098 "\APACrefatitle {" swap$ * "} {" * swap$
21099 "t" change.case$
21100 * "}" * add.period$
21101 }
21102 if$
21103 enclose.check
21104 }
21105
21106 % \end{macrocode}
21107 % \end{macro}
21108 %
21109 % \begin{macro}{format.atitle.connect}
21110 % Title of article in journal or book. The field must be on top of stack.
21111 % The second element on stack must be connected: if that is empty, then
21112 % |format.atitle.dot|, else |format.atitle.no.dot|, connect, and add a
21113 % period.
21114 % \begin{macrocode}
21115 FUNCTION {format.atitle.connect}
21116 { swap$
21117 duplicate$ empty$
21118 { pop$
21119 format.atitle.dot
21120 }
21121 { swap$
21122 format.atitle.no.dot
21123 swap$ connect.with.space.check
21124 add.period$
21125 }
21126 if$
21127 }
21128
21129 % \end{macrocode}
21130 % \end{macro}
21131 %
21132 % \begin{macro}{format.btitle.no.dot}
21133 % Title of a book or so, without period. Call with
21134 % \begin{verbatim}
21135 % field format.btitle.no.dot
21136 % \end{verbatim}
21137 % \begin{macrocode}
21138 FUNCTION {format.btitle.no.dot}
21139 { duplicate$ empty$
21140 { pop$
21141 ""
21142 }
21143 { duplicate$
21144 % Two arguments: Title twice: (1) don't change case; (2) change case
21145 "\APACrefbtitle {" swap$ * "} {" * swap$
21146 "t" change.case$
21147 * "}" *
21148 }
21149 if$
21150 }
21151
21152 % \end{macrocode}
21153 % \end{macro}
21154 %
21155 % \begin{macro}{format.btitle.dot}
21156 % Title of book or so, with period. Call with
21157 % \begin{verbatim}
21158 % field format.btitle.dot
21159 % \end{verbatim}
21160 % \begin{macrocode}
21161 FUNCTION {format.btitle.dot}
21162 { duplicate$ empty$
21163 { pop$
21164 ""
21165 }
21166 { add.period$ format.btitle.no.dot }
21167 if$
21168 }
21169 % \end{macrocode}
21170 % \end{macro}
21171 %
21172 % \begin{macrocode}
21173 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21174 %
21175 % title of book and similar
21176 % field must be on top of stack
21177 % second element on stack must be connected:
21178 % if that is empty, then btitle.dot
21179 % else btitle.no.dot, connect, and add period
21180 %
21181 FUNCTION {format.btitle.connect}
21182 { swap$
21183 duplicate$ empty$
21184 { pop$
21185 format.btitle.dot
21186 }
21187 { swap$
21188 format.btitle.no.dot
21189 swap$ connect.with.space.check
21190 add.period$
21191 }
21192 if$
21193 }
21194
21195 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21196 %
21197 % title of book and similar
21198 % field must be on top of stack
21199 % second element on stack must be connected
21200 %
21201 FUNCTION {format.btitle.connect.no.dot}
21202 { swap$
21203 duplicate$ empty$
21204 { pop$
21205 format.btitle.no.dot
21206 }
21207 { swap$
21208 format.btitle.no.dot
21209 swap$ connect.with.space.check
21210 }
21211 if$
21212 }
21213
21214 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21215 %
21216 % format englishtitle (of nonenglish article, etc.)
21217 %
21218 FUNCTION {format.aetitle.check}
21219 { englishtitle empty$
21220 { "" }
21221 { % Two arguments: Title twice: (1) don't change case; (2) change case
21222 "\APACrefaetitle {" englishtitle * "} {" *
21223 englishtitle "t" change.case$ * "}" *
21224 }
21225 if$
21226 }
21227
21228 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21229 %
21230 % format englishtitle (of nonenglish book, etc.)
21231 %
21232 FUNCTION {format.betitle.check}
21233 { englishtitle empty$
21234 { "" }
21235 { % Two arguments: Title twice: (1) don't change case; (2) change case
21236 "\APACrefbetitle {" englishtitle * "} {" *
21237 englishtitle "t" change.case$ * "}" *
21238 }
21239 if$
21240 }
21241
21242 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21243 %
21244 % format type (of article, etc.)
21245 %
21246 FUNCTION {format.atype.check}
21247 { type bracket.check }
21248
21249
21250 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21251 %
21252 % format title and englishtitle (of article, etc.)
21253 %
21254 FUNCTION {format.atitle.check}
21255 { format.aetitle.check
21256 title format.atitle.connect
21257 }
21258
21259
21260 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21261 %
21262 % format title, englishtitle, and type
21263 % (of article, etc.)
21264 %
21265 FUNCTION {format.atitle.type.check}
21266 { format.aetitle.check
21267 format.atype.check connect.with.space.check
21268 title format.atitle.connect
21269 }
21270
21271
21272 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21273 %
21274 % format title, englishtitle,
21275 % and translator (of article, etc.)
21276 %
21277 FUNCTION {format.atitle.trans.check}
21278 { format.aetitle.check
21279 format.atrans.check connect.with.space.check
21280 title format.atitle.connect
21281 }
21282
21283 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21284 %
21285 % format title, englishtitle, type,
21286 % and translator (of article, etc.)
21287 %
21288 FUNCTION {format.atitle.type.trans.check}
21289 { format.aetitle.check
21290 format.atype.check connect.with.space.check
21291 format.atrans.check connect.with.space.check
21292 title format.atitle.connect
21293 }
21294
21295 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21296 % JOURNAL FORMATTING %
21297 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21298
21299 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21300 %
21301 % format journal, volume, number and pages
21302 % call with
21303 % formatted.pages format.journal.vol.num.pages.check
21304 %
21305 FUNCTION { format.journal.vol.num.pages.check }
21306 { "journal" journal warning.if.empty
21307 duplicate$ empty$
21308 journal empty$ and
21309 volume empty$ and
21310 number empty$ and
21311 { pop$ "" }
21312 { "\APACjournalVolNumPages{" journal "" connect.check
21313 "}{" * volume "" connect.check
21314 "}{" * number "" connect.check
21315 "}{" * swap$ "" connect.check
21316 "}" *
21317 }
21318 if$
21319 }
21320
21321 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21322 % BOOK VOLUME, EDITION, AND OTHER SUPPLEMENTARY INFO %
21323 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21324
21325 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21326 %
21327 % volume of book, checks whether
21328 % "Volume" or "Volumes"
21329 %
21330 % call with
21331 % field format.bvolume.check
21332 %
21333 FUNCTION {format.bvolume.check}
21334 { duplicate$ empty$
21335 'skip$
21336 { duplicate$ multi.result.check
21337 { "\BVOLS" swap$ tie.or.space.connect }
21338 { "\BVOL" swap$ tie.or.space.connect }
21339 if$
21340 }
21341 if$
21342 }
21343
21344
21345
21346 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21347 %
21348 % edition of book, must not be empty
21349 % call with
21350 % field format.edition.check
21351 %
21352 FUNCTION {format.edition.check}
21353 { duplicate$ empty$
21354 'skip$
21355 { "\PrintOrdinal{" swap$ * "}" *
21356 "\BEd" connect.with.space.check
21357 }
21358 if$
21359 }
21360
21361
21362 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21363 %
21364 % volume and edition of book
21365 %
21366 FUNCTION {format.bvol.edition.check}
21367 { edition format.edition.check
21368 volume format.bvolume.check
21369 connect.with.comma.check
21370 }
21371
21372
21373
21374
21375 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21376 %
21377 % volume and edition of book
21378 %
21379 FUNCTION {format.bvol.edition}
21380 { format.bvol.edition.check
21381 parenthesize.check
21382 }
21383
21384 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21385 %
21386 % volume and edition and translator of translated book
21387 %
21388 FUNCTION {format.bvol.edition.trans}
21389 { format.bvol.edition.check
21390 format.translators.in.paren.check connect.with.semicolon.check
21391 parenthesize.check
21392 }
21393
21394 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21395 %
21396 % volume, edition, editor, and translator of (translated) book
21397 %
21398 FUNCTION {format.bvol.edition.editor.trans}
21399 { format.bvol.edition.check
21400 format.editors.translators.in.paren.check connect.with.semicolon.check
21401 parenthesize.check
21402 }
21403
21404 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21405 %
21406 % formats pages by first checking if 1 or more pages
21407 % and prefixing pages with "p." or "pp." (these strings
21408 % are given in the commands \BPG and \BPGS, respectively),
21409 % whichever is applicable, and do a tie or space connect
21410 %
21411 % call with
21412 % field format.bpages.check
21413 %
21414 FUNCTION {format.bpages.check}
21415 { duplicate$ empty$
21416 'skip$
21417 { duplicate$ multi.result.check
21418 { "\BPGS" swap$ tie.or.space.connect }
21419 { "\BPG~" swap$ * }
21420 if$
21421 }
21422 if$
21423 }
21424
21425 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21426 %
21427 % formats chapters by first checking if 1 or more chapters
21428 % and prefixing pages with "chap." (this string
21429 % is given in the commands \BCHAP and \BCHAPS, respectively),
21430 % whichever is applicable, and do a tie or space connect
21431 %
21432 % call with
21433 % field format.bchapter.check
21434 %
21435 FUNCTION {format.bchapter.check}
21436 { duplicate$ empty$
21437 'skip$
21438 { duplicate$ multi.result.check
21439 { "\BCHAPS" swap$ tie.or.space.connect }
21440 { "\BCHAP" swap$ tie.or.space.connect }
21441 if$
21442 }
21443 if$
21444 }
21445
21446
21447 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21448 %
21449 % volume, edition, and pages or chapter of article in book etc.
21450 %
21451 FUNCTION {format.bvol.edition.pages}
21452 { format.bvol.edition.check
21453 pages empty$
21454 { chapter format.bchapter.check connect.with.comma.check }
21455 { pages format.bpages.check connect.with.comma.check }
21456 if$
21457 parenthesize.check
21458 }
21459
21460
21461
21462 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21463 %
21464 % title, volume, edition of book
21465 %
21466 FUNCTION {format.btitle.vol.edition}
21467 { format.betitle.check
21468 format.bvol.edition connect.with.space.check
21469 title format.btitle.connect.no.dot
21470 }
21471
21472
21473 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21474 %
21475 % title, volume, edition, and translator of book
21476 %
21477 FUNCTION {format.btitle.vol.edition.trans}
21478 { format.betitle.check
21479 format.bvol.edition.trans connect.with.space.check
21480 title format.btitle.connect.no.dot
21481 }
21482
21483 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21484 %
21485 % title, volume, edition, editor, and translator of book
21486 %
21487 FUNCTION {format.btitle.vol.edition.editor.trans}
21488 { format.betitle.check
21489 format.bvol.edition.editor.trans connect.with.space.check
21490 title format.btitle.connect.no.dot
21491 }
21492
21493 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21494 % ADDRESS AND PUBLISHER %
21495 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21496
21497 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21498 %
21499 % format address and publisher of book etc.
21500 %
21501 % New York: Wiley
21502 % or
21503 % Wiley (if address empty)
21504 % or
21505 % New York (if publisher empty)
21506 %
21507 FUNCTION {format.address.publisher}
21508 { %
21509 % If publisher = author or publisher = "author" or publisher = "Author"
21510 % then hand over the final choice how to format this to \LaTeX.
21511 % (I could imagine similar code for editors, but the APA manual does
21512 % not mention it and then we'd have to check whether the editor is in
21513 % the author position, so let's keep it simple until someone complains.)
21514 %
21515 author empty$
21516 publisher empty$ or
21517 { publisher "\APACaddressPublisher{" }
21518 { author publisher =
21519 "author" publisher = or
21520 "Author" publisher = or
21521 { author "\APACaddressPublisherEqAuth{" }
21522 { publisher "\APACaddressPublisher{" }
21523 if$
21524 }
21525 if$
21526 address "" connect.check "}{" *
21527 % Recover publisher that was pushed onto the stack previously.
21528 swap$ "" connect.check "}" *
21529 }
21530
21531 % \end{macrocode}
21532 %
21533 % \begin{macro}{format.address.publisher.check}
21534 % Format \fieldname{address} and \fieldname{publisher} of a book etc.:
21535 % ``New York, NY: Wiley'' or ``Wiley'' (if \fieldname{address} is empty)
21536 % or ``New York, NY'' (if \fieldname{publisher} is empty), or do nothing
21537 % if both are empty.
21538 % \begin{macrocode}
21539 FUNCTION {format.address.publisher.check}
21540 { publisher empty$
21541 address empty$
21542 and
21543 'skip$
21544 {
21545 % \end{macrocode}
21546 % Clear the stack.
21547 % \begin{macrocode}
21548 duplicate$ empty$
21549 'skip$
21550 { output.new.block }
21551 if$
21552 format.address.publisher
21553 }
21554 if$
21555 }
21556
21557 % \end{macrocode}
21558 % \end{macro}
21559 % \begin{macrocode}
21560 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21561 % TYPE AND NUMBER OF A REPORT %
21562 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21563
21564
21565 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21566 %
21567 % format number as in reports: No. 2017
21568 % call with
21569 % field format.rnumber.check
21570 %
21571 FUNCTION {format.rnumber.check}
21572 { duplicate$ empty$
21573 'skip$
21574 { duplicate$ multi.result.check
21575 { "\BNUMS" swap$ tie.or.space.connect }
21576 { "\BNUM" swap$ tie.or.space.connect }
21577 if$
21578 }
21579 if$
21580 }
21581
21582 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21583 %
21584 % format type and number of a standalone item
21585 % call with
21586 % format.type.number
21587 %
21588 FUNCTION { format.type.number }
21589 { type empty$
21590 { type.2 }
21591 { type }
21592 if$
21593 number empty$
21594 { bracket.check }
21595 { number format.rnumber.check connect.with.space.check
21596 parenthesize.check
21597 }
21598 if$
21599 }
21600
21601 % \end{macrocode}
21602 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21603 % \paragraph{Howpublished formatting functions}
21604 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21605 % The third function is a cleaner version. The first one is used with
21606 % various entry types; the second one with \entryname{@misc}, the
21607 % third one in v6.03 only with theses.
21608 % \begin{macrocode}
21609 FUNCTION {format.howpublished}
21610 { howpublished empty$
21611 'skip$
21612 { % clear the stack
21613 duplicate$ empty$
21614 'pop$
21615 { output.dot.new.block }
21616 if$
21617 "\APAChowpublished {" howpublished * "}" *
21618 }
21619 if$
21620 }
21621 FUNCTION {output.howpublished}
21622 { howpublished empty$
21623 'skip$
21624 { "\APAChowpublished {" howpublished * "}" *
21625 output.dot.new.block
21626 }
21627 if$
21628 }
21629 FUNCTION {howpublished.block}
21630 { howpublished empty$
21631 'skip$
21632 { start.new.block
21633 "\APAChowpublished {" howpublished * "}" *
21634 output.dot.end.block
21635 }
21636 if$
21637 }
21638 % \end{macrocode}
21639 %
21640 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21641 % \subsection{URL and DOI formatting functions}
21642 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21643 % \begin{macro}{begin.end.url.env}
21644 % Begin and end of a URL environment.
21645 % \begin{macrocode}
21646 FUNCTION {begin.end.url.env}
21647 { "\begin{APACrefURL} "
21648 % \end{macrocode}
21649 % For ``Retrieved $\langle$\textit{date}$\rangle$, from''
21650 % \begin{macrocode}
21651 lastchecked empty$
21652 { urldate empty$
21653 'skip$
21654 { "[{" * urldate * "}]" * }
21655 if$
21656 }
21657 { "[{" * lastchecked * "}]" * }
21658 if$
21659 " \end{APACrefURL} "
21660 }
21661
21662 % \end{macrocode}
21663 % \end{macro}
21664 %
21665 % \begin{macro}{begin.end.doi.env}
21666 % Begin and end of a DOI environment.
21667 % \begin{macrocode}
21668 FUNCTION {begin.end.doi.env}
21669 { "\begin{APACrefDOI} "
21670 " \end{APACrefDOI} "
21671 }
21672
21673 % \end{macrocode}
21674 % \end{macro}
21675 %
21676 % \begin{macro}{begin.end.msg.env}
21677 % Begin and end of a message environment.
21678 % \begin{macrocode}
21679 FUNCTION {begin.end.msg.env}
21680 { "\begin{APACrefURLmsg} "
21681 " \end{APACrefURLmsg} "
21682 }
21683 % \end{macrocode}
21684 % \end{macro}
21685 % Format \fieldname{url} given that it is not empty.
21686 % \begin{macrocode}
21687 FUNCTION {format.url}
21688 % \end{macrocode}
21689 % First format begin and end of the enclosing environment.
21690 % With posted messages, a different environment is used.
21691 % \begin{macrocode}
21692 { type.2 empty$
21693 { begin.end.url.env }
21694 { type.2 "\bibmessage" =
21695 { begin.end.msg.env }
21696 { begin.end.url.env }
21697 if$
21698 }
21699 if$
21700 "\url{" url * "}" *
21701 % \end{macrocode}
21702 % Enclose url string in begin and end environment.
21703 % \begin{macrocode}
21704 enclose.check
21705 }
21706 % \end{macrocode}
21707 % Process a whole url block. Skip if a \fieldname{doi} is also present
21708 % because then \fieldname{doi} has precedence.
21709 % \begin{macrocode}
21710 FUNCTION {url.block}
21711 { doi empty$
21712 { url empty$
21713 'skip$
21714 { start.new.block
21715 format.url
21716 output.end.block
21717 }
21718 if$
21719 }
21720 'skip$
21721 if$
21722 }
21723 % \end{macrocode}
21724 % Format \fieldname{doi} given that it is not empty.
21725 % \begin{macrocode}
21726 FUNCTION {format.doi}
21727 % \end{macrocode}
21728 % Format begin and end of the enclosing environment.
21729 % \begin{macrocode}
21730 { begin.end.doi.env
21731 "\doi{" doi * "}" *
21732 % \end{macrocode}
21733 % Enclose doi string in begin and end environment.
21734 % \begin{macrocode}
21735 enclose.check
21736 }
21737 % \end{macrocode}
21738 % Process a whole doi block.
21739 % \begin{macrocode}
21740 FUNCTION {doi.block}
21741 { doi empty$
21742 'skip$
21743 { start.new.block
21744 format.doi
21745 output.end.block
21746 }
21747 if$
21748 }
21749 % \end{macrocode}
21750 %
21751 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21752 % \subsection{Note formatting functions}
21753 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21754 % Format optional note.
21755 % \begin{macrocode}
21756 FUNCTION {format.note}
21757 { "\APACrefnote{" "}" note enclose.check }
21758 % \end{macrocode}
21759 % Process a whole note block (only \fieldname{note}).
21760 % \begin{macrocode}
21761 FUNCTION {note.block}
21762 { note empty$
21763 'skip$
21764 { start.new.block
21765 format.note
21766 output.end.block
21767 }
21768 if$
21769 }
21770
21771 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21772 %
21773 % format original year of publication and note
21774 % (reprint or translation)
21775 %
21776 FUNCTION {format.orig.year.note}
21777 { originalyear empty$
21778 { format.note }
21779 { "\APACorigyearnote{"
21780 originalyear "" connect.check "}{" *
21781 note "" connect.check "}" *
21782 }
21783 if$
21784 }
21785
21786 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21787 %
21788 % format original journal of publication and note
21789 % (reprint or translation)
21790 %
21791 FUNCTION {format.orig.journal.note}
21792 { "\APACorigjournalnote{"
21793 originalyear "" connect.check "}{" *
21794 originaljournal "" connect.check "}{" *
21795 originalvolume "" connect.check "}{" *
21796 originalnumber "" connect.check "}{" *
21797 originalpages "" connect.check "}{" *
21798 note "" connect.check "}" *
21799 }
21800
21801 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21802 %
21803 % format original book of publication and note
21804 % (reprint or translation)
21805 %
21806 FUNCTION {format.orig.book.note}
21807 { "\APACorigbooknote{" originalyear "" connect.check "}{" *
21808 %
21809 originaleditor empty$
21810 'skip$
21811 { originaleditor num.names$ #1 >
21812 { "\APACorigEDS {" * originaleditor format.editor.names * "}" * }
21813 { "\APACorigED {" * originaleditor format.editor.names * "}" * }
21814 if$
21815 }
21816 if$
21817 %
21818 "}{" *
21819 originalbooktitle format.btitle.no.dot "" connect.check "} {" *
21820 originaledition format.edition.check "" connect.check "} {" *
21821 originalvolume format.bvolume.check "" connect.check "} {" *
21822 originalpages format.bpages.check "" connect.check "} {" *
21823 originaladdress "" connect.check "} {" *
21824 originalpublisher "" connect.check "} {" *
21825 note "" connect.check "}" *
21826 }
21827
21828
21829 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21830 %
21831 % format information about original publication of reprint
21832 % and format optional note
21833 %
21834 FUNCTION {format.orig.note}
21835 { originaljournal empty$
21836 { originalbooktitle empty$
21837 { note empty$
21838 { originalyear empty$
21839 'skip$
21840 { originalyear "\bibnodate" =
21841 originalyear "l" change.case$ "no date" = or
21842 originalyear "l" change.case$ "n.d." = or
21843 'skip$
21844 { output.new.block
21845 format.orig.year.note
21846 }
21847 if$
21848 }
21849 if$
21850 }
21851 { output.new.block
21852 format.orig.year.note
21853 }
21854 if$
21855 }
21856 { output.new.block
21857 format.orig.book.note
21858 }
21859 if$
21860 }
21861 { output.new.block
21862 format.orig.journal.note
21863 }
21864 if$
21865 }
21866 % \end{macrocode}
21867 % Finish current entry by writing what's left on the stack and starting
21868 % a new line.
21869 % \begin{macrocode}
21870 FUNCTION {fin.entry}
21871 { doi empty$
21872 'skip$
21873 { output.new.block
21874 format.doi
21875 }
21876 if$
21877 output.end.block
21878 "\PrintBackRefs{\CurrentBib}" write$ newline$
21879 test
21880 { "\vspace{\baselineskip}" write$ newline$ }
21881 'skip$
21882 if$
21883 %<*annotated>
21884 %
21885 % According to TLC2, pp. 810-811, both annote and annotate fields are
21886 % known, so support them both, but do not print them both, in case
21887 % someone wants to make a file that is compatible with both the annotate
21888 % and annotation styles and thus duplicates the information. Instead, we
21889 % give annote priority.
21890 %
21891 annote empty$
21892 {% Try annotate
21893 annotate empty$
21894 'skip$
21895 { % add annotation
21896 "\begin{APACrefannotation}" write$ newline$
21897 annotate write$ newline$
21898 "\end{APACrefannotation}" write$ newline$
21899 }
21900 if$
21901 }
21902 { % add annotation
21903 "\begin{APACrefannotation}" write$ newline$
21904 annote write$ newline$
21905 "\end{APACrefannotation}" write$ newline$
21906 }
21907 if$
21908 %</annotated>
21909 }
21910 % \end{macrocode}
21911 % Finish current entry: process \fieldname{doi}, back references, and
21912 % annotation if requested.
21913 % \begin{macrocode}
21914 FUNCTION {fin.entry.2}
21915 { doi.block
21916 "\PrintBackRefs{\CurrentBib}" write$ newline$
21917 test
21918 { "\vspace{\baselineskip}" write$ newline$ }
21919 'skip$
21920 if$
21921 %<*annotated>
21922 % \end{macrocode}
21923 % According to TLC2, pp. 810--811, both \fieldname{annote} and
21924 % \fieldname{annotate} fields are known, so support them both, but do
21925 % not print them both, in case someone wants to make a \fname{.bib}
21926 % file that is compatible with both the \pkg{annotate} and
21927 % and \pkg{annotation} styles and thus duplicates the information.
21928 % Instead, we give \fieldname{annote} priority.
21929 % \begin{macrocode}
21930 annote empty$
21931 {% Try annotate
21932 annotate empty$
21933 'skip$
21934 { % add annotation
21935 "\begin{APACrefannotation}" write$ newline$
21936 annotate write$ newline$
21937 "\end{APACrefannotation}" write$ newline$
21938 }
21939 if$
21940 }
21941 { % add annotation
21942 "\begin{APACrefannotation}" write$ newline$
21943 annote write$ newline$
21944 "\end{APACrefannotation}" write$ newline$
21945 }
21946 if$
21947 %</annotated>
21948 }
21949 % \end{macrocode}
21950 %
21951 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21952 % \subsection{Top-level and near-top level functions for formatting complete
21953 % entries}
21954 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21955 % Article in periodical: \entryname{journal}, \entryname{magazine},
21956 % \entryname{newspaper}. Call with
21957 % \begin{verbatim}
21958 % formatted.pages formatted.date periodical
21959 % \end{verbatim}
21960 % \begin{macrocode}
21961 FUNCTION {periodical}
21962 {
21963 % \end{macrocode}
21964 % \fieldname{author} or \fieldname{editor}, \fieldname{year},
21965 % \fieldname{title}, \fieldname{englishtitle}, \fieldname{type}.
21966 % \begin{macrocode}
21967 author empty$
21968 %
21969 % no author: possibly special issue with editors as authors
21970 % (APA manual, ex. 11, p. 121)
21971 %
21972 { editor empty$
21973 %
21974 % no author or editor: title serves as author.
21975 % title formatted as article title (APA manual not consistent in this,
21976 % compare statement on p. 119: ``treat as book title'' and
21977 % example 8, p. 121: no underlining => article title)
21978 %
21979 { format.atitle.type.trans.check output.new.block
21980 %
21981 % now formatted date on top of stack
21982 %
21983 output.dot.new.block
21984 }
21985 %
21986 % format editor and year, and check if year is present
21987 % format article title and check if title or type present
21988 %
21989 { format.editors.as.authors start.new.block
21990 %
21991 % now formatted date on top of stack
21992 %
21993 output.dot.new.block
21994 format.atitle.type.trans.check output.new.block
21995 }
21996 if$
21997 }
21998 %
21999 % format author and year, and check if year is present
22000 % format article title and check if title or type present
22001 %
22002 { format.authors start.new.block
22003 %
22004 % now formatted date on top of stack
22005 %
22006 output.dot.new.block
22007 format.atitle.type.trans.check output.new.block
22008 }
22009 if$
22010 %
22011 % format journal name, volume and issue number, and pages
22012 % and check if journal not empty
22013 %
22014 format.journal.vol.num.pages.check
22015 %
22016 % if not empty, insert howpublished.
22017 % (used if article is retrieved from the internet)
22018 %
22019 format.howpublished add.period$
22020 %
22021 % format url
22022 %
22023 url empty$
22024 'skip$
22025 { % Clear the stack
22026 duplicate$ empty$
22027 'skip$
22028 { output.new.block }
22029 if$
22030 format.url
22031 }
22032 if$
22033 %
22034 % possible reprint and optional note
22035 %
22036 format.orig.note
22037 fin.entry
22038 }
22039
22040
22041
22042 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22043 %
22044 % journal article
22045 %
22046 FUNCTION {article}
22047 { pages format.year.month.day.check periodical }
22048
22049
22050
22051 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22052 %
22053 % magazine article
22054 %
22055 FUNCTION {magazine}
22056 { pages format.year.month.day.check periodical }
22057
22058
22059
22060 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22061 %
22062 % newspaper article
22063 %
22064 FUNCTION {newspaper}
22065 { pages format.bpages.check format.year.month.day.check periodical }
22066
22067
22068
22069 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22070 %
22071 % (translation of) entire book
22072 %
22073 FUNCTION {book}
22074 { %
22075 % author or editor,
22076 % year, title, englishtitle, translator
22077 %
22078 author empty$
22079 %
22080 % no author: possibly edited book with editors as authors
22081 %
22082 { editor empty$
22083 %
22084 % no author or editor: title serves as author.
22085 % title formatted as book title
22086 %
22087 { format.btitle.vol.edition.trans
22088 format.type.number connect.with.space.check
22089 output.dot.new.block
22090 format.year.check add.period$
22091 }
22092 %
22093 % format editor and year, and check if year is present
22094 % format booktitle, volume, and edition and check if title present
22095 %
22096 { translator empty$
22097 { format.editors.as.authors start.new.block
22098 format.year.check output.dot.new.block
22099 format.btitle.vol.edition
22100 }
22101 %
22102 % format translator correctly
22103 %
22104 { translator editor =
22105 not
22106 { format.editors.as.authors start.new.block
22107 format.year.check output.dot.new.block
22108 format.btitle.vol.edition.trans
22109 }
22110 { format.ed.trans.as.authors start.new.block
22111 format.year.check output.dot.new.block
22112 format.btitle.vol.edition
22113 }
22114 if$
22115 }
22116 if$
22117 format.type.number connect.with.space.check
22118 add.period$
22119 }
22120 if$
22121 }
22122 %
22123 % format author and year, and check if year is present
22124 % format booktitle, volume, and edition and check if title present
22125 %
22126 { format.authors start.new.block
22127 format.year.check output.dot.new.block
22128 format.btitle.vol.edition.editor.trans
22129 format.type.number connect.with.space.check
22130 add.period$
22131 }
22132 if$
22133 %
22134 % format address and publisher
22135 %
22136 format.address.publisher.check
22137 %
22138 % if not empty, insert howpublished.
22139 % (used if book is retrieved from the internet)
22140 %
22141 format.howpublished add.period$
22142 %
22143 % format url
22144 %
22145 url empty$
22146 'skip$
22147 { % Clear the stack
22148 duplicate$ empty$
22149 'skip$
22150 { output.new.block }
22151 if$
22152 format.url
22153 }
22154 if$
22155 %
22156 % format original publication (of reprint/translation)
22157 % and optional note
22158 %
22159 format.orig.note
22160 fin.entry
22161 }
22162 %
22163 % \end{macrocode}
22164 % Article or chapter in edited book.
22165 % \begin{macrocode}
22166 FUNCTION {incollection}
22167 { author empty$
22168 % \end{macrocode}
22169 % No \fieldname{author}: \fieldname{title} serves as author. The title is
22170 % formatted as an article title.
22171 % \begin{macrocode}
22172 { editor.ne.trans
22173 { format.atitle.type.trans.check }
22174 { format.atitle.type.check }
22175 if$
22176 output.new.block
22177 % \end{macrocode}
22178 % Format \fieldname{month} and \fieldname{day} as well when available,
22179 % esp.\ for ``collections'' that are not books, such as parts of internet
22180 % documents.
22181 % \begin{macrocode}
22182 format.year.month.day.check add.period$
22183 }
22184 % \end{macrocode}
22185 % Format \fieldname{author} and \fieldname{year}, and check whether
22186 % \fieldname{year} is present. Format article title and check whether
22187 % \fieldname{title} or \fieldname{type} are present.
22188 % \begin{macrocode}
22189 { format.authors start.new.block
22190 format.year.month.day.check output.dot.new.block
22191 editor.ne.trans
22192 { format.atitle.type.trans.check }
22193 { format.atitle.type.check }
22194 if$
22195 }
22196 if$
22197 % \end{macrocode}
22198 % Format ``In '' \fieldname{editor} `` (Ed.\ \& Trans.), ''
22199 % \fieldname{booktitle}, \fieldname{volume}, \fieldname{edition},
22200 % \fieldname{pages}. Leave empty if all these fields are missing.
22201 % \begin{macrocode}
22202 editor empty$
22203 translator empty$ and
22204 edition empty$ and
22205 volume empty$ and
22206 pages empty$ and
22207 chapter empty$ and
22208 booktitle empty$ and
22209 'skip$
22210 {
22211 output.new.block
22212 format.in.editors.trans
22213 format.bvol.edition.pages
22214 booktitle format.btitle.connect * add.period$
22215 }
22216 if$
22217 % \end{macrocode}
22218 % Format \fieldname{address} and \fieldname{publisher}.
22219 % \begin{macrocode}
22220 format.address.publisher.check
22221 % \end{macrocode}
22222 % If not empty, insert \fieldname{howpublished}.
22223 % \begin{macrocode}
22224 format.howpublished add.period$
22225 % \end{macrocode}
22226 % Format \fieldname{url}.
22227 % \begin{macrocode}
22228 url empty$
22229 'skip$
22230 {
22231 % \end{macrocode}
22232 % Clear the stack.
22233 % \begin{macrocode}
22234 duplicate$ empty$
22235 'skip$
22236 { output.new.block }
22237 if$
22238 format.url
22239 }
22240 if$
22241 % \end{macrocode}
22242 % Format original publication (of reprint/translation) and optional note.
22243 % \begin{macrocode}
22244 format.orig.note
22245 fin.entry
22246 }
22247
22248 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22249 % REPORTS %
22250 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22251
22252
22253 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22254 %
22255 % technical report number
22256 %
22257 FUNCTION {format.tr.number}
22258 { type empty$
22259 { "\BTR{}" }
22260 { type "\bibnotype" =
22261 { "" }
22262 { type }
22263 if$
22264 }
22265 if$
22266 number format.rnumber.check connect.with.space.check
22267 }
22268
22269 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22270 %
22271 % title, volume, edition, report number
22272 %
22273 FUNCTION {format.tr.title.number}
22274 { format.betitle.check
22275 % Single out the situation in which there is no number
22276 % and type = {\bibnotype}, i.e., no type as well.
22277 % (Why not use book then?)
22278 type empty$
22279 { % Now, we're in the regular situation with at least a
22280 % number, a type, a volume, or an edition.
22281 "\APACbVolEdTR{" format.bvol.edition.check * "}{" *
22282 format.tr.number * "}" *
22283 }
22284 { type "\bibnotype" =
22285 number empty$
22286 volume empty$
22287 edition empty$
22288 and
22289 and
22290 and
22291 { "" }
22292 { % Now, we're in the regular situation with at least a
22293 % number, a type, a volume, or an edition.
22294 "\APACbVolEdTR {" format.bvol.edition.check * "}{" *
22295 format.tr.number * "}" *
22296 }
22297 if$
22298 }
22299 if$
22300 connect.with.space.check
22301 title format.btitle.connect
22302 }
22303
22304
22305 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22306 %
22307 % format address and institution of reports etc.
22308 %
22309 % Washington, DC: National Institute of Education
22310 % or
22311 % National Institute of Education (if address empty)
22312 %
22313 % warning if no institution
22314 %
22315 FUNCTION {format.address.institution.check}
22316 { url empty$
22317 doi empty$ and
22318 { "institution" institution warning.if.empty
22319 "address" address warning.if.empty
22320 }
22321 'skip$
22322 if$
22323 institution empty$
22324 address empty$
22325 and
22326 'skip$
22327 { % Clear the stack
22328 duplicate$ empty$
22329 'skip$
22330 { output.new.block }
22331 if$
22332 %
22333 % If institution = author or institution = "author"
22334 % or institution = "Author" then hand over the final choice how to
22335 % format this to \LaTeX. See also format.address.publisher
22336 %
22337 author empty$
22338 institution empty$ or
22339 { institution "\APACaddressInstitution{" }
22340 { author institution =
22341 "author" institution = or
22342 "Author" institution = or
22343 { author "\APACaddressInstitutionEqAuth{" }
22344 { institution "\APACaddressInstitution{" }
22345 if$
22346 }
22347 if$
22348 address "" connect.check "}{" *
22349 % Recover institution that was pushed onto the stack previously.
22350 swap$ "" connect.check "}" *
22351 }
22352 if$
22353 }
22354
22355
22356 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22357 %
22358 % reports
22359 %
22360 FUNCTION {techreport}
22361 { author empty$
22362 %
22363 % no author: possibly edited report with editors as authors
22364 %
22365 { editor empty$
22366 %
22367 % no author or editor: title serves as author.
22368 % title formatted as book title
22369 %
22370 { format.tr.title.number output.dot.new.block
22371 format.year.month.day.check add.period$
22372 }
22373 %
22374 % format editor and year, and check if year is present
22375 % format report title and check if title present
22376 % format volume, edition, type, and number
22377 %
22378 { format.editors.as.authors start.new.block
22379 format.year.month.day.check output.dot.new.block
22380 format.tr.title.number add.period$
22381 }
22382 if$
22383 }
22384 %
22385 % format author and year, and check if year is present
22386 % format report title and check if title present
22387 % format volume, edition, type, and number
22388 %
22389 { format.authors start.new.block
22390 format.year.month.day.check output.dot.new.block
22391 format.tr.title.number add.period$
22392 }
22393 if$
22394 %
22395 % format address and institution, check if institution present
22396 %
22397 format.address.institution.check
22398 %
22399 % if not empty, insert howpublished.
22400 % (used if report is retrieved from the internet)
22401 %
22402 format.howpublished add.period$
22403 %
22404 % format url
22405 %
22406 url empty$
22407 'skip$
22408 { % Clear the stack
22409 duplicate$ empty$
22410 'skip$
22411 { output.new.block }
22412 if$
22413 format.url
22414 }
22415 if$
22416 %
22417 % format optional note
22418 %
22419 note empty$
22420 'skip$
22421 { % Clear the stack
22422 duplicate$ empty$
22423 'skip$
22424 { output.new.block }
22425 if$
22426 format.note
22427 }
22428 if$
22429 fin.entry
22430 }
22431
22432
22433
22434 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22435 %
22436 % (translated) article or chapter in report
22437 %
22438 FUNCTION {intechreport}
22439 { author empty$
22440 %
22441 % no author: title serves as author.
22442 % title formatted as article title (APA manual not consistent in this,
22443 % compare statement on p. 119: ``treat as book title'' and
22444 % example 8, p. 121: no underlining => article title)
22445 %
22446 { editor.ne.trans
22447 { format.atitle.trans.check }
22448 { format.atitle.check }
22449 if$
22450 output.new.block
22451 format.year.month.day.check output.dot.new.block
22452 }
22453 %
22454 % format author and year, and check if year is present
22455 % format article title and check if title or type present
22456 %
22457 { format.authors start.new.block
22458 format.year.month.day.check output.dot.new.block
22459 editor.ne.trans
22460 { format.atitle.trans.check }
22461 { format.atitle.check }
22462 if$
22463 output.new.block
22464 }
22465 if$
22466 %
22467 % format "In " editor " (Ed. \& Trans.), "
22468 % booktitle, volume, edition, pages
22469 %
22470 format.in.editors.trans
22471 %
22472 % volume, edition, report type and number, pages
22473 %
22474 "\APACbVolEdTRpgs {" format.bvol.edition.check * "} {" *
22475 format.tr.number *
22476 "} {" * pages format.bpages.check *
22477 "}" *
22478 %
22479 booktitle format.btitle.connect *
22480 add.period$
22481 %
22482 % format address and publisher
22483 %
22484 format.address.institution.check
22485 %
22486 % if not empty, insert howpublished.
22487 % (used if report is retrieved from the internet)
22488 %
22489 format.howpublished add.period$
22490 %
22491 % format url
22492 %
22493 url empty$
22494 'skip$
22495 { % Clear the stack
22496 duplicate$ empty$
22497 'skip$
22498 { output.new.block }
22499 if$
22500 format.url
22501 }
22502 if$
22503 %
22504 % format original publication (of reprint/translation)
22505 % and optional note
22506 %
22507 format.orig.note
22508 fin.entry
22509 }
22510
22511 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22512 %
22513 % papers presented at conferences etc.
22514 %
22515 FUNCTION {lecture}
22516 { author empty$
22517 { "author" author warning.if.empty }
22518 { format.authors start.new.block }
22519 if$
22520 %
22521 % format year, month, and day, and check if year present
22522 % format title and check if title present
22523 % format howpublished and check if howpublished present
22524 %
22525 format.year.month.day.check output.dot.new.block
22526 symposium empty$
22527 { format.betitle.check
22528 title format.btitle.connect output.new.block
22529 howpublished empty$
22530 { "symposium and howpublished missing in " cite$ * warning$
22531 ""
22532 }
22533 { "\APAChowpublished {" howpublished * "}" * }
22534 if$
22535 address connect.with.comma.check
22536 }
22537 { format.atitle.type.check output.new.block
22538 "\BIn{} "
22539 chair empty$
22540 'skip$
22541 { chair format.editor.names
22542 chair num.names$ #1 >
22543 { "(\BCHAIRS)" }
22544 { "(\BCHAIR)" }
22545 if$
22546 connect.with.space.check * ", " *
22547 }
22548 if$
22549 symposium format.btitle.no.dot *
22550 format.howpublished
22551 address connect.with.comma.check
22552 }
22553 if$
22554 add.period$
22555 %
22556 % format url
22557 %
22558 url empty$
22559 'skip$
22560 { % Clear the stack
22561 duplicate$ empty$
22562 'skip$
22563 { output.new.block }
22564 if$
22565 format.url
22566 }
22567 if$
22568 %
22569 % format optional note
22570 %
22571 note empty$
22572 'skip$
22573 { % Clear the stack
22574 duplicate$ empty$
22575 'skip$
22576 { output.new.block }
22577 if$
22578 format.note
22579 }
22580 if$
22581 fin.entry
22582 }
22583
22584 % \end{macrocode}
22585 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22586 % \paragraph{Theses}
22587 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22588 % Format thesis title, with \fieldname{type} and \fieldname{school},
22589 % if necessary. Call with
22590 % \begin{verbatim}
22591 % "default.published.thesis" "default.unpublished.thesis" format.ttitle.type.school
22592 % \end{verbatim}
22593 % The type now needs to be done here, and the school as well if the
22594 % dissertation was retrieved from the internet, which we'll take to
22595 % be the same as \fieldname{url} non-empty. Note that \pkg{apacite}
22596 % cannot distinguish between institutional databases (ex.~41 in the
22597 % 6th ed.\ of the APA manual) and ordinary websites (ex.~42), so the
22598 % user should provide the \fieldname{school} if it's necessary but
22599 % not otherwise. If both \fieldname{url} and \fieldname{howpublished}
22600 % are empty, the type is taken to be the unpublished thesis type
22601 % (unless overridden by the \fieldname{type} field); otherwise, the
22602 % published type is used (unless overridden).
22603 % \begin{macrocode}
22604 FUNCTION {format.ttitle.type.school}
22605 { doi empty$ not
22606 url empty$ not or
22607 howpublished empty$ not or
22608 { pop$ }
22609 { swap$ pop$ }
22610 if$
22611 % \end{macrocode}
22612 % Single out the situation in which |type = {\bibnotype}|, i.e.,
22613 % no type.
22614 % \begin{macrocode}
22615 type empty$
22616 'skip$
22617 { type "\bibnotype" =
22618 { pop$
22619 ""
22620 }
22621 { pop$
22622 type
22623 }
22624 if$
22625 }
22626 if$
22627 % \end{macrocode}
22628 % The desired type is on top of the stack. Build \LaTeX{} command.
22629 % \begin{macrocode}
22630 duplicate$ empty$
22631 doi empty$
22632 url empty$ and
22633 howpublished empty$ and
22634 address empty$
22635 school empty$ and or and
22636 { 'pop$
22637 title empty$ not
22638 englishtitle empty$ not or
22639 { start.new.block }
22640 'skip$
22641 if$
22642 ""
22643 }
22644 { start.new.block
22645 "\APACtypeAddressSchool {" swap$ * "}{" *
22646 % \end{macrocode}
22647 % If unpublished, school and location are listed in the next block.
22648 % \begin{macrocode}
22649 doi empty$
22650 url empty$ and
22651 howpublished empty$ and
22652 { "}{}" * }
22653 { address "" connect.check "}{" *
22654 school "" connect.check "}" *
22655 }
22656 if$
22657 }
22658 if$
22659 % \end{macrocode}
22660 % Format english translation of title, if present, title itself, and
22661 % connect everything.
22662 % \begin{macrocode}
22663 format.betitle.check swap$
22664 connect.with.space.check
22665 "title" title warning.if.empty
22666 title format.btitle.connect
22667 }
22668 % \end{macrocode}
22669 % Block that indicates school and location for unpublished theses.
22670 % \begin{macrocode}
22671 FUNCTION {unpub.address.school.block}
22672 % \end{macrocode}
22673 % Determine whether this is an unpublished thesis (no \fieldname{url},
22674 % \fieldname{doi}, or \fieldname{howpublished}.
22675 % \begin{macrocode}
22676 { doi empty$
22677 url empty$ and
22678 howpublished empty$ and
22679 % \end{macrocode}
22680 % If so, there should be a \fieldname{school}, so issue a warning if
22681 % it's empty.
22682 % \begin{macrocode}
22683 { "school" school warning.if.empty
22684 school empty$
22685 address empty$ and
22686 'skip$
22687 { start.new.block
22688 "\APACaddressSchool {" address "" connect.check "}{" *
22689 school "" connect.check "}" *
22690 output.dot.end.block
22691 }
22692 if$
22693 }
22694 % \end{macrocode}
22695 % Do nothing if it's not an unpublished thesis.
22696 % \begin{macrocode}
22697 'skip$
22698 if$
22699 }
22700 % \end{macrocode}
22701 % Format theses. Call with
22702 % \begin{verbatim}
22703 % "default.published.thesis" "default.unpublished.thesis" thesis
22704 % \end{verbatim}
22705 % \begin{macrocode}
22706 FUNCTION {thesis}
22707 % \end{macrocode}
22708 % DAI and similar are now formatted purely as articles, so remove
22709 % the two default types on top of the stack and redirect to the
22710 % |article| function.
22711 % \begin{macrocode}
22712 { journal empty$ not
22713 { pop$ pop$
22714 article
22715 }
22716 { author empty$
22717 { "author" author warning.if.empty }
22718 { format.authors start.new.block }
22719 if$
22720 % \end{macrocode}
22721 % Check if \fieldname{year} is present and format year. Ditto for
22722 % \fieldname{title} with \fieldname{type} (and \fieldname{school}
22723 % if the dissertation was obtained from a website).
22724 % \begin{macrocode}
22725 format.year.check output.dot.end.block
22726 format.ttitle.type.school output.dot.end.block
22727 % \end{macrocode}
22728 % Put name of institution (\fieldname{school}) and its address here if
22729 % it's an unpublished thesis.
22730 % \begin{macrocode}
22731 unpub.address.school.block
22732 % \end{macrocode}
22733 % If not empty, insert \fieldname{howpublished}. This is used if the
22734 % thesis was retrieved from a database.
22735 % \begin{macrocode}
22736 howpublished.block
22737 % \end{macrocode}
22738 % Format \fieldname{url}, in case the thesis was downloaded from a
22739 % webpage, optional \fieldname{note}, and finalize with the standard
22740 % parts (\fieldname{doi}, back references).
22741 % \begin{macrocode}
22742 url.block
22743 note.block
22744 fin.entry.2
22745 }
22746 if$
22747 }
22748 % \end{macrocode}
22749 % PhD theses and master's these, respectively. These set the default
22750 % published and unpublished thesis types and then call |thesis|.
22751 % \begin{macrocode}
22752 FUNCTION {phdthesis}
22753 { "\BPhD" "\BUPhD" thesis }
22754 FUNCTION {mastersthesis}
22755 { "\BMTh" "\BUMTh" thesis }
22756
22757 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22758 % OTHER %
22759 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22760
22761 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22762 %
22763 % title of something (used in unpublished and misc)
22764 % english translation of title
22765 % type and number of something
22766 %
22767 FUNCTION {format.btitle.type.num}
22768 { format.betitle.check
22769 format.bvol.edition connect.with.space.check
22770 format.type.number
22771 connect.with.space.check
22772 title empty$
22773 { add.period$ }
22774 { title format.btitle.connect }
22775 if$
22776 }
22777
22778 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22779 %
22780 % title of message or software-related thing (used in misc)
22781 % english translation of title
22782 % type and number of something
22783 %
22784 FUNCTION {format.mtitle.type.num}
22785 { format.aetitle.check
22786 format.bvol.edition connect.with.space.check
22787 type.2 "\bibmessage" =
22788 { number empty$
22789 'skip$
22790 { type.2 number tie.or.space.connect
22791 bracket.check
22792 connect.with.space.check
22793 }
22794 if$
22795 }
22796 { format.type.number
22797 connect.with.space.check
22798 }
22799 if$
22800 title empty$
22801 { add.period$ }
22802 { title format.atitle.connect }
22803 if$
22804 }
22805
22806 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22807 %
22808 % title, english translation of title,
22809 % type and number of something (used in misc)
22810 %
22811 FUNCTION {output.misctitle.type.num}
22812 { type.2 empty$
22813 { format.btitle.type.num }
22814 { type.2 "\bibmessage" =
22815 type.2 "\bibcomputerprogram" = or
22816 type.2 "\bibcomputerprogrammanual" = or
22817 type.2 "\bibcomputerprogramandmanual" = or
22818 type.2 "\bibcomputersoftware" = or
22819 type.2 "\bibcomputersoftwaremanual" = or
22820 type.2 "\bibcomputersoftwareandmanual" = or
22821 type.2 "\bibprogramminglanguage" = or
22822 { format.mtitle.type.num }
22823 { format.btitle.type.num }
22824 if$
22825 }
22826 if$
22827 }
22828
22829 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22830 %
22831 % unpublished manuscripts, etc.
22832 %
22833 FUNCTION {unpublished}
22834 { check.relevant.fields
22835 author empty$
22836 %
22837 % no author: possibly edited book with editors as authors
22838 %
22839 { editor empty$
22840 %
22841 % no author or editor: title serves as author.
22842 % title formatted as book title
22843 %
22844 { format.btitle.type.num output.new.block
22845 format.year.month.day.check add.period$
22846 }
22847 %
22848 % format editor and year, and check if year is present
22849 % format book title, volume, and edition and check if title present
22850 %
22851 { format.editors.as.authors start.new.block
22852 format.year.month.day.check output.dot.new.block
22853 format.btitle.type.num
22854 }
22855 if$
22856 }
22857 %
22858 % format author and year, and check if year is present
22859 % format book title, volume, and edition
22860 % and check if title or type present
22861 %
22862 { format.authors start.new.block
22863 format.year.month.day.check output.dot.new.block
22864 format.btitle.type.num
22865 }
22866 if$
22867 howpublished empty$
22868 organization empty$ and
22869 address empty$ and
22870 'skip$
22871 { output.new.block
22872 "\APAChowpublished{" "}" howpublished enclose.check
22873 organization connect.with.comma.check
22874 address connect.with.comma.check
22875 add.period$
22876 }
22877 if$
22878 %
22879 % format url
22880 %
22881 url empty$
22882 'skip$
22883 { % Clear the stack
22884 duplicate$ empty$
22885 'skip$
22886 { output.new.block }
22887 if$
22888 format.url
22889 }
22890 if$
22891 %
22892 % format optional note
22893 %
22894 note empty$
22895 'skip$
22896 { % Clear the stack
22897 duplicate$ empty$
22898 'skip$
22899 { output.new.block }
22900 if$
22901 format.note
22902 }
22903 if$
22904 fin.entry
22905 }
22906
22907
22908 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22909 %
22910 % nonprint media and other things that don't fit
22911 %
22912 FUNCTION {misc}
22913 { %
22914 % To handle @manual: use type.2 instead of type.
22915 type.2 empty$
22916 type empty$ not and
22917 { type 'type.2 := }
22918 'skip$
22919 if$
22920 %
22921 author empty$
22922 %
22923 % no author: possibly edited item with editors as authors
22924 %
22925 { editor empty$
22926 %
22927 % no author or editor: title/type serves as author.
22928 % title formatted as book title
22929 %
22930 % if no title and no type, howpublished is title
22931 %
22932 { title empty$
22933 type.2 empty$ and
22934 { howpublished empty$
22935 { "No author, editor, title, type, and howpublished in "
22936 cite$ * warning$
22937 ""
22938 }
22939 { "\APAChowpublished{" howpublished * "}" * add.period$ }
22940 if$
22941 format.year.month.day.check add.period$
22942 }
22943 { output.misctitle.type.num output.new.block
22944 format.year.month.day.check add.period$
22945 format.howpublished add.period$
22946 }
22947 if$
22948 }
22949 %
22950 % format editor and year, and check if year is present
22951 % format book title, volume, and edition and check if title present
22952 %
22953 { format.editors.as.authors start.new.block
22954 format.year.month.day.check output.dot.new.block
22955 output.misctitle.type.num
22956 format.howpublished add.period$
22957 }
22958 if$
22959 }
22960 %
22961 % format author and year, and check if year is present
22962 % format book title, volume, and edition
22963 % and check if title or type present
22964 %
22965 { format.authors start.new.block
22966 format.year.month.day.check output.dot.new.block
22967 output.misctitle.type.num
22968 format.howpublished add.period$
22969 }
22970 if$
22971 %
22972 address empty$
22973 publisher empty$ and
22974 'skip$
22975 { % Clear the stack
22976 duplicate$ empty$
22977 'skip$
22978 { output.new.block }
22979 if$
22980 format.address.publisher add.period$
22981 }
22982 if$
22983 %
22984 % format url
22985 %
22986 url empty$
22987 'skip$
22988 { % Clear the stack
22989 duplicate$ empty$
22990 'skip$
22991 { output.new.block }
22992 if$
22993 format.url
22994 }
22995 if$
22996 %
22997 % format optional note
22998 %
22999 note empty$
23000 'skip$
23001 { % Clear the stack
23002 duplicate$ empty$
23003 'skip$
23004 { output.new.block }
23005 if$
23006 format.note
23007 }
23008 if$
23009 fin.entry
23010 }
23011
23012 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
23013 %
23014 % for legal cases and other cases that need to be
23015 % done by hand
23016 %
23017 FUNCTION {literal}
23018 { "key" key warning.if.empty
23019 "text" text warning.if.empty
23020 text empty$
23021 { "" }
23022 { text }
23023 if$
23024 fin.entry
23025 }
23026
23027 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
23028 %
23029 % technical documentation
23030 %
23031 FUNCTION {manual}
23032 { %
23033 % If type is empty, assume that it is a computer software manual.
23034 %
23035 type empty$
23036 { "\bibcomputersoftwaremanual" 'type.2 := }
23037 'skip$
23038 if$
23039 misc
23040 }
23041
23042 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
23043 %
23044 % booklet
23045 %
23046 FUNCTION {booklet}
23047 { misc }
23048
23049
23050 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
23051 %
23052 % part of a book
23053 %
23054 FUNCTION {inbook}
23055 { incollection }
23056
23057
23058 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
23059 %
23060 % article in proceedings
23061 %
23062 FUNCTION {inproceedings}
23063 { incollection }
23064
23065 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
23066 %
23067 % article in proceedings (Kopka & Daly, 2004, p. 230)
23068 %
23069 FUNCTION {conference}
23070 { inproceedings }
23071
23072
23073 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
23074 %
23075 % proceedings
23076 %
23077 FUNCTION {proceedings}
23078 { misc }
23079
23080
23081 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
23082 %
23083 % unknown types
23084 %
23085 FUNCTION {default.type}
23086 { misc }
23087
23088 % \end{macrocode}
23089 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
23090 % \subsection{Initialization functions}
23091 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
23092 % This currently only defines the maximum number of names to be
23093 % formatted and this is not even used. This is something that I may
23094 % want to revisit in order to make it more flexible.
23095 % \begin{macrocode}
23096 FUNCTION {initialize}
23097 {
23098 #6 'name.max :=
23099 %% #250 'entry.max$ :=
23100 %% #5000 'global.max$ :=
23101 }
23102 % \end{macrocode}
23103 % For numbering the entries according to current sorting order.
23104 % \begin{macrocode}
23105 FUNCTION {init.old.number}
23106 { #0 'old.number := }
23107 % \end{macrocode}
23108 % For comparing labels across entries.
23109 % \begin{macrocode}
23110 FUNCTION {init.old.label}
23111 { "zzzzzz" 'old.label := }
23112 % \end{macrocode}
23113 % For all entries, initialize flags whether initials must be cited and
23114 % whether an `a', `b', etc.\ needs to be added to the year. Both are
23115 % initialized as not needed.
23116 % \begin{macrocode}
23117 FUNCTION {init.cite.initials.add.to.year}
23118 { #0 'cite.initials :=
23119 #0 'add.to.year :=
23120 }
23121 % \end{macrocode}
23122 % Functions that indicate whether we're moving forward (|ITERATE|) or
23123 % backward (|REVERSE|) through the entry list.
23124 % \begin{macrocode}
23125 FUNCTION {move.forward}
23126 { #1 'forward := }
23127 FUNCTION {move.backward}
23128 { #0 'forward := }
23129 % \end{macrocode}
23130 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
23131 % \subsection{Basic bibliography output functions}
23132 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
23133 % Beginning of the \envirname{thebibliography} environment: Write
23134 % preamble if there is one, write |\begin| command.
23135 % \begin{macrocode}
23136 FUNCTION {begin.bib}
23137 { preamble$ empty$
23138 'skip$
23139 { preamble$ write$ newline$ }
23140 if$
23141 "\begin{thebibliography}{}" write$ newline$
23142 }
23143 % \end{macrocode}
23144 % Write |\end{thebibliography}| command.
23145 % \begin{macrocode}
23146 FUNCTION {end.bib}
23147 { newline$
23148 "\end{thebibliography}" write$ newline$
23149 }
23150 % \end{macrocode}
23151 % Write the citation labels and reference list entry to the
23152 % \fname{.bbl} file.
23153 % \begin{macrocode}
23154 FUNCTION {write.bbl.entry}
23155 {
23156 % \end{macrocode}
23157 % Output \cmd{\bibitem} and \cmd{\citeauthoryear} commands.
23158 % \begin{macrocode}
23159 make.cite.labels
23160 % \end{macrocode}
23161 % Format and output reference list entry.
23162 % \begin{macrocode}
23163 call.type$
23164 }
23165 % \end{macrocode}
23166 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
23167 % \subsection{Read and process entries and make the bibliography}
23168 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
23169 % Read citations from \fname{.aux} file and extract corresponding
23170 % entries from \fname{.bib} file.
23171 % \begin{macrocode}
23172 READ
23173 % \end{macrocode}
23174 % Write version info to \fname{.blg} file.
23175 % \begin{macrocode}
23176 EXECUTE { identify.apacite.version }
23177 % \end{macrocode}
23178 % Some initializations.
23179 % \begin{macrocode}
23180 EXECUTE { initialize }
23181 % \end{macrocode}
23182 % Store the citation order in an integer variable, and a corresponding
23183 % string variable that can be used for sorting.
23184 % \begin{macrocode}
23185 EXECUTE { init.old.number }
23186 ITERATE { make.citeorder.number }
23187 % \end{macrocode}
23188 % Sort items by title in order to replace each title by its number in
23189 % later sorting.
23190 % \begin{macrocode}
23191 ITERATE { make.sort.title }
23192 SORT
23193 EXECUTE { init.old.number }
23194 EXECUTE { init.old.label }
23195 ITERATE { make.title.number }
23196 % \end{macrocode}
23197 % Generate some tentative author-year labels and do some
23198 % preprocessing for the later definitive author and year labels.
23199 % \begin{macrocode}
23200 ITERATE { make.tentative.sort.label }
23201 SORT
23202 % \end{macrocode}
23203 % Check whether initials must be added to first author, how many
23204 % authors must be formatted, whether an `a', `b', etc., must be added
23205 % to the year label.
23206 % \begin{macrocode}
23207 ITERATE { init.cite.initials.add.to.year }
23208 EXECUTE { init.initials }
23209 ITERATE { check.add.initials }
23210 EXECUTE { init.initials }
23211 REVERSE { check.add.initials }
23212 ITERATE { tentative.cite.num.names }
23213 EXECUTE { init.cite.num.names }
23214 EXECUTE { move.forward }
23215 ITERATE { definitive.cite.num.names }
23216 EXECUTE { init.cite.num.names }
23217 EXECUTE { move.backward }
23218 REVERSE { definitive.cite.num.names }
23219 % \end{macrocode}
23220 % Make final sorting label and do definitive sorting.
23221 % \begin{macrocode}
23222 ITERATE { make.final.sort.key }
23223 SORT
23224 % \end{macrocode}
23225 % Write preamble and |\begin{thebibliography}{}| statement.
23226 % \begin{macrocode}
23227 EXECUTE { begin.bib }
23228 % \end{macrocode}
23229 % Make final cite labels, format reference list entry, and write to
23230 % \fname{.bbl} file.
23231 % \begin{macrocode}
23232 ITERATE { write.bbl.entry }
23233 % \end{macrocode}
23234 % Write |\end{thebibliography}| statement.
23235 % \begin{macrocode}
23236 EXECUTE { end.bib }
23237
23238 %</bibstyle|xbibstyle>
23239 % \end{macrocode}
23240 %
23241 %
23242 % \Finale
23243 \endinput
23244 %