ctable doinside 中 setspace 包的行为不一致

ctable doinside 中 setspace 包的行为不一致

这很奇怪:

\ctable[
doinside=\singlespacing,
%doinside=\setstretch{1}
]
{lp{5cm}}
{}
{\FL
Blubb & Blobb simply dummy text of the printing and typesetting industry. Lorem Ipsum
    has been the industry's standard dummy text ever since the 1500s. \ML
\LL
}

\singlespacing在 中doinside会出现各种错误。\doublespacing\onehalfspacing有效, 也有效\setstretch{x}。这可能是错误吗?如果是,在哪里报告? 使用 和 使用 是否能获得相同的\setstretch{1}行距\singlespacing

答案1

\doublespacing和相反\onehalfspacing\singlespacing命令还添加了一个“进入单空间的修正”(注释在 中setspace.sty),即\vskip\baselineskip,这会导致\ctable产生错误。因此,要么更改 的定义\singlespacing,要么最好\setstretch{1}在 内使用ctable

\documentclass{article}

\usepackage{setspace}

\makeatletter
\renewcommand{\singlespacing}{%
  \setstretch{\setspace@singlespace}%
%  \vskip\baselineskip% REMOVED
}
\makeatother

\usepackage{ctable}

\begin{document}

\ctable[
doinside=\singlespacing,
%doinside=\setstretch{1}
]
{lp{5cm}}
{}
{\FL
Blubb & Blobb simply dummy text of the printing and typesetting industry. Lorem Ipsum
    has been the industry's standard dummy text ever since the 1500s. \ML
\LL
}

\end{document}

在此处输入图片描述

相关内容