![如何刪除清單中的縮排](https://rvso.com/image/254686/%E5%A6%82%E4%BD%95%E5%88%AA%E9%99%A4%E6%B8%85%E5%96%AE%E4%B8%AD%E7%9A%84%E7%B8%AE%E6%8E%92.png)
\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}