长表标题中的粗体“表”,使用 svjour3 文档类

长表标题中的粗体“表”,使用 svjour3 文档类

我正在使用svjour3类用于将 tex 文档提交给 Springer 期刊。在此类中,表格标题如下所示:

表格1表格标题示例

然而,如果我使用 longtable,我会得到如下标题:

表 2:Longtable 标题示例

我怎样才能使长表标题与 svjour3 的表格标题一致?即,我希望后一个示例如下所示:

表 2Longtable 标题示例

即使用粗体并删除“:”。

由于这将被送去审查,因此我所做的任何改变都只针对长表,并且不会干扰 Springer 的文档类。

编辑:我刚刚发现,如果我将其添加到序言中就可以了:

\usepackage[labelfont=bf,small,labelsep=space]{caption}

这也会改变其他标题,但使它们与文档类中的原始标题完全相同。考虑到我要将其提交给期刊,采用该解决方案是否是个好主意?

答案1

我重新定义了\LT@makecaptionfrom ,以便以类似于排版表格标题longtbale的方式排版标题:svjour3

\documentclass{svjour3}
\usepackage{longtable}

\makeatletter
\def\LT@makecaption#1#2#3{%
  \LT@mcol\LT@cols c{\hbox to\z@{\hss\parbox[t]\LTcapwidth{%
    \captionstyle
    \sbox\@tempboxa{{\floatlegendstyle#1{#2}\floatcounterend}\capstrut #3}%
    \ifdim\wd\@tempboxa>\hsize
      {\floatlegendstyle#1{#2}\floatcounterend}\capstrut #3\par%
    \else
      \hbox to\hsize{\leftlegendglue\box\@tempboxa\hfil}%
    \fi
    \endgraf\vskip\baselineskip}%
  \hss}}}
\LTcapwidth=\dimexpr\textwidth-2\fboxsep\relax
\makeatother  

\begin{document}

\begin{table}
\centering
\caption{a test regular table}
\begin{tabular}{ | c | c |}
test & test \\
\end{tabular}
\end{table}


\begin{longtable}{ | c | c |}
\caption{test longtable caption and some more words and some more words and some more words and some more words and some more words and some more words and some more words and some more words and some more words} \\
test & test \\
\end{longtable}

\end{document}

在此处输入图片描述

但是,由于您将其提交给期刊,因此工作人员肯定会处理您的文档并在任何情况下产生所需的结果,因此我认为您不必为重新定义而烦恼。

关于该包的使用caption,我认为你不应该加载它;加载时该包将发出警告svjour3

Unsupported document class (or package) detected, usage of the caption package is not recommended.

再次强调,期刊工作人员肯定会对您的标题做出所有必要的调整。

相关内容