加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

LaTeX技巧154:实现如下表格标题样式

(2009-12-11 18:29:10)
标签:

latex

格式

例子

表格

标题样式

分类: 小技巧

QQ群:91940767/145316219/141877998/80300084/194770436
淘宝店:http://latexstudio.taobao.com
技巧续篇:http://latexstudio.net/
常见数学公式问题集下载

效果图:

LaTeX技巧154:实现如下表格标题样式

实现代码:

\documentclass{article}
\makeatletter
\long\def\@makecaption#1#2{%
\vskip\abovecaptionskip
\sbox\@tempboxa{#2}%
\makebox[\hsize][c]{\bf #1.}
\ifdim \wd\@tempboxa >\hsize
#2
\else
   \global \@minipagefalse
   \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
\fi
\vskip\belowcaptionskip}
\makeatother
\begin{document}
  \begin{table}
  \centering
  \caption{\bf The Title of Table}
 \begin{tabular}{|l|l|} \hline
  \multicolumn{2}{|c|}{Team sheet} \\ \hline
  GK & Paul Robinson \\ LB & Lucus Radebe \\
   DC & Michael Duberry \\ DC & Dominic Matteo
   \\ RB & Didier Domi \\ MC & David Batty \\
    MC & Eirik Bakke \\ MC & Jody Morris \\
     FW & Jamie McMaster \\ ST & Alan Smith \\
     ST & Mark Viduka \\ \hline
     \end{tabular}
  \end{table}
\end{document}

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有