## LaTeX forum ⇒ Graphics, Figures & Tables ⇒ table not working with \usepackage[table]{xcolor}

Information and discussion about graphics, figures & tables in LaTeX documents.
marek_step
Posts: 27
Joined: Sun Aug 19, 2012 8:48 am

### table not working with \usepackage[table]{xcolor}

Hello all!

A funny issue. No idea what's going on here: in the following MWE comment (or out) the \usepackage[table]{xcolor} and the corresponding } marked with a comment. With the colours the numbers are eaten in the resulting pdf ...

Thank you in advance for every hint!

marek


Stefan Kottwitz
Posts: 9406
Joined: Mon Mar 10, 2008 9:44 pm
Hi Marek!

\rowcolors colors the whole row, including the separation space. @{...} is for changing that space, such as by \hspace within, and that should be colored too. Howewer, you use the @{...} syntax for inserting actual text. That's not uncommon, but probably not foreseen with that feature.

In that case I would not use @{...} for inserting dashes or dots. It's probably not the correct spacing around such symbols or relations signs anyway, since it's a tabular intercolumn space and no standard spacing.

I would write the . and - just as usual in the table cell. The alignment may be ok still since the stuff is of the same width. Or one could use dcolumn or siunitx for alignment.

Stefan

marek_step
Posts: 27
Joined: Sun Aug 19, 2012 8:48 am
Thank you Stefan for your reply. I will look into the manuals of siunits and dcolumn

Best greetings to all!

marek

Stefan Kottwitz
Posts: 9406
Joined: Mon Mar 10, 2008 9:44 pm
By the way, it's siunitx with an x at the end, to distinguish it from the older siunits package. siunitx is the best and modern choice for formatting units. Note, in that example the units are italic, with math font and not proper kerning. Units are commonly written upright. siunitx provides a syntax and does the formatting right. In addition, it provides a table feature with alignment.