1

When making a table, should number values inside of table cells be entered in the math environment? Or is that unnecessary?

  • 1
    math mode, but usually (or at least often) you do not need to add the $ markup in each cell use a numeric column type from the dcolumn or siunitx packages, so that the numbers are aligned correctly. – David Carlisle Dec 13 '17 at 19:44
0

Yes they should. Please compare:

\begin{tabular}{cc}
-1 & 1,02 \\ % bad
$-1$ & $1,02$ % good
\end{tabular}

(In some languages comma is a decimal separator).

| improve this answer | |
  • So the comma in your good doesn't matter? – Jan Filip Dec 13 '17 at 20:10
  • If the comma is supposed to denote the decimal separator, it's a good idea to encase it in curly braces, lest TeX (mis)interpret it as a punctuation character. – Mico Dec 13 '17 at 20:23
  • Or better, if you are using a language that use comma as decimal separator, like Spanish, be sure that you have the correct preamble (\usepackage[spanish]{babel} o whatever) and just use $1.2$. – Fran Dec 13 '17 at 20:34

Not the answer you're looking for? Browse other questions tagged or ask your own question.