我想给这个表添加一个标题,但 (\caption) 不起作用。我遇到了两个错误 1.未定义的控制序列。2. \caption 超出浮点数

我想给这个表添加一个标题,但 (\caption) 不起作用。我遇到了两个错误 1.未定义的控制序列。2. \caption 超出浮点数
\setlength\extrarowheight{3pt}
\setlength{\tabcolsep}{4pt}
\noindent
\begin{tabularx}{\textwidth}{|C||C||C|} 
\hline
\multicolumn{3}{|c|}{Table 1: State of The ART Schemes With Intelligent Surfaces}\\
\hline\hline
 Scheme & Architecture & Functionality \\
\hline
Intelligent wall & Active frequency selective surfaces with PIN diodes & Fully transparent reflecting surfaces\\
Spatial microwave modulators & Binary phase state tunable meta-surfaces & Shaping complex microwave fields\\
Coding meta-materials & Meta-surfaces with binary elements (0 or $\pi$ phases) & Reconfigurable scattering patterns\\
Programmable meta-surface & Meta-surfaces with PIN diode-equipped cells & Reconfigurable phase, polarization, and scattering\\
Reconfigurable reflect-arrays & Reflect-arrays with tunable (varactor-tuned) resonators & Adjustable reflection phase\\
Large intelligent surface & Active contiguous surface for transmission and reception & Gains compared to massive MIMO   \\
Software-controlled hypersurface & Meta-surfaces equipped with IoT gateways & Wave absorption, polarization, and steering\\
\hline
\end{tabularx} 

答案1

(表格\caption的)应该位于环境内table

该包caption有助于设置标题的格式,但不需要使用命令\caption

A

\documentclass[12pt,a4paper]{article}

\usepackage{array}
\usepackage{tabularx}
\usepackage{caption} % added 

\newcolumntype{C}{>{\centering\arraybackslash}X}

\begin{document}

    \noindent
    \begin{table}% added <<<<<<<<<
        \setlength\extrarowheight{3pt}
        \setlength{\tabcolsep}{4pt}
        \caption{State of The ART Schemes With Intelligent Surfaces}
    \begin{tabularx}{\textwidth}{|C||C||C|} 
%       \hline
%       \multicolumn{3}{|c|}{Table 1: State of The ART Schemes With Intelligent Surfaces}\\
%       \hline
        \hline
        Scheme & Architecture & Functionality \\
        \hline
        Intelligent wall & Active frequency selective surfaces with PIN diodes & Fully transparent reflecting surfaces\\
        Spatial microwave modulators & Binary phase state tunable meta-surfaces & Shaping complex microwave fields\\
        Coding meta-materials & Meta-surfaces with binary elements (0 or $\pi$ phases) & Reconfigurable scattering patterns\\
        Programmable meta-surface & Meta-surfaces with PIN diode-equipped cells & Reconfigurable phase, polarization, and scattering\\
        Reconfigurable reflect-arrays & Reflect-arrays with tunable (varactor-tuned) resonators & Adjustable reflection phase\\
        Large intelligent surface & Active contiguous surface for transmission and reception & Gains compared to massive MIMO   \\
        Software-controlled hypersurface & Meta-surfaces equipped with IoT gateways & Wave absorption, polarization, and steering\\
        \hline
    \end{tabularx} 
\end{table}
\end{document}

相关内容