summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/afparticle/afparticle.dtx
blob: 6b3e9aa60d415e2b6cf36c63143c69994ad9ba64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
% \iffalse
%<*gobble>
% $Id: afparticle.dtx,v 1.14 2014-12-23 17:13:00 boris Exp $
%
% Copyright 2014, Boris Veytsman <boris@varphi.com>
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
% version 1.3 of this license or (at your option) any 
% later version.
% The latest version of the license is in
%    http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of
% LaTeX version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
%
% The Current Maintainer of this work is Boris Veytsman
%
% This work consists of the file afparticle.dtx and the
% derived file afparticle.cls
%
% \fi 
% \CheckSum{689}
%
%% \CharacterTable
%%  {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
%%   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
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~} 
%
% \iffalse
%
%
%\section{Identification}
%\label{sec:ident}
%
% We start with the declaration who we are
%    \begin{macrocode}
%</gobble>
%<class>\NeedsTeXFormat{LaTeX2e}
%<*gobble>
\ProvidesFile{afparticle.dtx}
%</gobble>
%<class>\ProvidesClass{afparticle}
[2014/12/23 v1.3 Typesetting articles for Archives of Forensic Psychology]
%<*gobble>
%    \end{macrocode}
%
%
% \fi
%
%\iffalse
%    \begin{macrocode}
\documentclass{ltxdoc}
\usepackage{array}
\usepackage{url}
\usepackage{hypdoc}
\hypersetup{breaklinks,colorlinks,linkcolor=black,citecolor=black,
            pagecolor=black,urlcolor=black,hyperindex=false}
\PageIndex
\CodelineIndex
\RecordChanges
\EnableCrossrefs
\begin{document}
  \DocInput{afparticle.dtx}
