Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the title of "List of Listings" #270

Open
xiehao opened this issue Apr 9, 2023 · 0 comments
Open

Change the title of "List of Listings" #270

xiehao opened this issue Apr 9, 2023 · 0 comments

Comments

@xiehao
Copy link

xiehao commented Apr 9, 2023

Description

I would like to change the name of "List of Listings" to something like "List of Code", but failed.
Currently I am using the minted package, and adding the following commands as its doc says:

  • \renewcommand{\listingscaption}{Code}
  • \renewcommand{\listoflistingscaption}{List of Code}

The first one works, but the second failed.

Minimal Working Example

\documentclass{kaobook}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{kaobiblio}
\usepackage{kaotheorems}
\usepackage{kaorefs}

% Using the `minted` package and do some configurations
\usepackage{minted}
\renewcommand{\listingscaption}{Code} % This works
\renewcommand{\listoflistingscaption}{List of Code} % This does not work!

\begin{document}

\title{Bug Report}
\author{Author}
\date{\today}

\frontmatter
\maketitle

\listoflistings % Add a list of listings

\mainmatter
\setchapterstyle{kao}

\chapter{First Chapter}
\blindtext

% Add a piece of demo code
\begin{listing}[H]
    \caption{A piece of demo code}
    \begin{minted}[autogobble,linenos]{cpp}
        import <iostream>;
        
        int main() {
            std::cout << "Hello" << std::endl;
            return 0;
        }
    \end{minted}
\end{listing}

\end{document}

Expected behavior:
The title name above should be changed to "List of Code".

Actual behavior:
It remains as "List of Listings".

Additional Information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant