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.

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.

share|improve this question
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
add comment

1 Answer 1

up vote 10 down vote accepted

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

share|improve this answer
add comment

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.