ctable
,不是常规的table
/ tabular
。
如何让两个窄 ctable 并排?我希望它们成为更大表的子表,只是两个并排的独立表。我尝试使用表、minipage、subfig — 我一直收到错误not in outer par mode
。
答案1
如果您将pos
选项设置为H
(从float
包中),那么您可以将ctable
s 括在里面minipages
:
\documentclass{article}
\usepackage{booktabs}
\usepackage{ctable}
\usepackage{float}
\begin{document}
\begin{center}
\begin{minipage}{.5\textwidth}
\ctable[caption = Two ctables side by side,
label = tab:test1,
width = 5cm,pos= H,left]{c>{\raggedright}X}{
\tnote{footnotes are placed under the table}
}{
\ML
\multicolumn{2}{c}{Multicolumn entry!}
\NN
\midrule
one&
The width of this column depends on the width of the table.\tmark
}
\end{minipage}%THIS COMMENT IS SIGNIFICANT
\begin{minipage}{.5\textwidth}
\ctable[caption = Two ctables side by side,
label = tab:test2,
width = 5cm,pos= H,left]{c>{\raggedright}X}{
\tnote{footnotes are placed under the table}
}{
\ML
\multicolumn{2}{c}{Multicolumn entry!}
\NN
\midrule
one&
The width of this column depends on the width of the table.\tmark
}
\end{minipage}
\end{center}
\end{document}
当然,现在你的桌子不是漂浮物体,因此正确放置它们是您的责任。