# a table of mine won't compile

I have had the problem of compiling my document with the following table in it:

\begin{table}[H]

\begin{center}
\caption{Input parameters associated with the hydraulic model} \label{parametersfinal}
\begin{tabular}{ll|ll}
\textbf{Parameter} & \textbf{Value} & \textbf{Parameter} & \textbf{Value}\\
\hline
$T_{ref}$ [K] & 273,16 & $\kappa_s$ [-] & $0,5 \cdot 10^{-3}$\\
$E_{f,ref}$ [N/m\textsuperscript{2}] & $50 \cdot 10^6$ & $r$ [-] & 0,04 \\
$E_{f,inc}$ [N/m\textsuperscript{2}/K] & $10 \cdot 10^6$ & $\beta$ [(N/m\textsuperscript{2})\textsuperscript{-1}] & $0,08 \cdot 10^{-6}$ \\
$\nu_f$ [-] & 0,45 & $\alpha$ [-] & 9 \\
$G_0$ [N/m\textsuperscript{2}] & $700 \cdot 10^6$ &  $p_{0,ref}$ [N/m\textsuperscript{2}] & -395 $\cdot 10^6$ \\
$\kappa_0$ [-] & 0,01 & $m$ [-] & 1 \\
$p^{*}_c$ [N/m\textsuperscript{2}] & $-40 \cdot 10^3$ & $(p^{*}_{y0})_{in}$ [N/m\textsuperscript{2}] & -500 $\cdot 10^3$ \\
$\lambda_0$ [-] & 0,05 & $Y_{ref}$ [m] & 0\\
$\gamma$ [-] & 1 & $\Delta p^{*}_{y0}$ [N/m\textsuperscript{2}] & 0 \\
$k_t$ [-] & 0,09 & $(S_{c,seg})_{in}$ [N/m\textsuperscript{2}] & $20 \cdot 10^6$  \\
$M$ [-] & 1,11 & $K_w$ [N/m\textsuperscript{2] & $10^9$ \\
\hline
\end{tabular}
\end{center}
\end{table}


I don't get any error messages or anything peculiar in my log, I just click the compile button and it just starts working and keeps at it forever until I abort it. Someone can help me?

• Is it safe to assume that you have a documentclass as well as \begin{document} and \end{document}? – AML May 16 at 13:32
• You're missing a } in the last \textsuperscript. – Torbjørn T. May 16 at 13:33
• Generally speaking, when compilation never stops, it usually means that the compiler is not able to reach the end of the document. In my experience, this also means a missing bracket or a missing ; in a tikz component. – Emilie Picard-Cantin May 16 at 14:40

As Torbjørn T. has already pointed out in a comment, the immediate problem is a missing } character after 2 in the expression [N/m\textsuperscript{2] in the final row of the table.

More generally, you may want to make the table [a lot!] more readable, say, by changing from 4 to 6 columns, so that the units of the parameters can be displayed in separate columns. Do also take the time to learn how to use the machinery of the siunitx package to display scientific units, and numbers, in a more LaTeX-y way, using the package's \si and \num macros.

\documentclass{article}
\usepackage{amsmath,siunitx,caption}
\sisetup{output-decimal-marker = {,},
per-mode              = symbol,
exponent-product      = \cdot,
retain-unity-mantissa = false }
\usepackage{array} % for '\newcolumntype' macro
\newcolumntype{L}{>{$}l<{$}}  % left-alignment, automatic math mode
\begin{document}
\begin{table}
\centering
\caption{Input parameters associated with the hydraulic model} \label{parametersfinal}
\begin{tabular}{@{} Lll | Lll @{}}
$Symbol$ & Units & Value &
$Symbol$ & Units & Value \\
\hline
T_{\textrm{ref}} & \si{\kelvin}$^{\strut}$ & \num{273,16} &
\kappa_s & - & \num{0,5e-3}\\
E_{f,\textrm{ref}} & \si{\newton\per\meter\squared} & \num{50e6} &
r & - & \num{0,04} \\
E_{f,\textrm{inc}} & \si{\newton\per\meter\squared\per\kelvin} & \num{10e6} &
\beta & \si{(\newton\per\meter\squared)\raiseto{-1}} & \num{0,08e-6} \\
\nu_f & - & 0,45 &
\alpha & - & 9 \\
G_0 & \si{\newton\per\meter\squared} & \num{700e6} &
p_{0,\textrm{ref}} & \si{\newton\per\meter\squared} & \num{-395e6} \\
\kappa_0 & - & 0,01 &
m & - & 1 \\
p^{*}_c & \si{\newton\per\meter\squared} & \num{-40e3} &
(p^{*}_{y0})_{\mathrm{in}} & \si{\newton\per\meter\squared} & \num{-500e3} \\
\lambda_0 & - & 0,05 &
Y_{\textrm{ref}} & \si{\meter} & 0\\
\gamma & - & 1 &
\Delta p^{*}_{y0} & \si{\newton\per\meter\squared} & 0 \\
k_t & - & 0,09 &
(S_{c,\textrm{seg}})_{\textrm{in}} & \si{\newton\per\meter\squared} & \num{20e6} \\
M & - & \num{1,11} &
K_w & \si{\newton\per\meter\squared} & \num{1e9} \\
\hline
\end{tabular}
\end{table}
\end{document}


Just for the sake of comparison, here's a screenshot of your original table. In addition to having a more "cramped" look due to the use of just 4 columns, note that there are several typographic inconsistencies (highlighted in yellow) in the right-hand column, relating to either too much whitespace after the decimal marker or the use of a text-dash symbol instead of a mathematical-minus symbol. These inconsistencies are avoided automatically if one uses the \num macro.

• A separate comment: It might make sense, in terms of enhancing the readability of the tabular material, to replace all instances of \si{\newton\per\meter\squared} with \si{\pascal}. – Mico May 16 at 17:33

More or less on the same basis, but I propose to put units in their own column. Don't use the center environment with table: it will add unwanted vertical spacing. Use the \centering command instead. With siunitx you can define your own abbreviations for units.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{siunitx, caption}
\DeclareSIUnit{\Nsqm}{\N\per\square\m}

\begin{document}

\begin{table}[h]
\centering\setlength{\extrarowheight}{3pt}
\sisetup{per-mode =symbol, exponent-product=\cdot, copy-decimal-marker}
\caption{Input parameters associated with the hydraulic model} \label{parametersfinal}
\begin{tabular}{lll|lll}
\multicolumn{2}{l}{\bfseries Parameter} & \textbf{Value} & \multicolumn{2}{l}{\bfseries Parameter} & \textbf{Value}\\
\hline
$T_\text{ref}$ & [K] & \num{273,16}& $\kappa_s$ & -- & \num{0,5e-3}\\
$E_{f,\text{ref}}$ & [\si{\Nsqm}] & \num{50 e6} & $r$ & -- & \num{0,04} \\
$E_{f,\text{inc}}$ & [\si{{\Nsqm}\per\K}] & \num{10 e6} & $\beta$ & [\si{(\Nsqm)^{-1}}]& \num{0,08e-6}\\
$\nu_f$ & -- & \num{0,45} & $\alpha$ & -- & 9 \\
$G_0$ & [\si{\Nsqm}] & \num{700 e6} & $p_{0, \text{ref}}$ & [\si{\Nsqm}] & \num{-395e6} \\
$\kappa_0$ & -- & 0,01 & \si{m} &– & 1 \\
$p^{*}_c$ & [N/m\textsuperscript{2}] & \num{-40 e3} & $(p^{*}_{y0})_{\text{in}}$ & [\si{\Nsqm}] & \num{-500 e3} \\
$\lambda_0$ & -- & \num{0,05} & $Y_\text{ref}$ & [m] & 0\\
$\gamma$ & -- & 1 & $\Delta p^{*}_{y0}$ & \si{\Nsqm}] & 0 \\
$k_t$ & -- & \num{0,09} & $(S_{c,\text{seg}})_\text{in}$ & [\si{\Nsqm}] & \num{20 e6} \\
$M$ & -- & \num{1,11} & $K_w$ & [\si{\Nsqm}] & \num{e9} \\
\hline
\end{tabular}
\end{table}

