5

I'm trying to replicate siunitx's decimal alignmnent in tables, using ctables.

\documentclass{article}
\usepackage{ctable}
\begin{document}
\ctable[] {rc} {}{
  \FL \textbf{Data} & \textbf{Distance}
  \ML one & 1.1
  \ML ten & 10.1
  \ML hundred & 100.1
  \LL
}
\end{document}

which results in:

this is what I get

And I'm looking to get somethign that looks closer to this answer.

4
  • 3
    Without siunitx? Why? – egreg Jan 9 '13 at 17:10
  • 2
    ctable just uses tabular internally so you could use siunitx or dcolumn to do the decimal alignment as in a normal tabular. – David Carlisle Jan 9 '13 at 17:23
  • I (mistakenly) assumed that one had to use tabular to get siunitx to work. All the examples I had seen used tabular only, and a cursory search didn't give me any results. @DavidCarlisle, feel free to answer the question and I'll accept it. – Felix Jan 9 '13 at 18:31
  • @egreg presumably the OP prefers the interface of ctable compared to the 'regular' tabular code... – cmhughes Jan 9 '13 at 20:33
11

ctable just uses tabular internally so you could use siunitx or dcolumn to do the decimal alignment as in a normal tabular.

\ctable[] {rS} {
  }{
  \FL \textbf{Data} & \textbf{Distance}
  \ML one & 1.1
  \ML ten & 10.1
  \ML hundred & 100.1
  \LL
}

enter image description here

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.