
\lstlistoflistings
與表格列表 ( ) 相比,列表(來自)是縮排的\listoftables
。如何去除多餘的凹痕?
\documentclass{memoir}
\usepackage{listings}
\begin{document}
\listoftables
\lstlistoflistings
\chapter{The chapter}
\begin{table}[h]
\caption{Table}
\end{table}
\begin{lstlisting}[caption={List}]
\end{lstlisting}
\end{document}
答案1
listings
'中的縮排\lstlistoflistings
類似於標準類別中 LoF/LoT 的縮排。以下是以下內容的改編memoir
:
\documentclass{memoir}
\usepackage{listings}
\makeatletter
\renewcommand*{\l@lstlisting}{\@dottedtocline{1}{0em}{2.3em}}
\makeatother
\begin{document}
\listoftables
\lstlistoflistings
\chapter{The chapter}
\begin{table}[h]
\caption{Table}
\end{table}
\begin{lstlisting}[caption={List}]
\end{lstlisting}
\end{document}