in my thesis I have a few R scripts at the very end, as an Appendix. Within the appendix itself I want the \lstlistoflistings.
This formats the list as a chapter (same as for the toc).
How can I format it as section? I just want to avoid the page break after the chapter title and have the list right after it, with a smaller font.
Here is a minimal working example
\documentclass{report}
\usepackage{listings}
\lstset{language=R}
\renewcommand{\lstlistlistingname}{List of R scripts}
\begin{document}
\tableofcontents
\chapter{the first chapter}
\section{section1}
some text
\chapter{the second chapter}
\addcontentsline{toc}{chapter}{Appendix A}
\chapter*{Appendix A}
\lstlistoflistings
\newpage
\begin{lstlisting}[caption=A script]
some code
\end{lstlisting}
\begin{lstlisting}[caption=Another script]
some more code
\end{lstlisting}
\end{document}
Thanks!

