c语言long乘以float溢出,longtable和floatrow的兼容性问题

floatrow功能强大,其文档超过100页,但是floatrow对longtable的支持有限

1

在floatrow文档的7.2一节:Please note that almost all settings in the \floatsetup’s argument do not work in- side longtable environments, except settings for caption width (see below) and plain horizontal alignment in the margins= key。

,大概只有caption的支持比较完善。尤其是,floatrow破坏了longtable的默认水平居中,见floatrow文档的3.6.6:

Alignment Settings for longtable. The floatrow expands some settings of table lay- out to the longtable environment, so you may set \LTleft and \LTright parameters inside \DeclareMarginSet settings. For example, centering option was defined like: \DeclareMarginSet{centering}{\setfloatmargins{\hfill}{\hfill}% \LTleft=\fill \LTright=\fill}

具体的说,floatrow宏包修改了longtable的\LTleft(longtable的左边界)和\LTright(longtable的右边接)为{0pt},导致longtable就不是默认居中了,使用floatrow的\floatset[longtable]{floatset=centering}也无济于事,只有在longtable中明确声明水平居中[c],即:

...

\usepackage{floatrow}

\begin{document}

\begin{longtable}[c]{ccc}

......

\end{longtable}

\end{document}

由于目前的LyX版本(2.2.3)在设置longtable的水平居中时,有意忽略了[c]选项的设置,因此只能采用另外一个解决方案,即在引入floatrow宏包后,马上重新设置(恢复)\LTleft和\LTright的(默认)值,即如下处理:

...

\usepackage{floatrow}

\floatset[longtable]{...}

\setlength\LTleft{\fill}

\setlength\LTright{\fill}

d4c39bd54dfbfe627dbd9fe226767b2c.png

0

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值