\end{document}
%    \end{macrocode}
%</gobble> 
%<*class>
% \fi
% \MakeShortVerb{|}
% \GetFileInfo{afparticle.dtx}
% \title{Typesetting Articles for \emph{Archives of Forensic Psychology}\thanks{\copyright 2014, Boris Veytsman}} 
% \author{Boris Veytsman\thanks{%
% \href{mailto:borisv@lk.net}{\texttt{borisv@lk.net}},
% \href{mailto:boris@varphi.com}{\texttt{boris@varphi.com}}}} 
% \date{\filedate, \fileversion}
% \maketitle
% \begin{abstract}
%   This package provides a class for typesetting articles for the
%   journal \emph{Archives of Forensic Psychology},
%   \url{http://www.archivesofforensicpsychology.com}.
% \end{abstract}
% \tableofcontents
%
% \clearpage
%
%
%\section{Introduction}
%\label{sec:intro}
%
% \emph{Archives of Forensic Psychology} is an Open Access journal.
% It is described on its Web
% page\footnote{\url{http://www.archivesofforensicpsychology.com}} in
% the following way:
% \begin{quotation}
%   Archives of Forensic Psychology (AFP) is an innovative,
%   peer-reviewed journal published twice per year. Our mission is to
%   link the science and practice of forensic psychology, by making
%   research and clinical resources freely available to all mental
%   health, correctional, and legal professionals. AFP welcomes
%   empirical research, book and instrument reviews, case studies,
%   commentaries, literature reviews, and policy
%   recommendations. Particularly encouraged is the submission of
%   non-significant results as well as the findings of government
%   reports, conference presentations, Master's theses, and
%   doctoral dissertations. 
% \end{quotation}
% 
% The class |afparticle| is based on the |elsarticle|
% class~\cite{elsarticle} with the following changes:
% \begin{enumerate}
% \item Some formatting changes: unnumbered sections and paragraphs
% and others.
% \item A different formatting of the title page.
% \item Creation of the special file with the metadata used for the
% Crossref submission.
% \item Consistent use of APA~6 citation style.
% \end{enumerate}
% Most of these changes should be transparent for the user;  in the
% next section we discuss the user-visible ones in more detail.
%
%
%\section{User Manual}
%\label{sec:manual}
%
% The user should consult the manual of
% |elsarticle|~\cite{elsarticle};  below we describe only the features
% different for |afparticle| class.  
% 
%\subsection{Invocation}
%\label{sec:invocation}
%
%
% To use the class put in the preamble of your document
% \begin{verbatim}
% \documentclass{afparticle}
% \end{verbatim}
% The class supports the same options as |elsarticles| with the
% following restrictions:
% \begin{enumerate}
% \item Options |3p| and |5p| are suppressed.  The
% journal uses only |1p| one-column design. Use options |preprint| and
% |review| to typeset the article for submission, and |1p| for the
% final typesetting.
% \item Options |authoryear|, |number|, |sort&compress| are
% suppressed.  The journal uses |apacite| package~\cite{Meijer:Apacite} for the
% bibliography (see below).
% \end{enumerate}
% 
% 
% To add line numbers to the manuscript, use
% \begin{verbatim}
% \usepackage{lineno}
% \end{verbatim}
% and then either
% \begin{verbatim}
% \begin{linenumbers}
% ...
% \end{linenumbers}
% \end{verbatim}
% or the global command
% \begin{verbatim}
% \linenumbers
% \end{verbatim}
% 
%
%\subsection{Front Matter}
%\label{sec:ug:frontmatter}
%
% \DescribeMacro{\maketitle}
% Unlike |elsartclass|, |afparticle| does \emph{not} usesthe
% environment |frontmatter|.  Instead, use \cs{maketitle} like you do
% in the standard \LaTeX\ article.
%
% \emph{Archives of Forensic Psychology} normally uses the
% ``second type of frontmatter coding''~\cite{elsarticle}: the authors
% with the same affiliation are grouped together, and the affiliation
% follows the group.
%
% \DescribeMacro{\tnoteref}
% \DescribeMacro{\corref}
% \DescribeMacro{\fnref}
% As different from |elsarticle|, the frontmatter commands
% \emph{do not allow footnotes inside their arguments.}  Thus the commands
% \cs{tnoteref}, \cs{corref}, \cs{fnref} are not allowed and produce
% errors.  Please do not use them.
%
% \DescribeMacro{\author*}
% Of course, there should be a way to show the corresponding author of
% the manuscript.  For this purpose the command \cs{author} has a
% starred form \cs{author}:
% \begin{verbatim}
% \author*{John Doe}   % Corresponding author
% \address{George Mason University, Mailstop 76A12,
%          Fairfax, VA, 22030, USA, 
%          \path{jdoe@gmu.edu}}
% \author{Alexander Hamilton}  % Other author
% \address{George Washington University}
% \end{verbatim}
% Please note that the journal requires the corresponding author to
% indicate her full mailing address and e-mail.
%
% \DescribeMacro{\shortauthors}
% \LaTeX\ automatically puts the names of the authors into a running
% head on even pages.  Sometimes when the list of authors is too
% large, it does not fit there.  In this case put after all
% \cs{author} definitions the line
% \begin{verbatim}
% \renewcommand{\shortauthors}{SHORT LIST}
% \end{verbatim}
% for example,
% \begin{verbatim}
% \renewcommand{\shortauthors}{John Doe et. al.}
% \end{verbatim}
% 
% \DescribeMacro{\title}
% Unlike \cs{title} in the standard \LaTeX\ and |elsarticle|, our
% \cs{title} has two arguments: the mandatory one and the optional
% one.  The reason is, the class uses title for running heads on odd
% pages.  If the title is too long, it may not fit, and then the
% optional argument is used for running heads:
% \begin{verbatim}
% \title{Notes on evidence}   % Running head and title coincide
% \title[Notes on evidence]{Some notes on evidence as presented to the
% juries}                     % Running head and title are different 
% \end{verbatim}
%
% \DescribeMacro{\volumenumber}
% \DescribeMacro{\issuenumber}
% \DescribeMacro{\publicationyear}
% \DescribeMacro{\publicationmonth}
% \DescribeMacro{\papernumber}
% \DescribeMacro{\startpage}
% \DescribeMacro{\endpage}
%  The macros |\volumenumber|, |\issuenumber|, |\publicationyear|,
%  |\publicationmonth|, |\papernumber|, |\startpage|, |\endpage| set up the
%  corresponding 
%  data for the paper, for example:
% \begin{verbatim}
% \volumenumber{88}
% \issuenumber{1--2}
% \publicationyear{2012}
% \publicationmonth{January--February}
% \papernumber{2}
% \startpage{1}
% \endpage{39}
% \end{verbatim}
% Note that if the argument of |\endpage| is empty, \LaTeX{} tries to
% calculate the last page number as best as it can.
%
% \DescribeMacro{\received}
% \DescribeMacro{\revised}
% \DescribeMacro{\accepted}
% The macros \cs{received}\marg{date}, \cs{revised}\marg{date},
% \cs{accepted}\marg{date} are used by the editorial staff for
% techincal information about the paper.  These macros can be
% repeated.  
%
%
% \DescribeMacro{\doinumber}
% Normally you do not need to set the DOI of the paper: \TeX{} will
% construct the number using the paper data (including paper number in
% the current issue).  However, you \emph{may} override its decision
% using the command |\doinumber| which sets the DOI explicitly, for
% example, |\doinumber|\marg{12.234/afp.2013.01.01}.
% You probably  should not use this macro.
%
% \DescribeMacro{\prevpaper}
% Instead of setting |\startpage|, one can use the the command
% |\prevpaper|\marg{previous paper}, with the argument being the
% location and file name of the previous paper in the journal, for example:
% \begin{verbatim}
% \prevpaper{../evidence/rules_of_evidence}
% \end{verbatim}
% Note that the |.tex| suffix should \emph{not} be used.  The previous
% paper must be processed by |latex| prior to the current one.  In
% this case |latex| will read the last page of the previous paper, and
% start the current one from the proper page number.  
% 
%
%\subsection{Back matter}
%\label{sec:ug_back}
%
% \DescribeMacro{\printbackmatter}
% The last command of the article must be \cs{printbackmatter}.  It
% prints the technical information about the paper.
%
%\subsection{Sectioning}
%\label{sec:ug:sectioning}
%
% The class uses unnumbered sections, subsections and subsubsections.
% Never use period (.) at the end of the title: it is not allowed for
% sections and subsections and is automatically added by
% subsubsectons.  
%
%
%\subsubsection{Tables and Figures}
%\label{sec:ug_floats}
%  
% You may use tables and figures in the manuscript.  Remember that
% table caption must \emph{precede} the table while figure captions
% follow the contents.
%
% 
%
%\subsection{Bibliography}
%\label{sec:biblio}
%
% The class uses |apacite|~\cite{Meijer:Apacite} for bibliography with
% |natbibapa| option.  The format of the bibliographic commands is
% described in the manuals~\cite{Meijer:Apacite}
% and~\cite{Daly07:Natbib}.  Basically you need the commands
% \cs{citet}\marg{key} for textual citations like ``John Doe (2012) wrote
% that\ldots'' and \cs{citep}\marg{key} for parentetical citations
% like ``As shown in the literature (John Doe, 2012)\ldots''.  
%
% If you use \textsc{Bib}\TeX, add to your file
% \cs{bibliography}\marg{bibfiles} and |\bibliography{apacite}|.  For
% manual bibliographies you must use APA6 citation style.
%
% \StopEventually{\clearpage
% \bibliography{tex}
% \bibliographystyle{unsrt}}
% 
% \clearpage
%
%
%\section{Implementation}
%\label{sec:impl}
%
%
%
%\subsection{Auxillary Macros}
%\label{sec:aux}
%
% \begin{macro}{AFP@DisableMacro}
%   Some commands are disabled
%    \begin{macrocode}
\def\AFP@DisableMacro#1{\ClassError{afparticle}{The macro 
    \expandafter\protect\csname#1\endcsname\space
    is disabled}{The command
    \expandafter\protect\csname#1\endcsname\space
    is introduced in the
    elsarticle class.\MessageBreak  It is disabled in afpartcile
    class}}
%    \end{macrocode}
%   
% \end{macro}
% \begin{macro}{\@nx}
% \begin{macro}{\@xp}
% \begin{macro}{\@ifnotempty}
%   From |amsart|
%    \begin{macrocode}
\let\@xp=\expandafter
\let\@nx=\noexpand
\long\def\@ifempty#1{\@xifempty#1@@..\@nil}
\long\def\@xifempty#1#2@#3#4#5\@nil{%
  \ifx#3#4\@xp\@firstoftwo\else\@xp\@secondoftwo\fi}
\long\def\@ifnotempty#1{\@ifempty{#1}{}}
%    \end{macrocode}
%   
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\nxandlist}
%   This is from |amsart|:
%    \begin{macrocode}
\newtoks\@emptytoks
\def\@andlista#1#2\and#3\and{\@andlistc{#2}\@ifnotempty{#3}{%
  \@andlistb#1{#3}}}
