如何在乳胶桌上放一个标题

Maz*_*sin 2 latex pdflatex

我想在Latex的下表上方放置标题。

\begin{center}

\begin{tabular}{ | l | l | l | l | l | l | l | l | l | p{5cm} |}
\hline
GT & MT & PT & ML & FP & FN & ID & FM & Rc & Pr \\ \hline
abc & abc & abc & abc & abc & abc & abc & abc & abc & abc \\ \hline

\hline
\end{tabular}

\end{center}
Run Code Online (Sandbox Code Playgroud)

Nan*_*tra 7

您不制作表格,而只制作表格形式(不能有标题)。您必须先创建一个表格,然后再创建一个表格:

\begin{table}[htb]

    \centering % instead of \begin{center}
    \caption{Here you can type in your caption}
    \vspace{10mm} % Adjust the height of the space between caption and tabular

    \begin{tabular}{ | l | l | l | l | l | l | l | l | l | p{5cm} |}
        \hline
        GT & MT & PT & ML & FP & FN & ID & FM & Rc & Pr \\ \hline
        abc & abc & abc & abc & abc & abc & abc & abc & abc & abc \\ \hline
         \hline
    \end{tabular}

\end{table}
Run Code Online (Sandbox Code Playgroud)

进一步的解释:“表环境仅保留我们的其他环境,并允许在表中添加标题。实际数据包含在表格环境中,我们使用中心环境将表居中在页面上。”

  • \ hline用于表格,而不是表格(困难但重要的区别)。 (2认同)