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}
0