\end{document}


a small variation of nice Mico answer. differences are:

• columns with units use s column specifier
• columns with numbers use S column specifier

due to this changes the table code is slightly shorter:

\documentclass{article}
\usepackage{amsmath}
\usepackage{caption}
\usepackage{siunitx}
\sisetup{input-symbols = {( - )},
output-decimal-marker = {,},
exponent-product      = \cdot,
table-unit-alignment  = left
}
\newcommand\mcc[1]{\multicolumn{1}{c}{#1}}
\usepackage{array} % for '\newcolumntype' macro
\newcolumntype{L}{>{$}l<{$}}  % left-alignment, automatic math mode

\begin{document}
\begin{table}[htb]
\centering
\caption{Input parameters associated with the hydraulic model}
\label{parametersfinal}
\renewcommand\arraystretch{1.1}
\begin{tabular}{@{} LsS | LsS @{}}
$Symbol$            &   \mcc{Units}                         & {Value }
& $Symbol$          &   \mcc{Units}                             & {Value}   \\
\hline
T_{\textrm{ref}}    & \kelvin                               & 273,16
& \kappa_s          & {-}                                       & 0,5e-3    \\
E_{f,\textrm{ref}}  & \pascal             & 50e6
& r                 & {-}                                       & 0,04      \\
E_{f,\textrm{inc}}  & \pascal\per\kelvin  & 10e6
& \beta             & \per\pascal                               &   80e-9   \\
\nu_f               & -                                     & 0,45
&    \alpha         & -                                         & 9         \\
G_0 &  \pascal                            &  700e6
& p_{0,\textrm{ref}}& \pascal                                   &  -395e6   \\
\kappa_0 & - & 0,01 &
m & - & 1 \\
p^{*}_c             & \pascal             & -40e3
& (p^{*}_{y0})_{\mathrm{in}}
& \pascal                                   & -500e3    \\
\lambda_0           & -                                     & 0,05
& Y_{\textrm{ref}}  & \meter                                    & 0         \\
\gamma              & -                                     & 1
& \Delta p^{*}_{y0} & \pascal                                   & 0         \\
k_t                 & -                                     & 0,09
& (S_{c,\textrm{seg}})_{\textrm{in}}
&  \pascal                                  & 20e6      \\
M                   & -             &  1,11
& K_w               &  \pascal                                  & 1e9       \\
\hline

\end{tabular}
\end{table}
\end{document}


• +1. Very nice enhancements for the s column. :-) While you're at it, you might also replace all instances of \newton\per\meter\squared with \pascal, to further reduce the (code) clutter. Not sure, though, whether the alignment of the numbers in columns 3 and 6 on the respective (implicit or explicit) decimal markers is an improvement relative to simple left-alignment. – Mico May 16 at 19:47
• @Mico, i see this, but din't figured out what is behind that op one ones use "pascal" and ones it definitions .... i will corrected to "pascal" asap. – Zarko May 16 at 19:50
• @Mico, oh here is now quite late and it seems that i'm quite tired from work in my family garden :-). i will check this again and correct asap. – Zarko May 16 at 20:53