Graphics, Figures & TablesCreating list of source code listings

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
marcisSrarcin95
Posts: 2
Joined: Sat Nov 25, 2017 12:36 pm

Creating list of source code listings

Post by marcisSrarcin95 »

Hi,

I'm new to latex and I'm using source code listings definition from this link -> https://www.overleaf.com/latex/examples ... de-listing. Everything works fine but I need to have a list of this code listings, something like \listoftables. Maybe there is a way to create own list of listings or to put them to \listoftables.

Any help would be appreciated!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

Creating list of source code listings

Post by rais »

Look for \lstlistoflistings in the listings documentation.

KR
Rainer
marcisSrarcin95
Posts: 2
Joined: Sat Nov 25, 2017 12:36 pm

Creating list of source code listings

Post by marcisSrarcin95 »

Thank You!!


It was enough to do:

\lstlistoflistings
\addcontentsline{toc}{chapter}{Spis listingów}

in main file.
Post Reply