当前位置:   article > 正文

Latex多行合并/多列合并详解_latex合并列

latex合并列

1、宏包

在\begin{document}前加入宏包

\usepackage{multirow} 
  • 1

2、多行合并

代码
三行合并

\multirow{3}{*}{a}
  • 1

例子

\begin{center}
	\tabcaption{表}
	\label{tab:2}
	\renewcommand\tabcolsep{1pt}%调整表格长度
	\begin{tabular}
{cccccc}\toprule
        名称&名称&名称&名称&名称& 名称\\\midrule
		\multirow{3}{*}{a}&1&2&3&4&5\\
		&1&2&3&4&5\\
        &1&2&3&4&5\\\bottomrule
\end{tabular}\end{center}

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12

在这里插入图片描述

3、多列合并

代码
四列合并

\multicolumn{4}{c}{3}
  • 1
\begin{center}
	\tabcaption{表}
	\label{tab:2}
	\renewcommand\tabcolsep{1pt}%调整表格长度
	\begin{tabular}
{cccccc}\toprule
        名称&名称&名称&名称&名称& 名称\\\midrule
		\multirow{3}{*}{a}&1&\multicolumn{4}{c}{3}\\
		&1&2&3&4&5\\
        &1&2&3&4&5\\\bottomrule
\end{tabular}\end{center}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11

在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/人工智能uu/article/detail/965352
推荐阅读
相关标签
  

闽ICP备14008679号