[Tex/LaTex] Table caption: place “Table” label above caption

captionstables

I require a method for captioning tables according to IEEE standards as follows:

enter image description here

Specifically, "TABLE I" must be above the caption itself.

For the record, I am aware of the \documentclass{ieeetran} which will give me exactly the table captioning I want, but this comes with a whole host of other formatting which I neither want nor require for my purposes.

So, here is my MWE:

\documentclass[12pt]{report}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{float}
\renewcommand*\thetable{\Roman{table}}
\renewcommand*{\tablename}{TABLE}
\usepackage{cleveref}

\begin{document}

\noindent \Cref{tab:table} demonstrates my current table-captioning method.

\begin{table}[H]
    \centering
    \caption[Alphanumeric Data]{ALPHANUMERIC DATA}
    \vspace{0.2cm}
    \begin{tabularx}{\textwidth}{X X X X}
        \toprule
         & \bf x & \bf y & \bf z \\
        \midrule
        \bf A & 1 & 2 & 3 \\
        \bf B & 4 & 5 & 6 \\
        \bf C & 7 & 8 & 9 \\
        \bottomrule
    \end{tabularx}
    \label{tab:table}
\end{table}

\end{document}

enter image description here

How do I put "TABLE I" above the caption itself and remove the colon so I get the output I showed in the first picture?

Thanks in advance.

Best Answer

caption offers labelsep = newline, as well as other options that might provide what you're looking for:

enter image description here

\documentclass{report}

\usepackage{caption}
\usepackage{cleveref}

\renewcommand*\thetable{\Roman{table}}

\captionsetup[table]{
  labelsep = newline, % Label and caption on separate line
  font = sc % Small caps font for caption
}  

\begin{document}

\noindent \Cref{tab:table} demonstrates my current table-captioning method.

\begin{table}
  \centering
  \caption{A table}
  \label{tab:table}
  \begin{tabular}{ *{3}{c} }
    \hline
    A & B & C \\
    \hline
  \end{tabular}
\end{table}

\end{document}