1

I am trying to produce a table within the document however it isn't working as it just comes up with an error saying

\hline -> \noalign

and I don't know what this means and all of the other tables within this document have the exact same layout and they work fine. My code is as follows:

\begin{table}[ht]
\caption{Numerical Prefixes}
\centering
\begin{tabular}{c c}
\hline
Number & Prefix\\
%heading
\hline
1 & Mono\\
2 & Di (bis)\\
3 & Tri (tris)\\
4 & etra (Tetrakis)\\
5 & Penta (pentakis)\\
6 & Hexa (hexakis)
\hline
\end{tabular}
\label{table:nonlin}
\end{table}

I know this isn't the typical way to write code on here but I'm not sure how to lay it out in that way. Any help would be great.

1
  • 2
    6 & Hexa (hexakis) should actually be 6 & Hexa (hexakis)\\ If the table row has not been ended, you can not add a \hline. – leandriis Apr 3 '19 at 20:55
1

You're missing a '\\' at the end of 6 & Hexa (hexakis).

\begin{table}[ht]
\caption{Numerical Prefixes}
\centering
\begin{tabular}{c c}
\hline
Number & Prefix\\
%heading
\hline
1 & Mono\\
2 & Di (bis)\\
3 & Tri (tris)\\
4 & etra (Tetrakis)\\
5 & Penta (pentakis)\\
6 & Hexa (hexakis)\\
\hline
\end{tabular}
\label{table:nonlin}
\end{table}

Without really knowing, I think the broad overview of what happened was you are asking it to put a horizontal line through your "6 & Hexa (hexakis)" and it didn't like that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.