当前位置:   article > 正文

Latex 公式 合并行与列_latex表格合并两列

latex表格合并两列

问题

latex 编辑公式时需要合并行与列

实例

使用 \multirow\multicolumn



% \footnotesize
\small
\begin{equation}
  \Delta l_p  = \left
		\{  
    \setlength\arraycolsep{2pt}
\begin{array}{lll} 
  A , &  F,  & \multirow[t]{2}{1cm}{$ \mathrm{for~} k = 3,6,7, $}  \\ 

  B, & G,  &   \\ 

  C , & H,  & \multirow[t]{2}{1cm}{$ \mathrm{for~} k = 2,10,8, $} \\ 

  D, & I,  &  \\
  
  E, & \multicolumn{2}{c}{\mathrm{for~} k=10, 4,}
  \end{array}
  \right.
  \label{Eq::Length}
\end{equation}
\normalsize
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23

在这里插入图片描述

\multirow

The multirow, bigstrut and bigdelim packages

\multirow[hvposi]{hnrowsi}[hbigstrutsi]{hwidthi}[hvmovei]{htexti}
  • 1
  • hvposi defines the vertical positioning of the text in the multirow block. Thedefault is [c] which means the text will be vertically
    centered. Other options are [t] for top alignment and [b] for bottom alignment.

  • hnrowsi is the number of rows to span. You should leave the other rows empty at this column, otherwise the stuff created by \multirow
    will over-write it. With a positive value of hnrowsi the spanned columns are this row and (hnrowsi-1) rows below it. With a negative
    value of hnrowsi they are this row and (1-hnrowsi) above it. Fractional values are permitted for hnrowsi; this allows for some fine-tuning.

  • hbigstrutsi is mainly used if you’ve used the bigstrut package. In that case it is the total number of uses of \bigstrut within the rows
    being spanned. Count 2 uses for each \bigstrut, 1 for each \bigstrut[hx i] where hx i is either t or b. The default is 0. The hbigstrutsi parameter can optionally be preceded by a prefix letter t, b or tb for finer control. See section 3.5 for details. The letter may be separated from the number by a space character.

  • hwidthi is the width to which the text is to be set. Special values are * to indicate that the text parameter’s natural width is to be
    used, and = to indicate that the specified width of the column in which the \multirow entry is set should be used.

  • hvmovei is a length used for fine-tuning: the text will be raised (or lowered, if hvmovei is negative) by that length above (below) wherever it would otherwise have gone.

可以通过 [hvmovei] 参数调整合并后 竖直方向位置。没有找到直接可以使用的 垂直居中 命令。

\multicolumn{1}{c}{\multirow{3}[2]{*}[-0.5em]{Heat Y}} 
  • 1

参考

The multirow, bigstrut and bigdelim packages
Vertical Alignment in multirow using cells with >1 lines

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

闽ICP备14008679号