![如何在内置目录中包含致谢?](https://linux22.com/image/437173/%E5%A6%82%E4%BD%95%E5%9C%A8%E5%86%85%E7%BD%AE%E7%9B%AE%E5%BD%95%E4%B8%AD%E5%8C%85%E5%90%AB%E8%87%B4%E8%B0%A2%EF%BC%9F.png)
这是我从一开始的文档:
\documentclass[11pt]{book}
\usepackage[utf8]{inputenc}
\usepackage[a4paper, margin=1in]{geometry}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{tikz-cd}
\usepackage{makecell}
\usepackage{mathtools}
\usepackage{commath}
\usepackage{bbm}
\usetikzlibrary{babel}
\usetikzlibrary{shapes.geometric}
\usepackage{amsmath,amsfonts,amssymb}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage{lipsum}
\usepackage{titlesec}
\usepackage{circledsteps}
\usepackage{ relsize, stackengine}
\usepackage[all,cmtip]{xy}
\usepackage[english]{babel}
\usepackage{xurl}
\usepackage[backend=biber,style=alphabetic,sorting=ynt]{biblatex}
\usepackage[nottoc,notlot,notlof]{tocbibind}
\usetikzlibrary{intersections}
\newtheorem{theorem}{Theorem}
\newtheorem{prop}{Proposition}
\newtheorem{definition}{Definition}[chapter]
\newtheorem{example}{Example}
\newtheorem{cor}{Corollary}
\newtheorem{question}{Question}
\usepackage[nottoc]{tocbibind} % For adding List of Tables and List of Figures to Table of Contents
\usepackage[titles]{tocloft}
\makeatletter
\def\ps@headings{%
\def\@oddfoot{\normalfont\hfil\thepage\hfil}%
\def\@evenfoot{\normalfont\hfil\thepage\hfil}}
\def\@evenhead{\hfil\slshape\leftmark}%
\def\@oddhead{{\slshape\rightmark}\hfil%
\let\@mkboth\markboth
\def\chaptermark##1{%
\markboth {\MakeUppercase{%
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\@chapapp\ \thechapter. \ %
\fi
\fi
##1}}{}}%
\def\sectionmark##1{%
\markright {\MakeUppercase{%
\ifnum \c@secnumdepth >\z@
\thesection. \ %
\fi
##1}}}}
\makeatother
\pagestyle{headings}% apply new definitions
\addbibresource{mybibliography.bib}
%\bibliography{references}
下面是我尝试向 toc 添加确认的代码部分:
\begin{document}
\pagenumbering{roman}
\setcounter{page}{2}
\renewcommand{\thesection}{\thechapter.\arabic{section}}
\newgeometry{top=1.75in, hmargin=1in ,bottom= 1.3 in}
\begin{center}
ACKNOWLEDGEMENTS
\end{center}
\vspace{1.5\baselineskip}
%\hspace{5pt}
\normalsize
\doublespacing
\setlength{\parindent}{.5 in}
\lipsum[1-2]
\vspace*{.5\baselineskip}\noindent\hspace{0.5\textwidth}Jacob A. Ryan
\newpage
\tableofcontents
\addcontentsline{toc}{chapter}{ACKNOWLEDGEMENT}
\end{document}
我遇到的问题是目录中致谢的页码不正确,致谢的实际页码是ii
在目录中写的iv
,实际上是目录最后一页的页码,有人可以帮我纠正这个问题吗?