使用多行时,revtex4-2 中的表格中的脚注会被换行

使用多行时,revtex4-2 中的表格中的脚注会被换行

梅威瑟:

\documentclass[twocolumn,amsmath,amssymb,aps,prb]{revtex4-2}

\usepackage{multirow}
\usepackage{booktabs}

\begin{document}
\begin{table}[htbp]
    \caption{Using star * in \texttt{\textbackslash multirow}}
    \begin{ruledtabular}
    \begin{tabular}{lcc}
        \multirow{2}{*}{Layer before ligand attachment\footnote{+CH3 means one methyl group is already attached}} & \multicolumn{2}{c}{-CH3}\\
        \cmidrule{2-3}
         & RAE & eRAE \\
        \midrule
        1 Nb +CH3 & 0 & 0
    \end{tabular}
    \end{ruledtabular}
\end{table}


\begin{table}[htbp]
    \caption{Using 3cm in \texttt{\textbackslash multirow}}
    \begin{ruledtabular}
    \begin{tabular}{lcc}
        \multirow{2}{3cm}{Layer before ligand attachment\footnote{+CH3 means one methyl group is already attached}} & \multicolumn{2}{c}{-CH3}\\
        \cmidrule{2-3}
         & RAE & eRAE \\
        \midrule
        1 Nb +CH3 & 0 & 0
    \end{tabular}
    \end{ruledtabular}
\end{table}
\end{document}

这将渲染 在此处输入图片描述

我希望单元格中的文本“Layer before...”可以换行,而脚注不换行。

答案1

你不需要\multirowtabular而是嵌套一个破碎的。

\documentclass[twocolumn,amsmath,amssymb,aps,prb]{revtex4-2}

\usepackage{booktabs}

\begin{document}

\begin{table}[htbp]

\caption{A caption to the table}

\begin{ruledtabular}
\begin{tabular}{lcc}
\smash{\begin{tabular}[t]{@{}l@{}} Layer before ligand \\ attachment%
  \footnote{+CH3 means one methyl group is already attached} \end{tabular}}
& \multicolumn{2}{c}{-CH3}\\
\cmidrule{2-3}
& RAE & eRAE \\
\midrule
1 Nb +CH3 & 0 & 0
\end{tabular}
\end{ruledtabular}

\end{table}

\end{document}

在此处输入图片描述

如果您想要说明目标宽度,则可以使用\footnotemark\footnotetext机制,但由于使用了双重处理而产生扭曲ruledtabular(我发现图形很糟糕,但这是另一回事)。

\documentclass[twocolumn,amsmath,amssymb,aps,prb]{revtex4-2}

\usepackage{booktabs,array}
\newcommand{\rultabfnmark}{\footnotemark\addtocounter{mpfootnote}{-1}}

\begin{document}

\begin{table}[htbp]

\caption{A caption to the table}

\begin{ruledtabular}
\begin{tabular}{lcc}
\smash{\parbox[t]{3cm}{\raggedright
  Layer before ligand attachment\rultabfnmark}}
& \multicolumn{2}{c}{-CH3}\\
\cmidrule{2-3}
& RAE & eRAE \\
\midrule
1 Nb +CH3 & 0 & 0
\end{tabular}
\footnotetext{+CH3 means one methyl group is already attached}
\end{ruledtabular}

\end{table}

\end{document}

输出与之前相同(当然,在特定情况下)。

相关内容