表格注释超出页边距

表格注释超出页边距

你好,我正在使用 TeXnicCenter,在表脚写注释时遇到了问题:
使用threeparttable

\documentclass[12pt,psfig,a4,final]{article}  
\usepackage{threeparttable}  
 \begin {table}[htbp]  
 \centering  
 \begin{threeparttable}  
 \caption{Friendship Network Groups: Tie Strength\tmark[a] Comparison}  
 {\scriptsize{  
 \begin{center}  
 \begin{tabular}{p{.07\textwidth} p{.06\textwidth} p{.06\textwidth} p{.06\textwidth} p{.06\textwidth} p{.06\textwidth} p{.06\textwidth}}\\  
    \toprule  
\multirow{2}{*}{\textbf{Network}} & \textbf{Mean} & \textbf{$\mathlarger{\sum}{w_e}$} &  \textbf{$Sd$} & \textbf{$n$} & \textbf{$u$} & \textbf{Median}\\\  
 & $\hat{w}_{e_{ij}}$ &  &  &  &  \\  
\midrule  
\textbf{$g_f$} & 4.24 & 16590 & 1.90 & 580 & 3910 & 4 \\[1.0em]  
\textbf{$g_{fS}$} & 4.34 & 4954 & 1.77 & 156 & 1151 & 4 \\[1.0em]  
    \textbf{$g_{fM}$} & 4.24 & 8525 & 1.95 & 418 & 1986 & 5 \\[1.0em]  
    \bottomrule   
\begin{tablenotes}  
\item[a]{Here is estimated tie strength as the value $w_e$ given by $i$ of the edge $ij$ through a likert scale.}  
\end{tablenotes}  
\end{tabular}   
\end{center}  
}}  
\end{threeparttable}  
\end{table}  

问题是,纸条只保留在一列中,如果纸条较长,它会垂直上下移动(只保留在一列中!),而不是水平移动。
这可能有一个简单的解决方案,但我还没有找到解决方案!有人有解决方案吗?

答案1

你正在使用,\tmark[a]你应该改用\tnote{a}。你需要结束tabular环境启动tablenotes环境:

\documentclass[12pt,final]{article}  
\usepackage{threeparttable}  
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{bm}

\begin{document}

\begin{table}[htbp]  
\centering  
\begin{threeparttable}  
  \caption{Friendship Network Groups: Tie Strength\tnote{a} Comparison}  
  {\scriptsize 
  \setlength\tabcolsep{4pt} 
  \begin{tabular}{@{}p{.1\textwidth}*{6}{p{.09\textwidth}}@{}}
  \toprule  
  \multirow{2}{*}{\textbf{Network}} & \textbf{Mean} & $\displaystyle\sum{w_e}$ 
    & $\boldsymbol{Sd}$ & $\boldsymbol n$ & $\boldsymbol u$ & \textbf{Median}\\\  
  & $\hat{w}_{e_{ij}}$ & & & & \\  
  \midrule  
  $\boldsymbol{g_f}$ & 4.24 & 16590 & 1.90 & 580 & 3910 & 4 \\[1.0em]  
  $\boldsymbol{g_{fS}}$ & 4.34 & 4954 & 1.77 & 156 & 1151 & 4 \\[1.0em]  
  $\boldsymbol{g_{fM}}$ & 4.24 & 8525 & 1.95 & 418 & 1986 & 5 \\[1.0em]  
  \bottomrule   
\end{tabular}   
\begin{tablenotes}  
\item[a] Here is estimated tie strength as the value $w_e$ given by $i$ of the edge $ij$ through a likert scale.
\end{tablenotes}  
}  
\end{threeparttable}  
\end{table}  

\end{document}

在此处输入图片描述

不直接相关,但\scriptsize没有参数;还请注意,我使用\boldsymbol(来自bm包)来获取粗体数学符号。我从类选项列表中隐藏了a4psfig,因为它们无效(也许你的意思是a4paper?)。我还增加了列的宽度以防止框过满;为了补偿,我局部减少了\tabcolsep

此外,由于您的条目(至少是示例中的条目)不超过一行,因此您可以使用l列而不是p{...}行:

\documentclass[12pt,final]{article}  
\usepackage{threeparttable}  
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{bm}

\begin{document}

\begin{table}[htbp]  
\centering  
\begin{threeparttable}  
  \caption{Friendship Network Groups: Tie Strength\tnote{a} Comparison}  
  {\scriptsize 
  \begin{tabular}{@{}*{7}{l}@{}}
  \toprule  
  \multirow{2}{*}{\textbf{Network}} & \textbf{Mean} & $\displaystyle\sum{w_e}$ 
    & $\boldsymbol{Sd}$ & $\boldsymbol n$ & $\boldsymbol u$ & \textbf{Median}\\\  
  & $\hat{w}_{e_{ij}}$ & & & & \\  
  \midrule  
  $\boldsymbol{g_f}$ & 4.24 & 16590 & 1.90 & 580 & 3910 & 4 \\[1.0em]  
  $\boldsymbol{g_{fS}}$ & 4.34 & 4954 & 1.77 & 156 & 1151 & 4 \\[1.0em]  
  $\boldsymbol{g_{fM}}$ & 4.24 & 8525 & 1.95 & 418 & 1986 & 5 \\[1.0em]  
  \bottomrule   
\end{tabular}   
\begin{tablenotes}  
\item[a] Here is estimated tie strength as the value $w_e$ given by $i$ of the edge $ij$ through a likert scale.
\end{tablenotes}  
}  
\end{threeparttable}  
\end{table}  

\end{document}

相关内容