论文页码错误

论文页码错误

在我正在撰写的论文报告中,简介紧接着目录出现。我不希望目录有页码,但希望阿拉伯数字从简介开始,并希望在目录中也出现相同的数字。但是,我没有得到想要的输出。页码一直从目录的最后一页(编号为 1)开始,简介的第一页编号为 2。

这是MWE:

\documentclass[12pt,a4paper,twoside]{report}
\makeatletter
% these two slashes-commands for continuous chapter numbering in parts of the document
\makeatother
\usepackage{titlesec}
\titleformat{\chapter}{\normalfont\huge}{\thechapter.}{20pt}{\huge\bf} %for chapter headings
\RequirePackage{etoolbox}
\usepackage{tikz-cd} % and in the above line to use commutative diagrams
\usepackage[toc,titletoc,title]{appendix}
\usepackage{tocloft}
\usepackage{blindtext}
% above three lines for appenices text to appear in Contents
\usepackage{amsfonts}
\usepackage[utf8]{inputenc}
\usepackage{amsthm}

\usepackage[toc]{appendix} % to make appendi appear in the table of contents


 \usepackage{bm} % to use bold font in math mode use \bm{ insert math mode text}


 \allowdisplaybreaks
 \usepackage{tikz-cd} % to draw commutative diagrams




 theoremstyle plain in the text
 \newtheorem{theorem}{Theorem}[chapter] 




\usepackage[english]{babel}

\usepackage{color}
\begin{document} 
\begin{titlepage}
   Some text

\end{titlepage}




\pagenumbering{gobble}
\newpage
\tableofcontents
\pagenumbering{gobble}
\addcontentsline{toc}{chapter}{Introduction} %to make introduction appear in toc

\pagenumbering{arabic}
\setcounter{page}{1}
\chapter*{Introduction}
Introduction goes here...
\end{document}

非常感谢任何能提供帮助的人!

答案1

首先,\pagenumbering将页码重新设置为 1,因此您不需要\setcounter{page}{1}

您缺少的部分是放在\clearpage目录之后,这样页码就不能应用于目录的最后一页。总结:

...
\tableofcontents
\clearpage % or \newpage, since there are no floats
\pagenumbering{arabic}
\chapter*{Introduction}
...

PS:我记得这个\pagestyle{gobble}技巧!

答案2

如果问题仅仅是一页的偏移,那么用\setcounter{page}{1}替换\setcounter{page}{0}

相关内容