Tables help in Latex

posted
11-Apr-18, 22:31
by maxipat 1 star member
Avatar for maxipat
posted about 2 weeks ago
I am trying to compile my thesis in Latex and am getting multiple errors for my tables. The error I get says" Latex Error: Illegal character in array arg. My table look like the one below:

\begin{table}[h]
\centering
\begin{tabular}{||{2 cm}||{8 cm}||}
\hline
\multicolumn{2}{|c|}{Internal Combustion Engine Operating Speeds} \\
\hline
Number of Cylinders & Engine Speed\\
\hline
1 & 2500 rev/min \\
\hline
$>$ 1 & 1500 rev/min \\
\hline
\end{tabular}
\caption{Internal Combustion Engine Operating Speeds. }
\label{tab:Engine}
\end{table}

can anyone help please

Thanks
Max
posted
12-Apr-18, 03:38
by pm133
Avatar for pm133
posted about 2 weeks ago
You are missing a qualifer before {2 cm} and {8cm}.

I have used 'p' but 'm' also works. You'll need to play around with this because I don't really understand the formatting and frankly the latex documentation is dreadful.
The following will get your code to compile and display the table as a first step though.

\begin{table}[h]
\centering
\begin{tabular}{||p{2 cm}||p{8 cm}||}
\hline
\multicolumn{2}{|c|}{Internal Combustion Engine Operating Speeds} \\
\hline
Number of Cylinders & Engine Speed\\
\hline
1 & 2500 rev/min \\
\hline
$>$ 1 & 1500 rev/min \\
\hline
\end{tabular}
\caption{Internal Combustion Engine Operating Speeds. }
\label{tab:Engine}
\end{table}

Postgraduate
Forum

Copyright ©2017
All rights reserved

Postgraduate Forum

Masters Degrees

PhD Opportunities

PostgraduateForum is a trading name of FindAUniversity Ltd
FindAUniversity Ltd, Sellers Wheel, 151 Arundel Street, Sheffield, S1 2NU, United Kingdom. Tel +44 (0) 114 268 4940 Fax: +44 (0) 114 268 5766