TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to align a list of ratios in a column of a table by the colon. Is this possible using siunitx?

For instance ratios like the following.




share|improve this question
If the first part of the ratio is always 1: then the answer is yes. – Qrrbrbirlbel Mar 13 '13 at 22:11
Yes, that is the case. What setting do I need to look at? – Darling Mar 13 '13 at 22:16
up vote 2 down vote accepted

Helpful options are:

  • table-space-text-pre and
  • table-align-text-pre.

You need the set a dummy text with the -space- option, so siunitx can reserve the right space in front of the actual number.

The -align- option accepts true (default) or false and sets the alignment of the text (see example).

We only want 1.0 part so be typeset by siunitx, the 1 from 1: would confuse the parer; we need to hide it in braces: {1:} or {1}:.

As you can see in the last table, we can even use different numbers in front of : (though, as it currently stands, they will not be typeset by siunitx).


    0.9    \\
    1.0125 \\
    0.99   \\


    0.9    \\
    1.0125 \\
    0.99   \\


    {1:}0.9    \\
    {2:}1.0125 \\
    {3:}0.99   \\


enter image description here

share|improve this answer

Your Answer


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.