长桌的两行标题?

长桌的两行标题?

我无法显示如图所示的两行标题。有人能帮忙解决这个问题吗?MWE 如下:

\documentclass[10pt,a4paper,oneside]{article}
\usepackage[a4paper,left=0.9in,right=0.9in,top=1in,bottom=1in]{geometry}
\usepackage{longtable}

\renewcommand{\familydefault}{ppl}

\begin{document}
    \pagestyle{empty}

    \noindent
    \begin{longtable}[t]{l l l}
        \caption*{\textbf{CAPTION}} \\
        \hline
        \textbf{Head 1} & \textbf{Head 2} & \textbf{Head 3} \\   
        \hline
        X1   & \quad A & \enspace B \\   
        X1   & \quad A & \enspace B \\   
        X1   & \quad A & \enspace B \\   
        X1   & \quad A & \enspace B \\   
        X1   & \quad A & \enspace B \\   
        \hline
    \end{longtable}
    \vspace{1mm}
    \centering{\textbf{Some text}}\\
    \scriptsize{(Some more text)}\\
    \scriptsize{(Target text is here)}

\end{document}

在此处输入图片描述

答案1

您确实需要这个包caption

% arara: pdflatex

\documentclass[oneside]{article}
\usepackage[a4paper,left=0.9in,right=0.9in,top=1in,bottom=1in]{geometry}
\usepackage{longtable}
\usepackage{booktabs}
\usepackage{caption}
\usepackage{blindtext}
\usepackage[sc]{mathpazo}

\begin{document}
    \pagestyle{empty}

    \begin{longtable}{lcl}
        \caption*{\textbf{CAPTION}\\\scriptsize (Target text is here)} \\
        \toprule
        \textbf{Head 1} & \textbf{Head 2} & \textbf{Head 3} \\   
        \midrule
        X1   &  A & \enspace B \\   
        X1   &  A & \enspace B \\   
        X1   &  A & \enspace B \\   
        X1   &  A & \enspace B \\   
        X1   &  A & \enspace B \\   
        \bottomrule
    \end{longtable}   

    \begin{center}
        \textbf{Some text}\\
        \scriptsize (Some more text)\\
        (Target text is here)
    \end{center}
    \blindtext
\end{document}

相关内容