Skip to content

List of listings is indented #301

@jantrienes

Description

@jantrienes

Description

The list of listings is indented, relative to LoF and LoT (see screenshot below).

It appears that this is related to some new defaults in listings package. Adding the snippet below to the preamble resolves the issue, but I can't say for sure if it is the proper implementation. Here is a related discussion.

% avoid listings's defaults overwrite the following:
\AtBeginDocument{
  \DeclareTOCStyleEntries[level=1,indent=0em,numwidth=2em,dynnumwidth=yes,pagenumberwidth=2.1em]{tocline}{lstlisting}
}

Minimal Working Example

Can be reproduced with examples/documentation.

Listings version: 1.10 (2024/02/21)

Expected behavior:
LoL should have the same alignment as LoF/LoT.

Actual behavior:
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions