我想更改我的回忆录类乳胶文档中的缩进
我试过
\usepackage{tocloft}
\setlength{\cftsecindent}{0pt}% Remove indent for \section
\setlength{\cftsubsecindent}{0pt}% Remove indent for \subsection
% \setlength{\cftsubsubsecindent}{0pt}% Remove indent for \subsubsection
但这会产生错误
kr.tex|37 error| Undefined control sequence. \cftsecindent \setlength{\cftsecindent}{0pt} % Remove indent for \section
kr.tex|37 error| LaTeX Error: Missing \begin{document}.
kr.tex|38 error| Undefined control sequence. \cftsubsecindent \setlength{\cftsubsecindent}{0pt} % Remove indent for \subsection (/usr/share/texmf-dist/tex/latex/ucs/ucsencs.def) ) [1{/var/lib/texmf/fonts/map/pdftex/updmap/p
答案1
不要使用tocloft
包含与memoir
ToC 等具有类似但不完全相同的操作方式的类的包。
% memtocprob.tex SE 606380
\documentclass{memoir}
\usepackage{comment}
\begin{comment}
\usepackage{tocloft}
\setlength{\cftsecindent}{0pt}% Remove indent for \section
\setlength{\cftsubsecindent}{0pt}% Remove indent for \subsection
% \setlength{\cftsubsubsecindent}{0pt}% Remove indent for \subsubsection
\end{comment}
\setlength{\cftsectionindent}{0pt}% Remove indent for \section
\setlength{\cftsubsectionindent}{0pt}% Remove indent for \subsection
\begin{document}
\tableofcontents
\chapter{A chapter}
\section{A section}
\subsection{A subsection}
\end{document}