在“TABLE #”字样下方添加标题表格

在“TABLE #”字样下方添加标题表格
\documentclass{article}
\usepackage[labelsep=period]{caption}

\begin{document}

\begin{table}
    \centering
    \caption{This is example of table. abcdefghijkl This is example of table. This is example of table. This is example of table. This is example of table. This is example of table.}
    \begin{tabular}{|c|c|}
        \hline
        No&Alphabet\\
        \hline
        1&a\\
        2&b\\
        3&c\\
        \hline
    \end{tabular}
\end{table}
\end{document}

如何制作如下所示的标题表?我不知道该怎么做。

在此处输入图片描述

TABLE #
CAPTION

答案1

您可以为标题定义自己的风格。

\documentclass{article}
\usepackage{caption}
\DeclareCaptionLabelSeparator{par}{\par}
\DeclareCaptionLabelFormat{Wijaya}{\hfil\MakeUppercase{#1}\space \Roman{table}}
\DeclareCaptionTextFormat{sc}{{\scshape #1}}
\captionsetup{labelsep=par, labelformat=Wijaya, textformat=sc}
\begin{document}
    
    \begin{table}
        \centering
        \caption{This is example of table. abcdefghijkl This is example of table. This is example of table. This is example of table. This is example of table. This is example of table.}
        \begin{tabular}{|c|c|}
            \hline
            No&Alphabet\\
            \hline
            1&a\\
            2&b\\
            3&c\\
            \hline
        \end{tabular}
    \end{table}
\end{document}

在此处输入图片描述

相关内容