1

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}
2
  • 2
    V_n \le 1 kV should be in math mode Commented Jan 7, 2019 at 12:00
  • 2
    $V_n$ and $\le$ -> Math mode. Please read an introduction to LaTeX.
    – Johannes_B
    Commented Jan 7, 2019 at 12:01

1 Answer 1

2

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 a tabular 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:

Here a version of your code with the improvements added:

\documentclass{article}
\usepackage{blindtext}% for example text here only
\usepackage{multirow}
\usepackage{caption} % proper table caption distance
\usepackage{booktabs} % book quality table lines
\usepackage{siunitx} % format SI units
\sisetup{output-decimal-marker = {,}} % use comma as decimal marker

\begin{document}
\blindtext

\begin{table}[h!]
\caption{Valores de referência para as distorções harmônicas totais de tensão.}
\centering % don't use {center} environment, which is for text paragraphs only and add unwanted vertical space before and after
\label{limites_distorcao}
\begin{tabular}{cccc}
\toprule
\multirow{2}{*}{Indicador} & \multicolumn{3}{c}{Tensão Nominal do Barramento}                                                          \\[.25ex]  
                           & $V_n \le \SI{1}{\kilo\volt} $ & $ \SI{1}{\kilo\volt} \le V_n \le \SI{69}{\kilo\volt} $ & $ \SI{69}{\kilo\volt} \le V_n \le \SI{230}{\kilo\volt} $\\ \midrule
$DHTvI_i$                  & \SI{7,5}{\%}                  & \SI{6}{\%}                                 & \SI{4}{\%}                                         \\ 
$DHTv3_i$                  & \SI{6,5}{\%}                  & \SI{5}{\%}                                 & \SI{3}{\%}                                         \\ 
\bottomrule
\end{tabular}

\end{table}

\blindtext

\end{document}

enter image description here

You must log in to answer this question.

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