Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 7 down vote accepted

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.

share|improve this answer
    
Thank you very much :) –  Mk12 Apr 13 '12 at 21:36
    
"%THIS COMMENT IS SIGNIFICANT", why? –  knub Jun 11 '13 at 14:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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