| 1 |
% \iffalse meta-comment |
| 2 |
% |
| 3 |
% Copyright (C) 2011 by Nathaniel J. Smith <[email protected]> |
| 4 |
% -------------------------------------------------------- |
| 5 |
% |
| 6 |
% Redistribution and use in source and binary forms, with or without |
| 7 |
% modification, are permitted provided that the following conditions are |
| 8 |
% met: |
| 9 |
% |
| 10 |
% 1. Redistributions of source code must retain the above copyright |
| 11 |
% notice, this list of conditions and the following disclaimer. |
| 12 |
% |
| 13 |
% 2. Redistributions in binary form must reproduce the above |
| 14 |
% copyright notice, this list of conditions and the following |
| 15 |
% disclaimer in the documentation and/or other materials provided |
| 16 |
% with the distribution. |
| 17 |
% |
| 18 |
% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 19 |
% ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 20 |
% LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 21 |
% A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 22 |
% HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 23 |
% SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 24 |
% LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 |
% DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 |
% THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 |
% (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 |
% OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 |
% |
| 30 |
% \fi |
| 31 |
% |
| 32 |
% \iffalse |
| 33 |
%<*driver> |
| 34 |
\ProvidesFile{apa6e.dtx} |
| 35 |
%</driver> |
| 36 |
%<class>\NeedsTeXFormat{LaTeX2e} |
| 37 |
%<class>\ProvidesClass{apa6e} |
| 38 |
%<*class> |
| 39 |
[2011/03/03 v0.3 APA 6e manuscript formatting] |
| 40 |
%</class> |
| 41 |
% |
| 42 |
%<*driver> |
| 43 |
\documentclass{ltxdoc} |
| 44 |
\usepackage{url} |
| 45 |
\EnableCrossrefs |
| 46 |
\CodelineIndex |
| 47 |
\RecordChanges |
| 48 |
\begin{document} |
| 49 |
\DocInput{apa6e.dtx} |
| 50 |
\end{document} |
| 51 |
%</driver> |
| 52 |
% \fi |
| 53 |
% |
| 54 |
% \CharacterTable |
| 55 |
% {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 |
| 56 |
% 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 |
| 57 |
% Digits \0\1\2\3\4\5\6\7\8\9 |
| 58 |
% Exclamation \! Double quote \" Hash (number) \# |
| 59 |
% Dollar \$ Percent \% Ampersand \& |
| 60 |
% Acute accent \' Left paren \( Right paren \) |
| 61 |
% Asterisk \* Plus \+ Comma \, |
| 62 |
% Minus \- Point \. Solidus \/ |
| 63 |
% Colon \: Semicolon \; Less than \< |
| 64 |
% Equals \= Greater than \> Question mark \? |
| 65 |
% Commercial at \@ Left bracket \[ Backslash \\ |
| 66 |
% Right bracket \] Circumflex \^ Underscore \_ |
| 67 |
% Grave accent \` Left brace \{ Vertical bar \| |
| 68 |
% Right brace \} Tilde \~} |
| 69 |
% |
| 70 |
% |
| 71 |
% \changes{v0.1}{2011/02/12}{Initial version} |
| 72 |
% |
| 73 |
% \changes{v0.2}{2011/03/01}{Added support for appendices} |
| 74 |
% |
| 75 |
% \changes{v0.3}{2011/07/02}{Added \texttt{floatmarkers} |
| 76 |
% option. Increased |\headheight| to make \textsc{fancyhdr} |
| 77 |
% happy. Made it possible to refer to appendices by |
| 78 |
% label. Implemented the rule that if there is only a single |
| 79 |
% appendix, it is simply called ``Appendix'', not ``Appendix |
| 80 |
% A''. Fixed a bug where floats were sometimes labeled as being in |
| 81 |
% an appendix (like ``Figure A1'') even when they weren't (thanks to |
| 82 |
% J.~Olson and Alex Sommerfeldt for the report and fix).} |
| 83 |
% |
| 84 |
% \GetFileInfo{apa6e.dtx} |
| 85 |
% |
| 86 |
% \DoNotIndex{\newcommand,\renewcommand} |
| 87 |
% |
| 88 |
% |
| 89 |
% \title{The \textsf{apa6e} class\thanks{This document |
| 90 |
% corresponds to \textsf{apa6e}~\fileversion, dated \filedate.}} |
| 91 |
% \author{Nathaniel J.~Smith \\ \texttt{[email protected]}} |
| 92 |
% |
| 93 |
% \maketitle |
| 94 |
% |
| 95 |
% \section{Introduction} |
| 96 |
% |
| 97 |
% This is a minimalist class file for formatting manuscripts in the |
| 98 |
% style described the American Psychological Association (APA) 6th |
| 99 |
% edition guidelines. Perhaps someday the more capable |
| 100 |
% \textsf{apa.cls} will gain support for 6th edition APA formatting, |
| 101 |
% in which case you should probably use it instead. But in the mean |
| 102 |
% time, this class may be useful. |
| 103 |
% |
| 104 |
% Note that this class relies heavily on existing \LaTeX\ packages to |
| 105 |
% do its work. If you're using a reasonably complete \LaTeX\ |
| 106 |
% distribution like \TeX\ Live then you probably have them already, |
| 107 |
% but if not then they can all be retrieved from CTAN. |
| 108 |
% |
| 109 |
% \section{Usage} |
| 110 |
% |
| 111 |
% Here's a sample document to get you started: |
| 112 |
% \begin{verbatim} |
| 113 |
% \documentclass{apa6e} |
| 114 |
% \usepackage{apacite} % This is not done automatically! |
| 115 |
% \bibliographystyle{apacite} |
| 116 |
% \title{A simple, correct explanation for every aspect of mental function} |
| 117 |
% \shorttitle{Psychology: the end} |
| 118 |
% \author{Over J.~Optimistic\\Pie in the Sky University} |
| 119 |
% \authornote{\dots} |
| 120 |
% \abstract{\dots} |
| 121 |
% \begin{document} |
| 122 |
% \maketitle |
| 123 |
% I have discovered a truly remarkable theory which |
| 124 |
% this example is too small to contain. |
| 125 |
% \bibliography{my-refs} |
| 126 |
% \end{document} |
| 127 |
% \end{verbatim} |
| 128 |
% Pretty simple, really. But for a few more details, read on. |
| 129 |
% |
| 130 |
% \section{Appendices} |
| 131 |
% |
| 132 |
% In APA style, appendices are not named. So to get appendices, use |
| 133 |
% the same mechanism as normal \LaTeX (i.e., type |\appendix| to |
| 134 |
% switch to `appendix mode' and then use |\section| to start each |
| 135 |
% appendix), but note that the section title will be ignored. You can |
| 136 |
% type |\section{Stimuli}| or |\section{La La La}| or just |
| 137 |
% |\section{}| and you'll get the same result regardless (something |
| 138 |
% like ``Appendix B''). |
| 139 |
% |
| 140 |
% \subsection{References} |
| 141 |
% |
| 142 |
% This class does not provide any built-in support for formatting |
| 143 |
% references in APA style; I suggest using either the classic |
| 144 |
% \textsf{apacite} package, or the \textsf{biblatex-apa} package |
| 145 |
% (which more accurately implements current APA guidelines, but |
| 146 |
% depends on use of the new \textsf{biblatex} system). |
| 147 |
% |
| 148 |
% If you do use \textsf{apacite}, then this package will automatically |
| 149 |
% make sure that it uses the appropriate style of header. If you use |
| 150 |
% \textsf{biblatex-apa}, then you're on your own --- if you try this, |
| 151 |
% please let me know whether you had to adjust anything! |
| 152 |
% |
| 153 |
% \subsection{Class options} |
| 154 |
% |
| 155 |
% This class supports several options. |
| 156 |
% |
| 157 |
% \subsubsection{\texttt{leavefloats}} |
| 158 |
% When reading drafts, I find the APA manuscript format quite |
| 159 |
% usable, except that I find it very annoying to have to flip back and |
| 160 |
% forth between the text and tables/figures/their captions. Use this |
| 161 |
% option if you want to let \LaTeX do use normal handling of floats, |
| 162 |
% e.g.: |\documentclass[leavefloats]{apa6e}|. |
| 163 |
% |
| 164 |
% To make sure you don't forget to take it out before submitting, |
| 165 |
% this also inserts a large note on the front page to remind you that |
| 166 |
% you are looking at a draft with illegitimate formatting. |
| 167 |
% |
| 168 |
% \subsubsection{\texttt{floatmarkers}} |
| 169 |
% Some people like to leave little markers in the text that say |
| 170 |
% ``Figure 3 about here'' and so on. As far as I can tell, this |
| 171 |
% is actually not part of APA 6e style, but if you want to do it |
| 172 |
% anyway, then this option is here for you: |
| 173 |
% |\documentclass{floatmarkers}{apa6e}|. |
| 174 |
% |
| 175 |
% \subsubsection{\texttt{endnotes}} |
| 176 |
% APA style allows footnotes to either be formatted as footnotes |
| 177 |
% directly in the text, or placed at the end in a `Footnotes' |
| 178 |
% section. By default we do the former; if you really want the latter |
| 179 |
% for some reason, then enable this option: |
| 180 |
% |\documentclass[endnotes]{apa6e}|. |
| 181 |
% |
| 182 |
% Of course, if you want multiple, then you can accomplish that in the |
| 183 |
% usual way: |\documentclass[leavefloats,endnotes]{apa6e}|. |
| 184 |
% |
| 185 |
% \subsection{Known limitations} |
| 186 |
% |
| 187 |
% We currently make no attempt to alter the standard list |
| 188 |
% environments (|itemize|, |enumerate|). As far as I can tell they are |
| 189 |
% already APA compliant, but they might introduce enough extra |
| 190 |
% vertical spacing as to be visually unpleasant. If this bothers you |
| 191 |
% and you find a good solution, let me know. (Also, we don't even |
| 192 |
% attempt to reproduce \textsf{apa.cls}'s |seriate| environment. I'm |
| 193 |
% not sure why one would use it in the first place.) |
| 194 |
% |
| 195 |
% We only format manuscripts; in particular, there is no equivalent to |
| 196 |
% \textsf{apa.cls}'s |jou| or |doc| modes. I don't really see the |
| 197 |
% point, personally, so I'm unlikely to fix this, but if you find |
| 198 |
% one of these modes useful and want to write some code for it, then |
| 199 |
% contributions are welcome. |
| 200 |
% |
| 201 |
% \subsection{Known \textit{Non}-limitations} |
| 202 |
% |
| 203 |
% In \textsf{apa.cls}, you cannot have any blank lines around |
| 204 |
% |\maketitle|, or formatting gets screwed up. When using |
| 205 |
% \textsf{apa6e.cls}, you can use as many blank lines as you like. Go |
| 206 |
% crazy. |
| 207 |
% |
| 208 |
% In \textsf{apa.cls}, you must be careful about where you place your |
| 209 |
% captions inside a floating environment --- they must go at the top |
| 210 |
% of |table| environments, and at the bottom of |figure| |
| 211 |
% environments. In \textsf{apa6e.cls}, you can put your captions |
| 212 |
% where-ever you want, and they'll still come out in the right |
| 213 |
% place. One less thing to worry about. |
| 214 |
% |
| 215 |
% \subsection{New macros} |
| 216 |
% |
| 217 |
% \DescribeMacro{\mspart} |
| 218 |
% This class defines just one new macro, and you shouldn't need to use |
| 219 |
% it. But just in case\dots\ |\mspart| is a new sectioning command, |
| 220 |
% designed to format the header at the beginning of each APA |
| 221 |
% manuscript `part' --- e.g., the abstract, the main body, the |
| 222 |
% references, etc. The syntax is exactly the same as for |\section| |
| 223 |
% and friends, e.g.: |\mspart{Abstract}|. However, since all the |
| 224 |
% standard manuscript parts are generated automatically by other |
| 225 |
% macros, this is unlikely to be useful. |
| 226 |
% |
| 227 |
% \StopEventually{\PrintChanges\PrintIndex} |
| 228 |
% |
| 229 |
% \section{Implementation} |
| 230 |
% |
| 231 |
% Define our options, and then load up the standard \textsf{article} class. |
| 232 |
% \begin{macrocode} |
| 233 |
\DeclareOption{endnotes}{\def\apaSIXe@endnotes\relax} |
| 234 |
\DeclareOption{leavefloats}{\def\apaSIXe@leavefloats\relax} |
| 235 |
\DeclareOption{floatmarkers}{\def\apaSIXe@floatmarkers\relax} |
| 236 |
% \end{macrocode} |
| 237 |
% All unrecognized options are passed through to \textsf{article}. |
| 238 |
% \begin{macrocode} |
| 239 |
\DeclareOption*{% |
| 240 |
\PassOptionsToClass{\CurrentOption}{article}% |
| 241 |
} |
| 242 |
\ProcessOptions\relax |
| 243 |
\LoadClass[12pt]{article} |
| 244 |
% \end{macrocode} |
| 245 |
% We want to typeset everything in Times, including math. |
| 246 |
% \begin{macrocode} |
| 247 |
\RequirePackage{times} |
| 248 |
\RequirePackage{mathptmx} |
| 249 |
% \end{macrocode} |
| 250 |
% Set margins and justification. If |\headheight| is less than 15 pt, |
| 251 |
% \textsc{fancyhdr} will complain. |
| 252 |
% \begin{macrocode} |
| 253 |
\RequirePackage[margin=1in,headheight=15pt]{geometry} |
| 254 |
\RequirePackage[document]{ragged2e} |
| 255 |
% \end{macrocode} |
| 256 |
% APA 6e says that indents should be ``5--7 spaces, or 1/2 |
| 257 |
% inch''. We'll use the latter. |
| 258 |
% \begin{macrocode} |
| 259 |
\setlength{\RaggedRightParindent}{0.5in} |
| 260 |
% \end{macrocode} |
| 261 |
% Doublespacing: The \textsf{setspace} package has the good taste to |
| 262 |
% disable doublespacing for things like captions and footnotes; the |
| 263 |
% APA doesn't. Which is totally reasonable, but it means that we can't |
| 264 |
% use \textsf{setspace}. I stole this magic number from the |
| 265 |
% \textsf{setspace} code --- it is only correct for 12 pt font. But |
| 266 |
% we only support 12 pt font anyway. |
| 267 |
% \begin{macrocode} |
| 268 |
\newcommand{\@doublespacing}{\linespread{1.655}} |
| 269 |
\@doublespacing |
| 270 |
% \end{macrocode} |
| 271 |
% Set up the running header. |
| 272 |
% \begin{macrocode} |
| 273 |
\RequirePackage{fancyhdr} |
| 274 |
\setlength{\headheight}{15.2pt} |
| 275 |
\fancyhf{} |
| 276 |
\renewcommand{\headrulewidth}{0pt} |
| 277 |
\rhead{\thepage} |
| 278 |
\fancypagestyle{titlepage}{\lhead{Running head: \MakeUppercase{\@shorttitle}}} |
| 279 |
\fancypagestyle{otherpage}{\lhead{\MakeUppercase{\@shorttitle}}} |
| 280 |
\pagestyle{otherpage} |
| 281 |
% \end{macrocode} |
| 282 |
% \subsection{The title page} |
| 283 |
% The commands to capture the various bits of the title page and |
| 284 |
% abstract. |
| 285 |
% \begin{macrocode} |
| 286 |
\newcommand{\shorttitle}[1]{\def\@shorttitle{#1}} |
| 287 |
\renewcommand{\title}[1]{\def\@title{#1}} |
| 288 |
\renewcommand{\author}[1]{\def\@author{#1}} |
| 289 |
\newcommand{\authornote}[1]{\def\@authornote{#1}} |
| 290 |
\renewcommand{\abstract}[1]{\def\@abstract{#1}} |
| 291 |
% \end{macrocode} |
| 292 |
% And here's how we actually format the title page. |
| 293 |
% \begin{macrocode} |
| 294 |
\renewcommand{\maketitle}{% |
| 295 |
\thispagestyle{titlepage}% |
| 296 |
\vspace*{1in}% |
| 297 |
\Centering\@title\\\@author% |
| 298 |
\vfill% |
| 299 |
\ifdefined% |
| 300 |
\apaSIXe@leavefloats% |
| 301 |
{\large\textbf{\textit{A helpful reminder, courtesy \texttt{apa6e.cls}:} Figures and tables are currently mixed in with |
| 302 |
your text for easier reading. Don't forget to remove the |
| 303 |
\texttt{leavefloats} option before you submit!}\vfill}% |
| 304 |
\fi |
| 305 |
Author Note\par\RaggedRight\@authornote% |
| 306 |
\mspart{Abstract}% |
| 307 |
\@abstract% |
| 308 |
\mspart{\@title}} |
| 309 |
% \end{macrocode} |
| 310 |
% By default, the \textsf{apacite} package will format the beginning |
| 311 |
% of the references as if a section, by calling |
| 312 |
% |\section{References}|. But that would be wrong. So we override the |
| 313 |
% internal command that it uses to do this. |
| 314 |
% \begin{macrocode} |
| 315 |
\AtBeginDocument{\def\st@rtbibsection{\mspart{References}}} |
| 316 |
% \end{macrocode} |
| 317 |
% \subsection{Captions} |
| 318 |
% Caption formatting is complicated. For tables, captions go above the |
| 319 |
% float body, and are formatted like: |
| 320 |
% \begin{center} |
| 321 |
% \framebox{\begin{tabular}{ll}Table 3 \\ \textit{My fabulous table}\end{tabular}} |
| 322 |
% \end{center} |
| 323 |
% For figures, captions go below the float body, and are formatted like: |
| 324 |
% \begin{center} |
| 325 |
% \framebox{\textit{Figure 7:} My smashing graph.} |
| 326 |
% \end{center} |
| 327 |
% \begin{macrocode} |
| 328 |
\RequirePackage{float} |
| 329 |
\floatstyle{plaintop} |
| 330 |
\restylefloat{table} |
| 331 |
\floatstyle{plain} % This puts captions below the figure |
| 332 |
\restylefloat{figure} |
| 333 |
\RequirePackage[singlelinecheck=off,justification=RaggedRight]{caption} |
| 334 |
\DeclareCaptionLabelFormat{tablelabel}{\hspace{-\RaggedRightParindent}#1 #2} |
| 335 |
\DeclareCaptionLabelFormat{figurelabel}{\hspace{-\RaggedRightParindent}\textit{#1 #2}} |
| 336 |
\DeclareCaptionTextFormat{tabletext}{\hspace{-\RaggedRightParindent}\textit{#1}} |
| 337 |
\captionsetup[table]{position=above,labelformat=tablelabel,labelsep=newline, |
| 338 |
textformat=tabletext} |
| 339 |
\captionsetup[figure]{position=below,labelformat=figurelabel} |
| 340 |
% \end{macrocode} |
| 341 |
% \subsection{Sectioning} |
| 342 |
% First, disable section numbering. |
| 343 |
% \begin{macrocode} |
| 344 |
\setcounter{secnumdepth}{0} |
| 345 |
% \end{macrocode} |
| 346 |
% Now, redefine the various sectioning commands to look like APA |
| 347 |
% titles --- |\section| is APA level 1, |\subsection| is APA level 2, |
| 348 |
% etc. This requires we use the |\@startsection| macro, which is very |
| 349 |
% confusing. Apparently it is documented in something called |
| 350 |
% \texttt{rep10.doc}; I found the relevant snippet at |
| 351 |
% \url{http://help-csli.stanford.edu/tex/latex-sections.shtml} and |
| 352 |
% reproduce it here for reference: |
| 353 |
% |
| 354 |
% \begin{verbatim} |
| 355 |
% \@startsection {NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE} |
| 356 |
% optional * [ALTHEADING]{HEADING} |
| 357 |
% Generic command to start a section. |
| 358 |
% NAME : e.g., 'subsection' |
| 359 |
% LEVEL : a number, denoting depth of section -- e.g., chapter=1, |
| 360 |
% section = 2, etc. A section number will be printed if |
| 361 |
% and only if LEVEL < or = the value of the secnumdepth |
| 362 |
% counter. |
| 363 |
% INDENT : Indentation of heading from left margin |
| 364 |
% BEFORESKIP : Absolute value = skip to leave above the heading. |
| 365 |
% If negative, then paragraph indent of text following |
| 366 |
% heading is suppressed. |
| 367 |
% AFTERSKIP : if positive, then skip to leave below heading, |
| 368 |
% else - skip to leave to right of run-in heading. |
| 369 |
% STYLE : commands to set style |
| 370 |
% If '*' missing, then increments the counter. If it is present, then |
| 371 |
% there should be no [ALTHEADING] argument. A sectioning command |
| 372 |
% is normally defined to \@startsection + its first six arguments. |
| 373 |
% \end{verbatim} |
| 374 |
% |
| 375 |
% \begin{macro}{\section} |
| 376 |
% \begin{macro}{\subsection} |
| 377 |
% Now, the code. For level 1 and 2 titles, we give them just a |
| 378 |
% \textit{little} bit of extra vertical room --- I find it makes them |
| 379 |
% much easier to read. |
| 380 |
% \begin{macrocode} |
| 381 |
\renewcommand{\section}{\@startsection {section}{1}{\z@}% |
| 382 |
{0.2\baselineskip \@plus 0.2ex \@minus 0.2ex}% |
| 383 |
{0.2\baselineskip \@plus .2ex}% |
| 384 |
{\Centering\normalfont\normalsize\bfseries}} |
| 385 |
\renewcommand{\subsection}{\@startsection{subsection}{2}{\z@}% |
| 386 |
{0.2\baselineskip \@plus 0.2ex \@minus 0.2ex}% |
| 387 |
{0.2\baselineskip \@plus 0.2ex}% |
| 388 |
{\normalfont\normalsize\bfseries}} |
| 389 |
% \end{macrocode} |
| 390 |
% \end{macro} |
| 391 |
% \end{macro} |
| 392 |
% \begin{macro}{\subsubsection} |
| 393 |
% \begin{macro}{\paragraph} |
| 394 |
% \begin{macro}{\subparagraph} |
| 395 |
% For levels 3--5, we don't add any extra vertical spacing, but we do |
| 396 |
% add just a little bit of extra horizontal space between the section |
| 397 |
% name and the text. And of course, we need to handle the obligatory |
| 398 |
% period. |
| 399 |
% \begin{macrocode} |
| 400 |
\renewcommand{\subsubsection}[1]{\@startsection{subsubsection}{3}{\parindent}% |
| 401 |
{0\baselineskip \@plus 0.2ex \@minus 0.2ex}% |
| 402 |
{-\z@}% |
| 403 |
{\normalfont\normalsize\bfseries}{#1}\textbf{.}\hspace{0.2em}} |
| 404 |
\renewcommand{\paragraph}[1]{\@startsection{paragraph}{4}{\parindent}% |
| 405 |
{0\baselineskip \@plus 0.2ex \@minus 0.2ex}% |
| 406 |
{-\z@}% |
| 407 |
{\normalfont\normalsize\bfseries\itshape}{#1}\textbf{\textit{.}}\hspace{0.2em}} |
| 408 |
\renewcommand{\subparagraph}[1]{\@startsection{subparagraph}{5}{\parindent}% |
| 409 |
{0\baselineskip \@plus 0.2ex \@minus 0.2ex}% |
| 410 |
{-\z@}% |
| 411 |
{\normalfont\normalsize\itshape}{#1}\textit{.}\hspace{0.2em}} |
| 412 |
% \end{macrocode} |
| 413 |
% \end{macro} |
| 414 |
% \end{macro} |
| 415 |
% \end{macro} |
| 416 |
% \begin{macro}{\mspart} |
| 417 |
% And we define a new sectioning command, for beginning 'manuscript |
| 418 |
% parts' (e.g., abstract, main body, references). Unlike section |
| 419 |
% headings, these should \textit{not} be bolded, but we do disable |
| 420 |
% following indentation. (Note that we cheat and re-use the section |
| 421 |
% counter, which doesn't matter since sections are unnumbered anyway.) |
| 422 |
% \begin{macrocode} |
| 423 |
\newcommand{\mspart}{\newpage\@startsection {section}{1}{\z@}% |
| 424 |
{-0.2\baselineskip \@plus -0.2ex \@minus -0.2ex}% |
| 425 |
{0.2\baselineskip \@plus .2ex}% |
| 426 |
{\Centering\normalfont\normalsize}} |
| 427 |
% \end{macrocode} |
| 428 |
% \end{macro} |
| 429 |
% \begin{macro}{\appendix} |
| 430 |
% Appendix handling is pretty straightforward, except that we have to |
| 431 |
% rearrange how floats are numbered (they go A1, A2, ... within |
| 432 |
% appendix A), and this is complicated by the need to work properly |
| 433 |
% with \textsc{endfloat}. So if the \textsc{leavefloats} option is in |
| 434 |
% effect, we'll want to change numbering immediately, but if we're |
| 435 |
% putting floats at the end, then we need to arrange for the numbering |
| 436 |
% changes to happen when \textsc{endfloat} is part of the way through |
| 437 |
% processing the floats. This is done by defining |
| 438 |
% |\apaSIXe@appendixfloats@setup| appropriately in the two cases, |
| 439 |
% below. |
| 440 |
% |
| 441 |
% The other slightly messy bit is that if there is only one appendix, |
| 442 |
% it is called ``Appendix'', but if there is more than one, then the |
| 443 |
% first is called ``Appendix A''. So we need to keep track of how many |
| 444 |
% appendices the document contains. We do this using a nasty |\label| |
| 445 |
% hack to get the necessary information into the \texttt{.aux} file. |
| 446 |
% \begin{macrocode} |
| 447 |
\RequirePackage{ifthen} |
| 448 |
\renewcommand{\appendix}{\setcounter{section}{0} |
| 449 |
\renewcommand{\section}[1]{\addtocounter{section}{1} |
| 450 |
\ifthenelse{\equal{\value{section}}{2}} |
| 451 |
{\label{apaSIXe@has@multiple@appendices}} |
| 452 |
{} |
| 453 |
\apaSIXe@appendixfloats@setup{\Alph{section}} |
| 454 |
\def\@currentlabel{\Alph{section}} |
| 455 |
\ifdefined\r@apaSIXe@has@multiple@appendices |
| 456 |
\mspart{Appendix \Alph{section}} |
| 457 |
\else |
| 458 |
\mspart{Appendix} |
| 459 |
\fi}} |
| 460 |
\newcommand{\apaSIXe@appendixfloats@figureson}[1]{% |
| 461 |
\setcounter{figure}{0}% |
| 462 |
\renewcommand{\thefigure}{#1\arabic{figure}}} |
| 463 |
\newcommand{\apaSIXe@appendixfloats@tableson}[1]{% |
| 464 |
\setcounter{table}{0}% |
| 465 |
\renewcommand{\thetable}{#1\arabic{table}}} |
| 466 |
% \end{macrocode} |
| 467 |
% \end{macro} |
| 468 |
% \subsection{Endnotes} |
| 469 |
% If the user requested endnotes, then set them up here. I'm not sure |
| 470 |
% why you'd want this, but I wrote the code before realizing that |
| 471 |
% ordinary footnotes were legal, so you get the benefit of my |
| 472 |
% mistake. |
| 473 |
% \begin{macrocode} |
| 474 |
\ifdefined\apaSIXe@endnotes |
| 475 |
\RequirePackage{endnotes} |
| 476 |
\renewcommand{\enoteheading}{\mspart{Footnotes}} |
| 477 |
\def\enotesize{\normalsize} |
| 478 |
\renewcommand{\footnote}[1]{\def\apaSIXe@hasendnotes\relax{}\endnote{#1}} |
| 479 |
\AtEndDocument{\ifdefined \apaSIXe@hasendnotes \theendnotes \fi} |
| 480 |
\fi |
| 481 |
% \end{macrocode} |
| 482 |
% \subsection{Floats at the end} |
| 483 |
% This must come after the endnotes handling above, since they both |
| 484 |
% use |\AtEndDocument| and floats are supposed to come after |
| 485 |
% footnotes. |
| 486 |
% |
| 487 |
% If \textsc{endfloat} is in use, then we have to arrange for |
| 488 |
% |\apaSIXe@appendixfloats@figureson| and |
| 489 |
% |\apaSIXe@appendixfloats@tableson| to be called partly through the |
| 490 |
% floats being processed. We accomplish this by writing out a calls to |
| 491 |
% them in the \texttt{fff} and \texttt{ttt} files that |
| 492 |
% \textsc{endfloat} uses. (Note that it's important to have two |
| 493 |
% different commands --- we used to have just one, but then whichever |
| 494 |
% file was loaded first turned on the appendix mode half-way through, |
| 495 |
% and then appendix mode was in effect for \textit{all} of the other |
| 496 |
% file.) If \texttt{floatmarkers} option is in effect, then we also |
| 497 |
% need to make sure that the markers for floats in the appendix use |
| 498 |
% the right numbers --- and these use different counters. |
| 499 |
% \begin{macrocode} |
| 500 |
\ifdefined\apaSIXe@leavefloats |
| 501 |
\newcommand{\apaSIXe@appendixfloats@setup}[1]{% |
| 502 |
\apaSIXe@appendixfloats@tableson{#1}% |
| 503 |
\apaSIXe@appendixfloats@figureson{#1}% |
| 504 |
} |
| 505 |
\else |
| 506 |
\ifdefined\apaSIXe@floatmarkers |
| 507 |
\relax |
| 508 |
\else |
| 509 |
\PassOptionsToPackage{nomarkers}{endfloat} |
| 510 |
\fi |
| 511 |
\RequirePackage[nolists,noheads,tablesfirst]{endfloat} |
| 512 |
\AtBeginDelayedFloats{\@doublespacing} |
| 513 |
\newcommand{\apaSIXe@appendixfloats@setup}[1]{% |
| 514 |
\setcounter{postfig}{0}% |
| 515 |
\renewcommand{\thepostfig}{#1\arabic{postfig}}% |
| 516 |
\setcounter{posttbl}{0}% |
| 517 |
\renewcommand{\theposttbl}{#1\arabic{posttbl}}% |
| 518 |
\efloat@iwrite{fff}{% |
| 519 |
\string\makeatletter\string\apaSIXe@appendixfloats@figureson{#1}\string\makeatother}% |
| 520 |
\efloat@iwrite{ttt}{% |
| 521 |
\string\makeatletter\string\apaSIXe@appendixfloats@tableson{#1}\string\makeatother}} |
| 522 |
\fi |
| 523 |
% \end{macrocode} |
| 524 |
% |
| 525 |
% \Finale |
| 526 |
\endinput |