使用多行時,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

你不需要\multirow:嵌套一個粉碎的tabular

\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}

輸出與以前相同(當然,在特定情況下)。

相關內容