\def\@andlistb#1#2#3#4#5\and{%
  \@ifempty{#5}{%
    \@andlistc{#2#4}%
  }{%
    \@andlistc{#1#4}\@andlistb{#1}{#3}{#3}{#5}%
  }}
\let\@andlistc\@iden
\newcommand{\nxandlist}[4]{%
  \def\@andlistc##1{\toks@\@xp{\the\toks@##1}}%
  \toks@{\toks@\@emptytoks \@andlista{{#1}{#2}{#3}}}%
  \the\@xp\toks@#4\and\and
  \edef#4{\the\toks@}%
  \let\@andlistc\@iden}
%    \end{macrocode}
%   
% \end{macro}
% \begin{macro}{\@@and}
%   The final `and' in the list
%    \begin{macrocode}
\def\@@and{and}
%    \end{macrocode}
%   
% \end{macro}
%
% \begin{macro}{\author@andify}
%   Again |amsart|
%    \begin{macrocode}
\def\author@andify{%
  \nxandlist {\unskip ,\penalty-1 \space\ignorespaces}%
    {\unskip {} \@@and~}%
    {\unskip ,\penalty-2 \space\@@and~}%
}
%    \end{macrocode}
%   
% \end{macro}
%
%
%\subsection{Options}
%\label{sec:options}
%
% We use |xkeyval|: right now our options do not have values, but we
% may change this.
%    \begin{macrocode}
\RequirePackage{xkeyval}
%    \end{macrocode}
% 
% \begin{macro}{AFP@OptionWarning}
%   We disable some options and issue a warning:
%    \begin{macrocode}
\def\AFP@OptionWarning#1{\ClassWarning{afparticle}{The option #1 is
    not used for afparticle.  I will silently ignore it}}
%    \end{macrocode}
% \end{macro}
%
%
% The suppressed options:
%    \begin{macrocode}
\DeclareOptionX{3p}{\AFP@OptionWarning{\CurrentOption}}%
\DeclareOptionX{5p}{\AFP@OptionWarning{\CurrentOption}}%
\DeclareOptionX{authoryear}{\AFP@OptionWarning{\CurrentOption}}%
\DeclareOptionX{number}{\AFP@OptionWarning{\CurrentOption}}%
\DeclareOptionX{sort&compress}{\AFP@OptionWarning{\CurrentOption}}%
%    \end{macrocode}
% 
% All non-suppressed options are passed to |elsarticle|:
%    \begin{macrocode}
\DeclareOptionX*{\PassOptionsToClass{\CurrentOption}{elsarticle}}
%    \end{macrocode}
%
%
% And executing options:
%    \begin{macrocode}
\ProcessOptionsX
%    \end{macrocode}
% 
%
%\subsection{Loading Classes and Packages}
%\label{sec:classes}
%
% We want to prevent loading of natbib
%    \begin{macrocode}
\@namedef{ver@natbib.sty}{}
\@namedef{opt@natbib.sty}{round,authoryear}
\newlength\bibsep
%    \end{macrocode}
%
% We use |elasrticle| since it has nice features for front matter:
%    \begin{macrocode}
\LoadClass[1p,authoryear,round]{elsarticle}
%    \end{macrocode}
%
% We need |lastpage| for last page calculations, |fancyhdr| for our
% headings, |hyperref| for references and |caption| for caption
% formatting. 
%    \begin{macrocode}
\RequirePackage{lastpage,fancyhdr}
\RequirePackage{caption}
\RequirePackage{booktabs}
\RequirePackage{graphicx}
\RequirePackage[hyperfootnotes=false,colorlinks,allcolors=blue]{hyperref}
%    \end{macrocode}
% 
% And now we do want natbib!
%    \begin{macrocode}
\expandafter\let\csname ver@natbib.sty\endcsname=\@undefined
\let\bibsep=\@undefined
\RequirePackage[natbibapa]{apacite}
%    \end{macrocode}
% 
%
%\subsection{Front Matter}
%\label{sec:frontmatter}
% 
% \begin{macro}{\abstract}
%   We do not use the word ``abstract'' for abstract
\renewenvironment{abstract}{\global\setbox\absbox=\vbox\bgroup
  \hsize=\textwidth\def\baselinestretch{1}%
  \noindent\unskip\ignorespaces}
 {\egroup}
% \end{macro}
%
% \begin{macro}{\tnoteref}
%   This macro is disabled.
%    \begin{macrocode}
\def\tnoteref#1{\AFP@DisableMacro{tnoteref}}
%    \end{macrocode}
%   
% \end{macro}
% \begin{macro}{\corref}
%   This macro is disabled.
%    \begin{macrocode}
\def\corref#1{\AFP@DisableMacro{corref}}
%    \end{macrocode}
%   
% \end{macro}
% \begin{macro}{\fnref}
%   This macro is disabled.
%    \begin{macrocode}
\def\fnref#1{\AFP@DisableMacro{fnref}}
%    \end{macrocode}
%   
% \end{macro}
%
% \begin{macro}{\title}
%   This is from |amsart|:
%    \begin{macrocode}
\renewcommand*{\title}[2][]{\gdef\shorttitle{#1}\gdef\@title{#2}}
\edef\title{\@nx\@dblarg
  \@xp\@nx\csname\string\title\endcsname}
%    \end{macrocode}
%   
% \end{macro}
%
% \begin{macro}{\ifAFP@corrauthor}
%   This checks whether this author is the coresponding author
%    \begin{macrocode}
\newif\ifAFP@corrauthor
%    \end{macrocode}
%   
% \end{macro}
%
% \begin{macro}{\authors}
%   We store in \cs{authors} the list of authors separated by
%   \cs{and}.
%    \begin{macrocode}
\def\authors{}
%    \end{macrocode}
%   
% \end{macro}
%
% \begin{macro}{\shortauthors}
%   Initially we define \cs{shortauthors} as \cs{authors}, but the
%   user can redefine it.
%    \begin{macrocode}
\def\shortauthors{\authors}
%    \end{macrocode}
%   
% \end{macro}
%
% \begin{macro}{\author}
%   First, check whether this author is the corresponding author.
%    \begin{macrocode}
\def\author{%
  \@ifstar{\AFP@corrauthortrue\AFP@author}{\AFP@corrauthorfalse\AFP@author}}
%    \end{macrocode}
%   
% \end{macro}
%
% \begin{macro}{\AFP@author}
%   The macro \cs{AFP@author} is our version of the standard
%   \cs{autor} macro
%    \begin{macrocode}
\def\AFP@author{\@ifnextchar[{\@@author}{\@author}}
%    \end{macrocode}
%   
% \end{macro}
%
% \begin{macro}{\@@author}
%   This typesets an author with some footnotes
%    \begin{macrocode}
\def\@@author[#1]#2{%
  \ifx\@empty\authors
      \gdef\authors{#2}%
  \else
    \g@addto@macro\authors{\and#2}%
  \fi
  \g@addto@macro\elsauthors{%
    \normalsize\upshape
    \def\baselinestretch{1}%
    \authorsep#2\unskip}%
  \ifAFP@corrauthor
  \g@addto@macro\elsauthors{\textsuperscript{$\ast$,}}\fi
  \g@addto@macro\elsauthors{%
    \textsuperscript{%#1%
      \@for\@@affmark:=#1\do{%
        \edef\affnum{\@ifundefined{X@\@@affmark}{1}{\elsRef{\@@affmark}}}%
        \unskip\sep\affnum\let\sep=,}%
      \ifx\@fnmark\@empty\else\unskip\sep\@fnmark\let\sep=,\fi
      \ifx\@corref\@empty\else\unskip\sep\@corref\let\sep=,\fi
    }%
    \def\authorsep{\unskip,\space}%
    \global\let\sep\@empty\global\let\@corref\@empty
    \global\let\@fnmark\@empty}%
  \@eadauthor={#2}
}
%    \end{macrocode}
%   
% \end{macro}
%
% \begin{macro}{\@author}
%   No footnote marks after the author:
%    \begin{macrocode}
\def\@author#1{%
  \ifx\@empty\authors
     \gdef\authors{#1}%
  \else
    \g@addto@macro\authors{\and#1}%
  \fi
 \g@addto@macro\elsauthors{\normalsize%
    \def\baselinestretch{1}%
    \upshape\authorsep#1}
  \ifAFP@corrauthor
  \g@addto@macro\elsauthors{\textsuperscript{$\ast$}}\fi
  \g@addto@macro\elsauthors{%
    \def\authorsep{\unskip,\space}%
    \global\let\@fnmark\@empty
    \global\let\sep\@empty}%
    \@eadauthor={#1}
}
%    \end{macrocode}
%   
% \end{macro}
%
% \begin{macro}{\@address}
% \changes{v1.0}{2014/08/18}{Added macro}
%   We redefine |elsarticle| macro to change the vertical spacing
%    \begin{macrocode}
\long\def\@address#1{\g@addto@macro\elsauthors{%
    \def\baselinestretch{1}\def\addsep{\par\vskip4pt}%
    \addsep\footnotesize\itshape#1%
    \def\authorsep{\par\vskip16pt}}}
%    \end{macrocode}
%   
% \end{macro}
%
%
% The next lines are from |resphilosophica| class
% \begin{macro}{\paperUrl}
%   The url to submit to crossref
%    \begin{macrocode}
\def\paperUrl#1{\gdef\@paperUrl{#1}}
\paperUrl{}
%    \end{macrocode}
%   
% \end{macro}
% \begin{macro}{\@mainrpi}
%   The stream for the rpi file:
%    \begin{macrocode}
\newwrite\@mainrpi
%    \end{macrocode}
%   
% \end{macro}
%
% \begin{macro}{\RESP@write@paper@info}
%   This writes the information about the paper into the file
%   |jobname.rpi|.  Note that hyperref makes our life a little bit
%   more complex
%    \begin{macrocode}
\def\RESP@write@paper@info{%
  \bgroup
  \if@filesw
     \openout\@mainrpi\jobname.rpi%
     \write\@mainrpi{\relax}%
    \ifx\r@LastPage\@undefined
       \edef\@tempa{\start@page}%
    \else
       \def\@tempb##1##2##3##4##5{##2}%
       \edef\@tempa{\expandafter\@tempb\r@LastPage}%
    \fi
    \def\and{\string\and\space}%
    \protected@write\@mainrpi{}%
    {\string\articleentry{\authors}{\@title}{\start@page}{\@tempa}}%
%    \end{macrocode}
%  The next lines are for crossref software
%    \begin{macrocode}
   \protected@write\@mainrpi{}%
    {\@percentchar authors=\authors}%
   \protected@write\@mainrpi{}%
    {\@percentchar title=\@title}%
   \protected@write\@mainrpi{}%
    {\@percentchar year=\currentyear}%
   \protected@write\@mainrpi{}%
    {\@percentchar volume=\currentvolume}%
   \protected@write\@mainrpi{}%
    {\@percentchar issue=\currentissue}%
   \protected@write\@mainrpi{}%
    {\@percentchar paper=\currentpaper}%
   \protected@write\@mainrpi{}%
    {\@percentchar startpage=\start@page}%
   \protected@write\@mainrpi{}%
    {\@percentchar endpage=\@tempa}%
   \protected@write\@mainrpi{}%
    {\@percentchar doi=\@doinumber}%
   \ifx\@paperUrl\@empty\else
   \protected@write\@mainrpi{}%
    {\@percentchar paperUrl=\@paperUrl}%
   \fi
    \closeout\@mainrpi
    \fi
\egroup}
%    \end{macrocode}
%   
% \end{macro}
%
%
% \begin{macro}{\maketitle}
% \changes{v1.0}{2014/08/18}{Moved the text down}
%   Our macro is simpler than that of |elsarticle|, since we have
%   fewer options.
%    \begin{macrocode}
\def\maketitle{%
  \null\bigskip\par
  \iflongmktitle\getSpaceLeft
     \global\setbox\els@boxa=\vsplit0 to \@tempdima
     \box\els@boxa\par\resetTitleCounters
     \printFirstPageNotes
     \box0%
   \else
       \finalMaketitle\printFirstPageNotes
   \fi
   \RESP@write@paper@info
   \author@andify\authors
   \xdef\authors{\authors}%
   \gdef\thefootnote{\arabic{footnote}}%
   \thispagestyle{firstpagestyle}%
}
%    \end{macrocode}
%   
% \end{macro}
%
% \begin{macro}{\volumenumber}
%   This sets the volume of the paper
%    \begin{macrocode}
\def\volumenumber#1{\gdef\currentvolume{#1}}
\volumenumber{}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\issuenumber}
%   This sets the issue of the paper:
%    \begin{macrocode}
\def\issuenumber#1{\gdef\currentissue{#1}}
\issuenumber{}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\publicationyear}
%   This sets the year of the paper
%    \begin{macrocode}
\def\publicationyear#1{\gdef\currentyear{#1}}
\publicationyear{}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\publicationmonth}
%   This sets the month of the paper
%    \begin{macrocode}
\newcommand\publicationmonth[2][]{\gdef\currentmonth{#2}%
  \gdef\abbrevcurrentmonth{#1}%
  \ifx\abbrevcurrentmonth\@empty\gdef\abbrevcurrentmonth{#2}\fi}
\publicationmonth{}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\papernumber}
%   This is absent from the |\issueinfo|.  
%    \begin{macrocode}
\def\papernumber#1{\gdef\currentpaper{#1}}
\papernumber{0000}
%   
% \end{macro}
%
%
% \begin{macro}{\doinumber}
%    \begin{macrocode}
\def\doinumber#1{\gdef\@doinumber{#1}}
\doinumber{123.4567/archivesforensicpsychology.\currentyear.\currentvolume.\currentissue.\currentpaper}
%    \end{macrocode}
% \end{macro}
% 
%
% \begin{macro}{\startpage}
%   This defines the starting page of the paper.  We have some nice
%   features to set up roman page numbers for editorial
%   stuff---probably not needed for this journal at this time\dots
%    \begin{macrocode}
\def\startpage#1{\pagenumbering{arabic}\setcounter{page}{#1}%
  \gdef\start@page{#1}%
  \ifnum\c@page<\z@ \pagenumbering{roman}\setcounter{page}{-#1}%
    \gdef\start@page{\romannumeral#1}%
  \fi}
%    \end{macrocode}   
% \end{macro}
%
% \begin{macro}{\endpage}
%   This macro again has a twist in it: if the argument is not set, it
%   calculates the last page number itself.
%    \begin{macrocode}
\def\endpage#1{\def\@tempa{#1}%
  \ifx\@tempa\@empty\def\end@page{\pageref{LastPage}}%
  \else\def\end@page{#1}\fi}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\pagespan}
%   This macro is different from the one provided by |amsart|
%   because we want to have the option of automatic calculation of the
%   last page number.
%    \begin{macrocode}
\def\pagespan#1#2{\startpage{#1}\endpage{#2}}
\pagespan{1}{}
%    \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\articleentry}
%   This is necessary for |\prevpaper| command.  We read the TOC entry
%   from the previous paper and increment it by 1.  Note that we
%   always start with on an odd page, since the additional check
%    \begin{macrocode}
\def\articleentry#1#2#3#4{\@tempcnta=#4\relax
  \advance\@tempcnta by 1\relax
  \ifodd\the\@tempcnta\else\advance\@tempcnta by 1\relax\fi
  \startpage{\the\@tempcnta}}
%    \end{macrocode}
%   
% \end{macro}
%
% \begin{macro}{\prevpaper}
%   This sets the previous paper location and reads the information
%   from the previous paper
%    \begin{macrocode}
\def\prevpaper#1{\IfFileExists{#1.rpi}{%
    \ClassInfo{afparticle}{%
      Reading first page number from the file #1.rpi}%
    \input{#1.rpi}%
  }{\ClassWarning{afparticle}{Cannot find the file #1.rpi.  
      Did you run latex on the previous paper?}}}
%    \end{macrocode}
%   
% \end{macro}
%
%
%\subsection{Back Matter}
%\label{sec:back}
%
% \begin{macro}{\AFP@backmatter}
%   The technical information about the paper.
%    \begin{macrocode}
\def\AFP@backmatter{}
%    \end{macrocode}
%   
% \end{macro}
% \begin{macro}{\received}
%   Date of receiving
%    \begin{macrocode}
\def\received#1{\g@addto@macro\AFP@backmatter{Received: #1\\}}
%    \end{macrocode}
%   
% \end{macro}
% \begin{macro}{\revised}
%   Date of receiving a revision
%    \begin{macrocode}
\def\revised#1{\g@addto@macro\AFP@backmatter{Revision Received: #1\\}}
%    \end{macrocode}
%   
% \end{macro}
% \begin{macro}{\accepted}
%   Date of acceptance
%    \begin{macrocode}
\def\accepted#1{\g@addto@macro\AFP@backmatter{Accepted: #1\\}}
%    \end{macrocode}
%   
% \end{macro}
%
%    \begin{macrocode}
%    \end{macrocode}
% 
% \begin{macro}{\printbackmatter}
%   Print the back matter
%    \begin{macrocode}
\def\printbackmatter{\ifx\AFP@backmatter\@empty\else\medskip
  \begin{flushright}%
    \AFP@backmatter
  \end{flushright}%
\fi}
%    \end{macrocode}
%   
% \end{macro}
%
%\subsection{Page styles}
%\label{sec:styles}
%
% In |preprint| mode |elsarticle| uses one side style.  We want to
% override this:
%    \begin{macrocode}
\AtBeginDocument{\@twosidetrue}
%    \end{macrocode}
% 
% \begin{macro}{\footskip}
%   We want generous \cs{footskip}
%    \begin{macrocode}
\setlength\footskip{40\p@}
%    \end{macrocode}
%   
% \end{macro}
% 
% \begin{macro}{\headrulewidth}
% \begin{macro}{\footrulewidth}
%   We do not want decorative rules in the journal:
%    \begin{macrocode}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macro}{standardpagestyle}
%   The page style for all pages but the first one
%    \begin{macrocode}
\fancypagestyle{standardpagestyle}{%
  \fancyhead{}%
  \fancyfoot{}%
  \fancyfoot[R]{\thepage}%
  \fancyhead[CE]{\scshape\MakeLowercase{\shortauthors}}%
  \fancyhead[CO]{\scshape\MakeLowercase{\shorttitle}}%
}
\pagestyle{standardpagestyle}
%    \end{macrocode}
%   
% \end{macro}
%
% \begin{macro}{firstpagestyle}
% \changes{v1.2}{2014/10/22}{Corrected masthead}
% \changes{v1.3}{2014/12/23}{Corrected another typo in masthead}
%   The page style for the first page
%    \begin{macrocode}
\fancypagestyle{firstpagestyle}{%
  \fancyhead{}%
  \fancyfoot{}%
  \fancyfoot[R]{\thepage}%
  \fancyhead[L]{\small Archives of Forensic Psychology\\
    \currentyear, Vol.~\currentvolume, No.~\currentissue,
    \thepage--\end@page}%
   \fancyhead[R]{\small\textcopyright~\currentyear\ Global Institute of
     Forensic Psychology\\ISSN~2334-2749}%
}
%    \end{macrocode}
% \end{macro}
%
%
%\subsection{Paragraphing}
%\label{sec:paras}
%
% \begin{macro}{\parindent}
%   We want generous indents
%    \begin{macrocode}
\setlength\parindent{2em}
%    \end{macrocode}
%   
% \end{macro}
%
%
%\subsection{Sectioning}
%\label{sec:sectioning}
%
% \begin{macro}{secnumdepth}
%   We do not number sections
%    \begin{macrocode}
\setcounter{secnumdepth}{-1}
%    \end{macrocode}
%   
% \end{macro}
%
% \begin{macro}{\section}
%   We center our sections:
%    \begin{macrocode}
\renewcommand\section{\@startsection {section}{1}{\z@}%
           {18\p@ \@plus 6\p@ \@minus 3\p@}%
           {9\p@ \@plus 6\p@ \@minus 3\p@}%
           {\centering\normalsize\bfseries\boldmath}}
%    \end{macrocode}
%   
% \end{macro}
%
% \begin{macro}{\subsection}
%   Our subsections look like sections, but flushed left
%    \begin{macrocode}
\renewcommand\subsection{\@startsection {subsection}{2}{\z@}%
           {18\p@ \@plus 6\p@ \@minus 3\p@}%
           {9\p@ \@plus 6\p@ \@minus 3\p@}%
           {\normalsize\bfseries\boldmath}}
%    \end{macrocode}
%   
% \end{macro}
%
% \begin{macro}{\subsubsection}
%   Our subsubsections are italicized and written on the same line as
%   the text.  Also, they end with dots.
%    \begin{macrocode}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{0\z@}%
           {0\z@}%
           {-6\p@}%
           {\normalfont\hspace*{\parindent}\itshape\@addfinaldot}}
%    \end{macrocode}
%   
% \end{macro}
%
% \begin{macro}{\@addfinaldot}
%   Add a dot after a text
%    \begin{macrocode}
\def\@addfinaldot#1{#1.}
%    \end{macrocode}
%   
% \end{macro}
%
%
%\subsection{Floats}
%\label{sec:floats}
% \changes{v1.0}{2014/08/18}{Centered captions}
% Setting up table captions
%    \begin{macrocode}
\DeclareCaptionLabelSeparator{periodNewline}{.\\}
\captionsetup[table]{position=top, format=plain,
  labelsep=periodNewline, justification=centering,
  singlelinecheck=off, font=normalsize, textfont=it}
%    \end{macrocode}
% 
% Setting up figure captions
%    \begin{macrocode}
\captionsetup[figure]{position=bottom, format=plain,
  labelsep=period, justification=centering,
  singlelinecheck=off, font=normalsize, labelfont=it}
%    \end{macrocode}
% 
%
%\subsection{Final Words}
%\label{sec:finis}
%
% \changes{v1.1}{2014/10/20}{Added changes requested by the editor and
%   implemented by David Latchman,
%   david.latchman@texnical-designs.com: no hyphenation throughout the
%   entire manuscript}
%
%    \begin{macrocode}
\tolerance=1
\emergencystretch=\maxdimen
\hyphenpenalty=10000
\hbadness=10000
\normalsize\normalfont
%</class>
%    \end{macrocode}
%
%\Finale
%\clearpage
%
%\PrintChanges
%\clearpage
%\PrintIndex
%
\endinput