如何在 Latex 上添加标题 table

How to put a caption on top of Latex table

我想在 Latex table 的下面添加一个标题。

\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}

您没有制作 table,而只是制作表格(不能有标题)。你必须先做一个table,然后再做一个表格:

\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}

Further explanation: "The table environment merely holds our other environments and allows to add a caption to our table. The actual data is contained in the tabular environment and we center the table on the page using the center environment."