2

I am inserting two tabulars in one table for Panels A and B. The table has one caption, and each tabular also has one caption* as follows.

\documentclass{article}
\usepackage{caption}
\begin{document}
\begin{table}
\centering
\caption{SHORT TITLE}
\caption*{Panel A. LONG DESCRIPTION}
\begin{tabular}{*5c} \hline
0 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 0 \\ \hline
\end{tabular}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%             I ALSO NEED A GAP HERE             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\caption*{Panel B. LONG DESCRIPTION}
\begin{tabular}{*5c} \hline
0 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 0 \\ \hline
\end{tabular}
\end{table}
\end{document}

And I found that the gap between the first tabular and the second caption* is too tight. The other three gaps (caption-caption*, caption*-tabular, caption*-tabular) are OK. Why do they have different gaps?

I also tried subtables as follows, but still the tight gap looks ugly.

\documentclass{article}
\usepackage{caption,subcaption}
\begin{document}
\begin{table}
\centering
\caption{SHORT TITLE}
\begin{subtable}{\textwidth}
\centering
\subcaption{Panel A. LONG DESCRIPTION}
\begin{tabular}{*5c} \hline
0 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 0 \\ \hline
\end{tabular}
\end{subtable}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%              STILL NO GAP APPLIED              %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{subtable}{\textwidth}
\centering
\subcaption{Panel B. LONG DESCRIPTION}
\begin{tabular}{*5c} \hline
0 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 0 \\ \hline
\end{tabular}
\end{subtable}
\end{table}
\end{document}

Here I add my version (\vspace{10pt} for \caption* and \vspace{6pt} for \subcaption*) but don't know if best.

\documentclass{article}
\usepackage{caption}
\begin{document}
\begin{table}
\centering
\caption{SHORT TITLE}
\caption*{Panel A. LONG DESCRIPTION}
\begin{tabular}{*5c} \hline
0 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 0 \\ \hline
\end{tabular}\vspace{10pt}

\caption*{Panel B. LONG DESCRIPTION}
\begin{tabular}{*5c} \hline
0 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 0 \\ \hline
\end{tabular}
\end{table}
\end{document}
5
  • Looks like subtables. What is supposed to be \caption* w.r.t. \caption?
    – Bernard
    Commented Sep 12, 2020 at 21:45
  • I am using captions for short titles and caption*s for long descriptions. Commented Sep 12, 2020 at 21:55
  • I think it would be semantically better to use subtables.
    – Bernard
    Commented Sep 12, 2020 at 21:57
  • subtables show the same problem. Commented Sep 12, 2020 at 22:37
  • Try loading the caption package. When the caption is above the floating object, latex doesn't swap the values of \abovecaptionskip and \belowcaptionskip.
    – Bernard
    Commented Sep 12, 2020 at 22:41

1 Answer 1

1

Perhaps this example will help.

\documentclass{article}

\RequirePackage{float}
\RequirePackage{caption}

\begin{document}
    
\centerline{SHORT TITLE}

    \begin{table}[H]
        \centering      
        \caption*{Panel A. LONG DESCRIPTION}
        \begin{tabular}{*5c} \hline
            0 & 0 & 0 & 0 & 0 \\
            0 & 0 & 0 & 0 & 0 \\ \hline
        \end{tabular}
    \end{table}     
        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                     I ALSO NEED A GAP HERE             %
        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \begin{table}[H]    
            \centering
        \caption*{Panel B. LONG DESCRIPTION}
        \begin{tabular}{*5c} \hline
            0 & 0 & 0 & 0 & 0 \\
            0 & 0 & 0 & 0 & 0 \\ \hline
        \end{tabular}
    \end{table}

\end{document}

enter image description here

Or this one: (you can also use \subcaption*{⟨heading⟩} )

\documentclass{article}
\usepackage{subcaption}
\begin{document}

\begin{table}
    \caption{FULL CAPTION}
    \begin{subtable}[t]{.5\linewidth}
      \centering
     \subcaption{    Panel A. LONG DESCRIPTION \\LONG DESCRIPTION }
        \begin{tabular}{*5c} \hline
            0 & 0 & 0 & 0 & 0 \\
            0 & 0 & 0 & 0 & 0 \\ \hline
        \end{tabular}
    \end{subtable}%
    \begin{subtable}[t]{.5\linewidth}
      \centering
    \subcaption{  Panel B. LONG DESCRIPTION \\ LONG DESCRIPTION}
      \begin{tabular}{*5c} \hline
        0 & 0 & 0 & 0 & 0 \\
        0 & 0 & 0 & 0 & 0 \\ \hline
      \end{tabular}
    \end{subtable} 
\end{table}

\end{document}

enter image description here

UPDATE after the comment. Put everything in a table environment.

\documentclass{article}

\RequirePackage{float}
\RequirePackage{caption}

\begin{document}

\begin{table}
      
\caption{SHORT TITLE 1}

    \begin{table}[H]
        \centering      
        \caption*{Panel A. LONG DESCRIPTION}
        \begin{tabular}{*5c} \hline
            0 & 0 & 0 & 0 & 0 \\
            0 & 0 & 0 & 0 & 0 \\ \hline
        \end{tabular}
    \end{table}     
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                 I ALSO NEED A GAP HERE             %
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \begin{table}[H]    
        \centering
        \caption*{Panel B. LONG DESCRIPTION}
        \begin{tabular}{*5c} \hline
            0 & 0 & 0 & 0 & 0 \\
            0 & 0 & 0 & 0 & 0 \\ \hline
        \end{tabular}
    \end{table}

\end{table}

\noindent ANOTHER GAP HERE    

\begin{table}[H] 
  
    \caption{SHORT TITLE 2}
    
    \begin{table}[H]
        \centering      
        \caption*{Panel C. LONG DESCRIPTION}
        \begin{tabular}{*5c} \hline
            0 & 0 & 0 & 0 & 0 \\
            0 & 0 & 0 & 0 & 0 \\ \hline
        \end{tabular}
    \end{table}     
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
PLUS ANOTHER GAP HERE               %
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \begin{table}[H]    
        \centering
        \caption*{Panel D. LONG DESCRIPTION}
        \begin{tabular}{*5c} \hline
            0 & 0 & 0 & 0 & 0 \\
            0 & 0 & 0 & 0 & 0 \\ \hline
        \end{tabular}
    \end{table}
    
\end{table}

\end{document}

enter image description here

3
  • Thanks, but I need (1) my caption numbering unchanged and (2) my tables located vertically—I added my second version above. Commented Sep 12, 2020 at 22:54
  • @Junyong Kim Please my updated answer. Commented Sep 12, 2020 at 23:28
  • float works. Thank you. Commented Sep 12, 2020 at 23:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .