1. 程式人生 > >轉:latex表格線的加粗及合併兩行

轉:latex表格線的加粗及合併兩行

轉:https://blog.csdn.net/loveaborn/article/details/9151505

在latex中要設定加粗的表格線,要使用如下包:

\usepackage{booktabs}

如下圖中的表格,首行(\toprule[2pt]),中間行(\midrule[1pt])及未尾行(\bottomrule[2pt])加粗:


對於以上表格,合併兩行使用

\multirow{2}*{男}
總的程式碼如下:


  
  1. \ begin{ table}[h]
  2. \centering
  3. \ begin{tabular}{cc|c|c|c|c}
  4. \toprule[ 2pt]
  5. & &\textbf{ Min
    } &\textbf{ Max} &\textbf{M} &\textbf{SD}\\ \midrule[ 1pt]
  6. \multirow{ 2}*{男} & 文科 & 1.00 & 5.00 & 2.55 & 1.36 \\
  7. & 理科 & 1.00
    & 4.00 & 1.86 & 0.95\\
  8. \multirow{ 2}*{女} & 文科 & 1.00 & 5.00 & 2.48 & 1.29 \\
  9. & 理科 & 1.00 & 5.00 & 2.10 & 1.28\\
  10. \bottomrule[ 2pt]
  11. \ end{tabular}
  12. \caption{各類人群日常微博使用情況描述統計表}
  13. \label{tab:wei1}
  14. \ end{ table}