正如在给定的链接中看到的,APA 样式要求标题采用非常特殊的格式图表。
我如何在标准文章格式中实现这一点?(我不想使用 APA6 类,因为它对论文有限制)
梅威瑟:
\documentclass[]{article}
\usepackage{multirow}
\usepackage{tikz}
\title{Test}
\author{Me, myself and I}
\begin{document}
\maketitle
\section{Table section}
\begin{table}[htpb]
\caption{The caption of table is not APA formatted yet.}
\begin{flushleft}
\small
\begin{tabular}{cccc}
Column 1 & \multicolumn{3}{c}{Column 2} \\
& Column 2a & Column 2b & Column2c \\
\hline
1 & 1 & .67 & 5 \\
1 & 2 & .32 & 2 \\
1 & 3 & .01 & 4 \\
\hline
\multicolumn{4}{l}{\multirow{2}{90mm}{Note: The caption is not APA formatted yet.}} \\
\\
\end{tabular}
\end{flushleft}
\end{table}
\section{Figure section}
\begin{figure}[htpb]
\begin{tikzpicture}
\draw (0,0) -- (2, 3);
\draw (0,0) -- (0, 3);
\draw (2,3) -- (0, 3);
\draw (0,3) -- (10, 1.5);
\draw (10, 1.5) -- (2, 3);
\draw (10, 1.5) -- (0,0);
\end{tikzpicture}
\caption{The caption of figure is not APA formatted yet.}
\end{figure}
\end{document}
答案1
要设置标题caption
,请使用包和来setspace
满足图形标题的双倍行距要求。现在,您可以使用\captionsetup[table]
和\captionsetup[figure]
来定义两种环境的标题样式。有针对所涉及的不同字体、文本对齐和相对于文本的标签格式的钩子。包文档包含许多很好的例子。
\documentclass[12pt]{article}
\usepackage{multirow,booktabs,setspace,caption}
\usepackage{tikz}
\DeclareCaptionLabelSeparator*{spaced}{\\[2ex]}
\captionsetup[table]{textfont=it,format=plain,justification=justified,
singlelinecheck=false,labelsep=spaced,skip=0pt}
\captionsetup[figure]{labelsep=period,labelfont=it,justification=justified,
singlelinecheck=false,font=doublespacing}
\begin{document}
\section{Table section}
\begin{table}[htpb]
\caption{The caption of the table.}
\begin{tabular}{cccc}
\toprule
Column 1 & \multicolumn{3}{c}{Column 2} \\
& Column 2a & Column 2b & Column2c \\
\midrule
1 & 1 & .67 & 5 \\
1 & 2 & .32 & 2 \\
1 & 3 & .01 & 4 \\
\bottomrule
\end{tabular}
\bigskip
\small\textit{Note}. The caption should now be correctly formatted.
\end{table}
\section{Figure section}
\begin{figure}[htpb]
\begin{tikzpicture}
\draw (0,0) -- (2, 3);
\draw (0,0) -- (0, 3);
\draw (2,3) -- (0, 3);
\draw (0,3) -- (10, 1.5);
\draw (10, 1.5) -- (2, 3);
\draw (10, 1.5) -- (0,0);
\end{tikzpicture}
\caption{The caption of figure is long to demonstrate the desired
double spacing which is a specific requirement of the style.}
\end{figure}
\end{document}