caption package is loaded by the
apa6 class, so you can use its commands to set the caption formatting. Adding:
will cause the caption to be centred. However, this doesn't seem to be the exact formatting you want. What you want a left aligned caption aligned to the natural width of the table. As Axel Sommerfeldt notes in the comments, there is an command in the
caption package which allows you to place a table and its caption in a box. This will allow you to do what you want quite simply. The command has not yet made it into the documentation of
The syntax of this command is:
(quoting from the
subcaption package by the same author:)
⟨list entry⟩ &
⟨heading⟩ will be used for
⟨width⟩ is the width of the resulting
\parbox; the default value is the width of the contents.
⟨inner-pos⟩ specifies how the contents will be justified inside the
\parbox; it can be either
s (for no special
justification). The default is
c. (But you can use any justification
\DeclareCaptionJustification as well, e.g.
Example of a table:
Test1 & 1 & 2\\
Test2 & 1 & 2\\
Test3 & 1 & 2\\
Unless you have very strict formatting requirements, I would simply stick to centred captions instead of doing this.
(Thanks to both Werner and Axel for their comments on this answer.)