2

I have a table:

\begin{table}[H]
    \captionsetup{font=small}
    \caption{Experiment Results}
    \begin{threeparttable}[H]
        \renewcommand\TPTminimum{\linewidth}
        \makebox[\linewidth]{% \scriptsize%
        \begin{tabular}{c|c||c|c}
            \toprule
            x & x & x & x \\
            \midrule
            y & y & y\tnote{1} & y\tnote{2} \\
            \bottomrule
        \end{tabular}}
        \begin{tablenotes}
            \item [*] AAAA
            \item [**] BBBB
            \item [1] CCCC
            \item [2] DDDD
        \end{tablenotes}
    \end{threeparttable}
\end{table}

"BBBB" in "\item [**] BBBB" starts at different position comparing to the other three, since "**" is longer than "*", "1", and "2":

* AAAA
** BBBB
1 CCCC
2 DDDD

Is there any way to make them look prettier, like:

*  AAAA
** BBBB
1  CCCC
2  DDDD

... without manual spacing?

0

1 Answer 1

1

Take a look at the following screenshot. (LaTeX code at the end of this posting.)

enter image description here

In my view, the alignment problem caused by \item[**] is insignificant when compared with the formatting problem caused by \tnote{**}.

I believe that the threeparttable machinery is designed around the idea -- AFAICT not stated explictly anywhere -- that only single symbols, characters, and numerals will ever be used as the arguments of \tnote and \item.

\documentclass{article}
\usepackage{threeparttable,array}
\begin{document}
\begin{table}[ht!]
\setlength\extrarowheight{2pt}
    \centering
        \caption{Experiment Results\strut}
        \begin{threeparttable}
        \begin{tabular}{c|c|c|c}
            \hline
            x\tnote{*} & x\tnote{**} & x & x \\
            \hline
            y & y & y\tnote{$\dagger$} & y\tnote{\S} \\
            \hline
        \end{tabular}
        
        \smallskip
        \begin{tablenotes}
            \item [*] AAAA
            \item [**] BBBB
            \item [$\dagger$] CCCC
            \item [\S] DDDD
        \end{tablenotes}
    \end{threeparttable}
\end{table}
\end{document}

You must log in to answer this question.

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