I have a very long list (900 rows) with seven columns reporting the value of a measured magnitude and the errors. I justified to the right all the text in the columns to put more stetic the table, but there's one of the columns that either the magnitude or the error have different number of digits, like for example

150.20 $\pm$ 10.00\\ 
402.71 $\pm$ 103.12\\
15.04 $\pm$ 4.59\\

and so on, where $\pm$ is the plus minus sign +-. When I compile the .tex it appears kind of a mess, the $\pm$ signs are not aligned within the column. I would like to format that column in such a way that the errors (the numbers after $\pm$) get justified by the right, all the $\pm$ signs are aligned in the column and the magnitudes (the numbers before $\pm$) justified to the right as well, in order to preserve the stetic.

Is there a specific command in latex to use in the tabular environment that can do that?


1 Answer 1


You can use decimal aligned columns

enter image description here




\begin{longtable}{D..{3.2}@ { $\pm$ }D..{3.2}}
150.20 & 10.00\\ 
402.71 & 103.12\\
15.04 & 4.59\\


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .