效果图:

代码如下:

\documentclass{article}
\usepackage{booktabs}

\makeatletter
\newsavebox{\@tabnotebox}
\providecommand\tmark{} % so having ctable or not is irrelevant
\providecommand\tnote{}
\newenvironment{tabularwithnotes}[3][c]
{\long\def\@tabnotes{#3}%
\renewcommand\tmark[1][a]{\makebox[0pt][l]{\textsuperscript{\itshape##1}}}%
\renewcommand\tnote[2][a]{\textsuperscript{\itshape##1}\,##2\par}
\begin{lrbox}{\@tabnotebox}
\begin{tabular}{#2}}
{\end{tabular}\end{lrbox}%
\parbox{\wd\@tabnotebox}{
\usebox{\@tabnotebox}\par
\smallskip\@tabnotes
}%
}
\makeatother

\begin{document}
\begin{table}
\centering
\caption{Somewhat long long long caption which is long}
\medskip
\begin{tabularwithnotes}{lr}
{
\tnote[a]{Short footnote}
\tnote[b]{Short footnote}
}
\toprule
Header 1 & Header 2 \\
\midrule
foo\tmark[a] & 1\tmark[b] \\
\bottomrule
\end{tabularwithnotes}
\end{table}
\end{document}  

选自:http://tex.stackexchange.com/questions/51793/caption-and-footnote-width-with-ctable

点赞(0)

评论列表 共有 0 条评论

暂无评论
立即
投稿

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部