テーブルノートの奇妙な改行 (ThreePartTable)

テーブルノートの奇妙な改行 (ThreePartTable)

私は、threeparttableおよびtablenotesパッケージを使用して、表の脚注を作成しています。必要なデザイン (上付き文字ではなく、ぶら下がり記号) を得るには、para従来の構文を使用するのではなく、オプションを使用して手動で脚注を打ち込むだけでよいことがわかりました\item[]。ただし、この方法では、記号とテキストの間に奇妙なスペースが生じます (中括弧で囲んだり、非常に短いテキスト行を使用したりしても)。脚注を で囲むとmbox問題は解決しますが、テキストが表の幅を超えてしまいます。 で囲んでpboxも問題は解決しません。

なぜこのようなことが起こるのか、また、どんな簡単な解決策があるのか​​興味があります。説明については、以下の画像とコードを参照してください。

ここに画像の説明を入力してください

ムウェ

\documentclass{scrartcl}

\usepackage{booktabs}
\usepackage[para]{threeparttable}
\usepackage{tablefootnote}
\renewcommand{\TPTnoteSettings}{\footnotesize}
\newcommand{\tabfnote}[2]{\llap{#1. }#2}

\begin{document}
\begin{table}[tbph]
    \begin{threeparttable}[t]
        \begin{tabular}{ll} \toprule
            Alpha & Beta \\
            Gamma & Delta \\ \bottomrule
        \end{tabular}
        \begin{tablenotes}
            \tabfnote{a}{Why is there space above?}\\
            \tabfnote{b}{But not above this one...}\\
            \tabfnote{c}{Or this one}
        \end{tablenotes}
    \end{threeparttable}
\end{table}
\end{document}

答え1

vertical modeの冒頭で何かが起きますがtablenotes、これはよくわかりません。しかし、\leavevmodeの定義の冒頭にを追加すると\tabfnote問題は解決します。

\documentclass{scrartcl}

\usepackage{booktabs}
\usepackage[para]{threeparttable}
\usepackage{tablefootnote}
\renewcommand{\TPTnoteSettings}{\footnotesize}
\newcommand{\tabfnote}[2]{\leavevmode\llap{#1. }#2}

\begin{document}

\begin{table}[tbph]
    \begin{threeparttable}[t]
        \begin{tabular}{ll} \toprule
            Alpha & Beta \\
            Gamma & Delta \\ \bottomrule
        \end{tabular}
        \begin{tablenotes}
            \tabfnote{a}{Why is there space above?}\\
            \tabfnote{b}{But not above this one...}\\
            \tabfnote{c}{Or this one}
        \end{tablenotes}
    \end{threeparttable}
\end{table}

\end{document} 

ここに画像の説明を入力してください

関連情報