更改“列表列表"文本 [英] Change "List of Listings" text
问题描述
我尝试使用命令更改列表清单"文本
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屋!