\noalign 错误?

\noalign 错误?
Misplaced \noalign.
\hline ->\noalign 
                  {\ifnum 0=`}\fi \hrule \@height \arrayrulewidth \futurelet...
l.94 \hline

这是我的代码:

\begin{tabular}{ |p{2cm}|p{2cm}|p{1.8cm}| }
\hline
\multicolumn{3}{|c|}{Voltage, Current, and Radius Observed}
\hline
Voltage (Volts) & Current (Amps) & Diameter (cm)
\hline
1.94 & 437.5 & 9.8
1.94 & 527 & 10.6
\end{tabular}

答案1

您的代码缺少行尾命令:

\documentclass{book}

\begin{document}

\begin{tabular}{ |p{2cm}|p{2cm}|p{1.8cm}| } 
\hline

\multicolumn{3}{|c|}{Voltage, Current, and Radius Observed}\\%<--
\hline

Voltage (Volts) & Current (Amps) & Diameter (cm)\\%<---
\hline

1.94 & 437.5 & 9.8\\ %<---
1.94 & 527 & 10.6

\end{tabular}
\end{document}

相关内容