\begin{table}
\begin{tabular}{|c|c|c|c|c|}
\hline
\multicolumn{5}{|c|}{\textbf{Table 1:}Unfiltered Water}\\
Concentration of analyte in sample & Avg & Std Dev & RSD & 90\% CI \\
\hline
Total hardness (ppm $CaCo_3$ equiv) & 97 & 2 & 2\% & \pm 5 \\
Calcium hardness (ppm $Ca^{2+}$) & 57 & 3 & 5\% & \pm 5 \\
Magnesium hardness( ppm $Mg^{2+}$) & 40 & 3 & 7.5\% & \pm 5 \\
\hline
\end{tabular}
This table is giving me an error. That says
! Missing $ inserted.
<inserted text>
$
l.41 ...Co_3 equiv\) & 97 & 2 & 2\% & \pm
5 \I've inserted a begin-math/end-math symbol since I think
you left one out. Proceed, with fingers crossed.
What is the cause of this error? I can't seem to find any thing that is mismatched.
\pm
requires math mode, that's all. Sincetabular
sets its contents in text mode, it causes an error, and you have to switch manually using$\pm$
. It's better to use\pm 5
though.CaCO$_3$
or use a specialized package for inputting chemical formulas such asmhchem
orbpchem
.\caption{}
command for automatic numbering! Details for this can be found in every basic latex tutorial dealing with floating environments such as figure or table