I am failing to set up a complex APA table once again.
Actually, I need a table like shown below:
My current MWE:
\documentclass[12pt,ngerman]{article}
\usepackage[utf8]{inputenc}
\usepackage{tabularx}
\usepackage{booktabs}
\begin{document}
\begin{table}[!htb]
\begin{tabularx}{\textwidth}{Xcccccccccccc} \toprule
& Dropout yes/no & & & & & & & & & & \\
& No dropout & & & dropout & & & $MW_{dif}$ & $95\% CI for MW_{dif}$ & $t$ & $df$ & $d$ \\ \hline
& $MW$ & $SD$ & $N$ & $MW$ & $SD$ & $N$ & & & & & \\
General self-efficacy & $10$ & $2$ & $7$ & $29$ & $2$ & $7$ & $8$ & $23.50, 51.00$ & $2.12*$ & $12$ & $0.55$ \\
\bottomrule
\end{tabularx}
\end{table}
\end{document}
Problem 1: How do I align the upper part (Dropout yes/no) middle to both main areas no dropout and dropout? Vice versa, how do I align the second line to the MW-SD-N?
Problem 2: How do I achieve a line in the main areas which is just including MW/SD and N each?
:-)
\multicolumn{<num_cols>}{<align>}{<content>}
(basic example here, or search TeX.SE for many more). Problem 2: Use\cmidrule(<trim>){<start>-<end>}
from thebooktabs
package.