I'm getting this error:
! Missing $ inserted.
<inserted text>
$
l.557 & V_
n \le 1 kV & 1 kV \le V_n \le 69 kV & 6...
? ! Missing $ inserted.
<inserted text>
$
l.557 & V_n \le 1 kV &
1 kV \le V_n \le 69 kV & 6...
?
And this is my table, can anyone help me where should i put the $? Latex is already doing it by itself (i guess), but i really want to know whats wrong here.
\begin{table}[h!]
\caption{Valores de referência para as distorções harmônicas totais de tensão.}
\begin{center}
\label{limites_distorcao}
\begin{tabular}{|c|c|c|c|}
\hline
\multirow{2}{*}{Indicador} & \multicolumn{3}{c|}{Tensão Nominal do Barramento} \\ \cline{2-4}
& V_n \le 1 kV & 1 kV \le V_n \le 69 kV & 69 kV \le V_n \le 230 kV \\ \hline
$DHTvI_i$ & 7,5\% & 6\% & 4\% \\ \hline
$DHTv3_i$ & 6,5\% & 5\% & 3\% \\ \hline
\end{tabular}
\end{center}
\end{table}
Best Answer
You are missing the dollar signs for the math code
V_n
and\le
which causes the error (as already stated by other users in the comments). Inside atabular
every cell is an own box and you need to enable math mode for each one.In addition to that you have some other issues in your code:
center
environment but the\centering
command. The former adds unwanted vertical space and is for text paragraphs only. See Should I use center or centering for figures and tables? for further details.siunitx
packagebooktab
package. Less rules in the table make it look better.{table}[h!]
is one of the most frequent beginner issue as they don't understand the use of floats (In short: they should float!). If you want a table at a certain position in the text then thetable
environment is not a good choice (yes, confusing!). See Force figure placement in text and maybe also How to influence the position of float environments like figure and table in LaTeX? for more information.Here a version of your code with the improvements added: