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
    Commented Jan 9, 2013 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. Commented Jan 9, 2013 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
    Commented Jan 9, 2013 at 18:31
  • @egreg presumably the OP prefers the interface of ctable compared to the 'regular' tabular code...
    – cmhughes
    Commented Jan 9, 2013 at 20:33

1 Answer 1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .