如何在长桌的 LoT 中包含单词“Table”?

如何在长桌的 LoT 中包含单词“Table”?

我正在使用大学提供的软件包撰写论文。当我编译文档时,LoT 显示如下: 很多 您知道我如何在附录 C 表格(C.1、C.2、C3)中添加“表格”一词吗?这些表格是长表格。我看过附录的辅助文件,其中有这些长表格,其编译如下:

\@writefile{lot}{\contentsline {table}{\numberline {C.1}{IEEE 118-bus test system - Bus data}}{64}{table.208}}

但我知道我需要如下相同的行(我需要的是 {Table\nobreakspace C.1} 而不是 {C.1}):

\@writefile{lot}{\contentsline {table}{\numberline {Table\nobreakspace C.1}{IEEE 118-bus test system - Bus data}}{64}{table.208}}

您有什么办法可以纠正这个问题吗?

答案1

由于没有设置或线索使用哪个类,我提供了一个通用的解决方案tocloft\cfttabpresnum命令(使用在中排版表格编号之前的空间LoT)以及通过向中添加一些值来增加数字宽度\cfttabpresnumwidth

\documentclass{book}

\usepackage{longtable}
\usepackage{tocloft}
\renewcommand{\cfttabpresnum}{\tablename\ }
\addtolength{\cfttabnumwidth}{30pt}
\usepackage{caption}
\begin{document}
\tableofcontents
\listoftables


\appendix
\chapter{Foo}
\begin{longtable}{ll}
foo & foo \\
\caption{This is my table}
\endfirsthead
\end{longtable}
\end{document}

在此处输入图片描述

相关内容