我阅读了链接上的描述(漂亮的目录)。但是,我遇到了很多错误。我的文件序言如下所示。我也不确定在哪里添加代码或修改上面链接中花哨的目录的代码。
\documentclass[11pt,a4paper,twoside]{report}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{amsmath}
%\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage[paperheight=24cm,paperwidth=17cm,left=2.5cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage{blindtext}
\usepackage{indentfirst}
\setlength\parindent{1cm}
\usepackage{ebgaramond,newtxmath,ebgaramond-maths}
% Adding box to the chapter
\usepackage{eso-pic,xcolor}
\definecolor{chapterthumbbg}{HTML}{6F7170}
\AddToShipoutPictureFG{%
\AtPageLowerLeft{%
\ifshowchapterthumb\ifodd\value{page}\else
\makebox[\paperwidth][r]{%
\raisebox{\dimexpr.5\paperheight-.5\height}{%
\setlength{\fboxsep}{\baselineskip}%
\colorbox{chapterthumbbg}{\textcolor{white}{\thechapter}}%
}%
}%
\fi\fi
}
}
\newif\ifshowchapterthumb
\begin{document}
\showchapterthumbfalse
%\input{Frontmatter/Title}
%\pagebreak
%\input{Frontmatter/committe}
%\pagebreak
%\input{Frontmatter/official_title}
%\pagebreak
%\input{Frontmatter/approvedby}
\tableofcontents
%\newpage
%\thispagestyle{empty}
%\mbox{}
\part{Part 1}
\showchapterthumbtrue
\include{Mainmatter/Chapter_1}
%\newpage
%\thispagestyle{empty}
%\mbox{}
\include{Mainmatter/Chapter_2}
\part{Part 2}
\include{Mainmatter/Chapter_3}
\end{document}
如果有人能帮助我,我将非常感激。
提前致谢。