1
2
3
4
5
6
7
8
9
10
11
12
13\startbtxrenderingdefinitions[apa]
14
15\ifdefined\c!translate \else \def\c!translate{translate} \fi
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32\definebtx
33 [apa]
34 [\c!default=default,
35 \c!specification=apa,
36 \c!otherstext={\btxspace\btxlabeltext{others}},
37
38 \c!monthconversion=\v!month,
39
40 \c!stopper:initials={\btxperiod},
41 \c!separator:invertedinitials={\btxcomma\btxnobreakspace},
42 \c!separator:names:2={\btxcomma},
43 \c!separator:names:3={\btxcomma\btxnobreakspace\textampersand\space},
44 \c!separator:names:4={\btxnobreakspace\textampersand\space}]
45
46
47
48
49
50\definebtxrendering
51 [apa]
52 [\c!specification=apa,
53 \c!sorttype=authoryear,
54 \c!numbering=\v!no]
55
56\setupbtxlist
57 [apa]
58 [\c!alternative=\v!paragraph,
59 \c!align={normal,verytolerant,stretch},
60
61
62 \c!margin=3.5\emwidth]
63
64\definebtx
65 [apa:\s!list]
66 [apa]
67 [\c!otherstext={\btxcomma\btxnobreakspace\textellipsis\space},
68 \c!etallimit=7,
69 \c!etaldisplay=6,
70 \c!etaloption=last,
71 \c!authorconversion=invertedshort]
72
73
74
75\definebtx
76 [apa:\s!list:author]
77 [apa:\s!list]
78
79\definebtx
80 [apa:\s!list:withauthor]
81 [apa:\s!list:author]
82
83\definebtx
84 [apa:\s!list:editor]
85 [apa:\s!list:author]
86
87\definebtx
88 [apa:\s!list:ineditor]
89 [apa:\s!list:editor]
90 [\c!authorconversion=normalshort]
91
92\definebtx
93 [apa:\s!list:translator]
94 [apa:\s!list:author]
95 [\c!authorconversion=normalshort]
96
97\definebtx
98 [apa:\s!list:director]
99 [apa:\s!list:author]
100
101\definebtx
102 [apa:\s!list:producer]
103 [apa:\s!list:author]
104
105\definebtx
106 [apa:\s!list:suffix]
107 [apa:\s!list]
108
109\definebtx
110 [apa:\s!list:url]
111 [apa:\s!list]
112
113\definebtx
114 [apa:\s!list:doi]
115 [apa:\s!list]
116
117\definebtx
118 [apa:\s!list:isbn]
119 [apa:\s!list]
120
121\definebtx
122 [apa:\s!list:issn]
123 [apa:\s!list]
124
125\definebtx
126 [apa:\s!list:\s!page]
127 [apa:\s!list]
128 [\c!separator:2={\btxcomma},
129 \c!separator:3={\btxcomma\btxlabeltext{and}\space},
130 \c!separator:4={\btxspace\btxlabeltext{and}\space},
131 \c!left={\btxleftparenthesis},
132 \c!right={\btxrightparenthesis},
133 \c!command={\wordright}]
134
135\definebtx
136 [apa:\s!list:numbering]
137 [apa:\s!list]
138 [\c!right={\btxspace}]
139
140\definebtx
141 [apa:\s!list:numbering:default]
142 [apa:\s!list:numbering]
143
144\definebtx
145 [apa:\s!list:numbering:num]
146 [apa:\s!list:numbering]
147 [\c!stopper={.}]
148
149\definebtx
150 [apa:\s!list:numbering:short]
151 [apa:\s!list:numbering]
152
153\definebtx
154 [apa:\s!list:numbering:tag]
155 [apa:\s!list:numbering]
156
157\definebtx
158 [apa:\s!list:numbering:index]
159 [apa:\s!list:numbering]
160
161
162
163
164
165
166
167
168
169
170\definebtx
171 [apa:\s!list:journal]
172 [apa:\s!list]
173 [\c!style=\v!italic]
174
175
176\definebtx
177 [apa:\s!list:volume]
178 [apa:\s!list]
179 [\c!style=\v!italic]
180
181\definebtx
182 [apa:\s!list:title]
183 [apa:\s!list]
184 [\c!style=\v!italic,
185 \c!command=\Word,
186 ]
187
188\definebtx
189 [apa:\s!list:title:article]
190 [apa:\s!list:title]
191 [\c!style=]
192
193\definebtx
194 [apa:\s!list:title:magazine]
195 [apa:\s!list:title]
196
197\definebtx
198 [apa:\s!list:title:newspaper]
199 [apa:\s!list:title]
200
201\definebtx
202 [apa:\s!list:title:periodical]
203 [apa:\s!list:title]
204
205\definebtx
206 [apa:\s!list:title:standard]
207 [apa:\s!list:title]
208
209\definebtx
210 [apa:\s!list:title:book]
211 [apa:\s!list:title]
212
213\definebtx
214 [apa:\s!list:booktitle:inbook]
215 [apa:\s!list:title]
216
217\definebtx
218 [apa:\s!list:title:inbook]
219 [apa:\s!list:title]
220 [\c!style=]
221
222\definebtx
223 [apa:\s!list:booktitle:incollection]
224 [apa:\s!list:title]
225
226\definebtx
227 [apa:\s!list:title:incollection]
228 [apa:\s!list:title]
229 [\c!style=]
230
231\definebtx
232 [apa:\s!list:title:proceedings]
233 [apa:\s!list:title]
234
235\definebtx
236 [apa:\s!list:booktitle:inproceedings]
237 [apa:\s!list:title]
238
239\definebtx
240 [apa:\s!list:title:inproceedings]
241 [apa:\s!list:title]
242 [\c!style=]
243
244\definebtx
245 [apa:\s!list:booktitle:conference]
246 [apa:\s!list:title]
247
248\definebtx
249 [apa:\s!list:title:conference]
250 [apa:\s!list:title]
251 [\c!style=]
252
253\definebtx
254 [apa:\s!list:title:thesis]
255 [apa:\s!list:title]
256
257\definebtx
258 [apa:\s!list:title:phdthesis]
259 [apa:\s!list:title]
260
261\definebtx
262 [apa:\s!list:title:mastersthesis]
263 [apa:\s!list:title]
264
265\definebtx
266 [apa:\s!list:title:booklet]
267 [apa:\s!list:title]
268
269\definebtx
270 [apa:\s!list:title:manual]
271 [apa:\s!list:title]
272
273\definebtx
274 [apa:\s!list:title:techreport]
275 [apa:\s!list:title]
276
277\definebtx
278 [apa:\s!list:title:unpublished]
279 [apa:\s!list:title]
280
281\definebtx
282 [apa:\s!list:title:patent]
283 [apa:\s!list:title]
284
285\definebtx
286 [apa:\s!list:title:electronic]
287 [apa:\s!list:title]
288
289\definebtx
290 [apa:\s!list:title:music]
291 [apa:\s!list:title]
292
293\definebtx
294 [apa:\s!list:title:film]
295 [apa:\s!list:title]
296
297\definebtx
298 [apa:\s!list:title:other]
299 [apa:\s!list:title]
300
301\definebtx
302 [apa:\s!list:title:misc]
303 [apa:\s!list:title]
304
305\definebtx
306 [apa:\s!list:title:literal]
307 [apa:\s!list:title]
308
309\definebtx
310 [apa:\s!list:type]
311 [\c!command=\Word]
312
313
314
315\definebtx
316 [apa:\s!cite]
317 [apa]
318 [\c!alternative=authoryear,
319 \c!otherstext={\btxcomma\btxlabeltext{others}},
320 \c!etallimit=5,
321 \c!etaldisplay=1,
322 \c!authorconversion=\v!name,
323 \c!sorttype=normal,
324 \c!style=,
325 \c!style={\texdefinition{btx:apa:setlanguage}{\mainbtxlanguage}},
326 \c!compress=\v!yes,
327 \c!separator:names:3={\btxcomma\btxlabeltext{and}\space},
328 \c!separator:names:4={\btxspace\btxlabeltext{and}\space}]
329
330\definebtx
331 [apa:\s!cite:name]
332 [apa:\s!cite]
333 [\c!authorconversion=\v!name]
334
335\definebtx
336 [apa:\s!cite:inverted]
337 [apa:\s!cite]
338 [\c!authorconversion=\v!invertedshort]
339
340\definebtx
341 [apa:\s!cite:invertedshort]
342 [apa:\s!cite]
343 [\c!authorconversion=\v!invertedshort]
344
345\definebtx
346 [apa:\s!cite:normalshort]
347 [apa:\s!cite]
348 [\c!authorconversion=\v!normalshort]
349
350\definebtx
351 [apa:\s!cite:normal]
352 [apa:\s!cite]
353 [\c!authorconversion=\v!normal]
354
355\definebtx
356 [apa:\s!cite:author]
357 [apa:\s!cite]
358
359\definebtx
360 [apa:\s!cite:editor]
361 [apa:\s!cite:author]
362
363\definebtx
364 [apa:\s!cite:translator]
365 [apa:\s!cite:author]
366
367\definebtx
368 [apa:\s!cite:organization]
369 [apa:\s!cite]
370
371\definebtx
372 [apa:\s!cite:authoryear]
373 [apa:\s!cite:author]
374 [\c!left={(},
375 \c!right={)},
376 \c!inbetween={\btxcomma},
377 \c!separator:names:3={\btxcomma\textampersand\space},
378 \c!separator:names:4={\btxspace\textampersand\space}]
379
380\definebtx
381 [apa:\s!cite:default]
382 [apa:\s!cite:authoryear]
383
384\definebtx
385 [apa:\s!cite:authoryears]
386 [apa:\s!cite:author]
387 [\c!left=,
388 \c!right=,
389 \c!inbetween={\btxspace}]
390
391\definebtx
392 [apa:\s!cite:authornum]
393 [apa:\s!cite:author]
394 [\c!left={(},
395 \c!right={)},
396 \c!separator:names:3={\btxcomma\textampersand\space},
397 \c!separator:names:4={\btxspace\textampersand\space}]
398
399\definebtx
400 [apa:\s!cite:author:num]
401 [apa:\s!cite:authornum]
402 [\c!left={\btxspace[},
403 \c!right={]}]
404
405\definebtx
406 [apa:\s!cite:author:year]
407 [apa:\s!cite]
408 [\c!separator:2={\btxcomma},
409 \c!separator:3={\btxcomma}]
410
411\definebtx
412 [apa:\s!cite:author:years]
413 [apa:\s!cite:authoryears]
414 [\c!inbetween=,
415 \c!left={\btxspace(},
416 \c!right={)},
417 \c!separator:2={\btxcomma},
418 \c!separator:3={\btxcomma}]
419
420\definebtx
421 [apa:\s!cite:lefttext]
422 [apa:\s!cite]
423 [\c!left=,
424 \c!right={\btxspace}]
425
426\definebtx
427 [apa:\s!cite:righttext]
428 [apa:\s!cite]
429 [\c!left={\btxcomma},
430 \c!right=]
431
432\definebtx
433 [apa:\s!cite:year]
434 [apa:\s!cite]
435 [\c!separator:2={\btxcomma},
436 \c!separator:3={\btxcomma\btxlabeltext{and}\space},
437 \c!separator:4={\btxspace\btxlabeltext{and}\space}]
438
439\definebtx
440 [apa:\s!cite:title]
441 [apa:\s!cite]
442 [\c!separator:2={\btxcomma},
443 \c!separator:3={\btxcomma\btxlabeltext{and}\space},
444 \c!separator:4={\btxspace\btxlabeltext{and}\space},
445 \c!sorttype=none,
446 \c!style=\v!italic]
447
448\definebtx
449 [apa:\s!cite:subtitle]
450 [apa:\s!cite:title]
451
452\definebtx
453 [apa:\s!cite:booktitle]
454 [apa:\s!cite:title]
455
456\definebtx
457 [apa:\s!cite:subbooktitle]
458 [apa:\s!cite:booktitle]
459
460
461
462\definebtx
463 [apa:\s!cite:title:inbook]
464 [apa:\s!cite:title]
465 [\c!style=]
466
467\definebtx
468 [apa:\s!cite:title:incollection]
469 [apa:\s!cite:title:inbook]
470
471\definebtx
472 [apa:\s!cite:title:inproceedings]
473 [apa:\s!cite:title:inbook]
474
475\definebtx
476 [apa:\s!cite:subtitle:inbook]
477 [apa:\s!cite:title:inbook]
478
479\definebtx
480 [apa:\s!cite:subtitle:incollection]
481 [apa:\s!cite:title:incollection]
482
483\definebtx
484 [apa:\s!cite:subtitle:inproceedings]
485 [apa:\s!cite:title:inproceedings]
486
487
488\definebtx
489 [apa:\s!cite:tag]
490 [apa:\s!cite]
491 [\c!left={[},
492 \c!right={]}]
493
494\definebtx
495 [apa:\s!cite:index]
496 [apa:\s!cite]
497 [\c!left={[},
498 \c!right={]}]
499
500\definebtx
501 [apa:\s!cite:page]
502 [apa:\s!cite]
503 [\c!left=,
504 \c!right=,
505 \c!separator:2={\btxcomma},
506 \c!separator:3={\btxcomma\btxlabeltext{and}\space},
507 \c!separator:4={\btxspace\btxlabeltext{and}\space}]
508
509\definebtx
510 [apa:\s!cite:pages]
511 [apa:\s!cite:page]
512
513\definebtx
514 [apa:\s!cite:keywords]
515 [apa:\s!cite]
516
517\definebtx
518 [apa:\s!cite:short]
519 [apa:\s!cite]
520 [\c!left={[},
521 \c!right={]}]
522
523\definebtx
524 [apa:\s!cite:category]
525 [apa:\s!cite]
526
527\definebtx
528 [apa:\s!cite:url]
529 [apa:\s!cite]
530 [\c!left={(},
531 \c!right={)}]
532
533\definebtx
534 [apa:\s!cite:doi]
535 [apa:\s!cite:url]
536
537\definebtx
538 [apa:\s!cite:isbn]
539 [apa:\s!cite]
540
541\definebtx
542 [apa:\s!cite:issn]
543 [apa:\s!cite]
544
545\definebtx
546 [apa:\s!cite:num]
547 [apa:\s!cite]
548 [\c!left={[},
549 \c!right={]},
550 \c!separator:2={,},
551 \c!separator:3=\btxparameter{\c!separator:2},
552 \c!separator:4=\btxparameter{\c!separator:2}]
553
554\definebtx
555 [apa:\s!cite:textnum]
556 [apa:\s!cite:num]
557 [\c!left={Ref.\nbsp},
558 \c!right=,
559 \c!separator:2={\btxcomma},
560 \c!separator:3={\btxspace\btxlabeltext{and}\space},
561 \c!separator:4={\btxspace\btxlabeltext{and}\space}]
562
563\definebtx
564 [apa:\s!cite:entry]
565 [apa:\s!cite]
566 [\c!left=,
567 \c!right=,
568 \c!inbetween={\btxspace},
569 \c!separator:2={\btxcomma},
570 \c!separator:3={\btxsemicolon},
571 \c!separator:4={\btxsemicolon}]
572
573
574
575
576
577
578
579
580
581\setupbtxlabeltext
582 [en]
583 [apa:number={No.},
584 apa:edition={ed.},
585 apa:Editor={Ed.},
586 apa:Editors={Eds.},
587 apa:Volume={Vol.},
588 apa:Volumes={Vols.},
589 apa:nd={n.d.},
590 apa:supplement={Suppl.},
591 apa:MotionPicture={Motion picture},
592 apa:Writer=Writer,
593 apa:Writers=Writers,
594 apa:Producer=Producer,
595 apa:Producers=Producers,
596 apa:Director=Director,
597 apa:Directors=Directors,
598 apa:Recordedby={Recorded by},
599 apa:Author=Author,
600 apa:Translator={Trans.},
601 apa:Advanced={Advanced online publication},
602 apa:Retrieved={Retrieved from}]
603
604\setupbtxlabeltext
605 [nl]
606 [apa:number={Nr.},
607 apa:edition={ed.},
608 apa:Editor=Editor,
609 apa:Editors=Editors,
610 apa:Volume={Vol.},
611 apa:Volumes={Vols.},
612 apa:nd={g.d.}
613 apa:supplement=Supplement,
614 apa:MotionPicture=Film,
615 apa:Writer=Scenarioschrijver,
616 apa:Writers=Schrijvers,
617 apa:Producer=Producent,
618 apa:Producers=Producents,
619 apa:Director=Directeur,
620 apa:Directors=Directeurs,
621 apa:Recordedby={Opgenomen door},
622 apa:Author=Auteur,
623 apa:Translator=Vertaler,
624 apa:Advanced={Geavanceerde online publicatie},
625 apa:Retrieved={Ontvangen van}]
626
627\setupbtxlabeltext
628 [fr]
629 [apa:number={N\high{o}},
630 apa:edition={édition},
631 apa:Editor=Éditeur,
632 apa:Editors=Éditeurs,
633 apa:Volume=Volume,
634 apa:Volumes=Volumes,
635 apa:nd={s.d.},
636 apa:supplement=Supplément,
637 apa:MotionPicture={Film cinématographique},
638 apa:Writer=Scénariste,
639 apa:Writers=Scénaristes,
640 apa:Producer=Producteur,
641 apa:Producers=Producteurs,
642 apa:Director=Réalisateur,
643 apa:Directors=Réalisateurs,
644 apa:Recordedby={Enregistré par},
645 apa:Author=Auteur,
646 apa:Translator=Traducteur,
647 apa:Advanced={Publication en ligne anticipée},
648 apa:Retrieved={Téléchargé de}]
649
650\setupbtxlabeltext
651 [de]
652 [apa:number={Nr.},
653 apa:edition=Auf\/lage,
654 apa:Editor=Herausgeber,
655 apa:Editors=Herausgeber,
656 apa:Volume=Band,
657 apa:Volumes={Bände},
658 apa:nd={o.D.},
659 apa:supplement={Beilage},
660 apa:MotionPicture=Kinofilm,
661 apa:Writer=Drehbuchautor,
662 apa:Writers=Schriftsteller,
663 apa:Producer=Producer,
664 apa:Producers=Produzenten,
665 apa:Director=Director,
666 apa:Directors=Directors,
667 apa:Recordedby={per Einschreiben},
668 apa:Author=Autor,
669 apa:Translator={Übersetzer},
670 apa:Advanced={Erweiterte OnlinePublikation},
671 apa:Retrieved={heruntergeladen von}]
672
673
674
675\setupbtxlabeltext
676 [it]
677 [apa:number={Nº},
678 apa:edition={ed.},
679 apa:Editor={A cura di},
680 apa:Editors={A cura di},
681 apa:Volume={Vol.},
682 apa:Volumes={Vol.},
683 apa:nd={s.d.},
684 apa:supplement={Supplemento},
685 apa:MotionPicture=Film,
686 apa:Writer=Sceneggiatore,
687 apa:Writers=Scrittori,
688 apa:Producer=Produttore,
689 apa:Producers=Produttori,
690 apa:Director=Direttore,
691 apa:Directors=Direttori,
692 apa:Recordedby={Registrato da},
693 apa:Author=Autore,
694 apa:Translator={Trad.},
695 apa:Advanced={Prepubblicazione on line},
696 apa:Retrieved={Accessible online}]
697
698\setupbtxlabeltext
699 [es]
700 [apa:number={Nº},
701 apa:edition={ed.},
702 apa:Editor=Editor,
703 apa:Editors=Editores,
704 apa:Volume={Vol.},
705 apa:Volumes={Vols.},
706 apa:nd={s.f.},
707 apa:supplement=Suplemento,
708 apa:MotionPicture=Cinematográfica,
709 apa:Writer=Guionista,
710 apa:Writers=Escritores,
711 apa:Producer=Productor,
712 apa:Producers=Productores,
713 apa:Director=Director,
714 apa:Directors=Directores,
715 apa:Recordedby={Grabada por},
716 apa:Author=Autor,
717 apa:Translator=Traductor,
718 apa:Advanced={Publicación en línea avanzada},
719 apa:Retrieved={Obtenido de}]
720
721
722\setupbtxlabeltext
723 [sv]
724 [apa:number={nr.},
725 apa:edition={Utgåva},
726 apa:Editor=Redaktör,
727 apa:Editors=Redaktörer,
728 apa:Volume=Band,
729 apa:Volumes=Band,
730 apa:nd={u.å.},
731 apa:supplement=Bilaga,
732 apa:MotionPicture=Spelfilm,
733 apa:Writer={Manusförfattare},
734 apa:Writers={Manusförfattare},
735 apa:Producer=Producent,
736 apa:Producers=Producenter,
737 apa:Director={Regissör},
738 apa:Directors={Regissörer},
739 apa:Recordedby={Inspelad av},
740 apa:Author={Författare},
741 apa:Translator={Översättare},
742 apa:Advanced={Avancerad onlinepublikation},
743 apa:Retrieved={Hämtad från}]
744
745
746
747
748
749\startsetups btx:apa:cite:author:year
750 \ifx\currentbtxfirst\empty
751 \def\currentbtxfirst{\fastsetup{\s!btx:apa:nd}}
752 \fi
753 \fastsetup{\s!btx:\s!cite:author:year}
754\stopsetups
755
756\startsetups btx:apa:cite:author:years
757 \ifx\currentbtxfirst\empty
758 \def\currentbtxfirst{\fastsetup{\s!btx:apa:nd}}
759 \fi
760 \fastsetup{\s!btx:\s!cite:author:years}
761\stopsetups
762
763
764
765\startsetups \s!btx:apa:\s!cite:organization
766 \fastsetup{\s!btx:\s!cite:normal}
767\stopsetups
768
769\startsetups \s!btx:apa:\s!cite:subtitle
770 \fastsetup{\s!btx:\s!cite:normal}
771\stopsetups
772
773\startsetups \s!btx:apa:\s!cite:booktitle
774 \fastsetup{\s!btx:\s!cite:normal}
775\stopsetups
776
777\startsetups \s!btx:apa:\s!cite:subbooktitle
778 \fastsetup{\s!btx:\s!cite:normal}
779\stopsetups
780
781
782
783\startsetups \s!btx:apa:\s!cite:title:inbook
784 \fastsetup{\s!btx:\s!cite:normal}
785\stopsetups
786
787\startsetups \s!btx:apa:\s!cite:title:incollection
788 \fastsetup{\s!btx:\s!cite:normal}
789\stopsetups
790
791\startsetups \s!btx:apa:\s!cite:title:inproceedings
792 \fastsetup{\s!btx:\s!cite:normal}
793\stopsetups
794
795\startsetups \s!btx:apa:\s!cite:subtitle:inbook
796 \fastsetup{\s!btx:\s!cite:normal}
797\stopsetups
798
799\startsetups \s!btx:apa:\s!cite:subtitle:incollection
800 \fastsetup{\s!btx:\s!cite:normal}
801\stopsetups
802
803\startsetups \s!btx:apa:\s!cite:subtitle:inproceedings
804 \fastsetup{\s!btx:\s!cite:normal}
805\stopsetups
806
807
808
809\startsetups btx:apa:list:pageorpages
810 \ifx\currentbtxlastpage\empty
811 \btxlabeltext{p}
812 \else
813 \btxlabeltext{pp}
814 \fi
815 \btxnbsp
816\stopsetups
817
818
819
820
821
822
823
824
825\startsetups apa:list:sameauthor
826 \fastsetup{apa:list:sameauthor:rule}
827\stopsetups
828
829\startsetups apa:list:sameauthor:rule
830 \blackrule
831 [\c!width=\dimexpr\listparameter\c!margin\interwordspace\relax,
832 \c!height=1.5\linewidth]
833\stopsetups
834
835\startsetups [apa:list:sameauthor:\v!empty]
836 \kern\dimexpr\listparameter\c!margin\interwordspace\relax
837\stopsetups
838
839
840
841\startsetups apa:list:sameauthor:ditto
842 \inframed
843 [\c!width=\dimexpr\listparameter\c!margin\interwordspace\relax,
844 \c!frame=\v!off,
845 \c!align=\v!middle]
846 {\doubleprime}
847\stopsetups
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869\starttexdefinition mutable protected btx:apa:setlanguage #language
870 \language[#language]
871 \doifelse{#language}{french}
872 {\setcharacterspacing[frenchpunctuation]}
873 {\doifelse{#language}{fr}
874 {\setcharacterspacing[frenchpunctuation]}
875 {\setcharacterspacing[nofrenchpunctuation]}
876 }
877\stoptexdefinition
878
879
880
881\starttexdefinition mutable protected btx:apa:translatedtitle #title
882 \ifx\currentbtxlanguage\empty
883
884 \else\ifx\mainbtxlanguage\currentbtxlanguage
885
886 \else
887 \btxdoif {#title:\mainbtxlanguage} {
888 \begingroup
889 \texdefinition{btx:apa:setlanguage}{\mainbtxlanguage}
890 \btxleftbracket
891 \btxusecommand [apa:\s!list:#title:\currentbtxcategory] {
892 \btxflush{#title:\mainbtxlanguage}
893 }
894 \btxrightbracket
895 \texdefinition{btx:apa:setlanguage}{\currentbtxlanguage}
896 \endgroup
897 }
898 \fi\fi
899\stoptexdefinition
900
901\starttexdefinition mutable protected btx:apa:composedtitle #title
902 \btxstartstyleandcolor[apa:\s!list:#title:\currentbtxcategory]
903 \begingroup
904 \texdefinition{btx:apa:setlanguage}{\currentbtxlanguage}
905 \btxusecommand [apa:\s!list:#title:\currentbtxcategory] {
906 \btxflush{#title}
907 \btxdoif {sub#title} {
908 \btxcolon
909 \btxflush{sub#title}
910 }
911 }
912 \texdefinition{btx:apa:setlanguage}{\mainbtxlanguage}
913 \endgroup
914
915
916
917
918
919
920
921 \texdefinition{btx:apa:translatedtitle}{#title}
922
923 \btxstopstyleandcolor
924\stoptexdefinition
925
926\starttexdefinition mutable protected btx:apa:title
927 \setmode{btx:apa:titleplaced}
928
929 \btxdoifelse {file} {
930 \texdefinition{btx:format:goto}
931 {url(file:\btxflush{file})}
932 {
933 \texdefinition{btx:apa:composedtitle}{title}
934 }
935 } {
936 \texdefinition{btx:apa:composedtitle}{title}
937 }
938 \btxdoif {title} {
939
940 \doif {\currentbtxcategory} {book} {
941 \doifnot {\btxfoundname{author}} {editor} {
942 \btxdoif {ineditor} {
943 \btxleftparenthesis
944 \btxflush{ineditor}
945 \btxcomma
946 \btxsingularorplural {ineditor} {
947 \btxlabeltext{apa:Editor}
948 } {
949 \btxlabeltext{apa:Editors}
950 }
951 \btxrightparenthesis
952 }
953 }
954 }
955 \btxdoif {translator} {
956 \btxleftparenthesis
957 \btxflush{translator}
958 \btxcomma
959 \btxlabeltext{apa:Translator}
960 \btxrightparenthesis
961 }
962 }
963\stoptexdefinition
964
965\starttexdefinition mutable protected btx:apa:titleifnotplaced
966 \doifelsemode {btx:apa:titleplaced} {
967 \resetmode{btx:apa:titleplaced}
968 } {
969 \btxdoif {title} {
970 \btxperiod
971 \texdefinition {btx:apa:title}
972 }
973 }
974\stoptexdefinition
975
976\startsetups btx:apa:nd
977 \btxlabeltext{apa:nd}
978\stopsetups
979
980\starttexdefinition mutable protected btx:apa:suffixedyear
981 \btxdoifelse {year} {
982 \btxflush{year}
983 \btxflushsuffix
984 \btxdoif {month} {
985 \btxcomma
986 \btxflush{month}
987 \btxdoif {day} {
988 \btxspace
989 \btxflush{day}
990 }
991 }
992 } {
993 \fastsetup{btx:apa:nd}
994
995 \btxdoif {suffix} {
996 \btxspace
997 \btxflushsuffix
998
999 }
1000 }
1001\stoptexdefinition
1002
1003
1004
1005\starttexdefinition mutable protected btx:apa:authororeditor #author
1006 \btxdoifelse {#author} {
1007 \btxstartstyleandcolor[apa:\s!list:#author]
1008 \btxusecommand[apa:\s!list:#author]{
1009 \btxflush{#author}
1010 }
1011 \btxstopstyleandcolor
1012
1013 \doifelse {\btxfoundname{#author}} {editor} {
1014 \btxleftparenthesis
1015 \btxsingularorplural {editor} {
1016 \btxlabeltext{apa:Editor}
1017 } {
1018 \btxlabeltext{apa:Editors}
1019 }
1020 \btxrightparenthesis
1021 } {\doif {\btxfoundname{#author}} {ineditor} {
1022 \btxleftparenthesis
1023 \btxsingularorplural {ineditor} {
1024 \btxlabeltext{apa:Editor}
1025 } {
1026 \btxlabeltext{apa:Editors}
1027 }
1028 \btxrightparenthesis
1029 } }
1030 \doif {\currentbtxcategory} {film} {
1031 \btxleftparenthesis
1032 \doifelse {\btxfoundname{#author}} {director} {
1033 \btxsingularorplural {director} {
1034 \btxlabeltext{apa:Director}
1035 } {
1036 \btxlabeltext{apa:Directors}
1037 }
1038 } {
1039 \doif {\btxfoundname{#author}} {author} {
1040 \btxsingularorplural {author} {
1041 \btxlabeltext{apa:Writer}
1042 } {
1043 \btxlabeltext{apa:Writers}
1044 }
1045 }
1046 \doif {\btxfoundname{#author}} {producer} {
1047 \btxsingularorplural {producer} {
1048 \btxlabeltext{apa:Producer}
1049 } {
1050 \btxlabeltext{apa:Producers}
1051 }
1052 }
1053 \btxdoif {director} {
1054 \btxrightparenthesis
1055 \removeunwantedspaces
1056 \btxparameter{\c!separator:names:3}
1057 \btxstartstyleandcolor[apa:\s!list:director]
1058 \btxusecommand[apa:\s!list:director]{
1059 \btxflush{director}
1060 }
1061 \btxstopstyleandcolor
1062 \btxleftparenthesis
1063 \btxsingularorplural {director} {
1064 \btxlabeltext{apa:Director}
1065 } {
1066 \btxlabeltext{apa:Directors}
1067 }
1068 }
1069 }
1070 \btxrightparenthesis
1071 }
1072 \btxdoif {withauthor} {
1073 \btxleftparenthesis
1074 \btxlabeltext{with}
1075 \btxspace
1076 \btxstartstyleandcolor[apa:\s!list:withauthor]
1077 \btxusecommand[apa:\s!list:withauthor]{
1078 \btxflush{withauthor}
1079 }
1080 \btxstopstyleandcolor
1081 \btxrightparenthesis
1082 }
1083 } {
1084 \texdefinition{btx:apa:title}
1085 }
1086\stoptexdefinition
1087
1088\starttexdefinition mutable protected btx:apa:authoryear
1089
1090 \texdefinition{btx:format:gotointernal}
1091 {
1092 \doifelsesetups{apa:list:sameauthor} {
1093 \btxdoifelsesameasprevious {author} {
1094 \fastsetup{apa:list:sameauthor}
1095 } {
1096 \texdefinition{btx:apa:authororeditor} {author}
1097 }
1098 } {
1099 \texdefinition{btx:apa:authororeditor} {author}
1100 }
1101 \btxleftparenthesis
1102 \texdefinition{btx:apa:suffixedyear}
1103 \btxrightparenthesis
1104 }
1105
1106 \doif {\btxfoundname{author}} {title} {
1107 \setmode{btx:apa:titleplaced}
1108 }
1109\stoptexdefinition
1110
1111\starttexdefinition mutable protected btx:apa:editorin
1112 \btxdoif {booktitle} {
1113 \btxperiod
1114 \btxlabeltext{In}
1115 \btxspace
1116 \doifnot {\btxfoundname{author}} {editor} {
1117 \btxdoif {ineditor} {
1118 \texdefinition{btx:apa:authororeditor} {ineditor}
1119 \btxcomma
1120 }
1121 }
1122 \texdefinition{btx:apa:composedtitle}{booktitle}
1123 }
1124\stoptexdefinition
1125
1126\starttexdefinition mutable protected btx:apa:organizationifnotauthor
1127 \btxdoif {organization} {
1128 \doifnot {\btxfoundname{author}} {organization} {
1129 \btxspace
1130 \btxflush{organization}
1131 \btxcomma
1132 }
1133 }
1134\stoptexdefinition
1135
1136\starttexdefinition mutable protected btx:apa:leftparenthesisorcomma
1137 \doifelsemode {btx:apa:editionsetisempty} {
1138 \btxleftparenthesis
1139 \resetmode{btx:apa:editionsetisempty}
1140 } {
1141 \btxcomma
1142 }
1143\stoptexdefinition
1144
1145\starttexdefinition mutable protected btx:apa:editionset
1146 \setmode{btx:apa:editionsetisempty}
1147 \doif {\currentbtxcategory} {techreport} {
1148 \texdefinition{btx:apa:leftparenthesisorcomma}
1149 \btxdoifelse {type} {
1150 \btxusecommand [apa:\s!list:type] {
1151 \btxflush{type}
1152 }
1153 } {
1154 \btxlabeltext{technicalreport}
1155 }
1156 }
1157 \btxdoif {volume} {
1158 \texdefinition{btx:apa:leftparenthesisorcomma}
1159 \btxoneorrange {volume} {
1160 \btxlabeltext{apa:Volume}
1161 } {
1162 \btxlabeltext{apa:Volumes}
1163 }
1164 \btxspace
1165 \btxflush{volume}
1166 }
1167 \btxdoif {number} {
1168 \texdefinition{btx:apa:leftparenthesisorcomma}
1169 \btxlabeltext{apa:number}
1170 \btxspace
1171 \btxflush{number}
1172 }
1173 \btxdoif {edition} {
1174 \texdefinition{btx:apa:leftparenthesisorcomma}
1175
1176
1177
1178 \btxdoifelse {edition:\mainbtxlanguage}
1179 {\btxflush{edition:\mainbtxlanguage}}
1180 {\btxflush{edition}}
1181 \btxspace
1182 \btxlabeltext{apa:edition}
1183 }
1184 \btxdoif {pages} {
1185 \texdefinition{btx:apa:leftparenthesisorcomma}
1186 \btxoneorrange {pages} {
1187 \btxlabeltext{p}
1188 } {
1189 \btxlabeltext{pp}
1190 }
1191 \btxnbsp
1192 \btxflush{pages}
1193 }
1194 \doifnotmode {btx:apa:editionsetisempty} {
1195 \btxrightparenthesis
1196 }
1197 \btxperiod
1198\stoptexdefinition
1199
1200\starttexdefinition mutable protected btx:apa:journal
1201 \btxstartstyleandcolor[apa:\s!list:journal]
1202 \btxusecommand [apa:\s!list:journal] {
1203 \btxflush{journal}
1204 }
1205 \btxstopstyleandcolor
1206\stoptexdefinition
1207
1208\starttexdefinition mutable protected btx:apa:volume
1209 \btxstartstyleandcolor[apa:\s!list:volume]
1210 \btxflush{volume}
1211 \btxstopstyleandcolor
1212\stoptexdefinition
1213
1214
1215
1216\starttexdefinition mutable protected btx:apa:journalvolumenumberpages
1217 \btxdoif {journal} {
1218 \btxspace
1219 \texdefinition{btx:apa:journal}
1220 \btxdoifelse {volume} {
1221 \btxcomma
1222 \texdefinition{btx:apa:volume}
1223 \btxdoif {number} {
1224
1225 (\btxflush{number}
1226 \btxrightparenthesis
1227 }
1228 } {
1229 \btxdoif {number} {
1230 \btxcomma
1231 \btxleftparenthesis
1232 \btxflush{number}
1233 \btxrightparenthesis
1234 }
1235 }
1236 \btxdoif {pages} {
1237 \btxcomma
1238 \doif {\currentbtxcategory} {newspaper} {
1239 \btxoneorrange {pages} {
1240 \btxlabeltext{p}
1241 } {
1242 \btxlabeltext{pp}
1243 }
1244 \btxnbsp
1245 }
1246 \btxflush{pages}
1247 }
1248 \btxperiod
1249 \doifnot {\currentbtxcategory} {newspaper} {
1250 \btxdoifnot {volume} {
1251 \btxdoifnot {number} {
1252 \btxdoifnot {pages} {
1253 \btxdoif {doi} {
1254 \btxspace
1255 \btxlabeltext{apa:Advanced}
1256 \btxperiod
1257 }
1258 }
1259 }
1260 }
1261 }
1262 }
1263\stoptexdefinition
1264
1265\starttexdefinition mutable protected btx:apa:wherefrompublisher
1266 \btxdoifelse {address} {
1267 \btxflush{address}
1268 \btxdoif {country} {
1269 \btxcomma
1270 \btxflush{country}
1271 }
1272 \btxcolon
1273 } {
1274 \btxdoif {country} {
1275 \btxflush{country}
1276 \btxcolon
1277 }
1278 }
1279 \doifelse {\btxfoundname{author}} {\btxfoundname{publisher}} {
1280 \btxlabeltext{apa:Author}
1281 } {
1282 \btxdoifelse {publisher} {
1283 \btxflush{publisher}
1284 } {
1285 \btxlabeltext{apa:Author}
1286 }
1287 }
1288 \btxperiod
1289\stoptexdefinition
1290
1291
1292
1293
1294\sethyphenatedurlafter{:.}
1295
1296\starttexdefinition mutable protected btx:apa:url
1297 \texdefinition {btx:format:goto} {
1298 url(\btxflush{url})
1299 } {
1300 \hyphenatedurl{\btxflush{url}}
1301 }
1302\stoptexdefinition
1303
1304
1305
1306\starttexdefinition mutable protected btx:apa:doi
1307 \texdefinition {btx:format:goto} {
1308 url(http:dx.doi.org\btxflush{doi})
1309 } {
1310 \hyphenatedurl{doi:\btxflush{doi}}
1311 }
1312\stoptexdefinition
1313
1314\starttexdefinition mutable protected btx:apa:note
1315 \btxdoif {note} {
1316 \btxleftparenthesis
1317 \btxflush{note}
1318 \btxrightparenthesis
1319 }
1320\stoptexdefinition
1321
1322\starttexdefinition mutable protected btx:apa:urldoinote
1323 \doif {\btxfoundname{doi}} {url} {
1324 \btxspace
1325 \btxlabeltext{apa:Retrieved}
1326 \btxspace
1327 \texdefinition{btx:apa:url}
1328 }
1329 \doif {\btxfoundname{doi}} {doi} {
1330 \btxspace
1331 \texdefinition{btx:apa:doi}
1332 }
1333
1334 \btxdoif {issn} {
1335 \btxspace
1336 \hyphenatedurl{issn:\btxflush{issn}}
1337 }
1338 \btxdoif {isbn} {
1339 \btxspace
1340 \hyphenatedurl{isbn:\btxflush{isbn}}
1341 }
1342 \texdefinition{btx:apa:note}
1343 \removeunwantedspaces
1344\stoptexdefinition
1345
1346\starttexdefinition mutable protected btx:apa:type
1347 \btxdoif {type} {
1348 \btxleftbracket
1349 \btxflush{type}
1350 \btxrightbracket
1351 }
1352\stoptexdefinition
1353
1354
1355
1356
1357
1358
1359
1360
1361\startsetups btx:apa:list:article
1362 \texdefinition{btx:apa:authoryear}
1363 \texdefinition{btx:apa:titleifnotplaced}
1364 \texdefinition{btx:apa:type}
1365 \btxperiod
1366 \texdefinition{btx:apa:journalvolumenumberpages}
1367 \texdefinition{btx:apa:urldoinote}
1368\stopsetups
1369
1370
1371
1372
1373
1374\startsetups btx:apa:list:magazine
1375 \fastsetup{btx:apa:list:article}
1376\stopsetups
1377
1378
1379
1380
1381
1382\startsetups btx:apa:list:newspaper
1383 \fastsetup{btx:apa:list:article}
1384\stopsetups
1385
1386
1387
1388
1389
1390
1391
1392\startsetups btx:apa:list:periodical
1393 \fastsetup{btx:apa:list:article}
1394\stopsetups
1395
1396
1397
1398
1399
1400\startsetups btx:apa:list:standard
1401 \texdefinition{btx:apa:authoryear}
1402 \texdefinition{btx:apa:titleifnotplaced}
1403 \btxperiod
1404 \texdefinition{btx:apa:urldoinote}
1405\stopsetups
1406
1407
1408
1409
1410
1411
1412
1413
1414\startsetups btx:apa:list:book
1415 \texdefinition{btx:apa:authoryear}
1416 \texdefinition{btx:apa:titleifnotplaced}
1417 \texdefinition{btx:apa:type}
1418 \texdefinition{btx:apa:editionset}
1419 \texdefinition{btx:apa:wherefrompublisher}
1420 \texdefinition{btx:apa:urldoinote}
1421\stopsetups
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432\startsetups btx:apa:list:inbook
1433 \texdefinition{btx:apa:authoryear}
1434 \texdefinition{btx:apa:titleifnotplaced}
1435 \texdefinition{btx:apa:type}
1436 \texdefinition{btx:apa:editorin}
1437 \texdefinition{btx:apa:editionset}
1438 \texdefinition{btx:apa:wherefrompublisher}
1439 \texdefinition{btx:apa:urldoinote}
1440\stopsetups
1441
1442
1443
1444
1445
1446
1447\startsetups btx:apa:list:incollection
1448 \fastsetup{btx:apa:list:inbook}
1449\stopsetups
1450
1451
1452
1453
1454
1455
1456\startsetups btx:apa:list:proceedings
1457 \fastsetup{btx:apa:list:book}
1458\stopsetups
1459
1460
1461
1462
1463
1464\startsetups btx:apa:list:inproceedings
1465 \texdefinition{btx:apa:authoryear}
1466 \texdefinition{btx:apa:titleifnotplaced}
1467 \texdefinition{btx:apa:editorin}
1468 \texdefinition{btx:apa:editionset}
1469 \texdefinition{btx:apa:organizationifnotauthor}
1470 \texdefinition{btx:apa:wherefrompublisher}
1471 \texdefinition{btx:apa:urldoinote}
1472\stopsetups
1473
1474\startsetups btx:apa:list:conference
1475 \fastsetup{btx:apa:list:inproceedings}
1476\stopsetups
1477
1478
1479
1480
1481
1482\startsetups btx:apa:list:thesis
1483 \texdefinition{btx:apa:authoryear}
1484 \texdefinition{btx:apa:titleifnotplaced}
1485 \btxleftparenthesis
1486 \btxdoifelse {type} {
1487 \btxusecommand [apa:\s!list:type] {
1488 \btxflush{type}
1489 }
1490 } {
1491 \btxlabeltext{\currentbtxcategory}
1492 }
1493 \btxrightparenthesis
1494 \btxdoif {school} {
1495 \btxperiod
1496 \btxflush{school}
1497 }
1498 \btxdoif {address} {
1499 \btxdoifelse {school} {
1500 \btxcomma
1501 } {
1502 \btxperiod
1503 }
1504 \btxflush{address}
1505 \btxdoif {country} {
1506 \btxcomma
1507 \btxflush{country}
1508 }
1509 }
1510 \btxperiod
1511 \texdefinition{btx:apa:urldoinote}
1512\stopsetups
1513
1514\startsetups btx:apa:list:phdthesis
1515 \fastsetup{btx:apa:list:thesis}
1516\stopsetups
1517
1518\startsetups btx:apa:list:mastersthesis
1519 \fastsetup{btx:apa:list:thesis}
1520\stopsetups
1521
1522
1523
1524
1525
1526\startsetups btx:apa:list:booklet
1527 \fastsetup{btx:apa:list:book}
1528\stopsetups
1529
1530
1531
1532
1533
1534\startsetups btx:apa:list:manual
1535 \fastsetup{btx:apa:list:book}
1536\stopsetups
1537
1538
1539
1540
1541
1542\startsetups btx:apa:list:techreport
1543 \fastsetup{btx:apa:list:book}
1544\stopsetups
1545
1546
1547
1548
1549
1550\startsetups btx:apa:list:unpublished
1551 \fastsetup{btx:apa:list:book}
1552\stopsetups
1553
1554
1555
1556
1557
1558
1559
1560
1561\startsetups btx:apa:list:patent
1562 \texdefinition{btx:apa:authoryear}
1563 \texdefinition{btx:apa:titleifnotplaced}
1564 \begingroup
1565 \it
1566 \btxdoif {nationality} {
1567 \btxspace
1568 \btxflush{nationality}
1569 }
1570 \btxspace
1571 \btxdoifelse{type}{
1572 \btxflush{type}
1573 }{
1574 \btxlabeltext{patent}
1575 }
1576 \btxdoif {number} {
1577 \btxspace
1578 \btxlabeltext{apa:number}
1579 \btxspace
1580 \btxflush{number}
1581 }
1582 \btxperiod
1583 \italiccorrection
1584 \endgroup
1585 \texdefinition{btx:apa:wherefrompublisher}
1586 \texdefinition{btx:apa:url}
1587 \texdefinition{btx:apa:note}
1588\stopsetups
1589
1590
1591
1592
1593
1594
1595
1596
1597\startsetups btx:apa:list:electronic
1598 \texdefinition{btx:apa:authoryear}
1599 \texdefinition{btx:apa:titleifnotplaced}
1600 \texdefinition{btx:apa:type}
1601 \texdefinition{btx:apa:organizationifnotauthor}
1602 \btxdoif {howpublished} {
1603 \btxspace
1604 \btxflush{howpublished}
1605 \btxperiod
1606 }
1607 \texdefinition{btx:apa:urldoinote}
1608\stopsetups
1609
1610
1611
1612
1613
1614\startsetups btx:apa:list:film
1615 \texdefinition{btx:apa:authoryear}
1616 \texdefinition {btx:apa:title}
1617 \btxleftbracket
1618 \btxdoifelse {type} {
1619 \btxflush{type}
1620 } {
1621 \btxlabeltext{apa:MotionPicture}
1622 }
1623 \btxrightbracketperiod
1624 \texdefinition{btx:apa:wherefrompublisher}
1625 \texdefinition{btx:apa:urldoinote}
1626\stopsetups
1627
1628
1629
1630
1631
1632\startsetups btx:apa:list:music
1633 \texdefinition{btx:apa:authoryear}
1634 \texdefinition{btx:apa:titleifnotplaced}
1635 \doifnot {\btxfoundname{author}} {artist} {
1636 \btxdoif {artist} {
1637 \btxleftbracket
1638 \btxlabeltext{apa:Recordedby}
1639 \btxspace
1640 \btxflush{artist}
1641 \btxrightbracketperiod
1642 }
1643 }
1644 \doifnot {\btxfoundname{title}} {album} {
1645 \btxdoif {album} {
1646 \btxperiod
1647 \btxlabeltext{In}
1648 \btxspace
1649 \btxflush{album}
1650 }
1651 }
1652 \texdefinition{btx:apa:type}
1653 \texdefinition{btx:apa:wherefrompublisher}
1654 \texdefinition{btx:apa:urldoinote}
1655\stopsetups
1656
1657
1658
1659
1660
1661\startsetups btx:apa:list:other
1662 \fastsetup{btx:apa:list:book}
1663\stopsetups
1664
1665
1666
1667
1668
1669\startsetups btx:apa:list:misc
1670 \texdefinition{btx:apa:authoryear}
1671 \texdefinition{btx:apa:titleifnotplaced}
1672 \btxperiod
1673 \btxdoif {howpublished} {
1674 \btxspace
1675 \btxflush{howpublished}
1676 \btxperiod
1677 }
1678 \texdefinition{btx:apa:urldoinote}
1679\stopsetups
1680
1681
1682
1683\startsetups btx:apa:list:literal
1684
1685 \removeunwantedspaces(
1686 \btxflush{tag}
1687 \btxrightparenthesis
1688 \btxdoif {text} {
1689 \btxflush{text}
1690 }
1691\stopsetups
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724\stopbtxrenderingdefinitions
1725 |