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.

Felix
  • 1,272
  • 3
    Without siunitx? Why? – egreg Jan 09 '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 09 '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 09 '13 at 18:31
  • @egreg presumably the OP prefers the interface of ctable compared to the 'regular' tabular code... – cmhughes Jan 09 '13 at 20:33

1 Answers1

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

Felix
  • 1,272
David Carlisle
  • 757,742