6

ctable, not a regular table/tabular.

How can I get two narrow ctables to go side by side? I want them to be subtables of a larger table, just two independent tables side by side. I've tried using a table, minipage, subfig—I keep getting the error not in outer par mode.

7

If you set the pos option to H (from the float package) then you can enclose your ctables inside 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}

enter image description here

Of course, now your tables are not floating objects so their correct placement is your responsibility.

1
  • "%THIS COMMENT IS SIGNIFICANT", why? – knub Jun 11 '13 at 14:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.