问题
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
\multirow
The multirow, bigstrut and bigdelim packages
\multirow[hvposi]{hnrowsi}[hbigstrutsi]{hwidthi}[hvmovei]{htexti}
-
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}}
参考
The multirow, bigstrut and bigdelim packages
Vertical Alignment in multirow using cells with >1 lines