Debian Codegraph @

texmf-dist/doc/latex/apa/examples.txt

raw
1 %
2 % Athanassios Protopapas, January 2006
3 % Examples for using apa.cls v1.3.2
4 %
5 % This file contains examples of using the commands defined in apa.cls
6 % Do not use this file as a sample document! It is only meant to show
7 % how to use the macros appropriately, and will not even pass through
8 % LaTeX successfully, because of many commands that are embedded in
9 % the text (unescaped backslashes all over the place).
10 % Just use the examples of the commands you need.
11 %
12 % See apaexample.tex if you want a file that will run through LaTeX and
13 % produce sample output compatible with APA style.
14 %
15 % The class command goes at the top
16 %
17 \documentclass[man]{apa}
18 %
19 % Change jou to man/doc for the other modes:
20 %
21 %\documentclass[jou]{apa}
22 %\documentclass[doc]{apa}
23 %
24 % Here's what I use:
25 %\documentclass[nobf,fignum,tt,man]{apa}
26 %
27 %If you need support for languages other than English, use babel.
28 % Do not load babel with \usepackage from your document, because it will
29 % clash with apacite. Pass the "babel" option to apa.cls to load along with
30 % the language(s) you need.
31 % If the main language of your document is different from English,
32 % then list it last in the options list. For example, if the paper is in Dutch:
33 %\documentclass[man,babel,english,dutch]{apa} % text in Dutch; English available
34 % If the main language of your document is English but you need support
35 % for another language (e.g., for short passages in Greek using \textgreek):
36 %\documentclass[man,babel,greek,english]{apa} % text in English; Greek available
37 %
38 % If you have postscript graphics to include, load the graphicx package
39 %
40 \usepackage{graphicx}
41 %
42 % Define the various headings, names, and other required stuff
43 %
44 \title{Sample Title}
45 \twoauthors{Myself Author}{Second Author and Some Friend}
46 \twoaffiliations{My Department\\ Address ZIP}{The other place\\ Elsewhere}
47 \abstract{Text of the abstract}
48 \acknowledgements{Thanks to people and grants, and your new address maybe.}
49 \shorttitle{Short Title as per APA manual}
50 \rightheader{Odd-Numbered Page Header}
51 \leftheader{Even-Numbered Page Header}
52 %
53 % Optionally, for keeping track of stuff:
54 %\note{Draft of \today}
55 %
56 % John Vokey uses something like this
57 \ifapamodeman{%
58 \note{\begin{flushleft}
59 Dr.\ Your Whole Name\\
60 Department of Psychology\\
61 At Some University\\
62 Some City, Some Province or State\\
63 Country Postal Code\\
64 e-mail: [email protected]\\
65 fax: (area)exchange-number
66 \end{flushleft}}}
67 {% else, i.e., in jou and doc mode
68 \note{Draft of \today}}
69 %
70 % If you use A4 paper and care to make a point of it in man mode,
71 % use this, courtesy of John Vokey:
72 %\ifapamodeman{\setlength{\textwidth}{5.76772in}%
73 % \setlength{\textheight}{9.19291in}}{}
74 %
75 % Optional journal-like looking headers
76 %
77 \journal{Journal of nothing}\volume{First and Last Volume}
78 \ccoppy{Copyright 2006 by Myself}\copnum{Some serial number}
79 %
80 % End of definitions, begin document with title and then main text
81 %
82 \begin{document}
83 \maketitle %% First thing after \begin{document}
84 Here goes the text of the article. %% Start immediately after \maketitle
85 %% no blank line between title & text
86
87 You can have some text appear differently in each mode, or only appear
88 in some mode(s). You can also modify the appearance of tables,
89 figures, or equations between modes of compilation. Here's an
90 unexciting example:
91
92 \ifapamodeman{This is printed in man mode only}{This is not man mode}.
93 You can also use the three-way switch: the current mode is
94 \ifapamode{man}{jou}{doc}.
95
96 Sectioning commands are used as in regular \LaTeX. It is very
97 important that you use these sectioning commands. Here's a typical
98 example for an experimental psychology paper, following the (untitled)
99 introductory section:
100
101 \section{Experiment 1}
102 Introduction to this experiment. When referring to it, type
103 Experiment~1 (with capital E and a tie to the number so they won't
104 separate). However, when mentioning the first experiment the ``e'' is
105 lowercase.
106 \subsection{Method}
107 You may need some general remarks on method here. Then use the standard parts.
108 \subsubsection{Subjects}
109 Description of subjects.
110 \subsubsection{Apparatus}
111 Sometimes it is necessary to give the apparatus a special section.
112 \subsubsection{Stimuli}
113 What the subjects saw, heard, or felt.
114 \subsubsection{Procedure}
115 What happened to the poor subjects.
116 \subsection{Results}
117 Now the numbers: What your measurements showed and all the statistics of it.
118 \subsection{Discussion}
119 If your results mean anything, this is the place to talk about it. In case
120 there is little to discuss before the final section (e.g., \section{General
121 Discussion} at the end) you may combine results and discussion in a single
122 \subsection{Results and Discussion} before you go on to the next
123 \section{Experiment 2}
124 and so on.
125
126 In case you have more than these three levels of headings
127 (sectioning), you can use the command \headinglevels (e.g.,
128 \headinglevels{four} for four levels). See the APA manual for how to
129 handle more or fewer heading levels (the appearance is, naturally,
130 taken care of by apa.cls and you only need concern yourself with the
131 conceptual divisions). In case of more than three levels you'll need
132 the \paragraph (for the fourth level) and \subparagraph (for the fifth
133 level) sectioning commands of \LaTeX.
134
135 \section{Floating things}
136 \subsection{Figures}
137 A figure can be included in any way you like, but this class provides
138 a way to deal automatically with fitting encapsulated postscript (EPS)
139 files without worrying about dimensions or mode. Start your figure or
140 figure* environment as usual (see the LaTeX book) and then instead of
141 \includegraphics use the new command \fitfigure.
142
143 An example of a figure that loads a postscript file. You can use the
144 t and b options for selectively putting a figure at the top or bottom
145 of a page. Always include p after t or b so that you won't risk
146 running out of space if a figure is too big. The h option for
147 inserted figures is not recommended because it's not used in APA
148 journals. Don't forget \usepackage{graphicx} in your preamble!
149 (not epsfig, not graphics).
150
151 \begin{figure}[tp]
152 \fitfigure{fig1} %% You could use {fig1.eps} here but see note below
153 \caption{This is the caption of the figure.}
154 \label{fig:fig1}
155 \end{figure}
156
157 There is absolutely no reason to complicate your figures any further
158 than this simple example. Just insert your nice and descriptive
159 caption text and the filename. If you omit the .eps extension for the
160 filename (as in the example), then if you happen to use pdflatex it
161 will automatically load the corresponding .pdf graphic file (assuming
162 you have made one with eps2pdf), while "regular" dvips will load the
163 .eps file.
164
165 At any point in the text, before or after the figure, you can
166 automatically refer to it with the \ref command, for example we can
167 refer to the above figure as Figure~\ref{fig:fig1}, where the tilde
168 keeps the word ``Figure'' (which is capitalized according to APA
169 instructions) together with the reference number. Use names that are
170 easy to remember instead of ``fig1'' !
171
172 Always put the \label command after (and outside) \caption, otherwise
173 you'll run into trouble with the man mode not finding any labels to
174 refer to.
175
176 \subsubsection{Bitmaps}
177 In case of a bitmap eps (as opposed to a graph or line drawing), you
178 probably don't want it scaled in man mode, for best reproduction, so
179 use \fitbitmap instead:
180
181 \begin{figure}[tp]
182 \fitbitmap{bm1.eps} %% ".eps" not necessary -- see note above
183 \caption{This is the caption of the figure.}
184 \label{fig:fig2}
185 \end{figure}
186
187 \subsection{Tables}
188 What about a table? Well, mostly no change from what you are used
189 to, except that you can use \thickline for the top separator
190 to match the APA-journal look. Here's an example:
191
192 \begin{table}[tbp]
193 \caption{Some numbers that could be experimental data.}
194 \label{tab:tab1}
195 \begin{tabular}{lcc}\thickline
196 & \multicolumn{2}{c}{Factor 2} \\ \cline{2-3}
197 Factor 1 & Condition~A & Condition~B \\ \hline
198 First & 586 (231) & 649 (255) \\
199 & 2.2 & 7.5\tabfnm{a}\\
200 Second & 590 (195) & 623 (231) \\
201 & 2.8 & 2.5\tabfnm{b}\\ \hline
202 \end{tabular}
203 \tabfnt{a}{Notes to table material are easy.}
204 \tabfnt{b}{Use as many as you like, just remember to number them.}
205 \end{table}
206
207 In case your data won't fit in a single column (in jou mode) use a
208 wide table (environment table* instead of table). Here's an example:
209
210 \begin{table*}[tbp]
211 \caption{Some more numbers that could be experimental data and are
212 the same as the previous ones, only more of them.}
213 \label{tab:tab2}
214 \begin{tabular}{lccccc}\thickline
215 & \multicolumn{5}{c}{Factor 2} \\ \cline{2-6}
216 Factor 1 & Condition~A & Condition~B & Condition~C & Condition~D & Condition~E \\ \hline
217 First & 586 (231) & 649 (255) & 586 (231) & 649 (255) & 586 (231) \\
218 & 2.2 & 7.5 & 2.2 & 7.5 & 2.2 \\
219 Second & 590 (195) & 623 (231) & 590 (195) & 623 (231) & 590 (195) \\
220 & 2.8 & 2.5 & 2.8 & 2.5 & 2.8 \\ \hline
221 \end{tabular}
222 \end{table*}
223
224 You can get as fancy as you want with tables, just remember not to use
225 any vertical lines, and to group columns with \cline when they are
226 described by a common header (using \multicolumn). There's rarely a
227 need to get more complicated than these examples. Avoid nesting
228 tabular environments, it's a mess and you'll have to use the notab
229 option to make it work (so that internal tabulars don't stretch to the
230 line width). Be creative with \multicolumn instead.
231
232 Use figure* instead of figure for figures that are too wide to
233 fit comfortably in a single column.
234
235 \section{Section Header}
236 More text can go here.\footnote{And this is a footnote, used in just
237 the regular LaTeX way}
238
239 Suppose this is the end of our document, and there are appendices.
240 Remember, appendices come *after* the bibliography. But there's no
241 text between the bibliography and the appendix part. Don't use
242 a \bibliographystyle because apa.cls automatically loads apacite.
243
244 \bibliography{mybibfile}
245
246 % Now the appendices. First we have to signal the pass into the
247 % appendix part. Then you'll have to give each appendix a title
248 % thinking of it as a section.
249
250 \appendix %% Just like that, in LaTeX spirit. No parameters or titles.
251
252 \section{Title of first Appendix}
253 This is the text of the first appendix. You can present your
254 mathematical derivations, raw materials, or whatever. You are free to
255 use figures and tables in the usual way. apa.cls will number them
256 correctly and include them in the table and figure lists where they
257 belong. Isn't apa.cls wonderful?
258
259 \section{List of stimuli}
260 Just to show that another appendix is really just another section.
261 Also, it's a good opportunity to show how longtable should be used.
262 Remember, you must include the longtable option with the apa class if
263 you need to use longtable, and copy the special endfloat.cfg supplied
264 with apa.cls to the working document directory. Also, keep in mind,
265 it only works in man mode.
266
267 \begin{longtable}{lcc}
268 \caption{One sample caption for the sample long table.}
269 \label{tab:ltab}
270 \\ \thickline
271 & \multicolumn{2}{c}{Type} \\ \cline{2-3}
272 Condition & Cond-A & Cond-B \\ \hline
273 \endfirsthead
274 \\ \thickline
275 & \multicolumn{2}{c}{Type} \\ \cline{2-3}
276 Condition & Cond-A & Cond-B \\ \hline
277 \endhead
278 \endfoot
279 \thickline
280 \endlastfoot
281 Cond-A & Stim-1 & Stim-2 \\
282 & 1.0 & 2.0 \\
283 Cond-B & Stim-3 & Stim-4 \\
284 & 3.0 & 4.0 \\ \hline
285 Cond-A & Stim-1 & Stim-2 \\
286 & 1.0 & 2.0 \\
287 Cond-B & Stim-3 & Stim-4 \\
288 & 3.0 & 4.0 \\ \hline
289 Cond-A & Stim-1 & Stim-2 \\
290 & 1.0 & 2.0 \\
291 Cond-B & Stim-3 & Stim-4 \\
292 & 3.0 & 4.0 \\ \hline
293 Cond-A & Stim-1 & Stim-2 \\
294 & 1.0 & 2.0 \\
295 Cond-B & Stim-3 & Stim-4 \\
296 & 3.0 & 4.0 \\ \hline
297 Cond-A & Stim-1 & Stim-2 \\
298 & 1.0 & 2.0 \\
299 Cond-B & Stim-3 & Stim-4 \\
300 & 3.0 & 4.0 \\ \hline
301 Cond-A & Stim-1 & Stim-2 \\
302 & 1.0 & 2.0 \\
303 Cond-B & Stim-3 & Stim-4 \\
304 & 3.0 & 4.0 \\ \hline
305 Cond-A & Stim-1 & Stim-2 \\
306 & 1.0 & 2.0 \\
307 Cond-B & Stim-3 & Stim-4 \\
308 & 3.0 & 4.0 \\ \hline
309 Cond-A & Stim-1 & Stim-2 \\
310 & 1.0 & 2.0 \\
311 Cond-B & Stim-3 & Stim-4 \\
312 & 3.0 & 4.0 \\ \hline
313 Cond-A & Stim-1 & Stim-2 \\
314 & 1.0 & 2.0 \\
315 Cond-B & Stim-3 & Stim-4 \\
316 & 3.0 & 4.0 \\ \hline
317 Cond-A & Stim-1 & Stim-2 \\
318 & 1.0 & 2.0 \\
319 Cond-B & Stim-3 & Stim-4 \\
320 & 3.0 & 4.0 \\ \hline
321 Cond-A & Stim-1 & Stim-2 \\
322 & 1.0 & 2.0 \\
323 Cond-B & Stim-3 & Stim-4 \\
324 & 3.0 & 4.0 \\ \hline
325 Cond-A & Stim-1 & Stim-2 \\
326 & 1.0 & 2.0 \\
327 Cond-B & Stim-3 & Stim-4 \\
328 & 3.0 & 4.0 \\ \hline
329 Cond-A & Stim-1 & Stim-2 \\
330 & 1.0 & 2.0 \\
331 Cond-B & Stim-3 & Stim-4 \\
332 & 3.0 & 4.0 \\ \hline
333 Cond-A & Stim-1 & Stim-2 \\
334 & 1.0 & 2.0 \\
335 Cond-B & Stim-3 & Stim-4 \\
336 & 3.0 & 4.0 \\ \hline
337 Cond-A & Stim-1 & Stim-2 \\
338 & 1.0 & 2.0 \\
339 Cond-B & Stim-3 & Stim-4 \\
340 & 3.0 & 4.0 \\ \hline
341 Cond-A & Stim-1 & Stim-2 \\
342 & 1.0 & 2.0 \\
343 Cond-B & Stim-3 & Stim-4 \\
344 & 3.0 & 4.0 \\ \hline
345 Cond-A & Stim-1 & Stim-2 \\
346 & 1.0 & 2.0 \\
347 Cond-B & Stim-3 & Stim-4 \\
348 & 3.0 & 4.0 \\ \hline
349 Cond-A & Stim-1 & Stim-2 \\
350 & 1.0 & 2.0 \\
351 Cond-B & Stim-3 & Stim-4 \\
352 & 3.0 & 4.0 \\ \hline
353 Cond-A & Stim-1 & Stim-2 \\
354 & 1.0 & 2.0 \\
355 Cond-B & Stim-3 & Stim-4 \\
356 & 3.0 & 4.0 \\ \hline
357 Cond-A & Stim-1 & Stim-2 \\
358 & 1.0 & 2.0 \\
359 Cond-B & Stim-3 & Stim-4 \\
360 & 3.0 & 4.0 \\ \hline
361 Cond-A & Stim-1 & Stim-2 \\
362 & 1.0 & 2.0 \\
363 Cond-B & Stim-3 & Stim-4 \\
364 & 3.0 & 4.0 \\ \hline
365 \end{longtable}
366
367 \end{document}