zoukankan      html  css  js  c++  java
  • 【转】Letax表格内单元格换行

    转自:http://blog.sina.com.cn/s/blog_531bb7630101841e.html

    /newcommand{/tabincell}[2]{/begin{tabular}{@{}#1@{}}#2/end{tabular}}%放在导言区
    %然后使用&/tabincell{c}{}&就可以在表格中自动换行
    %比如这么用
    /begin{tabular}{|c|c|}
    /hline
    1 & the first line //
    /hline
    2 & /tabincell{c}{haha// heihei//zeze} //
    /hline
    /end{tabular}
    以下为一例子,可直接存为.tex文件编译运行:
    documentclass[a4paper,12pt]{article}
    egin{document}
    egin{table}
    ewcommand{ abincell}[2]{egin{tabular}{@{}#1@{}}#2end{tabular}}
      centering
      egin{tabular}{|c|c|c|}hline
    1 & abincell{c}{the first line \ the next\the next\ last} & abincell{c}{one \ one}\hline
    2 & abincell{c}{hello\ aha\ ok \yes \en} & abincell{c}{two \ two \ two} \hline
    end{tabular}
      caption{longtitle}
    end{table}
    end{document}
    结果如下图:

     

  • 相关阅读:
    pyinstaller相关用法
    yield 与 yield from
    async /await相关知识理解
    调试程序方法pdb
    任务22-4
    任务22-2
    跳台阶
    计算三维空间某点距离原点的欧式距离
    质数判断
    罗马数字转换
  • 原文地址:https://www.cnblogs.com/Dontstop/p/6658557.html
Copyright © 2011-2022 走看看