0
\begin{table}[htbp]
  \centering
  \caption{Add caption}
    \begin{tabular}{|c|c|c|}
    \hline
    I (mA) & V (V)  \pm  0.0001 & L12 (H) \bigstrut\\
    \hline
    1   & 0.3 & 1.5 \bigstrut\\
    \hline
    2   & 0.20 & 1.30 \bigstrut\\
    \hline
    3   & 1.29 & 1.5 \bigstrut\\
    \hline
    4   & 1.9 & 1.62 \bigstrut\\
    \hline
    5   & 2.51 & 1.68 \bigstrut\\
    \hline
    6   & 3.11 & 1.2 \bigstrut\\
    \hline
    7   & 3.6 & 1.4 \bigstrut\\
    \hline
    8   & 4.5 & 1.19 \bigstrut\\
    \hline
    9   & 5.0 & 1.1 \bigstrut\\
    \hline
    10  & 6.07 & 1.8 \bigstrut\\
    \hline
    \end{tabular}
  \label{tab:addlabel}
\end{table}
6
  • 4
    please make a complete small document that shows the problem, for example \bigstrut is not defined by default, have you defined it? also \pm is a math mode command but you are setting this as text, $\pm $ Commented Feb 17, 2018 at 17:48
  • How to define \bigstrut ?
    – Vanja
    Commented Feb 17, 2018 at 17:53
  • @Vanja This depends on what you want \bigstrut to do? Commented Feb 17, 2018 at 17:54
  • OK. I deleted it. Actually the table was automatically generated from Excel to pdfLatex... Now the problem is: I (mA) & V1(V) & V2 (V) & V1/V2 & $\sqrt{\frac{$L_{1}$}{$L_{2}$}}$ & N1/N2 \\
    – Vanja
    Commented Feb 17, 2018 at 18:01
  • 1
    @Vanja: The line in your last comment uses six columns while the table in your question defines only three. Could you please turn your code snippets into a minimal (non) working example (MWE) that reproduces the error you get?
    – leandriis
    Commented Feb 17, 2018 at 18:05

2 Answers 2

3

Include the bigstrut package and change pm by $\pm$

\documentclass[]{article}

\usepackage{bigstrut}

\begin{document}


\begin{table}[htbp]
  \centering
  \caption{Add caption}
    \begin{tabular}{|c|c|c|}
    \hline
    I (mA) & V (V)  $\pm$  0.0001 & L12 (H) \bigstrut\\
    \hline
    1   & 0.3 & 1.5 \bigstrut\\
    \hline
    2   & 0.20 & 1.30 \bigstrut\\
    \hline
    3   & 1.29 & 1.5 \bigstrut\\
    \hline
    4   & 1.9 & 1.62 \bigstrut\\
    \hline
    5   & 2.51 & 1.68 \bigstrut\\
    \hline
    6   & 3.11 & 1.2 \bigstrut\\
    \hline
    7   & 3.6 & 1.4 \bigstrut\\
    \hline
    8   & 4.5 & 1.19 \bigstrut\\
    \hline
    9   & 5.0 & 1.1 \bigstrut\\
    \hline
    10  & 6.07 & 1.8 \bigstrut\\
    \hline
    \end{tabular}
  \label{tab:addlabel}
\end{table}


\end{document}

enter image description here

2

i would redesign your table on the following way:

enter image description here

\documentclass{article}
\usepackage{booktabs} % added
\usepackage{siunitx}  % added

\begin{document}
    \begin{table}[htbp]
  \centering
\caption{Add caption}
\label{tab:addlabel}
\renewcommand\arraystretch{1.1}% added
    \begin{tabular}{ S[table-format=2.0]% changed to use S column type from siunitx
                *{2}{S[table-format=1.2]}
                    }
    \toprule % rules from booktabs
{I (mA)}    &   {V (V) $\pm$ 0.0001}
                        &   {L12 (H)}   \\
    \midrule
1           &   0.3     &   1.5         \\
2           &   0.20    &   1.30        \\
3           &   1.29    &   1.5         \\
4           &   1.9     &   1.62        \\
5           &   2.51    &   1.68        \\
6           &   3.11    &   1.2         \\
7           &   3.6     &   1.4         \\
8           &   4.5     &   1.19        \\
9           &   5.0     &   1.1         \\
10          &   6.07    &   1.8         \\
    \bottomrule
    \end{tabular}
\end{table}
\end{document}

You must log in to answer this question.

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