更改“列表列表"文本 [英] Change "List of Listings" text

查看:217
本文介绍了更改“列表列表"文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用命令更改列表清单"文本

I tried to change the "List of Listings" text with the command

\renewcommand*{\lstlistlistingname}{List of XYZ}

在我的\begin{document}之前.怎么了?

顺便

\renewcommand*{\lstlistingname}{NewListing}

像魅力一样工作.

没有错误发生,只是文本没有变化.仍然是清单列表".

No error occurred, just no change in the text. It's still "List of Listings".

通过这种方式,我将其包括在内:

By the way this is how I included it:

\pagestyle{scrheadings}
\pagenumbering{Roman}

\pdfbookmark[0]{\contentsname}{Contents}
\tableofcontents
\listoftables
\listoffigures
\listoflistings

\pagestyle{scrheadings}
\pagenumbering{arabic}

我已经看到,在清单列表"页面上,编号以"1"开头,但应为"V".一些提示吗?

I've seen that on the "List of Listings" page the numbering starts with "1" but it should be a "V". Some hints?

谢谢

推荐答案

使用\lstlistoflistings

\listoflistings来自listing软件包. \lstlistoflistings来自listings包(请注意复数).您不应同时使用两者.

\listoflistings is from the listing package. \lstlistoflistings is from listings package (Notice the plural). You should not use both at the same time.

如果您使用的是listing软件包,请使用

If you are using the listing package, use

\renewcommand*{\listlistingname}{List of XYZ}

更改标题.

基于\lstlistingname可以工作的事实,我得出结论,您使用了listings包.我建议从您的tex文件中删除\usepackage{listing}行.如果同时使用两个软件包:只需使用正确的命令.这两个程序包中的清单都出现在两个程序包中,并将条目放入相同的lol文件中.

From the fact that \lstlistingname works I conclude that you use the listings package. I suggest to remove the line \usepackage{listing} from your tex file. If you use both packages: Just use the right commands. Listings from both package appear in both put the entries into the same lol file.

这篇关于更改“列表列表"文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