修改 LaTeX 目录以在章节/表格/图编号后添加句点

发布于 2024-08-25 04:14:33 字数 375 浏览 8 评论 0原文

我需要在目录/LoT/LoF 中每行的章节/表格/图号后面添加一个句点。

即,现在它显示:

TABLES
1   first
2   second

但我需要它显示:

TABLES
1.  first
2.  second

我知道这可以使用 tocloft 包来完成,但是,该包与我正在使用的乳胶样式冲突,并出现错误:\c@很多深度已经定义了。 (该样式是我大学论文格式的旧样式,但它有点过时了,所以我需要做一些更改才能正确。

我还发现我可以更改章节/表格/数字,因此它们包含句点。然而,这会弄乱我的参考文献,并且在我的所有参考文献中都有句点。

I need to add a period after the chapter/table/figure number in each line in Table of Contents/LoT/LoF.

ie, right now it shows:

TABLES
1   first
2   second

but I need it to show:

TABLES
1.  first
2.  second

I know this can be done with the tocloft package, however, that package is conflicting with the latex style I'm using, with the error: \c@lotdepth is already defined. (The style is an old style for my university's thesis format, but it's slightly out of date, so I need to make some changes to get it right.

I also found that I can change thechapter/thetable/thefigure, so those contain periods. However, that then messes up my references and has the period in all of my references.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

零度° 2024-09-01 04:14:33
\let \savenumberline \numberline
\def \numberline#1{\savenumberline{#1.}}
\let \savenumberline \numberline
\def \numberline#1{\savenumberline{#1.}}
拥抱我好吗 2024-09-01 04:14:33

这可能是对类文件本身的一个非常简单的修改。内容行格式是在那里定义的。只需找到它并添加 . 即可。

我对类文件的(有限!)经验是,即使是非常粗糙的类文件也有可读的标识符,因此您不需要了解 TeX 的所有令人讨厌的内部工作原理。

This is probably a pretty trivial hack of the class file itself. The contents line format is defined somewhere in there. Just find it and add the ..

My (limited!) experience with class files is that even pretty rough edged ones have readable identifiers, so you won't need to understand all the nasty inner workings of the TeX.

成熟的代价 2024-09-01 04:14:33

好的,所以我找到了答案。 \addcontentslines{...} 是添加实际文本的内容,因为当有五十个语句时乳胶格式很难遵循,所以我错过了它。在那里添加一个句点就解决了。

Ok, so I found the answer. The \addcontentslines{...} is what adds the actual text, and because latex formatting is difficult to follow when there's fifty statements, I was missing it. Adding a period into there took care of it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文