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.

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'm trying to center-align the two-line heading of the rightmost column of the following table. Given that I use decimal point alignment, I guess the centre of the headings should be aligned with the decimal point.

alt text

The code I used is below. I put table-text-alignment=center but it doesn't make any difference, as it can be seen.

            S[group-separator={,}, group-four-digits=true,table-format=5.0] 
            S[group-separator={,}, group-four-digits=true,table-format=5.0]
            >{\bfseries}S[table-format=3.2, table-text-alignment=center]
          \textbf{Product Group} & \textbf{Production Size} & \textbf{Number of Failures} & \textbf{Failure Rates} \\
          & & & \textbf{(per 1,000 items)} \\
          %  \addlinespace
          this is foo1 & 11111 & 1111 & 11.11\\
          this was foo2 & 22222 & 2222 & 222\\
          this will be foo3 & 33333 & 3333 & 3.33\\
          foo4 & 44444 & 4444 & 44.4\\
          foo5 & 55555 & 5555 & 5.5\\

I'm not sure what I'm doing wrong.

share|improve this question
up vote 4 down vote accepted

You have to mask the critical heading cell with an additional set of curly braces.

... & {\textbf{Failure Rates}} \\
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.