Text Formatting ⇒ listings | Change the Listings Entry in ToC
listings | Change the Listings Entry in ToC
I added the list of listings at the end of my document, and its entry is appearing in the Table of Content (just before the table of figures), which is nice. However, its name is simply "Listings" in the ToC, and I would like to change it to "Liste des codes" (in French). How can I do that ?
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
listings | Change the Listings Entry in ToC
Hi Cham,
redefine
Stefan
redefine
\lstlistlistingname
, this macro contains the header name for the list of listings, as described in the listings
documentation.Code: Select all
\renewcommand*{\lstlistlistingname}{Liste des codes}
LaTeX.org admin
Re: listings | Change the Listings Entry in ToC
Great. Now, why the "*" in this command ?
And one last glitch : currently, the list is working, but their number aren't right for the codes from my appendix. I simply get something like this :
1 Code bla bla
2 Code bla bla bla
instead of
A.1 Code bla bla
A.2 Code bla bla bla
And one last glitch : currently, the list is working, but their number aren't right for the codes from my appendix. I simply get something like this :
1 Code bla bla
2 Code bla bla bla
instead of
A.1 Code bla bla
A.2 Code bla bla bla
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
listings | Change the Listings Entry in ToC
An answer is here:Cham wrote:Great. Now, why the "*" in this command ?
Stefan_K wrote:The star marks a "short command", parameters for such commands must not contain paragraph breaks, making it easier to locate errors with some LaTeX error messages. That's why I prefer short commands when their parameters cannot exceed a paragraph, that's also the case when there are no parameters at all.
You need a chapter or a section for your appendix. Perhaps post with details (class, how you make the appendix). Also here, a new thread would be appropriate, as readers don't expect such a question here, as the title is about ToC entries.Cham wrote:currently, the list is working, but their number aren't right for the codes from my appendix.
Stefan
LaTeX.org admin
Re: listings | Change the Listings Entry in ToC
Ok.
But the case of my appendix is a bit complicated anyway. I'll start a new topic about it later.
Thanks again for your precious help, Stefan.
But the case of my appendix is a bit complicated anyway. I'll start a new topic about it later.
Thanks again for your precious help, Stefan.