用latex写表格用了\multirow命令时合并单元格内容无法换行问题

查遍了各种方法,什么包都不好用,最简单好用的方法还是弄明白\multirow的参数含义,一步就搞好:设置好表宽度后,把{*}换成{=}

\multirow[〈vpos〉]{〈nrows〉}[〈bigstruts〉]{〈width〉}[〈vmove〉]{〈text〉}

〈vpos〉 defines the vertical positioning of the text in the multirow block. The default is [c] which means the text will be vertically centered. Other options are [t] for top alignment and [b] for bottom alignment.

〈nrows〉 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 〈nrows〉 the spanned columns are this row and (〈nrows〉-1) rows below it. With a negative value of 〈nrows〉 they are this row and (-〈nrows〉-1) above it. Fractional values are permitted for 〈nrows〉; this allows for some fine-tuning.

〈bigstruts〉 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[〈x〉] where 〈x〉 is either t or b. The default is 0. The 〈bigstruts〉 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.

〈width〉 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.

〈vmove〉 is a length used for fine-tuning: the text will be raised (or lowered, if 〈vmove〉 is negative) by that length above (below) wherever it would other wise have gone.

〈text〉 is the actual text of the construct. If the width was set explicitly, the text will be set in a \parbox of that width; you can use \\ to force linebreaks where you like. If the width was given as * the text will be set in LR mode. If you want a multiline entry in this case you could use a tabular or array environment in the text parameter. See for example the minitab below. The width can also be given as = when the \multirow entry is given in a column that has a defined width, for example in a p{} column, an X column in tabularx or a L, C, R or J column in a tabulary environment. The text will be set in a \parbox of that width. If you give “=” in other situations, you will get strange results (usually a too wide column).

各种现成代码中都会用{*}

问题在于〈width〉 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

指导PDF见LaTeX表格中使用multirow和multirowcell换行时左对齐的方法_makecell左对齐-优快云博客

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值