使用 \usepackage{hanging} 时出错

使用 \usepackage{hanging} 时出错

我想制作如下的手动书目:在此处输入链接描述.(不要问我为什么不使用 bibtex 或 thebibliography)。

但每当我发表\usepackage{hanging}序言时,它都会显示错误:

TeX 容量超出,抱歉 [输入堆栈大小=5000]

段落中的 \hbox 过满(宽 4.84334pt)

\headhight 太小(12.0pt):至少设置为 14.49998pt。

但是,当我注释(使用“%”)或删除该包时,它恢复正常,没有错误。这意味着,挂起包有什么问题吗?

我尝试寻找重复的问题,我发现。其中一位回答者说包上有冲突。所以,我认为问题就是这样的。

无论如何,这是我的 MWE。无法显示整个文档,因为它有 58 页,我只会显示我的主要文档。

\documentclass[a4paper,12pt,oneside,openany]{book}
\usepackage{pgf, tikz}
\usepackage[a4paper, inner=4cm, outer=3cm, top=4cm, bottom=3cm]{geometry}
\usepackage{geometry}
\usepackage[onehalfspacing]{setspace}
\usepackage{fancyhdr}
\usepackage{titlesec}
\usepackage{setspace}
\usepackage[titles]{tocloft}
\usepackage{tocbibind}
\usepackage{indentfirst}
\usepackage{blindtext}
\usepackage{tocloft}
\usepackage{etoolbox}
\usepackage{enumitem}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage[utf8]{inputenc}
\usepackage{array}
\usepackage[column=O]{cellspace}
\usepackage{caption}
\usepackage{afterpage}
\usepackage{mathtools}
\usepackage{subcaption}
\usepackage{wrapfig}
\usepackage{cancel}
\usepackage{longtable}
\usepackage[indonesian]{babel}
    \addto{\captionsindonesian}{\renewcommand{\bibname}{DAFTAR PUSTAKA}}
\usepackage{lipsum}
\usepackage{pdflscape}
\usepackage{makecell} 
\usepackage{ragged2e}
\usepackage{hanging}

\newlist{ColEnum}{enumerate}{1}
\setlist[ColEnum,1]{label = \arabic*), left = 0pt, nosep, 
    before= {\begin{minipage}[t]{\hsize}\RaggedRight},
        after = {\end{minipage}}}
    
\usetikzlibrary{arrows.meta,
    chains,
    matrix,
    positioning,
    quotes,
    shapes.geometric}

\tikzset{FlowChart/.style = {
        base/.style = {draw, minimum width=32mm, minimum height=8mm,
            align=center},
        startstop/.style = {base, ellipse},
        process/.style = {base, rectangle},
        io/.style = {base, trapezium, trapezium stretches,
            trapezium left angle=70, trapezium right angle=110,
            fill=blue!30},
        decision/.style = {base, diamond, aspect=1.3, inner xsep=1pt},
        arr/.style = {-Stealth, semithick}
    }
}

\DeclareMathOperator{\Res}{Res}
\numberwithin{equation}{section}

\setlength{\cellspacetoplimit}{5pt}
\setlength{\cellspacebottomlimit}{4pt}

\theoremstyle{plain}
\newtheorem{thm}{Teorema}[section]
\newtheorem{cl}{Corollary}[section]
\newtheorem{lm}{Lemma}[section]

\theoremstyle{definition}
\newtheorem{defn}{Definisi}[section]
\newtheorem{exmp}{Contoh}
\renewcommand{\proofname}{\rm\bf{Bukti}}

\renewcommand\tablename{Tabel}
\renewcommand\figurename{Gambar}


\patchcmd{\section}{\bfseries}{\bfseries\boldmath}{}{}
\patchcmd{\tableofcontents}{\contentsname}{\MakeUppercase\contentsname}{}{}
\patchcmd{\listoffigures}{\listfigurename}{\MakeUppercase\listfigurename}{}{}
\patchcmd{\listoftables}{\listtablename}{\MakeUppercase\listtablename}{}{}
%\patchcmd{\bibliography}{\bibname}{\MakeUppercase\bibname}{}{}
\setlength{\cftbeforesecskip}{10pt}
\setlength{\cftbeforesubsecskip}{10pt}

\fancyhf{}
\cfoot{\thepage}
\linespread{1.5}
\pagestyle{plain}
\renewcommand\cftchapdotsep{\cftdotsep}
\titleformat{\chapter}[block]
    {\normalfont\bfseries\centering}
    {}{0pt}{}
\titleformat{\section}
    {\normalfont\bfseries}
    {\thesection}{1em}{}
\titleformat{\subsection}
    {\normalfont\bfseries}
    {\thesubsection}{1em}{}
\titlespacing*{\chapter}{0pt}{0pt}{20pt}
\titlespacing*{\section}{0pt}{0pt}{0pt}
\titlespacing*{\subsection}{0pt}{0pt}{0pt}

\renewcommand{\contentsname}{DAFTAR ISI}
\renewcommand{\listtablename}{DAFTAR TABEL}
\renewcommand{\listfigurename}{DAFTAR GAMBAR}
\newcommand\dd{\mathop{}\!\mathrm{d}}

%\addtocontents{toc}{\protect\null\protect\hfill{Halaman}\protect\par}
\setlength\parindent{1.25cm} 

\addtocontents{toc}{~\hfill{Halaman}\par}
\addtocontents{toc}{\protect\afterpage{~\hfill{Halaman}\par\medskip}}
\addtocontents{lot}{~\hfill{Halaman}\par}
\addtocontents{lof}{~\hfill{Halaman}\par}

\makeatletter
\def\ttl@mkchap@i#1#2#3#4#5#6#7{%
    \ttl@assign\@tempskipa#3\relax\beforetitleunit
    \vspace{\@tempskipa}%<<<<<< REMOVE THE * AFTER \vspace
    \global\@afterindenttrue
    \ifcase#5 \global\@afterindentfalse\fi
    \ttl@assign\@tempskipb#4\relax\aftertitleunit
    \ttl@topmode{\@tempskipb}{%
        \ttl@select{#6}{#1}{#2}{#7}}%
    \ttl@finmarks  % Outside the box!
    \@ifundefined{ttlp@#6}{}{\ttlp@write{#6}}}
\makeatother
\begin{document}

\clearpage
\thispagestyle{empty}
\include{cover1}
\frontmatter %

\pagestyle{fancy}   
\renewcommand{\headrulewidth}{0pt}
%\renewcommand{\arraystretch}{2.0}

\include{cover2}
\begin{spacing}{0.1}
    \tableofcontents
    
\end{spacing}
\begin{spacing}{1.5}
    \listoffigures
    \listoftables
\end{spacing}

\mainmatter 
\pagestyle{fancyplain}
\fancyhf{}
\fancyhead[R]{\thepage}
\renewcommand{\headrulewidth}{0pt}
\include{bab1}
\include{bab2}
\include{bab3}

\backmatter
%\include{dafpus}
\include{lampiran}


\end{document}

相关内容