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.

The siunitx package has already been extremely helpful to me for formatting tables containing numbers and I now use the S-column in nearly every table of my thesis.

However there is one problem: In the heading lines of the table (between toprule and midrule) there is text and variables and units which regularly produce errors when columns are formatted with S[...] so that I have to manually enclose every one of those texts with round brackets }.

I wonder: Is there a way to exclude a whole tabular line from the S-column formatting and mark it as "text" (as if every cell would be written in "{}")?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

The TeX \halign primitive, from which tabulars are built, is column-oriented. As a result, row operations are not trivial to implement. As a result, the current answer is that there is not a simple way to achieve what you'd like. I will of course consider possible approaches.

share|improve this answer
    
thank you for your explanation. –  Martin Jul 3 '11 at 19:52
2  
Joseph, @Martin: This reminds me on this answer to 'How to make a given table line bold'. Maybe the \rowfont macro can be used to insert a \relax? Would that be enough or does it has to be { }. (This requires the tabu package) –  Martin Scharrer Jul 3 '11 at 20:06
2  
@Martin: I suspect that tabu adds something to the end for the row, to allow a reset of 'things'. That works fine if you are happy to mess with the table mechanism, but siunitx avoids where possible doing anything like that. –  Joseph Wright Jul 3 '11 at 20:21
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.